breadboard 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/features/step_definitions/active_resource_steps.rb +3 -3
- data/lib/breadboard/breadboard.rb +12 -2
- data/lib/breadboard/environment.rb +2 -2
- metadata +57 -72
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -137,15 +137,15 @@ Given /^my Rails environment is "([^"]*)"$/ do |environment|
|
|
137
137
|
end
|
138
138
|
|
139
139
|
Then /^I should recieve the value configured in the Breadboard "([^"]*)" environment settings for that model$/ do |environment|
|
140
|
-
NoSiteAttribute.site.should == Breadboard.config.NoSiteAttribute.send(environment.to_sym)
|
140
|
+
NoSiteAttribute.site.to_s.should == Breadboard.config.NoSiteAttribute.send(environment.to_sym)
|
141
141
|
end
|
142
142
|
|
143
143
|
Then /^I should recieve the value configured in the Breadboard "([^"]*)" environment settings for the ancestor of that model$/ do |environment|
|
144
|
-
NoSiteAttribute.site.should == Breadboard.config.Parent.send(environment.to_sym)
|
144
|
+
NoSiteAttribute.site.to_s.should == Breadboard.config.Parent.send(environment.to_sym)
|
145
145
|
end
|
146
146
|
|
147
147
|
Then /^I should recieve the value configured in the Breadboard "([^"]*)" environment settings in the breadboard defaults section$/ do |environment|
|
148
|
-
NoSiteAttribute.site.should == Breadboard.config.default.send(environment.to_sym)
|
148
|
+
NoSiteAttribute.site.to_s.should == Breadboard.config.default.send(environment.to_sym)
|
149
149
|
end
|
150
150
|
|
151
151
|
Then /^ActiveResource should ignore more generic configurations in Breadboard$/ do
|
@@ -19,9 +19,19 @@ module Breadboard
|
|
19
19
|
model_superclass_chain.each do |klass|
|
20
20
|
klass_symbol = klass.to_s.to_sym
|
21
21
|
site = config.send(klass_symbol).send(environment) || config.send(klass_symbol).send(:all)
|
22
|
-
|
22
|
+
if site
|
23
|
+
site = site.call if site.respond_to? :call
|
24
|
+
site = URI.parse site
|
25
|
+
return site
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
site = config.default.send(environment) || config.default.send(:all)
|
30
|
+
if site
|
31
|
+
site = site.call if site.respond_to? :call
|
32
|
+
site = URI.parse site
|
33
|
+
return site
|
23
34
|
end
|
24
|
-
return config.default.send(environment) || config.default.send(:all)
|
25
35
|
end
|
26
36
|
|
27
37
|
def reset
|
@@ -7,12 +7,12 @@ module Breadboard
|
|
7
7
|
|
8
8
|
def test(url=nil)
|
9
9
|
return @environments[:test] if url.nil?
|
10
|
-
@environments[:test] =
|
10
|
+
@environments[:test] = url
|
11
11
|
end
|
12
12
|
|
13
13
|
def method_missing(method_name, *args, &block)
|
14
14
|
return @environments[method_name] if args.length == 0
|
15
|
-
@environments[method_name] =
|
15
|
+
@environments[method_name] = args.first
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
metadata
CHANGED
@@ -1,78 +1,72 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: breadboard
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
version: 1.0.0
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Matt Parker
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-04-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: activeresource
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 3
|
31
|
-
- 0
|
32
|
-
version: "3.0"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '3.0'
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: cucumber
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
25
|
none: false
|
40
|
-
requirements:
|
26
|
+
requirements:
|
41
27
|
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '3.0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: cucumber
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
48
37
|
version: 0.10.0
|
49
38
|
type: :development
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rspec
|
53
39
|
prerelease: false
|
54
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: 0.10.0
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
55
49
|
none: false
|
56
|
-
requirements:
|
50
|
+
requirements:
|
57
51
|
- - ~>
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
hash: 31
|
60
|
-
segments:
|
61
|
-
- 2
|
62
|
-
- 4
|
63
|
-
- 0
|
52
|
+
- !ruby/object:Gem::Version
|
64
53
|
version: 2.4.0
|
65
54
|
type: :development
|
66
|
-
|
67
|
-
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.4.0
|
62
|
+
description: ! 'Breadboard allows you to define what services your ActiveResource
|
63
|
+
derived classes connect to based on your rails environment. '
|
68
64
|
email: moonmaster9000@gmail.com
|
69
65
|
executables: []
|
70
|
-
|
71
66
|
extensions: []
|
72
|
-
|
73
|
-
extra_rdoc_files:
|
67
|
+
extra_rdoc_files:
|
74
68
|
- readme.md
|
75
|
-
files:
|
69
|
+
files:
|
76
70
|
- .gitignore
|
77
71
|
- .rvmrc
|
78
72
|
- CHANGELOG
|
@@ -97,38 +91,29 @@ files:
|
|
97
91
|
- readme.md
|
98
92
|
homepage: http://github.com/moonmaster9000/breadboard
|
99
93
|
licenses: []
|
100
|
-
|
101
94
|
post_install_message:
|
102
95
|
rdoc_options: []
|
103
|
-
|
104
|
-
require_paths:
|
96
|
+
require_paths:
|
105
97
|
- lib
|
106
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
107
99
|
none: false
|
108
|
-
requirements:
|
109
|
-
- -
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
|
112
|
-
|
113
|
-
- 0
|
114
|
-
version: "0"
|
115
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ! '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
105
|
none: false
|
117
|
-
requirements:
|
118
|
-
- -
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
|
121
|
-
segments:
|
122
|
-
- 0
|
123
|
-
version: "0"
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
124
110
|
requirements: []
|
125
|
-
|
126
111
|
rubyforge_project:
|
127
|
-
rubygems_version: 1.8.
|
112
|
+
rubygems_version: 1.8.24
|
128
113
|
signing_key:
|
129
114
|
specification_version: 3
|
130
115
|
summary: Simple, environment-based service provider configuration for ActiveResource
|
131
|
-
test_files:
|
116
|
+
test_files:
|
132
117
|
- features/active_resource.feature
|
133
118
|
- features/configure.feature
|
134
119
|
- features/reset.feature
|