Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up approx 20% of the rubocop issues in aruba #654

Merged
merged 9 commits into from
Jul 19, 2019
Prev Previous commit
Next Next commit
When using expand path, use a slightly cleaner reference according to…
… rubocop
  • Loading branch information
luke-hill committed Jul 1, 2019
commit 9359aa5d139dcc2976187e4bd36196e1c9f24f84
2 changes: 1 addition & 1 deletion bin/console
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby

$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)

require 'aruba/console'

Expand Down
2 changes: 1 addition & 1 deletion exe/aruba
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby

$LOAD_PATH << File.expand_path('../../lib', __FILE__)
$LOAD_PATH << File.expand_path('../lib', __dir__)

require 'aruba/cli'

Expand Down
2 changes: 1 addition & 1 deletion features/support/env.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$LOAD_PATH.unshift File.expand_path('../../../lib', __FILE__)
$LOAD_PATH.unshift File.expand_path('../../lib', __dir__)

# Has to be the first file required so that all other files show coverage information
require 'simplecov'
Expand Down
2 changes: 1 addition & 1 deletion features/support/simplecov_setup.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# @note this file is loaded in env.rb to setup simplecov using RUBYOPTs for child processes and @in-process
require 'simplecov'

root = File.expand_path('../../../', __FILE__)
root = File.expand_path('../..', __dir__)

SimpleCov.command_name(ENV['SIMPLECOV_COMMAND_NAME'])
SimpleCov.root(root)
Expand Down
2 changes: 1 addition & 1 deletion fixtures/cli-app/bin/aruba-test-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby

$LOAD_PATH << File.expand_path('../../lib', __FILE__)
$LOAD_PATH << File.expand_path('../lib', __dir__)
require 'cli/app'

exit 0
2 changes: 1 addition & 1 deletion fixtures/cli-app/cli-app.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cli/app/version'

Expand Down
2 changes: 1 addition & 1 deletion fixtures/cli-app/lib/cli/app.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require 'cli/app/version'

::Dir.glob(File.expand_path('../**/*.rb', __FILE__)).each { |f| require_relative f }
::Dir.glob(File.expand_path('**/*.rb', __dir__)).each { |f| require_relative f }

module Cli
module App
Expand Down
2 changes: 1 addition & 1 deletion fixtures/cli-app/spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
$LOAD_PATH.unshift File.expand_path('../lib', __dir__)

require 'cli/app'

Expand Down
2 changes: 1 addition & 1 deletion fixtures/empty-app/cli-app.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib = File.expand_path('../lib', __FILE__)
lib = File.expand_path('lib', __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'cli/app/version'

Expand Down