automigration 0.2.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. data/.rspec +1 -0
  2. data/.travis.yml +1 -3
  3. data/CHANGELOG.md +13 -0
  4. data/README.md +44 -23
  5. data/Rakefile +10 -12
  6. data/automigration.gemspec +4 -0
  7. data/lib/automigration.rb +5 -38
  8. data/lib/automigration/active_record_ext.rb +17 -0
  9. data/lib/automigration/db_column.rb +32 -0
  10. data/lib/automigration/dsl.rb +29 -0
  11. data/lib/automigration/engine.rb +23 -0
  12. data/lib/automigration/field.rb +75 -0
  13. data/lib/automigration/fields_keeper.rb +85 -0
  14. data/lib/automigration/migrator.rb +38 -77
  15. data/lib/automigration/version.rb +1 -1
  16. data/spec/dummy/.gitignore +2 -0
  17. data/spec/dummy/README.rdoc +261 -0
  18. data/spec/dummy/Rakefile +7 -0
  19. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  20. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  21. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  22. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  23. data/{log → spec/dummy/app/mailers}/.gitkeep +0 -0
  24. data/spec/dummy/app/models/.gitkeep +0 -0
  25. data/spec/dummy/app/models/accessible_model.rb +6 -0
  26. data/spec/dummy/app/models/auto_migration1.rb +14 -0
  27. data/{test → spec/dummy/app}/models/auto_migration1a.rb +2 -2
  28. data/{test → spec/dummy/app}/models/auto_migration2.rb +2 -2
  29. data/spec/dummy/app/models/auto_migration3.rb +5 -0
  30. data/{test → spec/dummy/app}/models/belongs_to_model.rb +0 -0
  31. data/{test → spec/dummy/app}/models/boolean_model.rb +0 -0
  32. data/{test → spec/dummy/app}/models/form_field.rb +0 -0
  33. data/{test → spec/dummy/app}/models/form_field2.rb +1 -1
  34. data/{test → spec/dummy/app}/models/local_name.rb +0 -0
  35. data/{test → spec/dummy/app}/models/local_name2.rb +0 -0
  36. data/{test → spec/dummy/app}/models/not_automigrable.rb +0 -0
  37. data/{test → spec/dummy/app}/models/searchable.rb +0 -0
  38. data/{test → spec/dummy/app}/models/simple.rb +0 -0
  39. data/{test → spec/dummy/app}/models/user1.rb +0 -0
  40. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  41. data/spec/dummy/config.ru +4 -0
  42. data/spec/dummy/config/application.rb +56 -0
  43. data/spec/dummy/config/boot.rb +10 -0
  44. data/spec/dummy/config/database.yml +14 -0
  45. data/spec/dummy/config/environment.rb +5 -0
  46. data/spec/dummy/config/environments/development.rb +37 -0
  47. data/spec/dummy/config/environments/production.rb +67 -0
  48. data/spec/dummy/config/environments/test.rb +37 -0
  49. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  50. data/spec/dummy/config/initializers/inflections.rb +15 -0
  51. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  52. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  53. data/spec/dummy/config/initializers/session_store.rb +8 -0
  54. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  55. data/spec/dummy/config/locales/en.yml +5 -0
  56. data/spec/dummy/config/routes.rb +58 -0
  57. data/spec/dummy/db/.gitkeep +0 -0
  58. data/spec/dummy/lib/assets/.gitkeep +0 -0
  59. data/spec/dummy/log/.gitkeep +0 -0
  60. data/spec/dummy/public/404.html +26 -0
  61. data/spec/dummy/public/422.html +26 -0
  62. data/spec/dummy/public/500.html +25 -0
  63. data/spec/dummy/public/favicon.ico +0 -0
  64. data/spec/dummy/script/rails +6 -0
  65. data/spec/lib/accessible_spec.rb +13 -0
  66. data/spec/lib/auto_migration_spec.rb +155 -0
  67. data/spec/lib/belongs_to_spec.rb +38 -0
  68. data/spec/lib/db_column_spec.rb +21 -0
  69. data/spec/lib/fields_spec.rb +22 -0
  70. data/spec/spec_helper.rb +24 -0
  71. metadata +106 -47
  72. data/lib/automigration/base_extention.rb +0 -15
  73. data/lib/automigration/fields/belongs_to.rb +0 -29
  74. data/lib/automigration/fields/boolean.rb +0 -9
  75. data/lib/automigration/fields/date.rb +0 -9
  76. data/lib/automigration/fields/datetime.rb +0 -9
  77. data/lib/automigration/fields/float.rb +0 -9
  78. data/lib/automigration/fields/integer.rb +0 -9
  79. data/lib/automigration/fields/password.rb +0 -9
  80. data/lib/automigration/fields/string.rb +0 -9
  81. data/lib/automigration/fields/sys/base.rb +0 -95
  82. data/lib/automigration/fields/sys/db_column.rb +0 -36
  83. data/lib/automigration/fields/sys/keeper.rb +0 -113
  84. data/lib/automigration/fields/sys/slice_creater.rb +0 -32
  85. data/lib/automigration/fields/text.rb +0 -9
  86. data/lib/automigration/fields/time.rb +0 -9
  87. data/test/auto_migration_test.rb +0 -186
  88. data/test/belongs_to_test.rb +0 -51
  89. data/test/db_column_test.rb +0 -23
  90. data/test/fields/accessible_test.rb +0 -13
  91. data/test/fields_test.rb +0 -34
  92. data/test/models/accessible_model.rb +0 -6
  93. data/test/models/auto_migration1.rb +0 -14
  94. data/test/models/auto_migration3.rb +0 -5
  95. data/test/test_helper.rb +0 -35
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id))(.:format)'
58
+ end
File without changes
File without changes
File without changes
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'accessible' do
4
+ it "mass assignment deny" do
5
+ lambda {
6
+ AccessibleModel.create(:first => 123)
7
+ }.should_not raise_error
8
+
9
+ lambda {
10
+ AccessibleModel.create(:second => 345)
11
+ }.should raise_error
12
+ end
13
+ end
@@ -0,0 +1,155 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'automigration' do
4
+ let(:migrations_dir) { File.expand_path("../../../tmp/migrations", __FILE__) }
5
+ let(:connection) { ActiveRecord::Base.connection }
6
+
7
+ before do
8
+ @migration_paths = Automigration::Migrator.migration_paths
9
+ @system_tables = Automigration::Migrator.system_tables
10
+ end
11
+
12
+ after do
13
+ Automigration::Migrator.set_migration_paths(@migration_paths)
14
+ Automigration::Migrator.set_system_tables(@system_tables)
15
+
16
+ if connection.table_exists?('not_used_table')
17
+ connection.drop_table('not_used_table')
18
+ end
19
+
20
+ if connection.table_exists?('schema_migrations')
21
+ connection.execute('DELETE FROM schema_migrations')
22
+ end
23
+
24
+ FileUtils.rm_rf(migrations_dir)
25
+
26
+ if ActiveRecord::Base.connection.tables.index('auto_migration1s')
27
+ connection.drop_table('auto_migration1s')
28
+ end
29
+
30
+ connection.drop_table('auto_migration2s')
31
+ Automigration::Migrator.new(:skip_output => true).update_schema!
32
+ end
33
+
34
+ it 'create_table_if_need' do
35
+ connection.drop_table('auto_migration1s')
36
+ ActiveRecord::Base.connection.tables.index('auto_migration1s').should be_nil
37
+
38
+ Automigration::Migrator.new(:skip_output => true).update_schema!
39
+ ActiveRecord::Base.connection.tables.index('auto_migration1s').should_not be_nil
40
+ end
41
+
42
+ it 'remove_unused_table' do
43
+ connection.create_table('not_used_table')
44
+ ActiveRecord::Base.connection.tables.index('not_used_table').should_not be_nil
45
+
46
+ Automigration::Migrator.new(:skip_output => true).update_schema!
47
+ ActiveRecord::Base.connection.tables.index('not_used_table').should be_nil
48
+ end
49
+
50
+ it 'not_remove_unused_table_if_it_checked_as_not_migratable' do
51
+ connection.create_table('not_used_table')
52
+ Automigration::Migrator.set_system_tables(%w(not_used_table))
53
+ ActiveRecord::Base.connection.tables.index('not_used_table').should_not be_nil
54
+
55
+ Automigration::Migrator.new(:skip_output => true).update_schema!
56
+ ActiveRecord::Base.connection.tables.index('not_used_table').should_not be_nil
57
+ end
58
+
59
+ it 'clean_unused_migration' do
60
+ connection.execute('DELETE FROM schema_migrations')
61
+ connection.execute("INSERT INTO schema_migrations(version) VALUES('20110114120000')")
62
+ connection.execute("INSERT INTO schema_migrations(version) VALUES('20110114132500')")
63
+ connection.execute("INSERT INTO schema_migrations(version) VALUES('20110114193000')")
64
+
65
+ FileUtils.mkdir_p(migrations_dir)
66
+ File.open(migrations_dir + "/20110114120000_create_users.rb", "w"){|f| f.puts "# some text"}
67
+ File.open(migrations_dir + "/20110114193000_create_projects.rb", "w"){|f| f.puts "# some text"}
68
+
69
+ Automigration::Migrator.set_migration_paths([migrations_dir])
70
+
71
+ count_sql = "SELECT count(*) AS count FROM schema_migrations"
72
+ connection.execute(count_sql)[0]['count'].to_i.should == 3
73
+ Automigration::Migrator.new(:skip_output => true).update_schema!
74
+ connection.execute(count_sql)[0]['count'].to_i.should == 2
75
+ end
76
+
77
+ it 'update_column_for_model_not_change_type_dramatically' do
78
+ connection.remove_column(AutoMigration1.table_name, 'string_field')
79
+ connection.add_column(AutoMigration1.table_name, 'string_field', :integer)
80
+ AutoMigration1.reset_column_information
81
+
82
+ AutoMigration1.create!(:string_field => 123)
83
+ AutoMigration1.first.string_field.should == 123
84
+
85
+ Automigration::Migrator.new(:skip_output => true).update_schema!
86
+
87
+ AutoMigration1.first.string_field.should == '123'
88
+ end
89
+
90
+ it 'create_columns_for_model' do
91
+ AutoMigration1.new.attributes.keys.index("boolean_field").should_not be_nil
92
+ AutoMigration1.new.attributes.keys.index("integer_field").should_not be_nil
93
+ AutoMigration1.new.attributes.keys.index("float_field").should_not be_nil
94
+ AutoMigration1.new.attributes.keys.index("string_field").should_not be_nil
95
+ AutoMigration1.new.attributes.keys.index("text_field").should_not be_nil
96
+ AutoMigration1.new.attributes.keys.index("datetime_field").should_not be_nil
97
+ AutoMigration1.new.attributes.keys.index("date_field").should_not be_nil
98
+ AutoMigration1.new.attributes.keys.index("time_field").should_not be_nil
99
+ AutoMigration1.new.attributes.keys.index("additional_field").should_not be_nil
100
+
101
+ AutoMigration1.new.attributes.keys.index("created_at").should_not be_nil
102
+ AutoMigration1.new.attributes.keys.index("updated_at").should_not be_nil
103
+ end
104
+
105
+ it 'create_columns_for_model_add_field' do
106
+ AutoMigration1a.new.attributes.keys.index("additional_field").should_not be_nil
107
+ AutoMigration1a.new.attributes.keys.index("integer_field").should_not be_nil
108
+
109
+ AutoMigration1a.new.attributes.keys.index("created_at").should_not be_nil
110
+ AutoMigration1a.new.attributes.keys.index("updated_at").should_not be_nil
111
+ end
112
+
113
+ it 'create_model_without_timestamps' do
114
+ AutoMigration3.new.attributes.keys.index("created_at").should be_nil
115
+ AutoMigration3.new.attributes.keys.index("updated_at").should be_nil
116
+ end
117
+
118
+ it 'destroy_columns_for_model' do
119
+ connection.add_column(AutoMigration1.table_name, 'new_column', :string)
120
+ AutoMigration1.reset_column_information
121
+
122
+ AutoMigration1.column_names.index('new_column').should_not be_nil
123
+ Automigration::Migrator.new(:skip_output => true).update_schema!
124
+ AutoMigration1.column_names.index('new_column').should be_nil
125
+ end
126
+
127
+ it 'destroy_columns_for_model' do
128
+ connection.add_column(AutoMigration1.table_name, 'new_column', :string)
129
+ AutoMigration1.reset_column_information
130
+
131
+ AutoMigration1.column_names.index('new_column').should_not be_nil
132
+ Automigration::Migrator.new(:skip_output => true).update_schema!
133
+ AutoMigration1.column_names.index('new_column').should be_nil
134
+ end
135
+
136
+ it 'destroy_columns_for_model_if_they_are_not_migrate_attr' do
137
+ connection.add_column(AutoMigration2.table_name, 'some_attr1', :string)
138
+ connection.add_column(AutoMigration2.table_name, 'some_attr2', :string)
139
+ connection.add_column(AutoMigration2.table_name, 'some_attr3', :string)
140
+ connection.add_column(AutoMigration2.table_name, 'some_attr4', :string)
141
+ AutoMigration2.reset_column_information
142
+
143
+ AutoMigration2.column_names.index('some_attr1').should_not be_nil
144
+ AutoMigration2.column_names.index('some_attr2').should_not be_nil
145
+ AutoMigration2.column_names.index('some_attr3').should_not be_nil
146
+ AutoMigration2.column_names.index('some_attr4').should_not be_nil
147
+
148
+ Automigration::Migrator.new(:skip_output => true).update_schema!
149
+
150
+ AutoMigration2.column_names.index('some_attr1').should_not be_nil
151
+ AutoMigration2.column_names.index('some_attr2').should_not be_nil
152
+ AutoMigration2.column_names.index('some_attr3').should_not be_nil
153
+ AutoMigration2.column_names.index('some_attr4').should be_nil
154
+ end
155
+ end
@@ -0,0 +1,38 @@
1
+ require 'spec_helper'
2
+
3
+ describe "belongs to" do
4
+ before do
5
+ @simple = Simple.create
6
+ @obj = BelongsToModel.create
7
+ end
8
+
9
+ after do
10
+ Simple.destroy_all
11
+ end
12
+
13
+ it "properties" do
14
+ @obj.simple.should be_nil
15
+ @obj.simple_id.should be_nil
16
+ end
17
+
18
+ it "mass assignment by object" do
19
+ @obj.update_attributes(:simple => @simple)
20
+ @simple.id.should == @obj.simple_id
21
+ end
22
+
23
+ it "mass assignment by id" do
24
+ @obj.update_attributes(:simple_id => @simple.id)
25
+ @simple.id.should == @obj.simple_id
26
+ end
27
+
28
+ it "use different class name" do
29
+ @obj.update_attributes(:some => @simple)
30
+ @simple.should == @obj.some
31
+ end
32
+
33
+ it "parent and children" do
34
+ child = BelongsToModel.find(BelongsToModel.create(:parent => @obj).id)
35
+ @obj.should == child.parent
36
+ @obj.id.should == child.parent_id
37
+ end
38
+ end
@@ -0,0 +1,21 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'db column' do
4
+ it "the same" do
5
+ a = Automigration::DbColumn.new('field', 'integer',
6
+ :default => 3,
7
+ :null => true,
8
+ :limit => 3,
9
+ :scale => 1,
10
+ :precision => 2)
11
+
12
+ b = Automigration::DbColumn.new('field', 'integer',
13
+ :default => 3,
14
+ :null => true,
15
+ :limit => 3,
16
+ :scale => 1,
17
+ :precision => 2)
18
+
19
+ a.the_same?(b).should be_true
20
+ end
21
+ end
@@ -0,0 +1,22 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'fields' do
4
+ it 'automigrable_model' do
5
+ Simple.auto_migrable?.should be_true
6
+ NotAutomigrable.auto_migrable?.should be_false
7
+ end
8
+
9
+ it 'migrations_attrs' do
10
+ AutoMigration1.migration_attrs.should == []
11
+ AutoMigration2.migration_attrs.should == %w[some_attr1 some_attr2 some_attr3]
12
+ end
13
+
14
+ it 'boolean_column_false_by_default' do
15
+ AutoMigration1.new.boolean_field.should be_false
16
+ end
17
+
18
+ it 'attributes_accessible' do
19
+ obj = AutoMigration1.create(:integer_field => 123)
20
+ obj.integer_field.should == 123
21
+ end
22
+ end
@@ -0,0 +1,24 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require 'rspec/rails'
6
+ require 'rspec/autorun'
7
+ require 'database_cleaner'
8
+ require 'factory_girl_rails'
9
+
10
+ RSpec.configure do |config|
11
+ config.before(:suite) do
12
+ DatabaseCleaner.strategy = :transaction
13
+ end
14
+
15
+ config.before(:each) do
16
+ DatabaseCleaner.start
17
+ end
18
+
19
+ config.after(:each) do
20
+ DatabaseCleaner.clean
21
+ end
22
+
23
+ config.include FactoryGirl::Syntax::Methods
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: automigration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-19 00:00:00.000000000 Z
12
+ date: 2012-03-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &86994240 !ruby/object:Gem::Requirement
16
+ requirement: &83783970 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.1'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *86994240
24
+ version_requirements: *83783970
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ansi
27
- requirement: &86993950 !ruby/object:Gem::Requirement
27
+ requirement: &83783610 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *86993950
35
+ version_requirements: *83783610
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: pg
38
- requirement: &86993600 !ruby/object:Gem::Requirement
38
+ requirement: &83782900 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,40 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *86993600
46
+ version_requirements: *83782900
47
+ - !ruby/object:Gem::Dependency
48
+ name: rspec-rails
49
+ requirement: &83782070 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *83782070
58
+ - !ruby/object:Gem::Dependency
59
+ name: database_cleaner
60
+ requirement: &83780030 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - ! '>='
64
+ - !ruby/object:Gem::Version
65
+ version: '0'
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *83780030
69
+ - !ruby/object:Gem::Dependency
70
+ name: factory_girl_rails
71
+ requirement: &83903880 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *83903880
47
80
  description: Store your migrations direct in models
48
81
  email:
49
82
  - vakhov@gmail.com
@@ -52,53 +85,79 @@ extensions: []
52
85
  extra_rdoc_files: []
53
86
  files:
54
87
  - .gitignore
88
+ - .rspec
55
89
  - .travis.yml
90
+ - CHANGELOG.md
56
91
  - Gemfile
57
92
  - LICENSE
58
93
  - README.md
59
94
  - Rakefile
60
95
  - automigration.gemspec
61
96
  - lib/automigration.rb
62
- - lib/automigration/base_extention.rb
63
- - lib/automigration/fields/belongs_to.rb
64
- - lib/automigration/fields/boolean.rb
65
- - lib/automigration/fields/date.rb
66
- - lib/automigration/fields/datetime.rb
67
- - lib/automigration/fields/float.rb
68
- - lib/automigration/fields/integer.rb
69
- - lib/automigration/fields/password.rb
70
- - lib/automigration/fields/string.rb
71
- - lib/automigration/fields/sys/base.rb
72
- - lib/automigration/fields/sys/db_column.rb
73
- - lib/automigration/fields/sys/keeper.rb
74
- - lib/automigration/fields/sys/slice_creater.rb
75
- - lib/automigration/fields/text.rb
76
- - lib/automigration/fields/time.rb
97
+ - lib/automigration/active_record_ext.rb
98
+ - lib/automigration/db_column.rb
99
+ - lib/automigration/dsl.rb
100
+ - lib/automigration/engine.rb
101
+ - lib/automigration/field.rb
102
+ - lib/automigration/fields_keeper.rb
77
103
  - lib/automigration/migrator.rb
78
104
  - lib/automigration/version.rb
79
105
  - lib/tasks/automigration.rake
80
- - log/.gitkeep
81
- - test/auto_migration_test.rb
82
- - test/belongs_to_test.rb
83
- - test/db_column_test.rb
84
- - test/fields/accessible_test.rb
85
- - test/fields_test.rb
86
- - test/models/accessible_model.rb
87
- - test/models/auto_migration1.rb
88
- - test/models/auto_migration1a.rb
89
- - test/models/auto_migration2.rb
90
- - test/models/auto_migration3.rb
91
- - test/models/belongs_to_model.rb
92
- - test/models/boolean_model.rb
93
- - test/models/form_field.rb
94
- - test/models/form_field2.rb
95
- - test/models/local_name.rb
96
- - test/models/local_name2.rb
97
- - test/models/not_automigrable.rb
98
- - test/models/searchable.rb
99
- - test/models/simple.rb
100
- - test/models/user1.rb
101
- - test/test_helper.rb
106
+ - spec/dummy/.gitignore
107
+ - spec/dummy/README.rdoc
108
+ - spec/dummy/Rakefile
109
+ - spec/dummy/app/assets/javascripts/application.js
110
+ - spec/dummy/app/assets/stylesheets/application.css
111
+ - spec/dummy/app/controllers/application_controller.rb
112
+ - spec/dummy/app/helpers/application_helper.rb
113
+ - spec/dummy/app/mailers/.gitkeep
114
+ - spec/dummy/app/models/.gitkeep
115
+ - spec/dummy/app/models/accessible_model.rb
116
+ - spec/dummy/app/models/auto_migration1.rb
117
+ - spec/dummy/app/models/auto_migration1a.rb
118
+ - spec/dummy/app/models/auto_migration2.rb
119
+ - spec/dummy/app/models/auto_migration3.rb
120
+ - spec/dummy/app/models/belongs_to_model.rb
121
+ - spec/dummy/app/models/boolean_model.rb
122
+ - spec/dummy/app/models/form_field.rb
123
+ - spec/dummy/app/models/form_field2.rb
124
+ - spec/dummy/app/models/local_name.rb
125
+ - spec/dummy/app/models/local_name2.rb
126
+ - spec/dummy/app/models/not_automigrable.rb
127
+ - spec/dummy/app/models/searchable.rb
128
+ - spec/dummy/app/models/simple.rb
129
+ - spec/dummy/app/models/user1.rb
130
+ - spec/dummy/app/views/layouts/application.html.erb
131
+ - spec/dummy/config.ru
132
+ - spec/dummy/config/application.rb
133
+ - spec/dummy/config/boot.rb
134
+ - spec/dummy/config/database.yml
135
+ - spec/dummy/config/environment.rb
136
+ - spec/dummy/config/environments/development.rb
137
+ - spec/dummy/config/environments/production.rb
138
+ - spec/dummy/config/environments/test.rb
139
+ - spec/dummy/config/initializers/backtrace_silencers.rb
140
+ - spec/dummy/config/initializers/inflections.rb
141
+ - spec/dummy/config/initializers/mime_types.rb
142
+ - spec/dummy/config/initializers/secret_token.rb
143
+ - spec/dummy/config/initializers/session_store.rb
144
+ - spec/dummy/config/initializers/wrap_parameters.rb
145
+ - spec/dummy/config/locales/en.yml
146
+ - spec/dummy/config/routes.rb
147
+ - spec/dummy/db/.gitkeep
148
+ - spec/dummy/lib/assets/.gitkeep
149
+ - spec/dummy/log/.gitkeep
150
+ - spec/dummy/public/404.html
151
+ - spec/dummy/public/422.html
152
+ - spec/dummy/public/500.html
153
+ - spec/dummy/public/favicon.ico
154
+ - spec/dummy/script/rails
155
+ - spec/lib/accessible_spec.rb
156
+ - spec/lib/auto_migration_spec.rb
157
+ - spec/lib/belongs_to_spec.rb
158
+ - spec/lib/db_column_spec.rb
159
+ - spec/lib/fields_spec.rb
160
+ - spec/spec_helper.rb
102
161
  homepage: ''
103
162
  licenses: []
104
163
  post_install_message:
@@ -113,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
113
172
  version: '0'
114
173
  segments:
115
174
  - 0
116
- hash: -250045731
175
+ hash: 690410381
117
176
  required_rubygems_version: !ruby/object:Gem::Requirement
118
177
  none: false
119
178
  requirements:
@@ -122,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
181
  version: '0'
123
182
  segments:
124
183
  - 0
125
- hash: -250045731
184
+ hash: 690410381
126
185
  requirements: []
127
186
  rubyforge_project: automigration
128
187
  rubygems_version: 1.8.17