Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
chore: gems update
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgon committed Aug 12, 2020
1 parent dc91b17 commit 53e30e2
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 49 deletions.
5 changes: 0 additions & 5 deletions .overcommit.yml
Expand Up @@ -38,11 +38,6 @@ PreCommit:
enabled: true
LocalPathsInGemfile:
enabled: true
Mdl:
enabled: true
exclude:
- CHANGELOG.md
- .github/ISSUE_TEMPLATE.md
MergeConflicts:
enabled: true
RuboCop:
Expand Down
47 changes: 46 additions & 1 deletion .rubocop.yml
Expand Up @@ -11,27 +11,57 @@ Layout/LineLength:
Layout/SpaceAroundMethodCallOperator:
Enabled: true

Lint/BinaryOperatorWithIdenticalOperands:
Enabled: true

Lint/DeprecatedOpenSSLConstant:
Enabled: true

Lint/DuplicateElsifCondition:
Enabled: true

Lint/DuplicateRescueException:
Enabled: true

Lint/EmptyConditionalBody:
Enabled: true

Lint/FloatComparison:
Enabled: true

Lint/MissingSuper:
Enabled: true

Lint/MixedRegexpCaptureTypes:
Enabled: true

Lint/OutOfRangeRegexpRef:
Enabled: true

Lint/RaiseException:
Enabled: true

Lint/SelfAssignment:
Enabled: true

Lint/StructNewOverride:
Enabled: true

Lint/TopLevelReturnWithArgument:
Enabled: true

Lint/UnreachableLoop:
Enabled: true

Metrics/AbcSize:
Max: 25
Max: 30

Metrics/BlockLength:
Enabled: false

Metrics/PerceivedComplexity:
Max: 10

Performance/AncestorsInclude:
Enabled: true

Expand Down Expand Up @@ -71,9 +101,15 @@ Style/CaseLikeIf:
Style/Documentation:
Enabled: false

Style/ExplicitBlockArgument:
Enabled: true

Style/ExponentialNotation:
Enabled: true

Style/GlobalStdStream:
Enabled: true

Style/HashAsLastArrayItem:
Enabled: true

Expand All @@ -89,6 +125,9 @@ Style/HashTransformKeys:
Style/HashTransformValues:
Enabled: false

Style/OptionalBooleanParameter:
Enabled: true

Style/RedundantAssignment:
Enabled: true

Expand All @@ -104,9 +143,15 @@ Style/RedundantRegexpCharacterClass:
Style/RedundantRegexpEscape:
Enabled: true

Style/SingleArgumentDig:
Enabled: true

Style/SlicingWithRange:
Enabled: true

Style/StringConcatenation:
Enabled: true

AllCops:
TargetRubyVersion: 2.6
DisplayCopNames: true
Expand Down
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -8,7 +8,6 @@ group :lint do
gem 'coveralls'
gem 'fasterer'
gem 'foodcritic'
gem 'mdl'
gem 'overcommit'
gem 'rubocop'
gem 'rubocop-performance'
Expand Down
54 changes: 22 additions & 32 deletions Gemfile.lock
Expand Up @@ -27,7 +27,7 @@ GEM
ridley (~> 5.0)
solve (~> 4.0)
thor (~> 0.19, < 0.19.2)
brakeman (4.8.2)
brakeman (4.9.0)
buff-config (2.0.0)
buff-extensions (~> 2.0)
varia_model (~> 0.6)
Expand Down Expand Up @@ -92,7 +92,7 @@ GEM
childprocess (4.0.0)
cleanroom (1.0.0)
colorize (0.8.1)
concurrent-ruby (1.1.6)
concurrent-ruby (1.1.7)
coveralls (0.8.19)
json (>= 1.8, < 3)
simplecov (~> 0.12.0)
Expand All @@ -102,7 +102,6 @@ GEM
diff-lcs (1.4.4)
docile (1.1.5)
ed25519 (1.2.4)
equatable (0.6.1)
erubi (1.9.0)
erubis (2.7.0)
ethon (0.12.0)
Expand Down Expand Up @@ -143,16 +142,15 @@ GEM
highline (1.7.10)
hitimes (2.0.0)
httpclient (2.8.3)
i18n (1.8.4)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
iniparse (1.5.0)
ipaddress (0.8.3)
json (2.3.1)
kitchen-docker (2.10.0)
test-kitchen (>= 1.0.0)
kitchen-vagrant (1.6.1)
kitchen-vagrant (1.7.0)
test-kitchen (>= 1.4, < 3)
kramdown (1.17.0)
launchy (2.5.0)
addressable (~> 2.7)
libyajl2 (1.2.0)
Expand All @@ -165,10 +163,6 @@ GEM
logging (2.3.0)
little-plugger (~> 1.1)
multi_json (~> 1.14)
mdl (0.5.0)
kramdown (~> 1.12, >= 1.12.0)
mixlib-cli (~> 1.7, >= 1.7.0)
mixlib-config (~> 2.2, >= 2.2.1)
mini_portile2 (2.4.0)
minitar (0.9)
minitest (5.14.1)
Expand All @@ -188,7 +182,6 @@ GEM
molinillo (0.6.6)
multi_json (1.15.0)
multipart-post (2.1.1)
necromancer (0.5.1)
net-http-persistent (2.9.4)
net-http-pipeline (1.0.1)
net-scp (3.0.0)
Expand Down Expand Up @@ -227,8 +220,7 @@ GEM
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
pastel (0.7.4)
equatable (~> 0.6)
pastel (0.8.0)
tty-color (~> 0.5)
plist (3.5.0)
polyglot (0.3.5)
Expand Down Expand Up @@ -280,17 +272,17 @@ GEM
rspec_junit_formatter (0.2.3)
builder (< 4)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.88.0)
rubocop (0.89.1)
parallel (~> 1.10)
parser (>= 2.7.1.1)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.7)
rexml
rubocop-ast (>= 0.1.0, < 1.0)
rubocop-ast (>= 0.3.0, < 1.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-ast (0.2.0)
parser (>= 2.7.0.1)
rubocop-ast (0.3.0)
parser (>= 2.7.1.4)
rubocop-performance (1.7.1)
rubocop (>= 0.82.0)
ruby-progressbar (1.10.1)
Expand Down Expand Up @@ -323,8 +315,8 @@ GEM
net-ssh (>= 2.7)
net-telnet (= 0.1.1)
sfl
strings (0.1.8)
strings-ansi (~> 0.1)
strings (0.2.0)
strings-ansi (~> 0.2)
unicode-display_width (~> 1.5)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
Expand All @@ -333,7 +325,7 @@ GEM
systemu (2.6.5)
term-ansicolor (1.7.1)
tins (~> 1.0)
test-kitchen (2.5.3)
test-kitchen (2.5.4)
bcrypt_pbkdf (~> 1.0)
ed25519 (~> 1.2)
license-acceptance (~> 1.0, >= 1.0.11)
Expand Down Expand Up @@ -364,20 +356,19 @@ GEM
typhoeus (~> 0.6, >= 0.6.8)
treetop (1.6.10)
polyglot (~> 0.3)
tty-box (0.5.0)
pastel (~> 0.7.2)
strings (~> 0.1.6)
tty-box (0.6.0)
pastel (~> 0.8)
strings (~> 0.2.0)
tty-cursor (~> 0.7)
tty-color (0.5.1)
tty-color (0.5.2)
tty-cursor (0.7.1)
tty-prompt (0.21.0)
necromancer (~> 0.5.0)
pastel (~> 0.7.0)
tty-reader (~> 0.7.0)
tty-reader (0.7.0)
tty-prompt (0.22.0)
pastel (~> 0.8)
tty-reader (~> 0.8)
tty-reader (0.8.0)
tty-cursor (~> 0.7)
tty-screen (~> 0.7)
wisper (~> 2.0.0)
tty-screen (~> 0.8)
wisper (~> 2.0)
tty-screen (0.8.1)
typhoeus (0.8.0)
ethon (>= 0.8.0)
Expand Down Expand Up @@ -426,7 +417,6 @@ DEPENDENCIES
foodcritic
kitchen-docker
kitchen-vagrant
mdl
overcommit
rspec
rubocop
Expand Down
2 changes: 0 additions & 2 deletions libraries/drivers_appserver_base.rb
Expand Up @@ -53,7 +53,6 @@ def manual_action(action)
end
end

# rubocop:disable Metrics/AbcSize
def add_appserver_config
opts = { deploy_dir: deploy_dir(app), out: out, deploy_env: deploy_env,
webserver: Drivers::Webserver::Factory.build(context, app).adapter,
Expand All @@ -67,7 +66,6 @@ def add_appserver_config
variables opts
end
end
# rubocop:enable Metrics/AbcSize

def add_appserver_service_script
opts = { deploy_dir: deploy_dir(app), app_shortname: app['shortname'], name: adapter, environment: environment,
Expand Down
2 changes: 0 additions & 2 deletions libraries/drivers_db_base.rb
Expand Up @@ -17,7 +17,6 @@ def setup
handle_packages
end

# rubocop:disable Metrics/AbcSize:
def out
return out_defaults if multiple_databases?
return out_node_engine if configuration_data_source == :node_engine
Expand All @@ -28,7 +27,6 @@ def out
database: app['data_sources'].first.try(:[], 'database_name')
).reject { |_k, v| v.blank? }
end
# rubocop:enable Metrics/AbcSize:

def out_node_engine
out_defaults.merge(
Expand Down
2 changes: 2 additions & 0 deletions libraries/drivers_framework_rails.rb
Expand Up @@ -55,9 +55,11 @@ def setup_rails_console

return unless File.exist?(application_rb_path)

# rubocop:disable Style/StringConcatenation
env_code = "if(defined?(Rails::Console))\n " +
environment.map { |key, value| "ENV['#{key}'] = #{value.inspect}" }.join("\n ") +
"\nend\n"
# rubocop:enable Style/StringConcatenation

contents = File.read(application_rb_path).sub(/(^(?:module|class).*$)/, "#{env_code}\n\\1")

Expand Down
2 changes: 1 addition & 1 deletion libraries/drivers_worker_base.rb
Expand Up @@ -14,7 +14,7 @@ def validate_app_engine; end

protected

def add_worker_monit # rubocop:disable Metrics/AbcSize
def add_worker_monit
opts = { application: app['shortname'], name: app['name'], out: out, deploy_to: deploy_dir(app),
environment: environment, adapter: adapter, app_shortname: app['shortname'] }

Expand Down
6 changes: 2 additions & 4 deletions libraries/helpers.rb
Expand Up @@ -87,11 +87,9 @@ def every_enabled_application
end
end

def every_enabled_rds(context, application)
def every_enabled_rds(context, application, &block)
data = [rdses.presence, Drivers::Db::Factory.build(context, application)].flatten.compact
data.each do |rds|
yield rds
end
data.each(&block)
end

def perform_bundle_install(shared_path, envs = {})
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/node.rb
Expand Up @@ -104,7 +104,7 @@
}
}.freeze

def node(override = {}, deep_merge = false)
def node(override = {}, deep_merge = false) # rubocop:disable Style/OptionalBooleanParameter
item =
if deep_merge
RubyOpsworksTests::DeepMergeableHash.new(DEFAULT_NODE).deep_merge(override)
Expand Down

0 comments on commit 53e30e2

Please sign in to comment.