factory_girl 4.2.0 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +29 -7
  3. data/.yardopts +1 -1
  4. data/Appraisals +12 -8
  5. data/CONTRIBUTING.md +60 -0
  6. data/GETTING_STARTED.md +473 -191
  7. data/Gemfile +6 -3
  8. data/Gemfile.lock +93 -65
  9. data/LICENSE +1 -1
  10. data/NAME.md +11 -0
  11. data/NEWS +43 -1
  12. data/README.md +52 -28
  13. data/Rakefile +1 -3
  14. data/factory_girl.gemspec +9 -17
  15. data/gemfiles/3.2.gemfile +6 -3
  16. data/gemfiles/3.2.gemfile.lock +85 -62
  17. data/gemfiles/4.0.gemfile +6 -3
  18. data/gemfiles/4.0.gemfile.lock +84 -74
  19. data/gemfiles/4.1.gemfile +10 -0
  20. data/gemfiles/4.1.gemfile.lock +104 -0
  21. data/gemfiles/4.2.gemfile +10 -0
  22. data/gemfiles/4.2.gemfile.lock +104 -0
  23. data/gemfiles/5.0.gemfile +10 -0
  24. data/gemfiles/5.0.gemfile.lock +103 -0
  25. data/lib/factory_girl/attribute/dynamic.rb +4 -1
  26. data/lib/factory_girl/attribute_assigner.rb +4 -4
  27. data/lib/factory_girl/attribute_list.rb +1 -1
  28. data/lib/factory_girl/callback.rb +1 -1
  29. data/lib/factory_girl/callbacks_observer.rb +1 -1
  30. data/lib/factory_girl/configuration.rb +7 -2
  31. data/lib/factory_girl/declaration_list.rb +2 -2
  32. data/lib/factory_girl/decorator/attribute_hash.rb +1 -2
  33. data/lib/factory_girl/decorator/class_key_hash.rb +2 -1
  34. data/lib/factory_girl/decorator.rb +2 -2
  35. data/lib/factory_girl/definition.rb +25 -15
  36. data/lib/factory_girl/definition_hierarchy.rb +1 -1
  37. data/lib/factory_girl/definition_proxy.rb +15 -17
  38. data/lib/factory_girl/errors.rb +6 -0
  39. data/lib/factory_girl/evaluator.rb +7 -1
  40. data/lib/factory_girl/factory.rb +3 -3
  41. data/lib/factory_girl/factory_runner.rb +7 -1
  42. data/lib/factory_girl/find_definitions.rb +3 -3
  43. data/lib/factory_girl/linter.rb +97 -0
  44. data/lib/factory_girl/strategy/stub.rb +58 -20
  45. data/lib/factory_girl/strategy_syntax_method_registrar.rb +17 -0
  46. data/lib/factory_girl/syntax/default.rb +8 -0
  47. data/lib/factory_girl/syntax/methods.rb +18 -2
  48. data/lib/factory_girl/version.rb +1 -1
  49. data/lib/factory_girl.rb +30 -3
  50. metadata +65 -249
  51. data/CONTRIBUTION_GUIDELINES.md +0 -10
  52. data/features/find_definitions.feature +0 -75
  53. data/features/step_definitions/database_steps.rb +0 -9
  54. data/features/step_definitions/factory_girl_steps.rb +0 -36
  55. data/features/support/env.rb +0 -10
  56. data/features/support/factories.rb +0 -16
  57. data/gemfiles/3.0.gemfile +0 -7
  58. data/gemfiles/3.0.gemfile.lock +0 -81
  59. data/gemfiles/3.1.gemfile +0 -7
  60. data/gemfiles/3.1.gemfile.lock +0 -82
  61. data/spec/acceptance/activesupport_instrumentation_spec.rb +0 -62
  62. data/spec/acceptance/aliases_spec.rb +0 -19
  63. data/spec/acceptance/attribute_aliases_spec.rb +0 -45
  64. data/spec/acceptance/attribute_existing_on_object_spec.rb +0 -68
  65. data/spec/acceptance/attributes_for_spec.rb +0 -97
  66. data/spec/acceptance/attributes_from_instance_spec.rb +0 -53
  67. data/spec/acceptance/attributes_ordered_spec.rb +0 -51
  68. data/spec/acceptance/build_list_spec.rb +0 -56
  69. data/spec/acceptance/build_spec.rb +0 -86
  70. data/spec/acceptance/build_stubbed_spec.rb +0 -161
  71. data/spec/acceptance/callbacks_spec.rb +0 -177
  72. data/spec/acceptance/create_list_spec.rb +0 -97
  73. data/spec/acceptance/create_spec.rb +0 -116
  74. data/spec/acceptance/define_child_before_parent_spec.rb +0 -21
  75. data/spec/acceptance/definition_spec.rb +0 -21
  76. data/spec/acceptance/definition_without_block_spec.rb +0 -15
  77. data/spec/acceptance/global_initialize_with_spec.rb +0 -82
  78. data/spec/acceptance/global_to_create_spec.rb +0 -122
  79. data/spec/acceptance/initialize_with_spec.rb +0 -217
  80. data/spec/acceptance/keyed_by_class_spec.rb +0 -22
  81. data/spec/acceptance/modify_factories_spec.rb +0 -184
  82. data/spec/acceptance/modify_inherited_spec.rb +0 -52
  83. data/spec/acceptance/nested_attributes_spec.rb +0 -32
  84. data/spec/acceptance/overrides_spec.rb +0 -61
  85. data/spec/acceptance/parent_spec.rb +0 -90
  86. data/spec/acceptance/register_strategies_spec.rb +0 -128
  87. data/spec/acceptance/sequence_context_spec.rb +0 -52
  88. data/spec/acceptance/sequence_spec.rb +0 -61
  89. data/spec/acceptance/skip_create_spec.rb +0 -19
  90. data/spec/acceptance/stub_spec.rb +0 -62
  91. data/spec/acceptance/syntax_methods_within_dynamic_attributes_spec.rb +0 -41
  92. data/spec/acceptance/traits_spec.rb +0 -727
  93. data/spec/acceptance/transient_attributes_spec.rb +0 -124
  94. data/spec/factory_girl/aliases_spec.rb +0 -31
  95. data/spec/factory_girl/attribute/association_spec.rb +0 -28
  96. data/spec/factory_girl/attribute/dynamic_spec.rb +0 -52
  97. data/spec/factory_girl/attribute/sequence_spec.rb +0 -16
  98. data/spec/factory_girl/attribute/static_spec.rb +0 -19
  99. data/spec/factory_girl/attribute_list_spec.rb +0 -143
  100. data/spec/factory_girl/attribute_spec.rb +0 -16
  101. data/spec/factory_girl/callback_spec.rb +0 -41
  102. data/spec/factory_girl/declaration/implicit_spec.rb +0 -25
  103. data/spec/factory_girl/declaration_list_spec.rb +0 -67
  104. data/spec/factory_girl/definition_proxy_spec.rb +0 -215
  105. data/spec/factory_girl/definition_spec.rb +0 -58
  106. data/spec/factory_girl/disallows_duplicates_registry_spec.rb +0 -19
  107. data/spec/factory_girl/evaluator_class_definer_spec.rb +0 -77
  108. data/spec/factory_girl/factory_spec.rb +0 -259
  109. data/spec/factory_girl/find_definitions_spec.rb +0 -110
  110. data/spec/factory_girl/null_factory_spec.rb +0 -13
  111. data/spec/factory_girl/null_object_spec.rb +0 -22
  112. data/spec/factory_girl/registry_spec.rb +0 -68
  113. data/spec/factory_girl/sequence_spec.rb +0 -95
  114. data/spec/factory_girl/strategy/attributes_for_spec.rb +0 -18
  115. data/spec/factory_girl/strategy/build_spec.rb +0 -7
  116. data/spec/factory_girl/strategy/create_spec.rb +0 -25
  117. data/spec/factory_girl/strategy/stub_spec.rb +0 -38
  118. data/spec/factory_girl/strategy_calculator_spec.rb +0 -29
  119. data/spec/factory_girl_spec.rb +0 -22
  120. data/spec/spec_helper.rb +0 -26
  121. data/spec/support/macros/define_constant.rb +0 -86
  122. data/spec/support/matchers/callback.rb +0 -9
  123. data/spec/support/matchers/declaration.rb +0 -83
  124. data/spec/support/matchers/delegate.rb +0 -44
  125. data/spec/support/matchers/trait.rb +0 -9
  126. data/spec/support/shared_examples/strategy.rb +0 -90
data/Gemfile CHANGED
@@ -1,5 +1,8 @@
1
- source "http://rubygems.org"
2
-
3
- gem "activerecord", :require => false
1
+ source 'https://rubygems.org'
4
2
 
5
3
  gemspec
4
+
5
+ gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
6
+ gem 'jdbc-sqlite3', platforms: :jruby
7
+
8
+ gem 'sqlite3', '~> 1.3.10', platforms: :ruby
data/Gemfile.lock CHANGED
@@ -1,88 +1,116 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- factory_girl (4.2.0)
4
+ factory_girl (4.8.1)
5
5
  activesupport (>= 3.0.0)
6
6
 
7
7
  GEM
8
- remote: http://rubygems.org/
8
+ remote: https://rubygems.org/
9
9
  specs:
10
- activemodel (3.2.3)
11
- activesupport (= 3.2.3)
12
- builder (~> 3.0.0)
13
- activerecord (3.2.3)
14
- activemodel (= 3.2.3)
15
- activesupport (= 3.2.3)
16
- arel (~> 3.0.2)
17
- tzinfo (~> 0.3.29)
18
- activesupport (3.2.3)
19
- i18n (~> 0.6)
20
- multi_json (~> 1.0)
21
- appraisal (0.5.1)
10
+ activemodel (5.0.0.1)
11
+ activesupport (= 5.0.0.1)
12
+ activerecord (5.0.0.1)
13
+ activemodel (= 5.0.0.1)
14
+ activesupport (= 5.0.0.1)
15
+ arel (~> 7.0)
16
+ activerecord-jdbc-adapter (1.3.21)
17
+ activerecord (>= 2.2)
18
+ activerecord-jdbcsqlite3-adapter (1.3.21)
19
+ activerecord-jdbc-adapter (~> 1.3.21)
20
+ jdbc-sqlite3 (>= 3.7.2, < 3.9)
21
+ activesupport (5.0.0.1)
22
+ concurrent-ruby (~> 1.0, >= 1.0.2)
23
+ i18n (~> 0.7)
24
+ minitest (~> 5.1)
25
+ tzinfo (~> 1.1)
26
+ appraisal (2.1.0)
22
27
  bundler
23
28
  rake
24
- arel (3.0.2)
25
- aruba (0.4.11)
26
- childprocess (>= 0.2.3)
27
- cucumber (>= 1.1.1)
28
- ffi (>= 1.0.11)
29
- rspec (>= 2.7.0)
30
- bourne (1.3.0)
31
- mocha (= 0.13.0)
32
- builder (3.0.4)
33
- childprocess (0.3.2)
34
- ffi (~> 1.0.6)
35
- cucumber (1.2.1)
29
+ thor (>= 0.14.0)
30
+ arel (7.1.4)
31
+ aruba (0.13.0)
32
+ childprocess (~> 0.5.6)
33
+ contracts (~> 0.9)
34
+ cucumber (>= 1.3.19)
35
+ ffi (~> 1.9.10)
36
+ rspec-expectations (>= 2.99)
37
+ thor (~> 0.19)
38
+ builder (3.2.2)
39
+ childprocess (0.5.9)
40
+ ffi (~> 1.0, >= 1.0.11)
41
+ concurrent-ruby (1.0.2)
42
+ concurrent-ruby (1.0.2-java)
43
+ contracts (0.13.0)
44
+ cucumber (1.3.20)
36
45
  builder (>= 2.1.2)
37
46
  diff-lcs (>= 1.1.3)
38
- gherkin (~> 2.11.0)
39
- json (>= 1.4.6)
40
- diff-lcs (1.1.3)
41
- ffi (1.0.11)
42
- ffi (1.0.11-java)
43
- gherkin (2.11.5)
44
- json (>= 1.4.6)
45
- gherkin (2.11.5-java)
46
- json (>= 1.4.6)
47
- i18n (0.6.1)
48
- json (1.7.5)
49
- json (1.7.5-java)
50
- metaclass (0.0.1)
51
- mocha (0.13.0)
52
- metaclass (~> 0.0.1)
53
- multi_json (1.5.0)
54
- rake (0.9.2.2)
55
- rspec (2.12.0)
56
- rspec-core (~> 2.12.0)
57
- rspec-expectations (~> 2.12.0)
58
- rspec-mocks (~> 2.12.0)
59
- rspec-core (2.12.2)
60
- rspec-expectations (2.12.1)
61
- diff-lcs (~> 1.1.3)
62
- rspec-mocks (2.12.1)
63
- simplecov (0.6.2)
47
+ gherkin (~> 2.12)
48
+ multi_json (>= 1.7.5, < 2.0)
49
+ multi_test (>= 0.1.2)
50
+ diff-lcs (1.2.5)
51
+ docile (1.1.5)
52
+ ffi (1.9.10)
53
+ ffi (1.9.10-java)
54
+ gherkin (2.12.2)
64
55
  multi_json (~> 1.3)
65
- simplecov-html (~> 0.5.3)
66
- simplecov-html (0.5.3)
67
- sqlite3 (1.3.7)
68
- timecop (0.3.5)
69
- tzinfo (0.3.33)
70
- yard (0.8.1)
56
+ gherkin (2.12.2-java)
57
+ multi_json (~> 1.3)
58
+ i18n (0.7.0)
59
+ jdbc-sqlite3 (3.8.11.2)
60
+ json (1.8.6)
61
+ json (1.8.6-java)
62
+ minitest (5.9.1)
63
+ multi_json (1.11.2)
64
+ multi_test (0.1.2)
65
+ rake (10.5.0)
66
+ rspec (3.4.0)
67
+ rspec-core (~> 3.4.0)
68
+ rspec-expectations (~> 3.4.0)
69
+ rspec-mocks (~> 3.4.0)
70
+ rspec-core (3.4.2)
71
+ rspec-support (~> 3.4.0)
72
+ rspec-expectations (3.4.0)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.4.0)
75
+ rspec-its (1.2.0)
76
+ rspec-core (>= 3.0.0)
77
+ rspec-expectations (>= 3.0.0)
78
+ rspec-mocks (3.4.1)
79
+ diff-lcs (>= 1.2.0, < 2.0)
80
+ rspec-support (~> 3.4.0)
81
+ rspec-support (3.4.1)
82
+ simplecov (0.11.2)
83
+ docile (~> 1.1.0)
84
+ json (~> 1.8)
85
+ simplecov-html (~> 0.10.0)
86
+ simplecov-html (0.10.0)
87
+ sqlite3 (1.3.12)
88
+ thor (0.19.1)
89
+ thread_safe (0.3.5)
90
+ thread_safe (0.3.5-java)
91
+ timecop (0.8.0)
92
+ tzinfo (1.2.2)
93
+ thread_safe (~> 0.1)
94
+ yard (0.8.7.6)
71
95
 
72
96
  PLATFORMS
73
97
  java
74
98
  ruby
75
99
 
76
100
  DEPENDENCIES
77
- activerecord
78
- appraisal (~> 0.5.1)
101
+ activerecord (>= 3.0.0)
102
+ activerecord-jdbcsqlite3-adapter
103
+ appraisal (~> 2.1.0)
79
104
  aruba
80
- bourne
81
- cucumber (~> 1.2.1)
105
+ cucumber (~> 1.3.15)
82
106
  factory_girl!
83
- mocha (>= 0.12.8)
84
- rspec (~> 2.12.0)
107
+ jdbc-sqlite3
108
+ rspec (~> 3.0)
109
+ rspec-its (~> 1.0)
85
110
  simplecov
86
- sqlite3
111
+ sqlite3 (~> 1.3.10)
87
112
  timecop
88
113
  yard
114
+
115
+ BUNDLED WITH
116
+ 1.15.4
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2013 Joe Ferris and thoughtbot, inc.
1
+ Copyright (c) 2008-2016 Joe Ferris and thoughtbot, inc.
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining a copy
4
4
  of this software and associated documentation files (the "Software"), to deal
data/NAME.md ADDED
@@ -0,0 +1,11 @@
1
+ # Why is this project called "Factory Girl"?
2
+
3
+ The name "Factory Girl" might be confusing to some developers who encounter this
4
+ library.
5
+
6
+ [We chose the name](https://robots.thoughtbot.com/waiting-for-a-factory-girl) as
7
+ a nod in the direction of the [Factory method](https://en.wikipedia.org/wiki/Factory_method_pattern)
8
+ and [Object Mother](http://martinfowler.com/bliki/ObjectMother.html) software
9
+ patterns from the _Design Patterns_ book, and as a reference to the
10
+ [Rolling Stones song](https://www.youtube.com/watch?v=4jKix2DFlnA) of the same
11
+ name.
data/NEWS CHANGED
@@ -1,3 +1,45 @@
1
+ 4.8.1 (September 28, 2017)
2
+ Explicitly define `#destroyed?` within the `Stub` strategy to return `nil` instead of raising
3
+ Update various dependencies
4
+ Update internal test suite to use RSpec's mocking/stubbing instead of mocha
5
+
6
+ 4.8.0 (December 16, 2016)
7
+ Improve documentation
8
+ Add `FactoryGirl.generate_list` to be consistent with `build_list`/`create_list` and friends
9
+ Add `FactoryGirl.use_parent_strategy` configuration to allow associations to leverage parent build strategy
10
+
11
+ 4.7.0 (April 1, 2016)
12
+ Improve documentation
13
+ Improve instrumentation payload to include traits, overrides, and the factory itself
14
+ Allow linting of traits
15
+ Deprecate factory lookup by class name in preparation for 5.0
16
+ Improve internal performance by using flat_map instead of map and compact
17
+ Improve handling of dirty attributes after building a stubbed object
18
+ Reduce warnings from redefining methods
19
+
20
+ 4.6.0 (skipped)
21
+
22
+ 4.5.0 (October 17, 2014)
23
+ Improve FactoryGirl.lint by including exception and message in output
24
+ Allow selective linting
25
+ Use more explicit #public_send when doing attribute assignment
26
+ Improve documentation around FactoryGirl.lint and initialize_with
27
+ Deprecate #ignore in favor of #transient
28
+
29
+ 4.4.0 (February 10, 2014)
30
+ Add FactoryGirl.lint
31
+ Fix memory leak in duplicate traits
32
+ Update documentation
33
+
34
+ 4.3.0 (November 3, 2013)
35
+ Start testing against Rails 4.0 and Ruby 2.0.0
36
+ Stop testing against Rails 3.0 and Ruby 1.9.2
37
+ Add *_pair methods to only build two objects
38
+ Raise if a method is defined with a FactoryGirl block (factory or trait)
39
+ Allow use of Symbol#to_proc in callbacks
40
+ Add global callbacks
41
+ Improve GETTING_STARTED and README
42
+
1
43
  4.2.0 (January 18, 2013)
2
44
  Improve documentation
3
45
  Allow *_list syntax methods to accept a block
@@ -92,7 +134,7 @@
92
134
 
93
135
  2.6.3 (March 9, 2012)
94
136
  Fix issue with traits not being present the first time a factory is accessed
95
- Update available Cucumber step definitions to not require a trialing colon
137
+ Update available Cucumber step definitions to not require a trailing colon
96
138
  when building a table of attributes to instantiate records with
97
139
 
98
140
  2.6.2 (March 9, 2012)
data/README.md CHANGED
@@ -1,74 +1,98 @@
1
- # factory_girl [![Build Status](https://secure.travis-ci.org/thoughtbot/factory_girl.png)](http://travis-ci.org/thoughtbot/factory_girl?branch=master) [![Dependency Status](https://gemnasium.com/thoughtbot/factory_girl.png)](https://gemnasium.com/thoughtbot/factory_girl)
1
+ # factory_girl [![Build Status](https://travis-ci.org/thoughtbot/factory_girl.svg)](http://travis-ci.org/thoughtbot/factory_girl?branch=master) [![Dependency Status](https://gemnasium.com/thoughtbot/factory_girl.svg)](https://gemnasium.com/thoughtbot/factory_girl) [![Code Climate](https://codeclimate.com/github/thoughtbot/factory_girl/badges/gpa.svg)](https://codeclimate.com/github/thoughtbot/factory_girl)
2
2
 
3
3
  factory_girl is a fixtures replacement with a straightforward definition syntax, support for multiple build strategies (saved instances, unsaved instances, attribute hashes, and stubbed objects), and support for multiple factories for the same class (user, admin_user, and so on), including factory inheritance.
4
4
 
5
5
  If you want to use factory_girl with Rails, see
6
6
  [factory_girl_rails](https://github.com/thoughtbot/factory_girl_rails).
7
7
 
8
+ _[Interested in the project name?](NAME.md)._
9
+
8
10
  Documentation
9
11
  -------------
10
12
 
11
13
  You should find the documentation for your version of factory_girl on [Rubygems](https://rubygems.org/gems/factory_girl).
12
14
 
13
- See [GETTING_STARTED](https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md) for information on defining and using factories.
15
+ See [GETTING_STARTED] for information on defining and using factories. We also
16
+ have [a detailed introductory video][], available for free on Upcase.
17
+
18
+ [a detailed introductory video]: https://upcase.com/videos/factory-girl?utm_source=github&utm_medium=open-source&utm_campaign=factory-girl
14
19
 
15
20
  Install
16
21
  --------
17
22
 
18
- ```shell
19
- gem install factory_girl
20
- ```
21
- or add the following line to Gemfile:
23
+ Add the following line to Gemfile:
22
24
 
23
25
  ```ruby
24
26
  gem 'factory_girl'
25
27
  ```
28
+
26
29
  and run `bundle install` from your shell.
27
30
 
31
+ To install the gem manually from your shell, run:
32
+
33
+ ```shell
34
+ gem install factory_girl
35
+ ```
36
+
37
+ **Caveat:** As of ActiveSupport 5.0 and above, Ruby 2.2.2+ is required. Because
38
+ of Rubygems' dependency resolution when installing gems, you may see an error
39
+ similar to:
40
+
41
+ ```
42
+ $ gem install factory_girl
43
+ ERROR: Error installing factory_girl:
44
+ activesupport requires Ruby version >= 2.2.2.
45
+ ```
46
+
47
+ To bypass this, install a pre-5.0 version of ActiveSupport before installing
48
+ manually.
49
+
28
50
  Supported Ruby versions
29
51
  -----------------------
30
52
 
31
- The FactoryGirl 3.x+ series supports MRI Ruby 1.9. Additionally, FactoryGirl
32
- 3.6+ supports JRuby 1.6.7.2+ while running in 1.9 mode. See
33
- [GETTING_STARTED](https://github.com/thoughtbot/factory_girl/blob/master/GETTING_STARTED.md)
53
+ The factory_girl 3.x+ series supports MRI Ruby 1.9. Additionally, factory_girl
54
+ 3.6+ supports JRuby 1.6.7.2+ while running in 1.9 mode. See [GETTING_STARTED]
34
55
  for more information on configuring the JRuby environment.
35
56
 
36
- For versions of Ruby prior to 1.9, please use FactoryGirl 2.x.
57
+ For versions of Ruby prior to 1.9, please use factory_girl 2.x.
37
58
 
38
59
  More Information
39
60
  ----------------
40
61
 
41
62
  * [Rubygems](https://rubygems.org/gems/factory_girl)
42
- * [Mailing list](http://groups.google.com/group/factory_girl)
63
+ * [Stack Overflow](http://stackoverflow.com/questions/tagged/factory-girl)
43
64
  * [Issues](https://github.com/thoughtbot/factory_girl/issues)
44
65
  * [GIANT ROBOTS SMASHING INTO OTHER GIANT ROBOTS](http://robots.thoughtbot.com/)
45
66
 
67
+ [GETTING_STARTED]: http://rubydoc.info/gems/factory_girl/file/GETTING_STARTED.md
68
+
46
69
  Contributing
47
70
  ------------
48
71
 
49
- Please see the [contribution guidelines](https://github.com/thoughtbot/factory_girl/blob/master/CONTRIBUTION_GUIDELINES.md).
72
+ Please see [CONTRIBUTING.md](https://github.com/thoughtbot/factory_girl/blob/master/CONTRIBUTING.md).
50
73
 
51
- Credits
52
- -------
74
+ factory_girl was originally written by Joe Ferris and is now maintained by Josh
75
+ Clayton. Many improvements and bugfixes were contributed by the [open source
76
+ community](https://github.com/thoughtbot/factory_girl/graphs/contributors).
53
77
 
54
- factory_girl was written by Joe Ferris with contributions from several authors, including:
78
+ License
79
+ -------
55
80
 
56
- * Alex Sharp
57
- * Eugene Bolshakov
58
- * Jon Yurek
59
- * Josh Nichols
60
- * Josh Owens
61
- * Nate Sutton
62
- * Josh Clayton
63
- * Thomas Walpole
81
+ factory_girl is Copyright © 2008-2016 Joe Ferris and thoughtbot. It is free
82
+ software, and may be redistributed under the terms specified in the
83
+ [LICENSE](/LICENSE) file.
64
84
 
65
- ![thoughtbot](http://thoughtbot.com/assets/tm/logo.png)
85
+ About thoughtbot
86
+ ----------------
66
87
 
67
- factory_girl is maintained and funded by [thoughtbot, inc](http://thoughtbot.com/community)
88
+ ![thoughtbot](http://presskit.thoughtbot.com/images/thoughtbot-logo-for-readmes.svg)
68
89
 
90
+ factory_girl is maintained and funded by thoughtbot, inc.
69
91
  The names and logos for thoughtbot are trademarks of thoughtbot, inc.
70
92
 
71
- License
72
- -------
93
+ We love open source software!
94
+ See [our other projects][community] or
95
+ [hire us][hire] to design, develop, and grow your product.
73
96
 
74
- 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.
97
+ [community]: https://thoughtbot.com/community?utm_source=github
98
+ [hire]: https://thoughtbot.com?utm_source=github
data/Rakefile CHANGED
@@ -9,9 +9,7 @@ require 'cucumber/rake/task'
9
9
  Bundler::GemHelper.install_tasks
10
10
 
11
11
  desc 'Default: run the specs and features.'
12
- task :default => 'spec:unit' do
13
- system("bundle exec rake -s appraisal spec:acceptance features;")
14
- end
12
+ task default: %w(spec:unit spec:acceptance features)
15
13
 
16
14
  namespace :spec do
17
15
  desc "Run unit specs"
data/factory_girl.gemspec CHANGED
@@ -10,10 +10,9 @@ Gem::Specification.new do |s|
10
10
  using factories - less error-prone, more explicit, and
11
11
  all-around easier to work with than fixtures.}
12
12
 
13
- s.files = `git ls-files`.split("\n")
14
- s.test_files = `git ls-files -- Appraisals {spec,features,gemfiles}/*`.split("\n")
13
+ s.files = `git ls-files`.split("\n").reject { |f| f.match(%r{^(spec|features)/}) }
15
14
 
16
- s.require_paths = ['lib']
15
+ s.require_path = 'lib'
17
16
  s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
18
17
 
19
18
  s.authors = ["Josh Clayton", "Joe Ferris"]
@@ -23,22 +22,15 @@ Gem::Specification.new do |s|
23
22
 
24
23
  s.add_dependency("activesupport", ">= 3.0.0")
25
24
 
26
- s.add_development_dependency("rspec", "~> 2.12.0")
27
- s.add_development_dependency("cucumber", "~> 1.2.1")
25
+ s.add_development_dependency("rspec", "~> 3.0")
26
+ s.add_development_dependency("rspec-its", "~> 1.0")
27
+ s.add_development_dependency("cucumber", "~> 1.3.15")
28
28
  s.add_development_dependency("timecop")
29
29
  s.add_development_dependency("simplecov")
30
30
  s.add_development_dependency("aruba")
31
- s.add_development_dependency("mocha", ">= 0.12.8")
32
- s.add_development_dependency("bourne")
33
- s.add_development_dependency("appraisal", "~> 0.5.1")
34
-
35
- if RUBY_PLATFORM == "java"
36
- s.add_development_dependency("activerecord-jdbcsqlite3-adapter")
37
- s.add_development_dependency("jdbc-sqlite3")
38
- else
39
- s.add_development_dependency("sqlite3")
40
- end
41
-
31
+ s.add_development_dependency("appraisal", "~> 2.1.0")
32
+ s.add_development_dependency("activerecord", ">= 3.0.0")
42
33
  s.add_development_dependency("yard")
43
- end
44
34
 
35
+ s.license = "MIT"
36
+ end
data/gemfiles/3.2.gemfile CHANGED
@@ -1,7 +1,10 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source "https://rubygems.org"
4
4
 
5
- gem "activerecord", "~> 3.2.11"
5
+ gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
6
+ gem "jdbc-sqlite3", :platforms => :jruby
7
+ gem "sqlite3", "~> 1.3.10", :platforms => :ruby
8
+ gem "activerecord", :git => "https://github.com/rails/rails.git", :branch => "3-2-stable"
6
9
 
7
- gemspec :path=>"../"
10
+ gemspec :path => "../"
@@ -1,82 +1,105 @@
1
+ GIT
2
+ remote: https://github.com/rails/rails.git
3
+ revision: e17e25cd23e8abd45b1706463dd57c90fa6dcb7c
4
+ branch: 3-2-stable
5
+ specs:
6
+ activemodel (3.2.22.5)
7
+ activesupport (= 3.2.22.5)
8
+ builder (~> 3.0)
9
+ activerecord (3.2.22.5)
10
+ activemodel (= 3.2.22.5)
11
+ activesupport (= 3.2.22.5)
12
+ arel (~> 3.0.2)
13
+ tzinfo (~> 0.3.29)
14
+ activesupport (3.2.22.5)
15
+ i18n (~> 0.6, >= 0.6.4)
16
+ multi_json (~> 1.0)
17
+
1
18
  PATH
2
- remote: /Users/joshuaclayton/dev/gems/factory_girl
19
+ remote: ../
3
20
  specs:
4
- factory_girl (4.2.0)
21
+ factory_girl (4.8.1)
5
22
  activesupport (>= 3.0.0)
6
23
 
7
24
  GEM
8
- remote: http://rubygems.org/
25
+ remote: https://rubygems.org/
9
26
  specs:
10
- activemodel (3.2.11)
11
- activesupport (= 3.2.11)
12
- builder (~> 3.0.0)
13
- activerecord (3.2.11)
14
- activemodel (= 3.2.11)
15
- activesupport (= 3.2.11)
16
- arel (~> 3.0.2)
17
- tzinfo (~> 0.3.29)
18
- activesupport (3.2.11)
19
- i18n (~> 0.6)
20
- multi_json (~> 1.0)
21
- appraisal (0.5.1)
27
+ appraisal (2.1.0)
22
28
  bundler
23
29
  rake
24
- arel (3.0.2)
25
- aruba (0.5.1)
26
- childprocess (~> 0.3.6)
27
- cucumber (>= 1.1.1)
28
- rspec-expectations (>= 2.7.0)
29
- bourne (1.3.0)
30
- mocha (= 0.13.0)
31
- builder (3.0.4)
32
- childprocess (0.3.6)
33
- ffi (~> 1.0, >= 1.0.6)
34
- cucumber (1.2.1)
30
+ thor (>= 0.14.0)
31
+ arel (3.0.3)
32
+ aruba (0.14.2)
33
+ childprocess (~> 0.5.6)
34
+ contracts (~> 0.9)
35
+ cucumber (>= 1.3.19)
36
+ ffi (~> 1.9.10)
37
+ rspec-expectations (>= 2.99)
38
+ thor (~> 0.19)
39
+ builder (3.2.3)
40
+ childprocess (0.5.9)
41
+ ffi (~> 1.0, >= 1.0.11)
42
+ contracts (0.16.0)
43
+ cucumber (1.3.20)
35
44
  builder (>= 2.1.2)
36
45
  diff-lcs (>= 1.1.3)
37
- gherkin (~> 2.11.0)
38
- json (>= 1.4.6)
39
- diff-lcs (1.1.3)
40
- ffi (1.3.1)
41
- gherkin (2.11.5)
42
- json (>= 1.4.6)
43
- i18n (0.6.1)
44
- json (1.7.6)
45
- metaclass (0.0.1)
46
- mocha (0.13.0)
47
- metaclass (~> 0.0.1)
48
- multi_json (1.5.0)
49
- rake (10.0.3)
50
- rspec (2.12.0)
51
- rspec-core (~> 2.12.0)
52
- rspec-expectations (~> 2.12.0)
53
- rspec-mocks (~> 2.12.0)
54
- rspec-core (2.12.2)
55
- rspec-expectations (2.12.1)
56
- diff-lcs (~> 1.1.3)
57
- rspec-mocks (2.12.1)
58
- simplecov (0.7.1)
59
- multi_json (~> 1.0)
60
- simplecov-html (~> 0.7.1)
61
- simplecov-html (0.7.1)
62
- sqlite3 (1.3.7)
63
- timecop (0.5.9)
64
- tzinfo (0.3.35)
65
- yard (0.8.3)
46
+ gherkin (~> 2.12)
47
+ multi_json (>= 1.7.5, < 2.0)
48
+ multi_test (>= 0.1.2)
49
+ diff-lcs (1.3)
50
+ docile (1.1.5)
51
+ ffi (1.9.18)
52
+ gherkin (2.12.2)
53
+ multi_json (~> 1.3)
54
+ i18n (0.8.6)
55
+ json (2.1.0)
56
+ multi_json (1.12.2)
57
+ multi_test (0.1.2)
58
+ rake (12.1.0)
59
+ rspec (3.6.0)
60
+ rspec-core (~> 3.6.0)
61
+ rspec-expectations (~> 3.6.0)
62
+ rspec-mocks (~> 3.6.0)
63
+ rspec-core (3.6.0)
64
+ rspec-support (~> 3.6.0)
65
+ rspec-expectations (3.6.0)
66
+ diff-lcs (>= 1.2.0, < 2.0)
67
+ rspec-support (~> 3.6.0)
68
+ rspec-its (1.2.0)
69
+ rspec-core (>= 3.0.0)
70
+ rspec-expectations (>= 3.0.0)
71
+ rspec-mocks (3.6.0)
72
+ diff-lcs (>= 1.2.0, < 2.0)
73
+ rspec-support (~> 3.6.0)
74
+ rspec-support (3.6.0)
75
+ simplecov (0.15.1)
76
+ docile (~> 1.1.0)
77
+ json (>= 1.8, < 3)
78
+ simplecov-html (~> 0.10.0)
79
+ simplecov-html (0.10.2)
80
+ sqlite3 (1.3.13)
81
+ thor (0.20.0)
82
+ timecop (0.9.1)
83
+ tzinfo (0.3.53)
84
+ yard (0.9.9)
66
85
 
67
86
  PLATFORMS
68
87
  ruby
69
88
 
70
89
  DEPENDENCIES
71
- activerecord (~> 3.2.11)
72
- appraisal (~> 0.5.1)
90
+ activerecord!
91
+ activerecord-jdbcsqlite3-adapter
92
+ appraisal (~> 2.1.0)
73
93
  aruba
74
- bourne
75
- cucumber (~> 1.2.1)
94
+ cucumber (~> 1.3.15)
76
95
  factory_girl!
77
- mocha (>= 0.12.8)
78
- rspec (~> 2.12.0)
96
+ jdbc-sqlite3
97
+ rspec (~> 3.0)
98
+ rspec-its (~> 1.0)
79
99
  simplecov
80
- sqlite3
100
+ sqlite3 (~> 1.3.10)
81
101
  timecop
82
102
  yard
103
+
104
+ BUNDLED WITH
105
+ 1.15.4
data/gemfiles/4.0.gemfile CHANGED
@@ -1,7 +1,10 @@
1
1
  # This file was generated by Appraisal
2
2
 
3
- source "http://rubygems.org"
3
+ source "https://rubygems.org"
4
4
 
5
- gem "activerecord", :github=>"rails/rails"
5
+ gem "activerecord-jdbcsqlite3-adapter", :platforms => :jruby
6
+ gem "jdbc-sqlite3", :platforms => :jruby
7
+ gem "sqlite3", "~> 1.3.10", :platforms => :ruby
8
+ gem "activerecord", "~> 4.0.13"
6
9
 
7
- gemspec :path=>"../"
10
+ gemspec :path => "../"