Skip to content

Commit

Permalink
update rubocop config, gemfile, gemfile.lock, json-each script, and g…
Browse files Browse the repository at this point in the history
…emspec
  • Loading branch information
dorianmariecom committed Aug 25, 2024
1 parent d916197 commit 9c7374c
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 20 deletions.
16 changes: 10 additions & 6 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ AllCops:
Exclude:
- node_modules/**/*
- vendor/**/*
Layout/SpaceInsideArrayLiteralBrackets:
Enabled: false
Performance/UnfreezeString:
Enabled: false
inherit_gem:
rubocop-rails-omakase: rubocop.yml
- "*/node_modules/**/*"
- "*/vendor/**/*"
require:
- rubocop-gemfile
- rubocop-rspec
- rubocop-rails
- rubocop-performance
- rubocop-rspec_rails
- rubocop-factory_bot
- rubocop-rake
11 changes: 10 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,13 @@ gemspec
ruby "3.3.4"

gem "rspec"
gem "rubocop-rails-omakase"

gem "bundler-audit", "~> 0.9.2"

gem "rubocop-factory_bot", "~> 2.26"
gem "rubocop-gemfile", "~> 0.1.0.beta3"
gem "rubocop-performance", "~> 1.21"
gem "rubocop-rails", "~> 2.26"
gem "rubocop-rake", "~> 0.6.0"
gem "rubocop-rspec", "~> 3.0"
gem "rubocop-rspec_rails", "~> 2.30"
33 changes: 24 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ GEM
ast (2.4.2)
base64 (0.2.0)
bigdecimal (3.1.8)
bundler-audit (0.9.2)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
diff-lcs (1.5.1)
Expand Down Expand Up @@ -72,9 +75,10 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.1)
parser (>= 3.3.1.0)
rubocop-minitest (0.35.1)
rubocop (>= 1.61, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-gemfile (0.1.0.beta3)
rubocop (>= 0.35.0)
rubocop-performance (1.21.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
Expand All @@ -83,26 +87,37 @@ GEM
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rails-omakase (1.0.0)
rubocop
rubocop-minitest
rubocop-performance
rubocop-rails
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (3.0.4)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-progressbar (1.13.0)
securerandom (0.3.1)
strscan (3.1.0)
thor (1.3.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)

PLATFORMS
arm64-darwin-23
ruby
x86_64-linux

DEPENDENCIES
bundler-audit (~> 0.9.2)
dorian-json-each!
rspec
rubocop-rails-omakase
rubocop-factory_bot (~> 2.26)
rubocop-gemfile (~> 0.1.0.beta3)
rubocop-performance (~> 1.21)
rubocop-rails (~> 2.26)
rubocop-rake (~> 0.6.0)
rubocop-rspec (~> 3.0)
rubocop-rspec_rails (~> 2.30)

RUBY VERSION
ruby 3.3.4p94
Expand Down
4 changes: 2 additions & 2 deletions bin/json-each
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ parsed = Dorian::Arguments.parse(version: { alias: :v }, help: { alias: :h })
abort parsed.help if parsed.options.help

if parsed.options.version
abort File.read(File.expand_path("../../VERSION", __FILE__))
abort File.read(File.expand_path("../VERSION", __dir__))
end

inputs = parsed.files.map { |file| File.read(file) }
Expand All @@ -20,5 +20,5 @@ inputs.each do |input|
JSON
.parse(input)
.to_deep_struct
.each { |it| eval(parsed.arguments.join(" ")) }
.each { |_it| eval(parsed.arguments.join(" ")) }
end
4 changes: 2 additions & 2 deletions dorian-json-each.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/dorianmariecom/dorian-json-each"
s.license = "MIT"
s.metadata = { "rubygems_mfa_required" => "true" }
s.add_dependency "json"
s.add_dependency "dorian-to_struct"
s.add_dependency "dorian-arguments"
s.add_dependency "dorian-to_struct"
s.add_dependency "json"
end

0 comments on commit 9c7374c

Please sign in to comment.