factory_girl 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -3,6 +3,7 @@ require 'rake'
3
3
  require 'rake/rdoctask'
4
4
  require 'rcov/rcovtask'
5
5
  require 'date'
6
+ require 'rake/gempackagetask'
6
7
 
7
8
  require 'spec/rake/spectask'
8
9
  require 'cucumber/rake/task'
@@ -60,3 +61,9 @@ Cucumber::Rake::Task.new(:features) do |t|
60
61
  t.fork = true
61
62
  t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
62
63
  end
64
+
65
+ eval("$specification = begin; #{IO.read('factory_girl.gemspec')}; end")
66
+ Rake::GemPackageTask.new($specification) do |package|
67
+ package.need_zip = true
68
+ package.need_tar = true
69
+ end
Binary file
data/lib/factory_girl.rb CHANGED
@@ -21,5 +21,10 @@ def Factory (name, attrs = {})
21
21
  end
22
22
 
23
23
  class Factory
24
- VERSION = "1.3.0"
24
+ VERSION = "1.3.1"
25
25
  end
26
+
27
+ if defined?(Rails) && Rails::VERSION::MAJOR == 2
28
+ require 'factory_girl/rails2'
29
+ end
30
+
@@ -16,7 +16,7 @@ class Factory
16
16
  # aliases. Contents captured in the pattern can be used in the alias.
17
17
  # * replace: +String+
18
18
  # The alias that results from the matched pattern. Captured strings can
19
- # be substituded like with +String#sub+.
19
+ # be substituted like with +String#sub+.
20
20
  #
21
21
  # Example:
22
22
  #
@@ -98,7 +98,7 @@ class Factory
98
98
  # This method should be called with either a value or block, but not both. If
99
99
  # called with a block, the attribute will be generated "lazily," whenever an
100
100
  # instance is generated. Lazy attribute blocks will not be called if that
101
- # attribute is overriden for a specific instance.
101
+ # attribute is overridden for a specific instance.
102
102
  #
103
103
  # When defining lazy attributes, an instance of Factory::Proxy will
104
104
  # be yielded, allowing associations to be built using the correct build
@@ -42,7 +42,7 @@ class Factory
42
42
  #
43
43
  # Returns:
44
44
  # The generated association for the current build strategy. Note that
45
- # assocaitions are not generated for the attributes_for strategy. Returns
45
+ # associations are not generated for the attributes_for strategy. Returns
46
46
  # nil in this case.
47
47
  #
48
48
  # Example:
@@ -1,2 +1 @@
1
- require 'factory_girl'
2
1
  Rails.configuration.after_initialize { Factory.find_definitions }
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_girl
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 3
9
- - 0
10
- version: 1.3.0
8
+ - 1
9
+ version: 1.3.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Joe Ferris
@@ -15,18 +14,16 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-06-11 00:00:00 -04:00
17
+ date: 2010-06-23 00:00:00 -04:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rcov
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 3
30
27
  segments:
31
28
  - 0
32
29
  version: "0"
@@ -36,11 +33,9 @@ dependencies:
36
33
  name: rspec
37
34
  prerelease: false
38
35
  requirement: &id002 !ruby/object:Gem::Requirement
39
- none: false
40
36
  requirements:
41
37
  - - ">="
42
38
  - !ruby/object:Gem::Version
43
- hash: 3
44
39
  segments:
45
40
  - 0
46
41
  version: "0"
@@ -50,11 +45,9 @@ dependencies:
50
45
  name: cucumber
51
46
  prerelease: false
52
47
  requirement: &id003 !ruby/object:Gem::Requirement
53
- none: false
54
48
  requirements:
55
49
  - - ">="
56
50
  - !ruby/object:Gem::Version
57
- hash: 3
58
51
  segments:
59
52
  - 0
60
53
  version: "0"
@@ -64,11 +57,9 @@ dependencies:
64
57
  name: activerecord
65
58
  prerelease: false
66
59
  requirement: &id004 !ruby/object:Gem::Requirement
67
- none: false
68
60
  requirements:
69
61
  - - ~>
70
62
  - !ruby/object:Gem::Version
71
- hash: 9
72
63
  segments:
73
64
  - 2
74
65
  - 3
@@ -80,11 +71,9 @@ dependencies:
80
71
  name: activerecord
81
72
  prerelease: false
82
73
  requirement: &id005 !ruby/object:Gem::Requirement
83
- none: false
84
74
  requirements:
85
75
  - - ~>
86
76
  - !ruby/object:Gem::Version
87
- hash: -1848230021
88
77
  segments:
89
78
  - 3
90
79
  - 0
@@ -97,11 +86,9 @@ dependencies:
97
86
  name: rr
98
87
  prerelease: false
99
88
  requirement: &id006 !ruby/object:Gem::Requirement
100
- none: false
101
89
  requirements:
102
90
  - - ">="
103
91
  - !ruby/object:Gem::Version
104
- hash: 3
105
92
  segments:
106
93
  - 0
107
94
  version: "0"
@@ -111,11 +98,9 @@ dependencies:
111
98
  name: sqlite3
112
99
  prerelease: false
113
100
  requirement: &id007 !ruby/object:Gem::Requirement
114
- none: false
115
101
  requirements:
116
102
  - - ">="
117
103
  - !ruby/object:Gem::Version
118
- hash: 3
119
104
  segments:
120
105
  - 0
121
106
  version: "0"
@@ -150,6 +135,7 @@ files:
150
135
  - lib/factory_girl/proxy/create.rb
151
136
  - lib/factory_girl/proxy/stub.rb
152
137
  - lib/factory_girl/proxy.rb
138
+ - lib/factory_girl/rails2.rb
153
139
  - lib/factory_girl/sequence.rb
154
140
  - lib/factory_girl/step_definitions.rb
155
141
  - lib/factory_girl/syntax/blueprint.rb
@@ -183,7 +169,7 @@ files:
183
169
  - features/step_definitions/database_steps.rb
184
170
  - features/support/env.rb
185
171
  - features/support/factories.rb
186
- - rails/init.rb
172
+ - features/support/test.db
187
173
  has_rdoc: true
188
174
  homepage: http://thoughtbot.com/projects/factory_girl
189
175
  licenses: []
@@ -196,27 +182,23 @@ rdoc_options:
196
182
  require_paths:
197
183
  - lib
198
184
  required_ruby_version: !ruby/object:Gem::Requirement
199
- none: false
200
185
  requirements:
201
186
  - - ">="
202
187
  - !ruby/object:Gem::Version
203
- hash: 3
204
188
  segments:
205
189
  - 0
206
190
  version: "0"
207
191
  required_rubygems_version: !ruby/object:Gem::Requirement
208
- none: false
209
192
  requirements:
210
193
  - - ">="
211
194
  - !ruby/object:Gem::Version
212
- hash: 3
213
195
  segments:
214
196
  - 0
215
197
  version: "0"
216
198
  requirements: []
217
199
 
218
200
  rubyforge_project:
219
- rubygems_version: 1.3.7
201
+ rubygems_version: 1.3.6
220
202
  signing_key:
221
203
  specification_version: 3
222
204
  summary: factory_girl provides a framework and DSL for defining and using model instance factories.
@@ -243,3 +225,4 @@ test_files:
243
225
  - features/step_definitions/database_steps.rb
244
226
  - features/support/env.rb
245
227
  - features/support/factories.rb
228
+ - features/support/test.db