sandboxy 2.0.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (208) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/README.md +26 -36
  4. data/{examples/rails_example/app → app}/models/sandbox.rb +1 -1
  5. data/lib/generators/sandboxy_generator.rb +0 -4
  6. data/lib/generators/templates/initializer.rb +7 -7
  7. data/lib/generators/templates/migration.rb.erb +4 -9
  8. data/lib/sandboxy.rb +2 -9
  9. data/lib/sandboxy/configuration.rb +37 -10
  10. data/lib/sandboxy/engine.rb +6 -0
  11. data/lib/sandboxy/middleware.rb +3 -3
  12. data/lib/sandboxy/railtie.rb +7 -6
  13. data/lib/sandboxy/sandboxed.rb +69 -19
  14. data/lib/sandboxy/version.rb +1 -1
  15. metadata +5 -197
  16. data/.github/issue_template.md +0 -14
  17. data/.github/pull_request_template.md +0 -21
  18. data/.gitignore +0 -8
  19. data/.travis.yml +0 -3
  20. data/CODE_OF_CONDUCT.md +0 -46
  21. data/CONTRIBUTING.md +0 -1
  22. data/DEPRECATIONS.md +0 -5
  23. data/Gemfile +0 -9
  24. data/INSTALL.md +0 -3
  25. data/Rakefile +0 -15
  26. data/examples/rails_example/.gitignore +0 -23
  27. data/examples/rails_example/Gemfile +0 -54
  28. data/examples/rails_example/README.md +0 -24
  29. data/examples/rails_example/Rakefile +0 -6
  30. data/examples/rails_example/app/api/books/api.rb +0 -33
  31. data/examples/rails_example/app/assets/config/manifest.js +0 -3
  32. data/examples/rails_example/app/assets/images/.keep +0 -0
  33. data/examples/rails_example/app/assets/javascripts/application.js +0 -15
  34. data/examples/rails_example/app/assets/javascripts/applications.coffee +0 -3
  35. data/examples/rails_example/app/assets/javascripts/authors.coffee +0 -3
  36. data/examples/rails_example/app/assets/javascripts/books.coffee +0 -3
  37. data/examples/rails_example/app/assets/javascripts/cable.js +0 -13
  38. data/examples/rails_example/app/assets/javascripts/channels/.keep +0 -0
  39. data/examples/rails_example/app/assets/javascripts/libraries.coffee +0 -3
  40. data/examples/rails_example/app/assets/javascripts/sandbox.coffee +0 -3
  41. data/examples/rails_example/app/assets/stylesheets/application.css +0 -15
  42. data/examples/rails_example/app/assets/stylesheets/applications.scss +0 -3
  43. data/examples/rails_example/app/assets/stylesheets/authors.scss +0 -3
  44. data/examples/rails_example/app/assets/stylesheets/books.scss +0 -3
  45. data/examples/rails_example/app/assets/stylesheets/libraries.scss +0 -3
  46. data/examples/rails_example/app/assets/stylesheets/sandbox.scss +0 -3
  47. data/examples/rails_example/app/assets/stylesheets/scaffolds.scss +0 -84
  48. data/examples/rails_example/app/channels/application_cable/channel.rb +0 -4
  49. data/examples/rails_example/app/channels/application_cable/connection.rb +0 -4
  50. data/examples/rails_example/app/controllers/application_controller.rb +0 -7
  51. data/examples/rails_example/app/controllers/applications_controller.rb +0 -74
  52. data/examples/rails_example/app/controllers/authors_controller.rb +0 -77
  53. data/examples/rails_example/app/controllers/books_controller.rb +0 -77
  54. data/examples/rails_example/app/controllers/concerns/.keep +0 -0
  55. data/examples/rails_example/app/controllers/libraries_controller.rb +0 -77
  56. data/examples/rails_example/app/controllers/sandbox_controller.rb +0 -6
  57. data/examples/rails_example/app/helpers/application_helper.rb +0 -2
  58. data/examples/rails_example/app/helpers/applications_helper.rb +0 -2
  59. data/examples/rails_example/app/helpers/authors_helper.rb +0 -2
  60. data/examples/rails_example/app/helpers/books_helper.rb +0 -2
  61. data/examples/rails_example/app/helpers/libraries_helper.rb +0 -2
  62. data/examples/rails_example/app/helpers/sandbox_helper.rb +0 -2
  63. data/examples/rails_example/app/jobs/application_job.rb +0 -2
  64. data/examples/rails_example/app/mailers/application_mailer.rb +0 -4
  65. data/examples/rails_example/app/models/application.rb +0 -14
  66. data/examples/rails_example/app/models/application_record.rb +0 -3
  67. data/examples/rails_example/app/models/author.rb +0 -2
  68. data/examples/rails_example/app/models/book.rb +0 -2
  69. data/examples/rails_example/app/models/concerns/.keep +0 -0
  70. data/examples/rails_example/app/models/library.rb +0 -2
  71. data/examples/rails_example/app/views/applications/_application.json.jbuilder +0 -2
  72. data/examples/rails_example/app/views/applications/_form.html.erb +0 -19
  73. data/examples/rails_example/app/views/applications/edit.html.erb +0 -6
  74. data/examples/rails_example/app/views/applications/index.html.erb +0 -25
  75. data/examples/rails_example/app/views/applications/index.json.jbuilder +0 -1
  76. data/examples/rails_example/app/views/applications/new.html.erb +0 -5
  77. data/examples/rails_example/app/views/applications/show.html.erb +0 -7
  78. data/examples/rails_example/app/views/applications/show.json.jbuilder +0 -1
  79. data/examples/rails_example/app/views/authors/_author.json.jbuilder +0 -2
  80. data/examples/rails_example/app/views/authors/_form.html.erb +0 -19
  81. data/examples/rails_example/app/views/authors/edit.html.erb +0 -6
  82. data/examples/rails_example/app/views/authors/index.html.erb +0 -25
  83. data/examples/rails_example/app/views/authors/index.json.jbuilder +0 -1
  84. data/examples/rails_example/app/views/authors/new.html.erb +0 -5
  85. data/examples/rails_example/app/views/authors/show.html.erb +0 -4
  86. data/examples/rails_example/app/views/authors/show.json.jbuilder +0 -1
  87. data/examples/rails_example/app/views/books/_book.json.jbuilder +0 -2
  88. data/examples/rails_example/app/views/books/_form.html.erb +0 -19
  89. data/examples/rails_example/app/views/books/edit.html.erb +0 -6
  90. data/examples/rails_example/app/views/books/index.html.erb +0 -25
  91. data/examples/rails_example/app/views/books/index.json.jbuilder +0 -1
  92. data/examples/rails_example/app/views/books/new.html.erb +0 -5
  93. data/examples/rails_example/app/views/books/show.html.erb +0 -4
  94. data/examples/rails_example/app/views/books/show.json.jbuilder +0 -1
  95. data/examples/rails_example/app/views/layouts/application.html.erb +0 -14
  96. data/examples/rails_example/app/views/layouts/mailer.html.erb +0 -13
  97. data/examples/rails_example/app/views/layouts/mailer.text.erb +0 -1
  98. data/examples/rails_example/app/views/libraries/_form.html.erb +0 -19
  99. data/examples/rails_example/app/views/libraries/_library.json.jbuilder +0 -2
  100. data/examples/rails_example/app/views/libraries/edit.html.erb +0 -6
  101. data/examples/rails_example/app/views/libraries/index.html.erb +0 -25
  102. data/examples/rails_example/app/views/libraries/index.json.jbuilder +0 -1
  103. data/examples/rails_example/app/views/libraries/new.html.erb +0 -5
  104. data/examples/rails_example/app/views/libraries/show.html.erb +0 -4
  105. data/examples/rails_example/app/views/libraries/show.json.jbuilder +0 -1
  106. data/examples/rails_example/bin/bundle +0 -3
  107. data/examples/rails_example/bin/rails +0 -4
  108. data/examples/rails_example/bin/rake +0 -4
  109. data/examples/rails_example/bin/setup +0 -38
  110. data/examples/rails_example/bin/update +0 -29
  111. data/examples/rails_example/bin/yarn +0 -11
  112. data/examples/rails_example/config.ru +0 -5
  113. data/examples/rails_example/config/application.rb +0 -18
  114. data/examples/rails_example/config/boot.rb +0 -3
  115. data/examples/rails_example/config/cable.yml +0 -10
  116. data/examples/rails_example/config/database.yml +0 -25
  117. data/examples/rails_example/config/environment.rb +0 -5
  118. data/examples/rails_example/config/environments/development.rb +0 -54
  119. data/examples/rails_example/config/environments/production.rb +0 -91
  120. data/examples/rails_example/config/environments/test.rb +0 -42
  121. data/examples/rails_example/config/initializers/application_controller_renderer.rb +0 -6
  122. data/examples/rails_example/config/initializers/assets.rb +0 -14
  123. data/examples/rails_example/config/initializers/backtrace_silencers.rb +0 -7
  124. data/examples/rails_example/config/initializers/cookies_serializer.rb +0 -5
  125. data/examples/rails_example/config/initializers/filter_parameter_logging.rb +0 -4
  126. data/examples/rails_example/config/initializers/grape.rb +0 -2
  127. data/examples/rails_example/config/initializers/inflections.rb +0 -16
  128. data/examples/rails_example/config/initializers/mime_types.rb +0 -4
  129. data/examples/rails_example/config/initializers/sandboxy.rb +0 -13
  130. data/examples/rails_example/config/initializers/wrap_parameters.rb +0 -14
  131. data/examples/rails_example/config/locales/en.yml +0 -33
  132. data/examples/rails_example/config/puma.rb +0 -56
  133. data/examples/rails_example/config/routes.rb +0 -13
  134. data/examples/rails_example/config/secrets.yml +0 -32
  135. data/examples/rails_example/db/migrate/20170827184048_create_books.rb +0 -9
  136. data/examples/rails_example/db/migrate/20170827184054_create_authors.rb +0 -9
  137. data/examples/rails_example/db/migrate/20170827184106_create_libraries.rb +0 -9
  138. data/examples/rails_example/db/migrate/20170827184304_create_applications.rb +0 -11
  139. data/examples/rails_example/db/migrate/20170827190815_sandboxy_migration.rb +0 -14
  140. data/examples/rails_example/db/schema.rb +0 -50
  141. data/examples/rails_example/db/seeds.rb +0 -7
  142. data/examples/rails_example/lib/assets/.keep +0 -0
  143. data/examples/rails_example/lib/tasks/.keep +0 -0
  144. data/examples/rails_example/package.json +0 -5
  145. data/examples/rails_example/public/404.html +0 -67
  146. data/examples/rails_example/public/422.html +0 -67
  147. data/examples/rails_example/public/500.html +0 -66
  148. data/examples/rails_example/public/apple-touch-icon-precomposed.png +0 -0
  149. data/examples/rails_example/public/apple-touch-icon.png +0 -0
  150. data/examples/rails_example/public/favicon.ico +0 -0
  151. data/examples/rails_example/public/robots.txt +0 -1
  152. data/examples/rails_example/test/application_system_test_case.rb +0 -5
  153. data/examples/rails_example/test/controllers/.keep +0 -0
  154. data/examples/rails_example/test/controllers/applications_controller_test.rb +0 -48
  155. data/examples/rails_example/test/controllers/authors_controller_test.rb +0 -48
  156. data/examples/rails_example/test/controllers/books_controller_test.rb +0 -48
  157. data/examples/rails_example/test/controllers/libraries_controller_test.rb +0 -48
  158. data/examples/rails_example/test/controllers/sandbox_controller_test.rb +0 -7
  159. data/examples/rails_example/test/fixtures/.keep +0 -0
  160. data/examples/rails_example/test/fixtures/applications.yml +0 -11
  161. data/examples/rails_example/test/fixtures/authors.yml +0 -11
  162. data/examples/rails_example/test/fixtures/books.yml +0 -11
  163. data/examples/rails_example/test/fixtures/files/.keep +0 -0
  164. data/examples/rails_example/test/fixtures/libraries.yml +0 -11
  165. data/examples/rails_example/test/helpers/.keep +0 -0
  166. data/examples/rails_example/test/integration/.keep +0 -0
  167. data/examples/rails_example/test/mailers/.keep +0 -0
  168. data/examples/rails_example/test/models/.keep +0 -0
  169. data/examples/rails_example/test/models/application_test.rb +0 -7
  170. data/examples/rails_example/test/models/author_test.rb +0 -7
  171. data/examples/rails_example/test/models/book_test.rb +0 -7
  172. data/examples/rails_example/test/models/library_test.rb +0 -7
  173. data/examples/rails_example/test/system/.keep +0 -0
  174. data/examples/rails_example/test/system/applications_test.rb +0 -9
  175. data/examples/rails_example/test/system/authors_test.rb +0 -9
  176. data/examples/rails_example/test/system/books_test.rb +0 -9
  177. data/examples/rails_example/test/system/libraries_test.rb +0 -9
  178. data/examples/rails_example/test/test_helper.rb +0 -9
  179. data/examples/rails_example/tmp/.keep +0 -0
  180. data/examples/rails_example/vendor/.keep +0 -0
  181. data/init.rb +0 -1
  182. data/lib/generators/templates/model.rb +0 -7
  183. data/sandboxy.gemspec +0 -28
  184. data/test/dummy30/Gemfile +0 -1
  185. data/test/dummy30/Rakefile +0 -4
  186. data/test/dummy30/app/models/application_record.rb +0 -3
  187. data/test/dummy30/app/models/shared_sandbox.rb +0 -4
  188. data/test/dummy30/app/models/some.rb +0 -3
  189. data/test/dummy30/app/models/user.rb +0 -3
  190. data/test/dummy30/config.ru +0 -2
  191. data/test/dummy30/config/application.rb +0 -14
  192. data/test/dummy30/config/boot.rb +0 -10
  193. data/test/dummy30/config/database.yml +0 -6
  194. data/test/dummy30/config/environment.rb +0 -5
  195. data/test/dummy30/config/environments/development.rb +0 -7
  196. data/test/dummy30/config/environments/test.rb +0 -6
  197. data/test/dummy30/config/initializers/sandboxy.rb +0 -13
  198. data/test/dummy30/config/initializers/secret_token.rb +0 -1
  199. data/test/dummy30/config/initializers/session_store.rb +0 -1
  200. data/test/dummy30/config/locales/en.yml +0 -2
  201. data/test/dummy30/config/routes.rb +0 -2
  202. data/test/dummy30/config/sandboxy.yml +0 -1
  203. data/test/factories/somes.rb +0 -17
  204. data/test/factories/users.rb +0 -5
  205. data/test/sandbox_test.rb +0 -51
  206. data/test/sandboxed_test.rb +0 -58
  207. data/test/schema.rb +0 -18
  208. data/test/test_helper.rb +0 -20
File without changes
File without changes
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require 'sandboxy'
@@ -1,7 +0,0 @@
1
- class Sandbox < ActiveRecord::Base
2
-
3
- self.table_name = 'sandboxy'
4
-
5
- belongs_to :sandboxed, polymorphic: true
6
-
7
- end
@@ -1,28 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path(File.join('..', 'lib', 'sandboxy', 'version'), __FILE__)
3
-
4
- Gem::Specification.new do |gem|
5
- gem.name = 'sandboxy'
6
- gem.version = Sandboxy::VERSION
7
- gem.platform = Gem::Platform::RUBY
8
- gem.summary = 'Virtual data-oriented environments for Rails'
9
- gem.description = 'Sandboxy allows you to use virtual data-oriented environments inside a Rails application while being able to switch in between at runtime. It achieves that by using a combination of Rack Middleware and ActiveRecord.'
10
- gem.authors = 'Jonas Hübotter'
11
- gem.email = 'jonas.huebotter@gmail.com'
12
- gem.homepage = 'https://github.com/jonhue/sandboxy'
13
- gem.license = 'MIT'
14
-
15
- gem.files = `git ls-files`.split("\n")
16
- gem.require_paths = ['lib']
17
-
18
- gem.post_install_message = IO.read('INSTALL.md')
19
-
20
- gem.required_ruby_version = '>= 2.3'
21
-
22
- gem.add_dependency 'rails', '>= 5.0'
23
-
24
- gem.add_development_dependency 'sqlite3', '~> 1.3'
25
- gem.add_development_dependency 'shoulda', '~> 3.5'
26
- gem.add_development_dependency 'factory_girl', '~> 4.8'
27
- gem.add_development_dependency 'tzinfo-data', '~> 1.2017'
28
- end
@@ -1 +0,0 @@
1
- gem 'rails', '~> 5.1.3'
@@ -1,4 +0,0 @@
1
- require File.expand_path '../config/application', __FILE__
2
- require 'rake'
3
-
4
- Dummy::Application.load_tasks
@@ -1,3 +0,0 @@
1
- class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
3
- end
@@ -1,4 +0,0 @@
1
- class SharedSandbox < ApplicationRecord
2
- self.abstract_class = true
3
- sandboxy
4
- end
@@ -1,3 +0,0 @@
1
- class Some < SharedSandbox
2
- validates_presence_of :name
3
- end
@@ -1,3 +0,0 @@
1
- class User < SharedSandbox
2
- validates_presence_of :name
3
- end
@@ -1,2 +0,0 @@
1
- require ::File.expand_path '../config/environment', __FILE__
2
- run Dummy::Application
@@ -1,14 +0,0 @@
1
- require File.expand_path '../boot', __FILE__
2
-
3
- require 'active_model/railtie'
4
- require 'active_record/railtie'
5
-
6
- Bundler.require
7
- require 'sandboxy'
8
-
9
- module Dummy
10
- class Application < Rails::Application
11
- config.encoding = 'utf-8'
12
- config.filter_parameters += [:password]
13
- end
14
- end
@@ -1,10 +0,0 @@
1
- require 'rubygems'
2
- gemfile = File.expand_path '../../../../Gemfile', __FILE__
3
-
4
- if File.exist?(gemfile)
5
- ENV['BUNDLE_GEMFILE'] = gemfile
6
- require 'bundler'
7
- Bundler.setup
8
- end
9
-
10
- $:.unshift File.expand_path '../../../../lib', __FILE__
@@ -1,6 +0,0 @@
1
- test:
2
- adapter: sqlite3
3
- database: ':memory:'
4
- development:
5
- adapter: sqlite3
6
- database: ':memory:'
@@ -1,5 +0,0 @@
1
- # Load the rails application
2
- require File.expand_path '../application', __FILE__
3
-
4
- # Initialize the rails application
5
- Dummy::Application.initialize!
@@ -1,7 +0,0 @@
1
- Dummy::Application.configure do
2
- config.cache_classes = false
3
- config.whiny_nils = true
4
- config.consider_all_requests_local = true
5
- config.active_support.deprecation = :log
6
- config.eager_load = false
7
- end
@@ -1,6 +0,0 @@
1
- Dummy::Application.configure do
2
- config.cache_classes = true
3
- config.consider_all_requests_local = true
4
- config.active_support.deprecation = :stderr
5
- config.eager_load = false
6
- end
@@ -1,13 +0,0 @@
1
- Sandboxy.configure do |config|
2
-
3
- # Set your environment default: Must be either `live` or `sandbox`.
4
- # This is the environment that your app boots with.
5
- # By default it gets refreshed with every new request to your server.
6
- # config.environment = 'live'
7
-
8
- # Specify whether to retain your current app environment on new requests.
9
- # If set to true, your app will only load your environment default when starting.
10
- # Every additional switch of your environment at runtime will then not be automatically resolved to your environment default on a new request.
11
- # config.retain_environment = false
12
-
13
- end
@@ -1 +0,0 @@
1
- Dummy::Application.config.secret_token = '7b0ce915dc4c2ee60581c2769798abb5e4078292ad23670fc8d728953fc13aec19863558873234816b58a54f6a35be58b2b0a26749a7dfddcd2f02ee82d7e94f'
@@ -1 +0,0 @@
1
- Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
@@ -1,2 +0,0 @@
1
- en:
2
- hello: 'Hello world'
@@ -1,2 +0,0 @@
1
- Dummy::Application.routes.draw do
2
- end
@@ -1 +0,0 @@
1
- # Use defaults
@@ -1,17 +0,0 @@
1
- FactoryGirl.define do
2
- factory :post, class: Some do |b|
3
- b.name 'Post'
4
- end
5
-
6
- factory :purchase, class: Some do |b|
7
- b.name 'Purchase'
8
- end
9
-
10
- factory :book, class: Some do |b|
11
- b.name 'Book'
12
- end
13
-
14
- factory :receipt, class: Some do |b|
15
- b.name 'Receipt'
16
- end
17
- end
@@ -1,5 +0,0 @@
1
- FactoryGirl.define do
2
- factory :sam, class: User do |u|
3
- u.name 'Sam'
4
- end
5
- end
@@ -1,51 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
-
3
- class SandboxTest < ActiveSupport::TestCase
4
-
5
- context 'scopes' do
6
- should 'be defined' do
7
- assert Some.respond_to? :live_scoped
8
- assert Some.respond_to? :sandboxed_scoped
9
- assert Some.respond_to? :live
10
- assert Some.respond_to? :sandboxed
11
- assert Some.respond_to? :desandbox
12
- end
13
- end
14
-
15
- context 'sandbox' do
16
- setup do
17
- @post = FactoryGirl.create :post
18
- @purchase = FactoryGirl.create :purchase
19
- $sandbox = true
20
- @book = FactoryGirl.create :book
21
- @receipt = FactoryGirl.create :receipt
22
- end
23
-
24
- context '#desandbox' do
25
- should 'return all records' do
26
- assert_equal Some.unscope(:joins, :where).all, Some.desandbox
27
- end
28
- end
29
-
30
- context '#live' do
31
- setup do
32
- $sandbox = false
33
- end
34
-
35
- should 'return all live records' do
36
- assert_equal Some.all, Some.live
37
- end
38
- end
39
-
40
- context '#sandboxed' do
41
- setup do
42
- $sandbox = true
43
- end
44
-
45
- should 'return all sandboxed records' do
46
- assert_equal Some.all, Some.sandboxed
47
- end
48
- end
49
- end
50
-
51
- end
@@ -1,58 +0,0 @@
1
- require File.dirname(__FILE__) + '/test_helper'
2
-
3
- class SandboxedTest < ActiveSupport::TestCase
4
-
5
- context 'instance methods' do
6
- setup do
7
- @post = FactoryGirl.create :post
8
- end
9
-
10
- should 'be defined' do
11
- assert @post.respond_to? :make_sandboxed
12
- assert @post.respond_to? :make_live
13
- assert @post.respond_to? :sandboxed?
14
- assert @post.respond_to? :live?
15
- end
16
- end
17
-
18
- context 'sandboxed' do
19
- setup do
20
- @post = FactoryGirl.create :post
21
- @purchase = FactoryGirl.create :purchase
22
- $sandbox = true
23
- @book = FactoryGirl.create :book
24
- @receipt = FactoryGirl.create :receipt
25
- end
26
-
27
- context '#sandboxed?' do
28
- should 'be true for @book & @receipt' do
29
- @book.make_sandboxed ##### SHOULD NOT BE NECESSARY #####
30
- @receipt.make_sandboxed ##### SHOULD NOT BE NECESSARY #####
31
- assert_equal true, @book.sandboxed?
32
- assert_equal true, @receipt.sandboxed?
33
- end
34
- end
35
-
36
- context '#live?' do
37
- should 'be true for @post & @purchase' do
38
- assert_equal true, @post.live?
39
- assert_equal true, @purchase.live?
40
- end
41
- end
42
-
43
- context '#make_sandboxed' do
44
- should 'move record to sandboxed environment' do
45
- @purchase.make_sandboxed
46
- assert_equal true, @purchase.sandboxed?
47
- end
48
- end
49
-
50
- context '#make_live' do
51
- should 'move record to live environment' do
52
- @receipt.make_live
53
- assert_equal true, @receipt.live?
54
- end
55
- end
56
- end
57
-
58
- end
@@ -1,18 +0,0 @@
1
- ActiveRecord::Schema.define version: 0 do
2
-
3
- create_table :sandboxy, force: true do |t|
4
- t.integer :sandboxed_id, null: false
5
- t.string :sandboxed_type, null: false
6
- t.datetime :created_at
7
- t.datetime :updated_at
8
- end
9
-
10
- create_table :users, force: true do |t|
11
- t.column :name, :string
12
- end
13
-
14
- create_table :somes, force: true do |t|
15
- t.column :name, :string
16
- end
17
-
18
- end
@@ -1,20 +0,0 @@
1
- # Configure Rails Envinronment
2
- ENV['RAILS_ENV'] = 'test'
3
-
4
- # # Test Coverage
5
- # require 'simplecov'
6
- # SimpleCov.start
7
-
8
- require File.expand_path '../dummy30/config/environment.rb', __FILE__
9
- require 'rails/test_help'
10
-
11
- ActiveRecord::Base.logger = Logger.new File.dirname(__FILE__) + '/debug.log'
12
- ActiveRecord::Migration.verbose = false
13
-
14
- load File.dirname(__FILE__) + '/schema.rb'
15
-
16
- require File.dirname(__FILE__) + '/../lib/generators/templates/model.rb'
17
-
18
- require 'shoulda'
19
- require 'factory_girl'
20
- FactoryGirl.find_definitions