factory_bot_rails 1.0.0.alpha

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +7 -0
  2. data/Appraisals +21 -0
  3. data/CONTRIBUTING.md +39 -0
  4. data/Gemfile +20 -0
  5. data/Gemfile.lock +144 -0
  6. data/LICENSE +19 -0
  7. data/NEWS +24 -0
  8. data/README.md +94 -0
  9. data/Rakefile +24 -0
  10. data/bin/setup +16 -0
  11. data/factory_bot_rails-1.0.0.gem +0 -0
  12. data/factory_bot_rails.gemspec +20 -0
  13. data/factory_girl_rails.gemspec +20 -0
  14. data/features/fixture_replacement_config.feature +132 -0
  15. data/features/generators.feature +54 -0
  16. data/features/load_definitions.feature +85 -0
  17. data/features/step_definitions/appraisal.rb +5 -0
  18. data/features/step_definitions/rails_steps.rb +42 -0
  19. data/features/support/env.rb +21 -0
  20. data/gemfiles/rails3.2.gemfile +22 -0
  21. data/gemfiles/rails3.2.gemfile.lock +177 -0
  22. data/gemfiles/rails4.1.gemfile +23 -0
  23. data/gemfiles/rails4.1.gemfile.lock +175 -0
  24. data/gemfiles/rails4.2.gemfile +21 -0
  25. data/gemfiles/rails4.2.gemfile.lock +190 -0
  26. data/gemfiles/rails5.0.gemfile +22 -0
  27. data/gemfiles/rails5.0.gemfile.lock +153 -0
  28. data/lib/factory_bot_rails.rb +4 -0
  29. data/lib/factory_bot_rails/generator.rb +43 -0
  30. data/lib/factory_bot_rails/generators/non_rspec_generator.rb +19 -0
  31. data/lib/factory_bot_rails/generators/null_generator.rb +11 -0
  32. data/lib/factory_bot_rails/generators/rspec_generator.rb +23 -0
  33. data/lib/factory_bot_rails/railtie.rb +28 -0
  34. data/lib/generators/factory_bot.rb +15 -0
  35. data/lib/generators/factory_bot/model/model_generator.rb +99 -0
  36. data/tmp/aruba/testapp/Gemfile +50 -0
  37. data/tmp/aruba/testapp/Gemfile.lock +188 -0
  38. data/tmp/aruba/testapp/README.md +24 -0
  39. data/tmp/aruba/testapp/Rakefile +6 -0
  40. data/tmp/aruba/testapp/app/assets/config/manifest.js +3 -0
  41. data/tmp/aruba/testapp/app/assets/javascripts/application.js +16 -0
  42. data/tmp/aruba/testapp/app/assets/javascripts/cable.js +13 -0
  43. data/tmp/aruba/testapp/app/assets/stylesheets/application.css +15 -0
  44. data/tmp/aruba/testapp/app/channels/application_cable/channel.rb +4 -0
  45. data/tmp/aruba/testapp/app/channels/application_cable/connection.rb +4 -0
  46. data/tmp/aruba/testapp/app/controllers/application_controller.rb +3 -0
  47. data/tmp/aruba/testapp/app/helpers/application_helper.rb +2 -0
  48. data/tmp/aruba/testapp/app/jobs/application_job.rb +2 -0
  49. data/tmp/aruba/testapp/app/mailers/application_mailer.rb +4 -0
  50. data/tmp/aruba/testapp/app/models/application_record.rb +3 -0
  51. data/tmp/aruba/testapp/app/models/user.rb +2 -0
  52. data/tmp/aruba/testapp/app/views/layouts/application.html.erb +14 -0
  53. data/tmp/aruba/testapp/app/views/layouts/mailer.html.erb +13 -0
  54. data/tmp/aruba/testapp/app/views/layouts/mailer.text.erb +1 -0
  55. data/tmp/aruba/testapp/bin/bundle +3 -0
  56. data/tmp/aruba/testapp/bin/rails +9 -0
  57. data/tmp/aruba/testapp/bin/rake +9 -0
  58. data/tmp/aruba/testapp/bin/setup +34 -0
  59. data/tmp/aruba/testapp/bin/spring +17 -0
  60. data/tmp/aruba/testapp/bin/update +29 -0
  61. data/tmp/aruba/testapp/config.ru +5 -0
  62. data/tmp/aruba/testapp/config/application.rb +16 -0
  63. data/tmp/aruba/testapp/config/boot.rb +3 -0
  64. data/tmp/aruba/testapp/config/cable.yml +9 -0
  65. data/tmp/aruba/testapp/config/database.yml +25 -0
  66. data/tmp/aruba/testapp/config/environment.rb +5 -0
  67. data/tmp/aruba/testapp/config/environments/development.rb +54 -0
  68. data/tmp/aruba/testapp/config/environments/production.rb +86 -0
  69. data/tmp/aruba/testapp/config/environments/test.rb +42 -0
  70. data/tmp/aruba/testapp/config/initializers/application_controller_renderer.rb +6 -0
  71. data/tmp/aruba/testapp/config/initializers/assets.rb +11 -0
  72. data/tmp/aruba/testapp/config/initializers/backtrace_silencers.rb +7 -0
  73. data/tmp/aruba/testapp/config/initializers/cookies_serializer.rb +5 -0
  74. data/tmp/aruba/testapp/config/initializers/filter_parameter_logging.rb +4 -0
  75. data/tmp/aruba/testapp/config/initializers/inflections.rb +16 -0
  76. data/tmp/aruba/testapp/config/initializers/mime_types.rb +4 -0
  77. data/tmp/aruba/testapp/config/initializers/new_framework_defaults.rb +24 -0
  78. data/tmp/aruba/testapp/config/initializers/session_store.rb +3 -0
  79. data/tmp/aruba/testapp/config/initializers/wrap_parameters.rb +14 -0
  80. data/tmp/aruba/testapp/config/locales/en.yml +23 -0
  81. data/tmp/aruba/testapp/config/puma.rb +47 -0
  82. data/tmp/aruba/testapp/config/routes.rb +3 -0
  83. data/tmp/aruba/testapp/config/secrets.yml +22 -0
  84. data/tmp/aruba/testapp/config/spring.rb +6 -0
  85. data/tmp/aruba/testapp/db/development.sqlite3 +0 -0
  86. data/tmp/aruba/testapp/db/migrate/1_create_users.rb +7 -0
  87. data/tmp/aruba/testapp/db/schema.rb +19 -0
  88. data/tmp/aruba/testapp/db/seeds.rb +7 -0
  89. data/tmp/aruba/testapp/db/test.sqlite3 +0 -0
  90. data/tmp/aruba/testapp/lib/some_railtie/factories.rb +5 -0
  91. data/tmp/aruba/testapp/lib/some_railtie/railties.rb +8 -0
  92. data/tmp/aruba/testapp/log/development.log +16 -0
  93. data/tmp/aruba/testapp/log/test.log +21 -0
  94. data/tmp/aruba/testapp/public/404.html +67 -0
  95. data/tmp/aruba/testapp/public/422.html +67 -0
  96. data/tmp/aruba/testapp/public/500.html +66 -0
  97. data/tmp/aruba/testapp/public/apple-touch-icon-precomposed.png +0 -0
  98. data/tmp/aruba/testapp/public/apple-touch-icon.png +0 -0
  99. data/tmp/aruba/testapp/public/favicon.ico +0 -0
  100. data/tmp/aruba/testapp/public/robots.txt +5 -0
  101. data/tmp/aruba/testapp/test/test_helper.rb +10 -0
  102. data/tmp/aruba/testapp/test/unit/user_test.rb +8 -0
  103. metadata +176 -0
@@ -0,0 +1,66 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <meta name="viewport" content="width=device-width,initial-scale=1">
6
+ <style>
7
+ body {
8
+ background-color: #EFEFEF;
9
+ color: #2E2F30;
10
+ text-align: center;
11
+ font-family: arial, sans-serif;
12
+ margin: 0;
13
+ }
14
+
15
+ div.dialog {
16
+ width: 95%;
17
+ max-width: 33em;
18
+ margin: 4em auto 0;
19
+ }
20
+
21
+ div.dialog > div {
22
+ border: 1px solid #CCC;
23
+ border-right-color: #999;
24
+ border-left-color: #999;
25
+ border-bottom-color: #BBB;
26
+ border-top: #B00100 solid 4px;
27
+ border-top-left-radius: 9px;
28
+ border-top-right-radius: 9px;
29
+ background-color: white;
30
+ padding: 7px 12% 0;
31
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
32
+ }
33
+
34
+ h1 {
35
+ font-size: 100%;
36
+ color: #730E15;
37
+ line-height: 1.5em;
38
+ }
39
+
40
+ div.dialog > p {
41
+ margin: 0 0 1em;
42
+ padding: 1em;
43
+ background-color: #F7F7F7;
44
+ border: 1px solid #CCC;
45
+ border-right-color: #999;
46
+ border-left-color: #999;
47
+ border-bottom-color: #999;
48
+ border-bottom-left-radius: 4px;
49
+ border-bottom-right-radius: 4px;
50
+ border-top-color: #DADADA;
51
+ color: #666;
52
+ box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
53
+ }
54
+ </style>
55
+ </head>
56
+
57
+ <body>
58
+ <!-- This file lives in public/500.html -->
59
+ <div class="dialog">
60
+ <div>
61
+ <h1>We're sorry, but something went wrong.</h1>
62
+ </div>
63
+ <p>If you are the application owner check the logs for more information.</p>
64
+ </div>
65
+ </body>
66
+ </html>
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1,10 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7
+ fixtures :all
8
+
9
+ # Add more helper methods to be used by all tests here...
10
+ end
@@ -0,0 +1,8 @@
1
+ require 'test_helper'
2
+
3
+ class UserTest < ActiveSupport::TestCase
4
+ test "use factory of some_railtie" do
5
+ user = FactoryBot.create(:factory_from_some_railtie)
6
+ assert_equal 'Artem', user.name
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,176 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: factory_bot_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0.alpha
5
+ platform: ruby
6
+ authors:
7
+ - Joe Ferris
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-01-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: railties
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.0.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.0.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: factory_bot
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.0.alpha
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.0.alpha
41
+ description: |-
42
+ factory_bot_rails provides integration between
43
+ factory_bot and rails 3 or newer (currently just automatic factory definition
44
+ loading)
45
+ email: jferris@thoughtbot.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - Appraisals
51
+ - CONTRIBUTING.md
52
+ - Gemfile
53
+ - Gemfile.lock
54
+ - LICENSE
55
+ - NEWS
56
+ - README.md
57
+ - Rakefile
58
+ - bin/setup
59
+ - factory_bot_rails-1.0.0.gem
60
+ - factory_bot_rails.gemspec
61
+ - factory_girl_rails.gemspec
62
+ - features/fixture_replacement_config.feature
63
+ - features/generators.feature
64
+ - features/load_definitions.feature
65
+ - features/step_definitions/appraisal.rb
66
+ - features/step_definitions/rails_steps.rb
67
+ - features/support/env.rb
68
+ - gemfiles/rails3.2.gemfile
69
+ - gemfiles/rails3.2.gemfile.lock
70
+ - gemfiles/rails4.1.gemfile
71
+ - gemfiles/rails4.1.gemfile.lock
72
+ - gemfiles/rails4.2.gemfile
73
+ - gemfiles/rails4.2.gemfile.lock
74
+ - gemfiles/rails5.0.gemfile
75
+ - gemfiles/rails5.0.gemfile.lock
76
+ - lib/factory_bot_rails.rb
77
+ - lib/factory_bot_rails/generator.rb
78
+ - lib/factory_bot_rails/generators/non_rspec_generator.rb
79
+ - lib/factory_bot_rails/generators/null_generator.rb
80
+ - lib/factory_bot_rails/generators/rspec_generator.rb
81
+ - lib/factory_bot_rails/railtie.rb
82
+ - lib/generators/factory_bot.rb
83
+ - lib/generators/factory_bot/model/model_generator.rb
84
+ - tmp/aruba/testapp/Gemfile
85
+ - tmp/aruba/testapp/Gemfile.lock
86
+ - tmp/aruba/testapp/README.md
87
+ - tmp/aruba/testapp/Rakefile
88
+ - tmp/aruba/testapp/app/assets/config/manifest.js
89
+ - tmp/aruba/testapp/app/assets/javascripts/application.js
90
+ - tmp/aruba/testapp/app/assets/javascripts/cable.js
91
+ - tmp/aruba/testapp/app/assets/stylesheets/application.css
92
+ - tmp/aruba/testapp/app/channels/application_cable/channel.rb
93
+ - tmp/aruba/testapp/app/channels/application_cable/connection.rb
94
+ - tmp/aruba/testapp/app/controllers/application_controller.rb
95
+ - tmp/aruba/testapp/app/helpers/application_helper.rb
96
+ - tmp/aruba/testapp/app/jobs/application_job.rb
97
+ - tmp/aruba/testapp/app/mailers/application_mailer.rb
98
+ - tmp/aruba/testapp/app/models/application_record.rb
99
+ - tmp/aruba/testapp/app/models/user.rb
100
+ - tmp/aruba/testapp/app/views/layouts/application.html.erb
101
+ - tmp/aruba/testapp/app/views/layouts/mailer.html.erb
102
+ - tmp/aruba/testapp/app/views/layouts/mailer.text.erb
103
+ - tmp/aruba/testapp/bin/bundle
104
+ - tmp/aruba/testapp/bin/rails
105
+ - tmp/aruba/testapp/bin/rake
106
+ - tmp/aruba/testapp/bin/setup
107
+ - tmp/aruba/testapp/bin/spring
108
+ - tmp/aruba/testapp/bin/update
109
+ - tmp/aruba/testapp/config.ru
110
+ - tmp/aruba/testapp/config/application.rb
111
+ - tmp/aruba/testapp/config/boot.rb
112
+ - tmp/aruba/testapp/config/cable.yml
113
+ - tmp/aruba/testapp/config/database.yml
114
+ - tmp/aruba/testapp/config/environment.rb
115
+ - tmp/aruba/testapp/config/environments/development.rb
116
+ - tmp/aruba/testapp/config/environments/production.rb
117
+ - tmp/aruba/testapp/config/environments/test.rb
118
+ - tmp/aruba/testapp/config/initializers/application_controller_renderer.rb
119
+ - tmp/aruba/testapp/config/initializers/assets.rb
120
+ - tmp/aruba/testapp/config/initializers/backtrace_silencers.rb
121
+ - tmp/aruba/testapp/config/initializers/cookies_serializer.rb
122
+ - tmp/aruba/testapp/config/initializers/filter_parameter_logging.rb
123
+ - tmp/aruba/testapp/config/initializers/inflections.rb
124
+ - tmp/aruba/testapp/config/initializers/mime_types.rb
125
+ - tmp/aruba/testapp/config/initializers/new_framework_defaults.rb
126
+ - tmp/aruba/testapp/config/initializers/session_store.rb
127
+ - tmp/aruba/testapp/config/initializers/wrap_parameters.rb
128
+ - tmp/aruba/testapp/config/locales/en.yml
129
+ - tmp/aruba/testapp/config/puma.rb
130
+ - tmp/aruba/testapp/config/routes.rb
131
+ - tmp/aruba/testapp/config/secrets.yml
132
+ - tmp/aruba/testapp/config/spring.rb
133
+ - tmp/aruba/testapp/db/development.sqlite3
134
+ - tmp/aruba/testapp/db/migrate/1_create_users.rb
135
+ - tmp/aruba/testapp/db/schema.rb
136
+ - tmp/aruba/testapp/db/seeds.rb
137
+ - tmp/aruba/testapp/db/test.sqlite3
138
+ - tmp/aruba/testapp/lib/some_railtie/factories.rb
139
+ - tmp/aruba/testapp/lib/some_railtie/railties.rb
140
+ - tmp/aruba/testapp/log/development.log
141
+ - tmp/aruba/testapp/log/test.log
142
+ - tmp/aruba/testapp/public/404.html
143
+ - tmp/aruba/testapp/public/422.html
144
+ - tmp/aruba/testapp/public/500.html
145
+ - tmp/aruba/testapp/public/apple-touch-icon-precomposed.png
146
+ - tmp/aruba/testapp/public/apple-touch-icon.png
147
+ - tmp/aruba/testapp/public/favicon.ico
148
+ - tmp/aruba/testapp/public/robots.txt
149
+ - tmp/aruba/testapp/test/test_helper.rb
150
+ - tmp/aruba/testapp/test/unit/user_test.rb
151
+ homepage: http://github.com/thoughtbot/factory_bot_rails
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">"
167
+ - !ruby/object:Gem::Version
168
+ version: 1.3.1
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.5.1
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: factory_bot_rails provides integration between factory_bot and rails 3 or
175
+ newer
176
+ test_files: []