breadboard 1.1.0.rc3 → 1.1.0.rc4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/breadboard/active_resource.rb +1 -1
- data/lib/breadboard/environment.rb +9 -3
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.0.
|
1
|
+
1.1.0.rc4
|
@@ -4,7 +4,7 @@ module ActiveResource
|
|
4
4
|
class_eval do
|
5
5
|
%w(site user password).each do |attr|
|
6
6
|
define_method "#{attr}_with_breadboard" do
|
7
|
-
|
7
|
+
instance_variable_get("@#{attr}") || begin
|
8
8
|
setting = Breadboard.service_for(self)
|
9
9
|
setting.kind_of?(Breadboard::Config::EnvConfig) ? setting.send(attr) : setting
|
10
10
|
end
|
@@ -5,11 +5,17 @@ module Breadboard
|
|
5
5
|
@environments = {}
|
6
6
|
end
|
7
7
|
|
8
|
-
def test(url=nil)
|
8
|
+
def test(url=nil, &block)
|
9
9
|
return @environments[:test] if url.nil?
|
10
|
-
@environments[:test]
|
11
|
-
end
|
10
|
+
@environments[:test] ||= EnvConfig.new
|
12
11
|
|
12
|
+
if block_given?
|
13
|
+
@environments[:test].instance_eval block
|
14
|
+
else
|
15
|
+
@environments[:test].site URI.parse(url)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
13
19
|
def method_missing(method_name, *args, &block)
|
14
20
|
if block_given?
|
15
21
|
@environments[method_name] ||= EnvConfig.new
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: breadboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 15424045
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 1
|
9
9
|
- 0
|
10
10
|
- rc
|
11
|
-
-
|
12
|
-
version: 1.1.0.
|
11
|
+
- 4
|
12
|
+
version: 1.1.0.rc4
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Matt Parker
|