File tree Expand file tree Collapse file tree 8 files changed +58
-34
lines changed Expand file tree Collapse file tree 8 files changed +58
-34
lines changed Original file line number Diff line number Diff line change 1- AllCops :
2-   TargetRubyVersion : 3.0 
1+ require :
2+   - standard 
3+   - rubocop-rspec 
4+   - rubocop-rake 
5+   - rubocop-performance 
36
4- Style/StringLiterals :
5-   EnforcedStyle :  double_quotes 
7+ inherit_gem :
8+   standard :  config/base.yml 
69
7- Style/StringLiteralsInInterpolation :
8-   EnforcedStyle : double_quotes 
10+ AllCops :
11+   NewCops : enable 
12+   TargetRubyVersion : 3.0 
913
10- Style/Documentation :
14+ RSpec/MultipleExpectations :
1115  Enabled : false 
1216
13- Metrics :
14-   Exclude :
15-     - ' test/test_*.rb' 
17+ RSpec/ExampleLength :
18+   Max : 25 
Original file line number Diff line number Diff line change 1818      reline  (>=  0.4.2 )
1919    json  (2.7.2 )
2020    language_server-protocol  (3.17.0.3 )
21+     lint_roller  (1.1.0 )
2122    mini_portile2  (2.8.8 )
2223    parallel  (1.26.3 )
2324    parser  (3.3.5.0 )
6061      unicode-display_width  (>=  2.4.0 , <  3.0 )
6162    rubocop-ast  (1.32.3 )
6263      parser  (>=  3.3.1.0 )
64+     rubocop-performance  (1.23.1 )
65+       rubocop  (>=  1.48.1 , <  2.0 )
66+       rubocop-ast  (>=  1.31.1 , <  2.0 )
67+     rubocop-rake  (0.6.0 )
68+       rubocop  (~>  1.0 )
69+     rubocop-rspec  (3.4.0 )
70+       rubocop  (~>  1.61 )
6371    ruby-progressbar  (1.13.0 )
6472    sqlite3  (2.4.0 )
6573      mini_portile2  (~>  2.8.0 )
74+     standard  (1.35.0.1 )
75+       language_server-protocol  (~>  3.17.0.2 )
76+       lint_roller  (~>  1.0 )
77+       rubocop  (~>  1.62 )
78+       standard-custom  (~>  1.0.0 )
79+       standard-performance  (~>  1.3 )
80+     standard-custom  (1.0.2 )
81+       lint_roller  (~>  1.0 )
82+       rubocop  (~>  1.50 )
83+     standard-performance  (1.6.0 )
84+       lint_roller  (~>  1.1 )
85+       rubocop-performance  (~>  1.23.0 )
6686    stringio  (3.1.1 )
6787    unicode-display_width  (2.6.0 )
6888
@@ -74,8 +94,11 @@ DEPENDENCIES
7494  rake 
7595  rake-compiler 
7696  rspec 
77-   rubocop 
97+   rubocop-performance 
98+   rubocop-rake 
99+   rubocop-rspec 
78100  sqlite_extensions-uuid !
101+   standard 
79102
80103BUNDLED WITH 
81104   2.5.21 
Original file line number Diff line number Diff line change @@ -9,15 +9,12 @@ RuboCop::RakeTask.new
99require  "rspec/core/rake_task" 
1010RSpec ::Core ::RakeTask . new ( :spec ) 
1111
12- task  build : :compile 
13- 
14- GEMSPEC  =  Gem ::Specification . load ( Dir . glob ( "*.gemspec" ) . first ) 
15- 
16- Rake ::ExtensionTask . new ( "sqlite_extensions/uuid" ,  GEMSPEC )  do  |ext |
12+ Rake ::ExtensionTask . new ( "sqlite_extensions/uuid" )  do  |ext |
1713  ext . name  =  "uuid" 
1814  ext . lib_dir  =  "lib/sqlite_extensions/uuid" 
1915end 
2016
17+ desc  "Update vendored SQLite files" 
2118task  :update  do 
2219  sh  "wget https://sqlite.org/2024/sqlite-autoconf-3460100.tar.gz" 
2320  sh  "tar xvf sqlite-autoconf-3460100.tar.gz" 
@@ -28,6 +25,7 @@ task :update do
2825  sh  "mv -v ./uuid.c ext/sqlite_extensions/uuid/" 
2926end 
3027
28+ desc  "Run specs" 
3129task  spec : :compile 
3230
3331task  default : %i[ clobber  compile  spec  rubocop ] 
Original file line number Diff line number Diff line change 1+ require  "sqlite_extensions/uuid" 
Original file line number Diff line number Diff line change 66  config . order  =  :random 
77  Kernel . srand  config . seed 
88end 
9+ 
10+ require  "sqlite_extensions-uuid" 
Original file line number Diff line number Diff line change 11# frozen_string_literal: true 
22
3- require  "sqlite_extensions/uuid" 
4- 
5- # NOTE: `sqlite3` isn't required by our gem, but we need it for these tests. 
3+ # not required by our gem, but needed for these tests 
64require  "sqlite3" 
75
8- RSpec . describe  "Sqlite3 usage"  do 
6+ RSpec . describe  "Sqlite3 usage"  do   # rubocop:disable RSpec/DescribeClass 
97  before  do 
10-     gemspec  =  instance_double ( Gem ::Specification ,  require_path : File . join ( __dir__ ,  "../lib" ) ) 
8+     gemspec  =  instance_double ( 
9+       Gem ::Specification , 
10+       require_path : File . join ( __dir__ ,  "../../lib" ) 
11+     ) 
1112    allow ( Gem ) . to  receive ( :loaded_specs ) . and_return ( "sqlite_extensions-uuid"  =>  gemspec ) 
1213  end 
1314
Original file line number Diff line number Diff line change 11# frozen_string_literal: true 
22
3- require  "sqlite_extensions/uuid" 
4- 
5- RSpec . describe  SqliteExtensions ::UUID  do  # rubocop:disable Metrics/BlockLength 
3+ RSpec . describe  SqliteExtensions ::UUID  do 
64  it  "has a version"  do 
75    expect ( described_class ::VERSION ) . to  eq  "1.0.1" 
86  end 
1412    end 
1513
1614    it  "returns the path to the compiled extension"  do 
17-       path  =  SqliteExtensions :: UUID . to_path 
15+       path  =  described_class . to_path 
1816
1917      expect ( path ) . to  eq  "foo/sqlite_extensions/uuid/uuid" 
2018    end 
2119  end 
2220
2321  it  "has the correct gemspec info"  do 
24-     path  =  File . expand_path ( "../sqlite_extensions-uuid.gemspec" ,  __dir__ ) 
22+     path  =  File . expand_path ( "../../ sqlite_extensions-uuid.gemspec" ,  __dir__ ) 
2523    gemspec  =  Gem ::Specification . load  path 
2624
2725    expect ( gemspec ) . to  have_attributes ( 
3230        ext/sqlite_extensions/uuid/sqlite3.h 
3331        ext/sqlite_extensions/uuid/sqlite3ext.h 
3432        ext/sqlite_extensions/uuid/uuid.c 
33+         lib/sqlite_extensions-uuid.rb 
3534        lib/sqlite_extensions/uuid.rb 
3635        lib/sqlite_extensions/uuid/version.rb 
3736      ] , 
Original file line number Diff line number Diff line change @@ -13,13 +13,7 @@ Gem::Specification.new do |spec|
1313  spec . license  =  "MIT" 
1414  spec . required_ruby_version  =  ">= 3.0.0" 
1515
16-   spec . files  =  %w[ 
17-     lib/sqlite_extensions/uuid.rb 
18-     lib/sqlite_extensions/uuid/version.rb 
19-     ext/sqlite_extensions/uuid/sqlite3ext.h 
20-     ext/sqlite_extensions/uuid/sqlite3.h 
21-     ext/sqlite_extensions/uuid/uuid.c 
22-   ] 
16+   spec . files  =  Dir . glob ( "lib/**/*.rb" )  + Dir . glob ( "ext/**/*.{c,h}" ) 
2317  spec . require_paths  =  [ "lib" ] 
2418  spec . extensions  =  [ "ext/sqlite_extensions/uuid/extconf.rb" ] 
2519
@@ -29,5 +23,8 @@ Gem::Specification.new do |spec|
2923  spec . add_development_dependency  "rake" 
3024  spec . add_development_dependency  "rake-compiler" 
3125  spec . add_development_dependency  "rspec" 
32-   spec . add_development_dependency  "rubocop" 
26+   spec . add_development_dependency  "standard" 
27+   spec . add_development_dependency  "rubocop-rake" 
28+   spec . add_development_dependency  "rubocop-rspec" 
29+   spec . add_development_dependency  "rubocop-performance" 
3330end 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments