stepford 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +21 -1
- data/lib/stepford/factory_girl.rb +0 -1
- data/lib/stepford/version.rb +1 -1
- metadata +1 -17
data/README.md
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
Stepford
|
2
2
|
=====
|
3
3
|
|
4
|
-
Stepford is a CLI to create starter [Factory Girl][factory_girl] factories for all of your Rails models.
|
4
|
+
Stepford is a CLI to create starter [Factory Girl][factory_girl] factories for all of your Rails models, e.g.
|
5
|
+
|
6
|
+
require 'factory_girl_rails'
|
7
|
+
|
8
|
+
FactoryGirl.define do
|
9
|
+
|
10
|
+
factory :item do
|
11
|
+
association :created_by, factory: :user
|
12
|
+
created_at { 2.weeks.ago }
|
13
|
+
name 'Test Name'
|
14
|
+
price 1.23
|
15
|
+
updated_at { 2.weeks.ago }
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
5
19
|
|
6
20
|
### Setup
|
7
21
|
|
@@ -9,6 +23,10 @@ In your Rails 3+ project, add this to your Gemfile:
|
|
9
23
|
|
10
24
|
gem 'stepford'
|
11
25
|
|
26
|
+
If you don't already have it, add this also:
|
27
|
+
|
28
|
+
gem 'factory_girl_rails'
|
29
|
+
|
12
30
|
Then run:
|
13
31
|
|
14
32
|
bundle install
|
@@ -41,6 +59,8 @@ If you have duplicate factory definitions during Rails load, it may complain. Ju
|
|
41
59
|
|
42
60
|
Uses the Ruby 1.9 hash syntax in generated factories. If you don't have 1.9, it might not fail during generation, but it may later when loading the factories.
|
43
61
|
|
62
|
+
If you are using STI, you'll need to manually fix the value that goes into the `type` attribute, or remove it.
|
63
|
+
|
44
64
|
### License
|
45
65
|
|
46
66
|
Copyright (c) 2012 Gary S. Weaver, released under the [MIT license][lic].
|
data/lib/stepford/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stepford
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -43,22 +43,6 @@ dependencies:
|
|
43
43
|
- - ! '>='
|
44
44
|
- !ruby/object:Gem::Version
|
45
45
|
version: '0'
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: factory_girl
|
48
|
-
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
|
-
requirements:
|
51
|
-
- - ! '>='
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: '0'
|
54
|
-
type: :runtime
|
55
|
-
prerelease: false
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
|
-
requirements:
|
59
|
-
- - ! '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
46
|
description: A CLI to create starter FactoryGirl factories for all of your Rails models.
|
63
47
|
email:
|
64
48
|
- garysweaver@gmail.com
|