cluster-fuck 0.1.4 → 0.1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cluster-fuck/reader.rb +1 -1
- data/lib/cluster-fuck/version.rb +1 -1
- data/spec/lib/cluster-fuck/reader_spec.rb +1 -0
- data/spec/spec_helper.rb +2 -1
- metadata +1 -1
data/lib/cluster-fuck/reader.rb
CHANGED
@@ -14,7 +14,7 @@ module ClusterFuck
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def set_amicus_env_to_shared_unless_key_found!
|
17
|
-
unless stored_object.exists?
|
17
|
+
unless has_local_override? or stored_object.exists?
|
18
18
|
original_amicus_env = @amicus_env
|
19
19
|
@amicus_env = SHARED_ENV
|
20
20
|
raise KeyDoesNotExistError, "there was no #{key} in either #{original_amicus_env} or #{SHARED_ENV}" unless stored_object(true).exists?
|
data/lib/cluster-fuck/version.rb
CHANGED
@@ -18,6 +18,7 @@ module ClusterFuck
|
|
18
18
|
let(:local_path) { "cluster-fuck/#{amicus_env}/#{key}" }
|
19
19
|
|
20
20
|
before do
|
21
|
+
reader.send(:stored_object).should_not_receive(:exists?) #shouldn't even check for existence on the network
|
21
22
|
File.should_receive(:exists?).at_least(1).times.with(local_path).and_return(true)
|
22
23
|
File.stub(:read).with(local_path).and_return(local_yaml)
|
23
24
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
Dir["spec/support/**/*.rb"].each {|f| require File.expand_path(f)}
|
3
|
+
|
2
4
|
require 'pry'
|
3
5
|
require 'cluster-fuck'
|
4
6
|
|
5
|
-
Dir["spec/support/**/*.rb"].each {|f| require File.expand_path(f)}
|
6
7
|
|
7
8
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
8
9
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|