summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Lance <stefan@lances.net>2015-07-21 10:03:46 -0500
committerStefan Lance <stefan@lances.net>2015-07-21 10:03:46 -0500
commite8401d10da808852c307c29c949b12b73d44aceb (patch)
tree950667fdd582b3fb2265c82226f38615c7569c92
parent0854c6e83785a097aaf59e7398d52f2b924ed94f (diff)
downloadbundler-e8401d10da808852c307c29c949b12b73d44aceb.tar.gz
Fix RuboCop style violations
-rw-r--r--lib/bundler/settings.rb10
-rw-r--r--spec/bundler/cli_spec.rb4
2 files changed, 6 insertions, 8 deletions
diff --git a/lib/bundler/settings.rb b/lib/bundler/settings.rb
index 0745709782..9a598eb213 100644
--- a/lib/bundler/settings.rb
+++ b/lib/bundler/settings.rb
@@ -6,16 +6,14 @@ module Bundler
NUMBER_KEYS = %w(retry timeout redirect).freeze
DEFAULT_CONFIG = {:retry => 3, :timeout => 10, :redirect => 5}
+ attr_reader :root
+
def initialize(root = nil)
@root = root
@local_config = load_config(local_config_file)
@global_config = load_config(global_config_file)
end
- def root
- @root
- end
-
def [](name)
key = key_for(name)
value = (@local_config[key] || ENV[key] || @global_config[key] || DEFAULT_CONFIG[name])
@@ -51,7 +49,7 @@ module Bundler
keys = @global_config.keys | @local_config.keys | env_keys
keys.map do |key|
- key.sub(/^BUNDLE_/, '').gsub(/__/, ".").downcase
+ key.sub(/^BUNDLE_/, "").gsub(/__/, ".").downcase
end
end
@@ -164,7 +162,7 @@ module Bundler
# all other absolute paths
install_path = set_path
else
- # all relative paths (configured by the user)
+ # all relative paths (configured by the user)
install_path = File.join(Bundler::root, set_path)
end
end
diff --git a/spec/bundler/cli_spec.rb b/spec/bundler/cli_spec.rb
index 4cb306c731..06933528f7 100644
--- a/spec/bundler/cli_spec.rb
+++ b/spec/bundler/cli_spec.rb
@@ -28,14 +28,14 @@ describe "bundle executable" do
it "prints help when ARGV is empty" do
bundle :help
help_output = out
- bundle ''
+ bundle ""
expect(out).to eq(help_output)
end
it "prints help when ARGV is empty" do
bundle :help
help_output = out
- bundle ''
+ bundle ""
expect(out).to eq(help_output)
end
end