factory_factory_girl 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb2510f65b12bb72ee573d36244d2cbcb0528ba0
4
- data.tar.gz: 2ee54ba5a30a7cc760cbf8a45290cd29e2ed2ca2
3
+ metadata.gz: 9f26bd9110b27b0ee92b3a805dc45cd591f9f75e
4
+ data.tar.gz: cec9e3f0416b9113ad849ec1503d77939e7561d1
5
5
  SHA512:
6
- metadata.gz: a68e11ad3489ff6146a914f4ad7fae2a7641dc8d3a08160d8dbbf1ada53ff812cb74321cee2126d5c45ab06bc42a641cb04a4363d6eb5468c55718d2eb402bce
7
- data.tar.gz: aa283839221ba96bc7aec64fc73f69c25b0335c493201598e1a127335b4e83b42699c5cfac32cb1ad50f139fe7fcf578beb3eb6c46b6100e9b21c9f4cae9dd10
6
+ metadata.gz: b7081e89e55836a554614af7b0d4b49c233ffa60b5091df57ad6ff234a5b945ae0e8afeaf2d8760253fd3e1958bbe25dc780024b2e5c1f79c9dbc3604cb4d743
7
+ data.tar.gz: abdc25871cc8b91dec6447390bbf163ca9255ca0a1d8a259b3735f20f58f8375c12bb474ac106089c68af5722e5739ee8faa4f67216c9b22a77067ae2630258e
data/README.md CHANGED
@@ -3,36 +3,33 @@
3
3
 
4
4
  # FactoryFactoryGirl
5
5
 
6
- ## Notice!!! This gem is still under development, it's very buggy!!!!!
7
-
8
6
  ## Mission
9
7
 
10
- FactoryGirl is a very useful gem, which lets us generate test data more efficiently. However, if you start new projects very frequently, you will feel painful writing every project's factory, especially when most of them have some common attributes.
8
+ [FactoryGirl](https://github.com/thoughtbot/factory_girl/) is a very useful gem, which lets us generate test data more efficiently. However, if you start new projects very frequently, you will feel painful writing every project's factory, especially when most of them have some common attributes.
11
9
 
12
- For example, you use `FFaker::Job.title` to generate all your `name` or `title`'s value, and use `FFaker::Lorem.paragraph` to generate the `description` or `content`'s value. Then you just need to cope & paste those methods in serveral columns, in serveral model's factories, or even in serveral project's factories.
10
+ For example, you use `FFaker::Job.title` to generate all your `name` or `title`'s value, and use `FFaker::Lorem.paragraph` to generate `description` or `content`'s value. Then you just need to cope & paste those methods to serveral columns in serveral factories, or even in serveral project's factories.
13
11
 
14
- So the mission of this gem is helping people generate their factory more quikly, with some pre-defined rules like:
12
+ So I created [FactoryFactoryGirl](https://github.com/st0012/factory_factory_girl). The mission of this gem is helping people generate their factory more quickly, with some pre-defined rules like:
15
13
 
16
- ```ruby
14
+ ```
17
15
  FactoryFactoryGirl.configure do |config|
18
16
  config.match(/name|title/, function: "FFaker::Job.title")
19
17
  config.match(/content|descripton/, function: "FFaker::Lorem.paragraph")
20
18
  end
21
19
  ```
22
-
23
20
  And type:
24
21
 
25
22
  ```
26
23
  $ rails g factory_factory_girl:model post
27
-
28
- # or
29
-
24
+ ```
25
+ or
26
+ ```
30
27
  $ rails g factory_factory_girl:model job
31
28
  ```
32
29
 
33
30
  Then you will see you factory file have some pre-defined value.
34
31
 
35
- ```ruby
32
+ ```
36
33
  FactoryGirl.define do
37
34
  ........
38
35
  name { FFaker::Job.title }
@@ -41,7 +38,9 @@ FactoryGirl.define do
41
38
  end
42
39
  ```
43
40
 
44
- I think this is great because the rule you defined here, can be use in any other projects, and you won't need to copy & paste the setting of those frequently seen column's.
41
+ And the rule you defined in this project, can be use in any other projects. You won't need to copy & paste the setting of those frequently seen column's.
42
+
43
+ I think this gem could be helpful, but also needs a lot work. So if you find any bug or want any feature, please open an issue or email me , thanks 😄.
45
44
 
46
45
 
47
46
  ## Installation
@@ -78,7 +77,7 @@ And run
78
77
  $ rails g factory_factory_girl:model YOUR_MODEL
79
78
  ```
80
79
 
81
- Notice that the default directory is `test/factories` (this is inherit from `factory_girl_rails`), so if you put your factories somewhere else, you need to specify it like
80
+ **Notice that the default directory is `test/factories`** (this is inherit from `factory_girl_rails`), so if you put your factories somewhere else, you need to specify it like
82
81
 
83
82
  ```
84
83
  $ rails g factory_factory_girl:model YOUR_MODEL --dir=spec/factories
@@ -92,5 +91,14 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
92
91
 
93
92
  ## Contributing
94
93
 
95
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/factory_factory_girl.
94
+ - [Fork it](https://github.com/st0012/factory_factory_girl/fork)
95
+ - Create your feature branch (git checkout -b my-new-feature)
96
+ - Commit your changes (git commit -am 'Add some feature')
97
+ - Push to the branch (git push origin my-new-feature)
98
+ - Create a new Pull Request
99
+
100
+ ## Wanted contribution topic
96
101
 
102
+ - More specs
103
+ - New feature
104
+ - Bug report/fix
@@ -14,7 +14,7 @@ module FactoryFactoryGirl
14
14
  unless SKIPED_COLUMN.include? attribute.name
15
15
  "#{attribute.name} #{set_column(attribute)}"
16
16
  end
17
- end.compact.join("\n")
17
+ end.compact.join("\n ")
18
18
  end
19
19
 
20
20
  def set_column(attribute)
@@ -1,3 +1,3 @@
1
1
  module FactoryFactoryGirl
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factory_factory_girl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Low
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: factory_girl_rails