watchmaker 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,6 +3,6 @@ rvm:
3
3
  - 1.9.2
4
4
  script: "bundle exec rake spec"
5
5
  gemfile:
6
- - gemfiles/rails-3.0.9.gemfile
6
+ - gemfiles/rails-3.0.10.gemfile
7
7
  - gemfiles/rails-3.1.0.gemfile
8
8
  - gemfiles/rails-master.gemfile
data/Appraisals CHANGED
@@ -8,6 +8,6 @@ appraise "rails-3.1.0" do
8
8
  gem "rails", "3.1.0"
9
9
  end
10
10
 
11
- appraise "rails-3.0.9" do
12
- gem "rails", "3.0.9"
11
+ appraise "rails-3.0.10" do
12
+ gem "rails", "3.0.10"
13
13
  end
@@ -14,17 +14,13 @@ place; for example:
14
14
 
15
15
  === Define profiles
16
16
 
17
- ==== Implicit profiles
18
-
19
- Specify a dependency hash of profile name to objects. The watchmaker
20
- will either yield another watchmaker or a factory when resolving those
21
- dependencies.
17
+ Specify car, garage and boat as a dependency for lots of things. Watchmaker
18
+ will either use a watchmaker by that name to fulfill that dependency, or fall
19
+ back to the factory if it doesn't exist.
22
20
 
23
21
  Watchmaker.define :lots_of_things => [:car, :garage, :boat]
24
22
 
25
- ==== Lambda-based profiles
26
-
27
- When called, will call the lambda.
23
+ Specify a block with things to do do:
28
24
 
29
25
  Watchmaker.define :two_garages do
30
26
  2.times do
@@ -32,32 +28,31 @@ When called, will call the lambda.
32
28
  end
33
29
  end
34
30
 
35
- ==== Factory-based profiles
36
-
37
- Create a garage using the garage factory.
31
+ Specify a factory as a dependency:
38
32
 
39
33
  Watchmaker.define :garage, :factories => [:garage] do
40
34
  # Some other post-factory creation setup here.
41
35
  end
42
36
 
43
- ==== Watchmaker-based profiles
37
+ Specify multiple factories as dependencies:
44
38
 
45
- Create a garage using the garage factory.
39
+ Watchmaker.define :garages, :factories => [:garage, :garage] do
40
+ # Some other post-factory creation setup here.
41
+ end
46
42
 
47
- Watchmaker.define :garage, :factories => [:garage]
43
+ Pass those objects in to the block:
48
44
 
49
- Create a car using the car factory, and a garage using the garage
50
- watchmaker.
45
+ Watchmaker.define :car_and_driver, :factories => [:garage, :car] do |garage, car|
46
+ garage.cars << car
47
+ end
51
48
 
52
- Watchmaker.define :car, :factories => [:car], :watchmakers => [:garage]
49
+ Sepcify another watchmaker as a dependency:
53
50
 
54
- ==== Inject created objects into the lambda
51
+ Watchmaker.define :car, :watchmakers => [:garage]
55
52
 
56
- Inject the factory-created garage and car into the block.
53
+ Specify a factory and a watchmaker as a dependency:
57
54
 
58
- Watchmaker.define :car_in_garage, :factories => [:garage, :car] do |garage, car|
59
- garage.cars << car
60
- end
55
+ Watchmaker.define :car, :factories => [:car], :watchmakers => [:garage]
61
56
 
62
57
  === Manufacture objects
63
58
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
- gem "rails", "3.0.9"
5
+ gem "rails", "3.0.10"
6
6
 
7
7
  gemspec :path=>"../"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /home/cmeiklejohn/Repositories/watchmaker
3
3
  specs:
4
- watchmaker (0.1.1)
4
+ watchmaker (0.2.0)
5
5
  factory_girl
6
6
  factory_girl_rails
7
7
  rails (~> 3.0)
@@ -9,14 +9,13 @@ PATH
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- ZenTest (4.6.0)
13
12
  abstract (1.0.0)
14
- actionmailer (3.0.9)
15
- actionpack (= 3.0.9)
13
+ actionmailer (3.0.10)
14
+ actionpack (= 3.0.10)
16
15
  mail (~> 2.2.19)
17
- actionpack (3.0.9)
18
- activemodel (= 3.0.9)
19
- activesupport (= 3.0.9)
16
+ actionpack (3.0.10)
17
+ activemodel (= 3.0.10)
18
+ activesupport (= 3.0.10)
20
19
  builder (~> 2.1.2)
21
20
  erubis (~> 2.6.6)
22
21
  i18n (~> 0.5.0)
@@ -24,19 +23,19 @@ GEM
24
23
  rack-mount (~> 0.6.14)
25
24
  rack-test (~> 0.5.7)
26
25
  tzinfo (~> 0.3.23)
27
- activemodel (3.0.9)
28
- activesupport (= 3.0.9)
26
+ activemodel (3.0.10)
27
+ activesupport (= 3.0.10)
29
28
  builder (~> 2.1.2)
30
29
  i18n (~> 0.5.0)
31
- activerecord (3.0.9)
32
- activemodel (= 3.0.9)
33
- activesupport (= 3.0.9)
30
+ activerecord (3.0.10)
31
+ activemodel (= 3.0.10)
32
+ activesupport (= 3.0.10)
34
33
  arel (~> 2.0.10)
35
34
  tzinfo (~> 0.3.23)
36
- activeresource (3.0.9)
37
- activemodel (= 3.0.9)
38
- activesupport (= 3.0.9)
39
- activesupport (3.0.9)
35
+ activeresource (3.0.10)
36
+ activemodel (= 3.0.10)
37
+ activesupport (= 3.0.10)
38
+ activesupport (3.0.10)
40
39
  appraisal (0.3.8)
41
40
  bundler
42
41
  rake
@@ -44,54 +43,56 @@ GEM
44
43
  builder (2.1.2)
45
44
  diesel (0.1.5)
46
45
  railties
47
- diff-lcs (1.1.2)
46
+ diff-lcs (1.1.3)
48
47
  erubis (2.6.6)
49
48
  abstract (>= 1.0.0)
50
- factory_girl (2.0.3)
51
- factory_girl_rails (1.1.0)
52
- factory_girl (~> 2.0.0)
49
+ factory_girl (2.1.0)
50
+ factory_girl_rails (1.2.0)
51
+ factory_girl (~> 2.1.0)
53
52
  railties (>= 3.0.0)
54
53
  ffi (1.0.9)
55
- guard (0.5.1)
54
+ guard (0.7.0)
56
55
  thor (~> 0.14.6)
57
- guard-rspec (0.4.1)
56
+ guard-rspec (0.4.5)
58
57
  guard (>= 0.4.0)
59
58
  horo (1.0.3)
60
59
  rdoc (>= 2.5)
61
60
  i18n (0.5.0)
62
61
  libnotify (0.5.7)
63
- ffi (= 1.0.9)
64
62
  mail (2.2.19)
65
63
  activesupport (>= 2.3.6)
66
64
  i18n (>= 0.4.0)
67
65
  mime-types (~> 1.16)
68
66
  treetop (~> 1.4.8)
67
+ metaclass (0.0.1)
69
68
  mime-types (1.16)
70
- mocha (0.9.12)
69
+ mocha (0.10.0)
70
+ metaclass (~> 0.0.1)
71
+ multi_json (1.0.3)
71
72
  polyglot (0.3.2)
72
73
  rack (1.2.3)
73
74
  rack-mount (0.6.14)
74
75
  rack (>= 1.0.0)
75
76
  rack-test (0.5.7)
76
77
  rack (>= 1.0)
77
- rails (3.0.9)
78
- actionmailer (= 3.0.9)
79
- actionpack (= 3.0.9)
80
- activerecord (= 3.0.9)
81
- activeresource (= 3.0.9)
82
- activesupport (= 3.0.9)
78
+ rails (3.0.10)
79
+ actionmailer (= 3.0.10)
80
+ actionpack (= 3.0.10)
81
+ activerecord (= 3.0.10)
82
+ activeresource (= 3.0.10)
83
+ activesupport (= 3.0.10)
83
84
  bundler (~> 1.0)
84
- railties (= 3.0.9)
85
- railties (3.0.9)
86
- actionpack (= 3.0.9)
87
- activesupport (= 3.0.9)
85
+ railties (= 3.0.10)
86
+ railties (3.0.10)
87
+ actionpack (= 3.0.10)
88
+ activesupport (= 3.0.10)
88
89
  rake (>= 0.8.7)
89
90
  rdoc (~> 3.4)
90
91
  thor (~> 0.14.4)
91
92
  rake (0.9.2)
92
93
  rb-inotify (0.8.6)
93
94
  ffi (>= 0.5.0)
94
- rdoc (3.9.2)
95
+ rdoc (3.9.4)
95
96
  rspec (2.6.0)
96
97
  rspec-core (~> 2.6.0)
97
98
  rspec-expectations (~> 2.6.0)
@@ -105,9 +106,10 @@ GEM
105
106
  activesupport (~> 3.0)
106
107
  railties (~> 3.0)
107
108
  rspec (~> 2.6.0)
108
- simplecov (0.4.2)
109
- simplecov-html (~> 0.4.4)
110
- simplecov-html (0.4.5)
109
+ simplecov (0.5.3)
110
+ multi_json (~> 1.0.3)
111
+ simplecov-html (~> 0.5.3)
112
+ simplecov-html (0.5.3)
111
113
  sqlite3 (1.3.4)
112
114
  thor (0.14.6)
113
115
  treetop (1.4.10)
@@ -119,7 +121,6 @@ PLATFORMS
119
121
  ruby
120
122
 
121
123
  DEPENDENCIES
122
- ZenTest
123
124
  appraisal (~> 0.3.5)
124
125
  bundler (~> 1.0.15)
125
126
  diesel
@@ -128,7 +129,7 @@ DEPENDENCIES
128
129
  horo
129
130
  libnotify
130
131
  mocha
131
- rails (= 3.0.9)
132
+ rails (= 3.0.10)
132
133
  rb-inotify
133
134
  rspec
134
135
  rspec-rails
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: /home/cmeiklejohn/Repositories/watchmaker
3
3
  specs:
4
- watchmaker (0.1.1)
4
+ watchmaker (0.2.0)
5
5
  factory_girl
6
6
  factory_girl_rails
7
7
  rails (~> 3.0)
@@ -9,7 +9,6 @@ PATH
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- ZenTest (4.6.2)
13
12
  actionmailer (3.1.0)
14
13
  actionpack (= 3.1.0)
15
14
  mail (~> 2.3.0)
@@ -49,9 +48,9 @@ GEM
49
48
  railties
50
49
  diff-lcs (1.1.3)
51
50
  erubis (2.7.0)
52
- factory_girl (2.0.5)
53
- factory_girl_rails (1.1.0)
54
- factory_girl (~> 2.0.0)
51
+ factory_girl (2.1.0)
52
+ factory_girl_rails (1.2.0)
53
+ factory_girl (~> 2.1.0)
55
54
  railties (>= 3.0.0)
56
55
  ffi (1.0.9)
57
56
  guard (0.6.3)
@@ -131,7 +130,6 @@ PLATFORMS
131
130
  ruby
132
131
 
133
132
  DEPENDENCIES
134
- ZenTest
135
133
  appraisal (~> 0.3.5)
136
134
  bundler (~> 1.0.15)
137
135
  diesel
@@ -51,7 +51,7 @@ GIT
51
51
  PATH
52
52
  remote: /home/cmeiklejohn/Repositories/watchmaker
53
53
  specs:
54
- watchmaker (0.1.1)
54
+ watchmaker (0.2.0)
55
55
  factory_girl
56
56
  factory_girl_rails
57
57
  rails (~> 3.0)
@@ -59,7 +59,6 @@ PATH
59
59
  GEM
60
60
  remote: http://rubygems.org/
61
61
  specs:
62
- ZenTest (4.6.0)
63
62
  appraisal (0.3.8)
64
63
  bundler
65
64
  rake
@@ -138,7 +137,6 @@ PLATFORMS
138
137
  ruby
139
138
 
140
139
  DEPENDENCIES
141
- ZenTest
142
140
  appraisal (~> 0.3.5)
143
141
  bundler (~> 1.0.15)
144
142
  diesel
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Watchmaker # :nodoc:
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchmaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-02 00:00:00.000000000 -04:00
13
- default_executable:
12
+ date: 2011-09-16 00:00:00.000000000Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rails
17
- requirement: &20782820 !ruby/object:Gem::Requirement
16
+ requirement: &18414680 !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,10 +21,10 @@ dependencies:
22
21
  version: '3.0'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *20782820
24
+ version_requirements: *18414680
26
25
  - !ruby/object:Gem::Dependency
27
26
  name: factory_girl
28
- requirement: &20781980 !ruby/object:Gem::Requirement
27
+ requirement: &18414060 !ruby/object:Gem::Requirement
29
28
  none: false
30
29
  requirements:
31
30
  - - ! '>='
@@ -33,10 +32,10 @@ dependencies:
33
32
  version: '0'
34
33
  type: :runtime
35
34
  prerelease: false
36
- version_requirements: *20781980
35
+ version_requirements: *18414060
37
36
  - !ruby/object:Gem::Dependency
38
37
  name: factory_girl_rails
39
- requirement: &20781180 !ruby/object:Gem::Requirement
38
+ requirement: &18413040 !ruby/object:Gem::Requirement
40
39
  none: false
41
40
  requirements:
42
41
  - - ! '>='
@@ -44,10 +43,10 @@ dependencies:
44
43
  version: '0'
45
44
  type: :runtime
46
45
  prerelease: false
47
- version_requirements: *20781180
46
+ version_requirements: *18413040
48
47
  - !ruby/object:Gem::Dependency
49
48
  name: bundler
50
- requirement: &20780160 !ruby/object:Gem::Requirement
49
+ requirement: &18411200 !ruby/object:Gem::Requirement
51
50
  none: false
52
51
  requirements:
53
52
  - - ~>
@@ -55,10 +54,10 @@ dependencies:
55
54
  version: 1.0.15
56
55
  type: :development
57
56
  prerelease: false
58
- version_requirements: *20780160
57
+ version_requirements: *18411200
59
58
  - !ruby/object:Gem::Dependency
60
59
  name: rspec
61
- requirement: &20769240 !ruby/object:Gem::Requirement
60
+ requirement: &18409500 !ruby/object:Gem::Requirement
62
61
  none: false
63
62
  requirements:
64
63
  - - ! '>='
@@ -66,10 +65,10 @@ dependencies:
66
65
  version: '0'
67
66
  type: :development
68
67
  prerelease: false
69
- version_requirements: *20769240
68
+ version_requirements: *18409500
70
69
  - !ruby/object:Gem::Dependency
71
70
  name: rspec-rails
72
- requirement: &20767800 !ruby/object:Gem::Requirement
71
+ requirement: &18406180 !ruby/object:Gem::Requirement
73
72
  none: false
74
73
  requirements:
75
74
  - - ! '>='
@@ -77,10 +76,10 @@ dependencies:
77
76
  version: '0'
78
77
  type: :development
79
78
  prerelease: false
80
- version_requirements: *20767800
79
+ version_requirements: *18406180
81
80
  - !ruby/object:Gem::Dependency
82
81
  name: sqlite3
83
- requirement: &20766440 !ruby/object:Gem::Requirement
82
+ requirement: &18403880 !ruby/object:Gem::Requirement
84
83
  none: false
85
84
  requirements:
86
85
  - - ! '>='
@@ -88,10 +87,10 @@ dependencies:
88
87
  version: '0'
89
88
  type: :development
90
89
  prerelease: false
91
- version_requirements: *20766440
90
+ version_requirements: *18403880
92
91
  - !ruby/object:Gem::Dependency
93
92
  name: mocha
94
- requirement: &20765820 !ruby/object:Gem::Requirement
93
+ requirement: &18400160 !ruby/object:Gem::Requirement
95
94
  none: false
96
95
  requirements:
97
96
  - - ! '>='
@@ -99,10 +98,10 @@ dependencies:
99
98
  version: '0'
100
99
  type: :development
101
100
  prerelease: false
102
- version_requirements: *20765820
101
+ version_requirements: *18400160
103
102
  - !ruby/object:Gem::Dependency
104
103
  name: appraisal
105
- requirement: &20765000 !ruby/object:Gem::Requirement
104
+ requirement: &18397500 !ruby/object:Gem::Requirement
106
105
  none: false
107
106
  requirements:
108
107
  - - ~>
@@ -110,10 +109,10 @@ dependencies:
110
109
  version: 0.3.5
111
110
  type: :development
112
111
  prerelease: false
113
- version_requirements: *20765000
112
+ version_requirements: *18397500
114
113
  - !ruby/object:Gem::Dependency
115
114
  name: horo
116
- requirement: &20764480 !ruby/object:Gem::Requirement
115
+ requirement: &18339200 !ruby/object:Gem::Requirement
117
116
  none: false
118
117
  requirements:
119
118
  - - ! '>='
@@ -121,10 +120,10 @@ dependencies:
121
120
  version: '0'
122
121
  type: :development
123
122
  prerelease: false
124
- version_requirements: *20764480
123
+ version_requirements: *18339200
125
124
  - !ruby/object:Gem::Dependency
126
125
  name: simplecov
127
- requirement: &20763900 !ruby/object:Gem::Requirement
126
+ requirement: &18334660 !ruby/object:Gem::Requirement
128
127
  none: false
129
128
  requirements:
130
129
  - - ! '>='
@@ -132,10 +131,10 @@ dependencies:
132
131
  version: '0'
133
132
  type: :development
134
133
  prerelease: false
135
- version_requirements: *20763900
134
+ version_requirements: *18334660
136
135
  - !ruby/object:Gem::Dependency
137
136
  name: diesel
138
- requirement: &20763300 !ruby/object:Gem::Requirement
137
+ requirement: &18306220 !ruby/object:Gem::Requirement
139
138
  none: false
140
139
  requirements:
141
140
  - - ! '>='
@@ -143,10 +142,10 @@ dependencies:
143
142
  version: '0'
144
143
  type: :development
145
144
  prerelease: false
146
- version_requirements: *20763300
145
+ version_requirements: *18306220
147
146
  - !ruby/object:Gem::Dependency
148
147
  name: guard
149
- requirement: &20762780 !ruby/object:Gem::Requirement
148
+ requirement: &18300500 !ruby/object:Gem::Requirement
150
149
  none: false
151
150
  requirements:
152
151
  - - ! '>='
@@ -154,10 +153,10 @@ dependencies:
154
153
  version: '0'
155
154
  type: :development
156
155
  prerelease: false
157
- version_requirements: *20762780
156
+ version_requirements: *18300500
158
157
  - !ruby/object:Gem::Dependency
159
158
  name: guard-rspec
160
- requirement: &20762200 !ruby/object:Gem::Requirement
159
+ requirement: &18270800 !ruby/object:Gem::Requirement
161
160
  none: false
162
161
  requirements:
163
162
  - - ! '>='
@@ -165,10 +164,10 @@ dependencies:
165
164
  version: '0'
166
165
  type: :development
167
166
  prerelease: false
168
- version_requirements: *20762200
167
+ version_requirements: *18270800
169
168
  - !ruby/object:Gem::Dependency
170
169
  name: rb-inotify
171
- requirement: &20738200 !ruby/object:Gem::Requirement
170
+ requirement: &18267500 !ruby/object:Gem::Requirement
172
171
  none: false
173
172
  requirements:
174
173
  - - ! '>='
@@ -176,10 +175,10 @@ dependencies:
176
175
  version: '0'
177
176
  type: :development
178
177
  prerelease: false
179
- version_requirements: *20738200
178
+ version_requirements: *18267500
180
179
  - !ruby/object:Gem::Dependency
181
180
  name: libnotify
182
- requirement: &20737680 !ruby/object:Gem::Requirement
181
+ requirement: &18265920 !ruby/object:Gem::Requirement
183
182
  none: false
184
183
  requirements:
185
184
  - - ! '>='
@@ -187,7 +186,7 @@ dependencies:
187
186
  version: '0'
188
187
  type: :development
189
188
  prerelease: false
190
- version_requirements: *20737680
189
+ version_requirements: *18265920
191
190
  description: Build complex objects easily for use in integration tests.
192
191
  email:
193
192
  - christopher.meiklejohn@gmail.com
@@ -206,8 +205,8 @@ files:
206
205
  - README.rdoc
207
206
  - Rakefile
208
207
  - db/schema.rb
209
- - gemfiles/rails-3.0.9.gemfile
210
- - gemfiles/rails-3.0.9.gemfile.lock
208
+ - gemfiles/rails-3.0.10.gemfile
209
+ - gemfiles/rails-3.0.10.gemfile.lock
211
210
  - gemfiles/rails-3.1.0.gemfile
212
211
  - gemfiles/rails-3.1.0.gemfile.lock
213
212
  - gemfiles/rails-master.gemfile
@@ -227,7 +226,6 @@ files:
227
226
  - spec/support/models.rb
228
227
  - spec/support/watchmakers.rb
229
228
  - watchmaker.gemspec
230
- has_rdoc: true
231
229
  homepage: https://github.com/cmeiklejohn/watchmaker
232
230
  licenses: []
233
231
  post_install_message:
@@ -242,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
242
240
  version: '0'
243
241
  segments:
244
242
  - 0
245
- hash: -3091043332297961962
243
+ hash: 1606083286535417542
246
244
  required_rubygems_version: !ruby/object:Gem::Requirement
247
245
  none: false
248
246
  requirements:
@@ -251,10 +249,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
249
  version: '0'
252
250
  segments:
253
251
  - 0
254
- hash: -3091043332297961962
252
+ hash: 1606083286535417542
255
253
  requirements: []
256
254
  rubyforge_project: watchmaker
257
- rubygems_version: 1.6.2
255
+ rubygems_version: 1.8.6
258
256
  signing_key:
259
257
  specification_version: 3
260
258
  summary: Build complex objects easily for use in integration tests.