Skip to content

Commit

Permalink
Update gems and RuboCop config
Browse files Browse the repository at this point in the history
  • Loading branch information
miharekar committed Nov 11, 2023
1 parent d385e62 commit 1464783
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 88 deletions.
51 changes: 24 additions & 27 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
require:
- standard
- standard-custom
- standard-performance
- rubocop-performance
- rubocop-rails
---

inherit_gem:
standard: config/base.yml
standard-performance: config/base.yml
standard-custom: config/base.yml
standard-rails: config/base.yml

require:
- standard
- standard-custom
- standard-performance
- rubocop-performance
- rubocop-rails

AllCops:
NewCops: enable
TargetRubyVersion: 3.2
Expand All @@ -21,30 +23,10 @@ AllCops:
Bundler/OrderedGems:
Enabled: true

Layout/EmptyLineAfterGuardClause:
Enabled: true

Layout/ClassStructure:
Enabled: true

Style/Send:
Enabled: true

Style/HashSyntax:
Enabled: true
EnforcedStyle: ruby19_no_mixed_keys
EnforcedShorthandSyntax: always

Style/FrozenStringLiteralComment:
Enabled: true

Style/SymbolArray:
Enabled: true

Style/WordArray:
Enabled: true

Style/IfUnlessModifier:
Layout/EmptyLineAfterGuardClause:
Enabled: true

Performance/AncestorsInclude:
Expand Down Expand Up @@ -97,3 +79,18 @@ Performance/Sum:

Performance/TimesMap:
Enabled: true

Style/FrozenStringLiteralComment:
Enabled: true

Style/IfUnlessModifier:
Enabled: true

Style/Send:
Enabled: true

Style/SymbolArray:
Enabled: true

Style/WordArray:
Enabled: true
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ group :development do
gem "brakeman"
gem "letter_opener"
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false
gem "standard", require: false
gem "standard-performance", require: false
gem "standard-rails", require: false
gem "web-console"
end
Expand Down
116 changes: 58 additions & 58 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,73 +15,74 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
actioncable (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
actionmailbox (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.1)
actionpack (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activesupport (= 7.1.1)
actionmailer (7.1.2)
actionpack (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activesupport (= 7.1.2)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.1)
actionview (= 7.1.1)
activesupport (= 7.1.1)
actionpack (7.1.2)
actionview (= 7.1.2)
activesupport (= 7.1.2)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.1)
actionpack (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
actiontext (7.1.2)
actionpack (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.1)
activesupport (= 7.1.1)
actionview (7.1.2)
activesupport (= 7.1.2)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
active_link_to (1.0.5)
actionpack
addressable
activejob (7.1.1)
activesupport (= 7.1.1)
activejob (7.1.2)
activesupport (= 7.1.2)
globalid (>= 0.3.6)
activemodel (7.1.1)
activesupport (= 7.1.1)
activerecord (7.1.1)
activemodel (= 7.1.1)
activesupport (= 7.1.1)
activemodel (7.1.2)
activesupport (= 7.1.2)
activerecord (7.1.2)
activemodel (= 7.1.2)
activesupport (= 7.1.2)
timeout (>= 0.4.0)
activestorage (7.1.1)
actionpack (= 7.1.1)
activejob (= 7.1.1)
activerecord (= 7.1.1)
activesupport (= 7.1.1)
activestorage (7.1.2)
actionpack (= 7.1.2)
activejob (= 7.1.2)
activerecord (= 7.1.2)
activesupport (= 7.1.2)
marcel (~> 1.0)
activesupport (7.1.1)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand Down Expand Up @@ -197,7 +198,7 @@ GEM
activesupport (>= 6.0.0)
railties (>= 6.0.0)
io-console (0.6.0)
irb (1.8.3)
irb (1.9.0)
rdoc
reline (>= 0.3.8)
jmespath (1.6.2)
Expand Down Expand Up @@ -321,30 +322,30 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.1)
actioncable (= 7.1.1)
actionmailbox (= 7.1.1)
actionmailer (= 7.1.1)
actionpack (= 7.1.1)
actiontext (= 7.1.1)
actionview (= 7.1.1)
activejob (= 7.1.1)
activemodel (= 7.1.1)
activerecord (= 7.1.1)
activestorage (= 7.1.1)
activesupport (= 7.1.1)
rails (7.1.2)
actioncable (= 7.1.2)
actionmailbox (= 7.1.2)
actionmailer (= 7.1.2)
actionpack (= 7.1.2)
actiontext (= 7.1.2)
actionview (= 7.1.2)
activejob (= 7.1.2)
activemodel (= 7.1.2)
activerecord (= 7.1.2)
activestorage (= 7.1.2)
activesupport (= 7.1.2)
bundler (>= 1.15.0)
railties (= 7.1.1)
railties (= 7.1.2)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.1)
actionpack (= 7.1.1)
activesupport (= 7.1.1)
railties (7.1.2)
actionpack (= 7.1.2)
activesupport (= 7.1.2)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down Expand Up @@ -411,7 +412,7 @@ GEM
rufus-scheduler (~> 3.2)
sidekiq (>= 6, < 8)
tilt (>= 1.4.0)
slim (5.1.1)
slim (5.2.0)
temple (~> 0.10.0)
tilt (>= 2.1.0)
snaky_hash (2.0.1)
Expand Down Expand Up @@ -457,7 +458,7 @@ GEM
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.8.2)
unf_ext (0.0.9)
unicode-display_width (2.5.0)
version_gem (1.1.3)
warden (1.2.9)
Expand Down Expand Up @@ -519,13 +520,12 @@ DEPENDENCIES
redis
responders
rubocop
rubocop-performance
rubocop-rails
sidekiq
sidekiq-scheduler
slim
stackprof
standard
standard-performance
standard-rails
stimulus-rails
stripe
Expand Down
2 changes: 1 addition & 1 deletion test/models/shot_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def new_shot(path)
assert_equal %w[espresso_flow espresso_flow_weight espresso_weight], shot.information.data.keys.sort
assert_equal 1366, shot.information.data["espresso_weight"].size
assert_equal 10, shot.information.extra.keys.size
assert shot.information.data["espresso_flow_weight"].all? { |v| v >= 0 rescue puts "error: #{v}" }
assert shot.information.data["espresso_flow_weight"].all? { |v| v >= 0 }
end

test "extracts correct weight from beanconqueror file" do
Expand Down

0 comments on commit 1464783

Please sign in to comment.