Skip to content

Commit

Permalink
Update rubocop rules according to latest release.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed Mar 5, 2018
1 parent fbe02c4 commit 6f627f6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@ SingleLineBlockParams:
VariableInterpolation:
Enabled: false

Style/TrailingCommaInLiteral:
Style/TrailingCommaInArrayLiteral:
Enabled: false

Style/TrailingCommaInHashLiteral:
Enabled: false

WhileUntilModifier:
Enabled: false

Naming/UncommunicativeMethodParamName:
Enabled: false

PredicateName:
NamePrefixBlacklist:
- is_
Expand Down
12 changes: 12 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

#
# This file was generated by Bundler.
#
Expand All @@ -11,6 +12,17 @@ require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

bundle_binstub = File.expand_path("../bundle", __FILE__)

if File.file?(bundle_binstub)
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
load(bundle_binstub)
else
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
end
end

require "rubygems"
require "bundler/setup"

Expand Down
2 changes: 1 addition & 1 deletion lib/browser/browser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module Browser
EMPTY_STRING = "".freeze

def self.root
@root ||= Pathname.new(File.expand_path("../../..", __FILE__))
@root ||= Pathname.new(File.expand_path("../..", __dir__))
end

# Hold the list of browser matchers.
Expand Down
2 changes: 1 addition & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require "simplecov"
SimpleCov.start

ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", __FILE__)
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
require "bundler/setup"
require "minitest/autorun"
require "minitest/utils"
Expand Down

0 comments on commit 6f627f6

Please sign in to comment.