factory_girl_rails 4.4.0 → 4.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +18 -22
  3. data/CONTRIBUTING.md +27 -26
  4. data/Gemfile +18 -1
  5. data/Gemfile.lock +144 -0
  6. data/NEWS +15 -0
  7. data/README.md +51 -38
  8. data/bin/setup +16 -0
  9. data/bin/stubs/a2h +16 -0
  10. data/bin/stubs/appraisal +17 -0
  11. data/bin/stubs/aruba +16 -0
  12. data/bin/stubs/autospec +17 -0
  13. data/bin/stubs/bcat +16 -0
  14. data/bin/stubs/btee +16 -0
  15. data/bin/stubs/bundler +17 -0
  16. data/bin/stubs/cdiff +16 -0
  17. data/bin/stubs/cucumber +17 -0
  18. data/bin/stubs/decolor +16 -0
  19. data/bin/stubs/erubis +17 -0
  20. data/bin/stubs/htmldiff +17 -0
  21. data/bin/stubs/ldiff +17 -0
  22. data/bin/stubs/nokogiri +16 -0
  23. data/bin/stubs/rackup +17 -0
  24. data/bin/stubs/rails +17 -0
  25. data/bin/stubs/rake +17 -0
  26. data/bin/stubs/rake2thor +16 -0
  27. data/bin/stubs/rdiscount +16 -0
  28. data/bin/stubs/rdoc +16 -0
  29. data/bin/stubs/ri +16 -0
  30. data/bin/stubs/rspec +17 -0
  31. data/bin/stubs/setup +16 -0
  32. data/bin/stubs/sprockets +16 -0
  33. data/bin/stubs/thor +17 -0
  34. data/bin/stubs/tilt +16 -0
  35. data/factory_girl_rails.gemspec +6 -13
  36. data/features/fixture_replacement_config.feature +51 -11
  37. data/features/generators.feature +40 -14
  38. data/features/load_definitions.feature +8 -8
  39. data/features/step_definitions/appraisal.rb +1 -1
  40. data/features/step_definitions/rails_steps.rb +5 -23
  41. data/features/support/env.rb +2 -2
  42. data/gemfiles/rails3.2.gemfile +14 -8
  43. data/gemfiles/rails3.2.gemfile.lock +117 -100
  44. data/gemfiles/rails4.1.gemfile +23 -0
  45. data/gemfiles/rails4.1.gemfile.lock +183 -0
  46. data/gemfiles/rails4.2.gemfile +21 -0
  47. data/gemfiles/rails4.2.gemfile.lock +193 -0
  48. data/gemfiles/rails5.0.gemfile +22 -0
  49. data/gemfiles/rails5.0.gemfile.lock +156 -0
  50. data/lib/factory_girl_rails/generators/rspec_generator.rb +1 -1
  51. data/lib/factory_girl_rails/railtie.rb +4 -0
  52. data/lib/generators/factory_girl/model/model_generator.rb +77 -9
  53. data/lib/generators/factory_girl.rb +1 -1
  54. data/pkg/factory_girl_rails-4.5.0.gem +0 -0
  55. data/tmp/aruba/testapp/Gemfile +55 -0
  56. data/tmp/aruba/testapp/Gemfile.lock +195 -0
  57. data/tmp/aruba/testapp/README.md +24 -0
  58. data/tmp/aruba/testapp/Rakefile +6 -0
  59. data/tmp/aruba/testapp/app/assets/config/manifest.js +3 -0
  60. data/tmp/aruba/testapp/app/assets/javascripts/application.js +16 -0
  61. data/tmp/aruba/testapp/app/assets/javascripts/cable.js +13 -0
  62. data/tmp/aruba/testapp/app/assets/stylesheets/application.css +15 -0
  63. data/tmp/aruba/testapp/app/channels/application_cable/channel.rb +4 -0
  64. data/tmp/aruba/testapp/app/channels/application_cable/connection.rb +4 -0
  65. data/tmp/aruba/testapp/app/controllers/application_controller.rb +3 -0
  66. data/tmp/aruba/testapp/app/helpers/application_helper.rb +2 -0
  67. data/tmp/aruba/testapp/app/jobs/application_job.rb +2 -0
  68. data/tmp/aruba/testapp/app/mailers/application_mailer.rb +4 -0
  69. data/tmp/aruba/testapp/app/models/application_record.rb +3 -0
  70. data/tmp/aruba/testapp/app/models/user.rb +2 -0
  71. data/tmp/aruba/testapp/app/views/layouts/application.html.erb +14 -0
  72. data/tmp/aruba/testapp/app/views/layouts/mailer.html.erb +13 -0
  73. data/tmp/aruba/testapp/app/views/layouts/mailer.text.erb +1 -0
  74. data/tmp/aruba/testapp/bin/bundle +3 -0
  75. data/tmp/aruba/testapp/bin/rails +9 -0
  76. data/tmp/aruba/testapp/bin/rake +9 -0
  77. data/tmp/aruba/testapp/bin/setup +34 -0
  78. data/tmp/aruba/testapp/bin/spring +17 -0
  79. data/tmp/aruba/testapp/bin/update +29 -0
  80. data/tmp/aruba/testapp/config/application.rb +16 -0
  81. data/tmp/aruba/testapp/config/boot.rb +3 -0
  82. data/tmp/aruba/testapp/config/cable.yml +9 -0
  83. data/tmp/aruba/testapp/config/database.yml +25 -0
  84. data/tmp/aruba/testapp/config/environment.rb +5 -0
  85. data/tmp/aruba/testapp/config/environments/development.rb +54 -0
  86. data/tmp/aruba/testapp/config/environments/production.rb +86 -0
  87. data/tmp/aruba/testapp/config/environments/test.rb +42 -0
  88. data/tmp/aruba/testapp/config/initializers/application_controller_renderer.rb +8 -0
  89. data/tmp/aruba/testapp/config/initializers/assets.rb +11 -0
  90. data/tmp/aruba/testapp/config/initializers/backtrace_silencers.rb +7 -0
  91. data/tmp/aruba/testapp/config/initializers/cookies_serializer.rb +5 -0
  92. data/tmp/aruba/testapp/config/initializers/filter_parameter_logging.rb +4 -0
  93. data/tmp/aruba/testapp/config/initializers/inflections.rb +16 -0
  94. data/tmp/aruba/testapp/config/initializers/mime_types.rb +4 -0
  95. data/tmp/aruba/testapp/config/initializers/new_framework_defaults.rb +26 -0
  96. data/tmp/aruba/testapp/config/initializers/session_store.rb +3 -0
  97. data/tmp/aruba/testapp/config/initializers/wrap_parameters.rb +14 -0
  98. data/tmp/aruba/testapp/config/locales/en.yml +23 -0
  99. data/tmp/aruba/testapp/config/puma.rb +47 -0
  100. data/tmp/aruba/testapp/config/routes.rb +3 -0
  101. data/tmp/aruba/testapp/config/secrets.yml +22 -0
  102. data/tmp/aruba/testapp/config/spring.rb +6 -0
  103. data/tmp/aruba/testapp/config.ru +5 -0
  104. data/tmp/aruba/testapp/db/development.sqlite3 +0 -0
  105. data/tmp/aruba/testapp/db/migrate/1_create_users.rb +7 -0
  106. data/tmp/aruba/testapp/db/schema.rb +19 -0
  107. data/tmp/aruba/testapp/db/seeds.rb +7 -0
  108. data/tmp/aruba/testapp/db/test.sqlite3 +0 -0
  109. data/tmp/aruba/testapp/lib/some_railtie/factories.rb +5 -0
  110. data/tmp/aruba/testapp/lib/some_railtie/railties.rb +8 -0
  111. data/tmp/aruba/testapp/log/development.log +16 -0
  112. data/tmp/aruba/testapp/log/test.log +21 -0
  113. data/tmp/aruba/testapp/public/404.html +67 -0
  114. data/tmp/aruba/testapp/public/422.html +67 -0
  115. data/tmp/aruba/testapp/public/500.html +66 -0
  116. data/tmp/aruba/testapp/public/apple-touch-icon-precomposed.png +0 -0
  117. data/tmp/aruba/testapp/public/apple-touch-icon.png +0 -0
  118. data/tmp/aruba/testapp/public/favicon.ico +0 -0
  119. data/tmp/aruba/testapp/public/robots.txt +5 -0
  120. data/tmp/aruba/testapp/test/test_helper.rb +10 -0
  121. data/tmp/aruba/testapp/test/unit/user_test.rb +8 -0
  122. metadata +116 -100
  123. data/.gitignore +0 -9
  124. data/.travis.yml +0 -16
  125. data/gemfiles/rails3.1.gemfile +0 -16
  126. data/gemfiles/rails3.1.gemfile.lock +0 -171
  127. data/lib/generators/factory_girl/model/templates/fixtures.erb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1533aae56f965c37b6dc6abf69214fecaa270dc7
4
- data.tar.gz: ad0541e1fc7e0a27644f7bea5b5c0c68a51251c3
3
+ metadata.gz: 396a84dab19d631dc2b5546843446287654fb332
4
+ data.tar.gz: b04f71b317a6fed8edf5906df9e7dac62a450ed4
5
5
  SHA512:
6
- metadata.gz: 5a6752d35ccb8311201829d0ebb79bd430bf45ee570b7f670bd866f435730f2b8ae5f1cf7844b9662aa7bab76f2903e70de2338d9d4fff9c624ead6bf01a6107
7
- data.tar.gz: 958d596ecff924f9cc99297049bbed15aef334d73f6f67e093a1b6c8cbbf5562047190bfad116027174a384827c5db6e575f6a1cbe76ecaa99215b14cd7112fc
6
+ metadata.gz: c28c168fa853d36fb419d4ffa2bf39b3136ec7e87f378d1da72bf203aac570b040e606708ab0e718672eb826d5542b54ec1634e4fe01274cff07159ca5b0349c
7
+ data.tar.gz: bd9f517256f9ae64310c45d18cdb309b6d8f483b7accf8bd342beed7afbddb7b216023153b99ff4dbe4df3096eb76f1b52aeecf609c9c24ca4d93e95d1108429
data/Appraisals CHANGED
@@ -1,25 +1,21 @@
1
- appraise "rails3.1" do
2
- gem "rails", "3.1.10"
3
- gem "sass-rails"
4
- gem "coffee-rails"
5
- gem "uglifier"
6
- gem "sqlite3", ">= 1.3.4", platforms: :mri
7
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.2.5", platforms: :jruby
8
- gem "minitest-rails"
9
- gem "therubyrhino"
10
- gem "jquery-rails"
11
- gem "rspec-rails"
1
+ # These are the versions of Rails we want to test against.
2
+ appraise 'rails3.2' do
3
+ gem 'rails', '~> 3.2.21'
4
+ gem 'sass-rails'
12
5
  end
13
6
 
14
- appraise "rails3.2" do
15
- gem "rails", "3.2.11"
16
- gem "sass-rails"
17
- gem "coffee-rails"
18
- gem "uglifier"
19
- gem "sqlite3", ">= 1.3.4", platforms: :mri
20
- gem "activerecord-jdbcsqlite3-adapter", "~> 1.2.5", platforms: :jruby
21
- gem "minitest-rails"
22
- gem "therubyrhino"
23
- gem "jquery-rails"
24
- gem "rspec-rails"
7
+ appraise 'rails4.1' do
8
+ gem 'rails', '~> 4.1.9'
9
+ gem 'sass-rails'
10
+ gem 'spring'
11
+ end
12
+
13
+ appraise 'rails4.2' do
14
+ gem 'rails', '~> 4.2.0'
15
+ end
16
+
17
+ appraise "rails5.0" do
18
+ gem "activerecord", "~> 5.0.0"
19
+ gem "railties", "~> 5.0.0"
20
+ gem "rspec-rails", "~> 3.5.0.beta4"
25
21
  end
data/CONTRIBUTING.md CHANGED
@@ -1,38 +1,39 @@
1
- We love pull requests. Here's a quick guide:
1
+ # Contributing
2
2
 
3
- 1. Fork the repo.
3
+ We love pull requests from everyone. By participating in this project, you
4
+ agree to abide by the thoughtbot [code of conduct].
4
5
 
5
- 2. Run the tests. We only take pull requests with passing tests, and it's great
6
- to know that you have a clean slate: `bundle && rake`
6
+ [code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
7
7
 
8
- 3. Add a test for your change. Only refactoring and documentation changes
9
- require no new tests. If you are adding functionality or fixing a bug, we need
10
- a test!
8
+ Fork, then clone the repo:
11
9
 
12
- 4. Make the test pass.
10
+ git clone git@github.com:your-username/factory_girl_rails.git
13
11
 
14
- 5. Push to your fork and submit a pull request.
12
+ Set up your machine:
15
13
 
14
+ ./bin/setup
16
15
 
17
- At this point you're waiting on us. We like to at least comment on, if not
18
- accept, pull requests within three business days (and, typically, one business
19
- day). We may suggest some changes or improvements or alternatives.
16
+ Make sure the tests pass:
20
17
 
21
- Some things that will increase the chance that your pull request is accepted,
22
- taken straight from the Ruby on Rails guide:
18
+ rake
23
19
 
24
- * Use Rails idioms and helpers
25
- * Include tests that fail without your code, and pass with it
26
- * Update the documentation, the surrounding one, examples elsewhere, guides,
27
- whatever is affected by your contribution
20
+ Make your change. Add tests for your change. Make the tests pass:
28
21
 
29
- Syntax:
22
+ rake
30
23
 
31
- * Two spaces, no tabs.
32
- * No trailing whitespace. Blank lines should not have any space.
33
- * Prefer &&/|| over and/or.
34
- * MyClass.my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
35
- * a = b and not a=b.
36
- * Follow the conventions you see used in the source already.
24
+ Push to your fork and [submit a pull request][pr].
37
25
 
38
- And in case we didn't emphasize it enough: we love tests!
26
+ [pr]: https://github.com/thoughtbot/factory_girl_rails/compare/
27
+
28
+ At this point you're waiting on us. We like to at least comment on pull requests
29
+ within three business days (and, typically, one business day). We may suggest
30
+ some changes or improvements or alternatives.
31
+
32
+ Some things that will increase the chance that your pull request is accepted:
33
+
34
+ * Write tests.
35
+ * Follow our [style guide][style].
36
+ * Write a [good commit message][commit].
37
+
38
+ [style]: https://github.com/thoughtbot/guides/tree/master/style
39
+ [commit]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
data/Gemfile CHANGED
@@ -1,3 +1,20 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
+
5
+ gem 'appraisal'
6
+ gem 'aruba'
7
+ gem 'coffee-rails'
8
+ gem 'cucumber', '1.3.19'
9
+ gem 'jquery-rails'
10
+ gem 'rake'
11
+ gem 'rspec-rails'
12
+ gem 'uglifier'
13
+ gem 'test-unit'
14
+
15
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
16
+ gem 'jdbc-sqlite3', platforms: :jruby
17
+ gem 'therubyrhino', platforms: :jruby
18
+ gem 'jruby-openssl', platforms: :jruby
19
+
20
+ gem 'sqlite3', platforms: :ruby
data/Gemfile.lock ADDED
@@ -0,0 +1,144 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ factory_girl_rails (4.9.0)
5
+ factory_girl (~> 4.9.0)
6
+ railties (>= 3.0.0)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ actionpack (4.1.1)
12
+ actionview (= 4.1.1)
13
+ activesupport (= 4.1.1)
14
+ rack (~> 1.5.2)
15
+ rack-test (~> 0.6.2)
16
+ actionview (4.1.1)
17
+ activesupport (= 4.1.1)
18
+ builder (~> 3.1)
19
+ erubis (~> 2.7.0)
20
+ activemodel (4.1.1)
21
+ activesupport (= 4.1.1)
22
+ builder (~> 3.1)
23
+ activerecord (4.1.1)
24
+ activemodel (= 4.1.1)
25
+ activesupport (= 4.1.1)
26
+ arel (~> 5.0.0)
27
+ activerecord-jdbc-adapter (1.3.15)
28
+ activerecord (>= 2.2)
29
+ activerecord-jdbcsqlite3-adapter (1.3.15)
30
+ activerecord-jdbc-adapter (~> 1.3.15)
31
+ jdbc-sqlite3 (>= 3.7.2, < 3.9)
32
+ activesupport (4.1.1)
33
+ i18n (~> 0.6, >= 0.6.9)
34
+ json (~> 1.7, >= 1.7.7)
35
+ minitest (~> 5.1)
36
+ thread_safe (~> 0.1)
37
+ tzinfo (~> 1.1)
38
+ appraisal (1.0.3)
39
+ bundler
40
+ rake
41
+ thor (>= 0.14.0)
42
+ arel (5.0.1.20140414130214)
43
+ aruba (0.5.4)
44
+ childprocess (>= 0.3.6)
45
+ cucumber (>= 1.1.1)
46
+ rspec-expectations (>= 2.7.0)
47
+ builder (3.2.2)
48
+ childprocess (0.5.3)
49
+ ffi (~> 1.0, >= 1.0.11)
50
+ coffee-rails (4.0.1)
51
+ coffee-script (>= 2.2.0)
52
+ railties (>= 4.0.0, < 5.0)
53
+ coffee-script (2.2.0)
54
+ coffee-script-source
55
+ execjs
56
+ coffee-script-source (1.7.0)
57
+ cucumber (1.3.19)
58
+ builder (>= 2.1.2)
59
+ diff-lcs (>= 1.1.3)
60
+ gherkin (~> 2.12)
61
+ multi_json (>= 1.7.5, < 2.0)
62
+ multi_test (>= 0.1.2)
63
+ diff-lcs (1.2.5)
64
+ erubis (2.7.0)
65
+ execjs (2.0.2)
66
+ factory_girl (4.9.0)
67
+ activesupport (>= 3.0.0)
68
+ ffi (1.9.3)
69
+ ffi (1.9.3-java)
70
+ gherkin (2.12.2)
71
+ multi_json (~> 1.3)
72
+ gherkin (2.12.2-java)
73
+ multi_json (~> 1.3)
74
+ i18n (0.7.0)
75
+ jdbc-sqlite3 (3.8.7)
76
+ jquery-rails (3.1.0)
77
+ railties (>= 3.0, < 5.0)
78
+ thor (>= 0.14, < 2.0)
79
+ jruby-openssl (0.9.6-java)
80
+ json (1.8.3)
81
+ json (1.8.3-java)
82
+ minitest (5.9.0)
83
+ multi_json (1.11.2)
84
+ multi_test (0.1.2)
85
+ power_assert (0.2.3)
86
+ rack (1.5.5)
87
+ rack-test (0.6.3)
88
+ rack (>= 1.0)
89
+ railties (4.1.1)
90
+ actionpack (= 4.1.1)
91
+ activesupport (= 4.1.1)
92
+ rake (>= 0.8.7)
93
+ thor (>= 0.18.1, < 2.0)
94
+ rake (11.1.2)
95
+ rspec-core (2.14.8)
96
+ rspec-expectations (2.14.5)
97
+ diff-lcs (>= 1.1.3, < 2.0)
98
+ rspec-mocks (2.14.6)
99
+ rspec-rails (2.14.2)
100
+ actionpack (>= 3.0)
101
+ activemodel (>= 3.0)
102
+ activesupport (>= 3.0)
103
+ railties (>= 3.0)
104
+ rspec-core (~> 2.14.0)
105
+ rspec-expectations (~> 2.14.0)
106
+ rspec-mocks (~> 2.14.0)
107
+ sqlite3 (1.3.9)
108
+ test-unit (3.0.9)
109
+ power_assert
110
+ therubyrhino (2.0.4)
111
+ therubyrhino_jar (>= 1.7.3)
112
+ therubyrhino_jar (1.7.4)
113
+ thor (0.19.1)
114
+ thread_safe (0.3.5)
115
+ thread_safe (0.3.5-java)
116
+ tzinfo (1.2.2)
117
+ thread_safe (~> 0.1)
118
+ uglifier (2.5.0)
119
+ execjs (>= 0.3.0)
120
+ json (>= 1.8.0)
121
+
122
+ PLATFORMS
123
+ java
124
+ ruby
125
+
126
+ DEPENDENCIES
127
+ activerecord-jdbcsqlite3-adapter
128
+ appraisal
129
+ aruba
130
+ coffee-rails
131
+ cucumber (= 1.3.19)
132
+ factory_girl_rails!
133
+ jdbc-sqlite3
134
+ jquery-rails
135
+ jruby-openssl
136
+ rake
137
+ rspec-rails
138
+ sqlite3
139
+ test-unit
140
+ therubyrhino
141
+ uglifier
142
+
143
+ BUNDLED WITH
144
+ 1.13.6
data/NEWS CHANGED
@@ -1,3 +1,18 @@
1
+ factory_girl_rails versioning is synced with factory_girl releases. For this reason
2
+ there might not be any notable changes in new versions of this project.
3
+
4
+ 4.7.0 (April 1, 2016)
5
+ No notable changes
6
+
7
+ 4.6.0 (February 1, 2016)
8
+ No notable changes
9
+
10
+ 4.5.0 (October 17, 2014)
11
+ Improved README
12
+
13
+ 4.4.1 (February 26, 2014)
14
+ Support Spring
15
+
1
16
  4.2.1 (February 8, 2013)
2
17
  Fix bug when configuring FG and RSpec fixture directory
3
18
  Remove debugging
data/README.md CHANGED
@@ -1,73 +1,79 @@
1
- factory_girl [![Build Status](https://secure.travis-ci.org/thoughtbot/factory_girl_rails.png)](http://travis-ci.org/thoughtbot/factory_girl_rails?branch=master)
2
- ============
1
+ # factory_girl_rails [![Build Status][ci-image]][ci] [![Code Climate][grade-image]][grade]
3
2
 
4
- `factory_girl` is a fixtures replacement with a straightforward definition
3
+ [factory_girl][fg] is a fixtures replacement with a straightforward definition
5
4
  syntax, support for multiple build strategies (saved instances, unsaved
6
5
  instances, attribute hashes, and stubbed objects), and support for multiple
7
6
  factories for the same class (`user`, `admin_user`, and so on), including factory
8
7
  inheritance.
9
8
 
10
- Rails
11
- -----
9
+ ## Rails
12
10
 
13
- `factory_girl_rails` provides Rails integration for `factory_girl`. All
14
- Rails-specific features are only compatible with Rails 3.
11
+ factory_girl_rails provides Rails integration for [factory_girl][fg].
15
12
 
16
13
  Currently, automatic factory definition loading is the only Rails-specific feature.
17
14
 
18
- Download
19
- --------
15
+ Supported Rails versions are listed in [`Appraisals`](Appraisals). Supported
16
+ Ruby versions are listed in [`.travis.yml`](.travis.yml).
20
17
 
21
- Github: http://github.com/thoughtbot/factory_girl_rails/tree/master
18
+ ## Download
19
+
20
+ Github: http://github.com/thoughtbot/factory_girl_rails
22
21
 
23
22
  Gem:
24
23
 
25
- gem install factory_girl_rails
24
+ $ gem install factory_girl_rails
26
25
 
27
- Configuration
28
- -------------
26
+ ## Configuration
29
27
 
30
28
  Add `factory_girl_rails` to your Gemfile:
31
29
 
32
- gem 'factory_girl_rails'
30
+ ```ruby
31
+ group :development, :test do
32
+ gem 'factory_girl_rails'
33
+ end
34
+ ```
33
35
 
34
36
  Generators for factories will automatically substitute fixture (and maybe any other
35
37
  `fixture_replacement` you set). If you want to disable this feature, add the
36
38
  following to your application.rb file:
37
39
 
38
- config.generators do |g|
39
- g.factory_girl false
40
- end
40
+ ```ruby
41
+ config.generators do |g|
42
+ g.factory_girl false
43
+ end
44
+ ```
41
45
 
42
46
  Default factories directory is `test/factories`, or `spec/factories` if
43
47
  `test_framework` generator is set to `:rspec`; change this behavior with:
44
48
 
45
- config.generators do |g|
46
- g.factory_girl dir: 'custom/dir/for/factories'
47
- end
48
-
49
- If you use `factory_girl` for fixture replacement, ensure that
50
- `factory_girl_rails` is available in the development group. If it's not, Rails
51
- will generate standard yml files instead of factory files.
49
+ ```ruby
50
+ config.generators do |g|
51
+ g.factory_girl dir: 'custom/dir/for/factories'
52
+ end
53
+ ```
52
54
 
53
- `factory_girl` takes an option `suffix: 'some_suffix'`
54
- to generate factories as "modelname_some_suffix.rb"
55
+ If you use factory_girl for fixture replacement, ensure that
56
+ factory_girl_rails is available in the development group. If it's not, Rails
57
+ will generate standard .yml files instead of factory files.
55
58
 
56
- More Information
57
- ----------------
59
+ factory_girl takes an option `suffix: 'some_suffix'` to generate factories as
60
+ `modelname_some_suffix.rb`.
58
61
 
59
- factory_girl: http://github.com/thoughtbot/factory_girl/tree/master
62
+ If you use factory_girl for fixture replacement and already have a
63
+ `factories.rb` file in the directory that contains your tests,
64
+ factory_girl_rails will insert new factory definitions at the top of
65
+ `factories.rb`.
60
66
 
67
+ You may need to configure your test suite to include factory_girl methods; see
68
+ [configuration](https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md#configure-your-test-suite).
61
69
 
62
- Contributing
63
- ------------
70
+ ## Contributing
64
71
 
65
- Please see CONTRIBUTING.md for details.
72
+ Please see [CONTRIBUTING.md](CONTRIBUTING.md).
66
73
 
67
- Credits
68
- -------
74
+ ## Credits
69
75
 
70
- factory_girl was originally written by Joe Ferris.
76
+ [factory_girl][fg] was originally written by Joe Ferris.
71
77
 
72
78
  ![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
73
79
 
@@ -75,7 +81,14 @@ factory_girl is maintained and funded by [thoughtbot, inc](http://thoughtbot.com
75
81
 
76
82
  The names and logos for thoughtbot are trademarks of thoughtbot, inc.
77
83
 
78
- License
79
- -------
84
+ ## License
85
+
86
+ factory_girl_rails is Copyright © 2008-2016 Joe Ferris and thoughtbot. It is free
87
+ software, and may be redistributed under the terms specified in the
88
+ [LICENSE](LICENSE) file.
80
89
 
81
- factory_girl is Copyright © 2008-2013 Joe Ferris and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.
90
+ [fg]: https://github.com/thoughtbot/factory_girl
91
+ [ci]: http://travis-ci.org/thoughtbot/factory_girl_rails?branch=master
92
+ [ci-image]: https://secure.travis-ci.org/thoughtbot/factory_girl_rails.png
93
+ [grade]: https://codeclimate.com/github/thoughtbot/factory_girl_rails
94
+ [grade-image]: https://codeclimate.com/github/thoughtbot/factory_girl_rails.png
data/bin/setup ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env sh
2
+
3
+ # Run this script immediately after cloning the codebase.
4
+
5
+ # Exit if any subcommand fails
6
+ set -e
7
+
8
+ # Set up Ruby dependencies via Bundler
9
+ bundle install
10
+
11
+ # Add binstubs to PATH in ~/.zshenv like this:
12
+ # export PATH=".git/safe/../../bin:$PATH"
13
+ mkdir -p .git/safe
14
+
15
+ # Set up Appraisal to help us test against multiple Rails versions
16
+ bundle exec appraisal install
data/bin/stubs/a2h ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'a2h' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('bcat', 'a2h')
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'appraisal' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("appraisal", "appraisal")
data/bin/stubs/aruba ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'aruba' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require "pathname"
10
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require "rubygems"
14
+ require "bundler/setup"
15
+
16
+ load Gem.bin_path("aruba", "aruba")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'autospec' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rspec-core", "autospec")
data/bin/stubs/bcat ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'bcat' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('bcat', 'bcat')
data/bin/stubs/btee ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'btee' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('bcat', 'btee')
data/bin/stubs/bundler ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'bundler' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("bundler", "bundler")
data/bin/stubs/cdiff ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'cdiff' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('term-ansicolor', 'cdiff')
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'cucumber' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("cucumber", "cucumber")
data/bin/stubs/decolor ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'decolor' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('term-ansicolor', 'decolor')
data/bin/stubs/erubis ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'erubis' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("erubis", "erubis")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'htmldiff' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("diff-lcs", "htmldiff")