migrant 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  == Summary
4
4
 
5
- Migrant gives you a super-clean DSL to describe your ActiveRecord models (somewhat similar to DataMapper)
6
- and generates all your migrations for you so you can spend more time coding the stuff that counts!
5
+ Migrant gives you a clean DSL to describe your database schema (somewhat similar to DataMapper)
6
+ and generates all your migrations for you so you can spend more time coding the tricky stuff!
7
7
 
8
8
  You'll also get a handy .mock method to instantiate a filled in model for testing or debugging purposes.
9
9
 
@@ -129,6 +129,6 @@ Please be sure to install all the development dependencies from the gemspec, the
129
129
 
130
130
  > rake test
131
131
 
132
-
132
+ Simplecov reports will be generated for each run, if it's not at 100% line coverage, something's wrong!
133
133
 
134
134
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
@@ -13,7 +13,7 @@ module Migrant
13
13
  # Get all tables and compare to the desired schema
14
14
  # The next line is an evil hack to recursively load all model files in app/models
15
15
  # This needs to be done because Rails normally lazy-loads these files, resulting a blank descendants list of AR::Base
16
- Dir["#{Rails.root.to_s}/app/models/**/*.rb"].each { |f| load(f) } if ActiveRecord::Base.descendants.blank?
16
+ Dir["#{Rails.root.to_s}/app/models/**/*.rb"].each { |f| require(f) }
17
17
 
18
18
  ActiveRecord::Base.descendants.each do |model|
19
19
  next if model.schema.nil? || !model.schema.requires_migration? # Skips inherited schemas (such as models with STI)
data/migrant.gemspec CHANGED
@@ -1,137 +1,135 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{migrant}
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Pascal Houliston"]
12
- s.date = %q{2010-10-28}
12
+ s.date = %q{2010-11-22}
13
13
  s.description = %q{Migrant gives you a super-clean DSL to describe your ActiveRecord models (somewhat similar to DataMapper) and generates all your migrations for you so you can spend more time coding the stuff that counts!}
14
14
  s.email = %q{101pascal@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
- "README.rdoc"
17
+ "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
- ".gitignore",
21
- "LICENSE",
22
- "README.rdoc",
23
- "Rakefile",
24
- "VERSION",
25
- "lib/datatype/base.rb",
26
- "lib/datatype/boolean.rb",
27
- "lib/datatype/currency.rb",
28
- "lib/datatype/date.rb",
29
- "lib/datatype/float.rb",
30
- "lib/datatype/foreign_key.rb",
31
- "lib/datatype/hash.rb",
32
- "lib/datatype/polymorphic.rb",
33
- "lib/datatype/range.rb",
34
- "lib/datatype/string.rb",
35
- "lib/datatype/symbol.rb",
36
- "lib/datatype/time.rb",
37
- "lib/generators/migrations.rb",
38
- "lib/migrant.rb",
39
- "lib/migrant/migration_generator.rb",
40
- "lib/migrant/model_extensions.rb",
41
- "lib/migrant/schema.rb",
42
- "lib/railtie.rb",
43
- "lib/tasks/db.rake",
44
- "migrant.gemspec",
45
- "test/additional_models/review.rb",
46
- "test/helper.rb",
47
- "test/rails_app/.gitignore",
48
- "test/rails_app/README",
49
- "test/rails_app/Rakefile",
50
- "test/rails_app/app/controllers/application_controller.rb",
51
- "test/rails_app/app/helpers/application_helper.rb",
52
- "test/rails_app/app/models/business.rb",
53
- "test/rails_app/app/models/business_category.rb",
54
- "test/rails_app/app/models/category.rb",
55
- "test/rails_app/app/models/customer.rb",
56
- "test/rails_app/app/models/user.rb",
57
- "test/rails_app/app/views/layouts/application.html.erb",
58
- "test/rails_app/config.ru",
59
- "test/rails_app/config/application.rb",
60
- "test/rails_app/config/boot.rb",
61
- "test/rails_app/config/database.yml",
62
- "test/rails_app/config/environment.rb",
63
- "test/rails_app/config/environments/development.rb",
64
- "test/rails_app/config/environments/production.rb",
65
- "test/rails_app/config/environments/test.rb",
66
- "test/rails_app/config/initializers/backtrace_silencers.rb",
67
- "test/rails_app/config/initializers/inflections.rb",
68
- "test/rails_app/config/initializers/mime_types.rb",
69
- "test/rails_app/config/initializers/secret_token.rb",
70
- "test/rails_app/config/initializers/session_store.rb",
71
- "test/rails_app/config/locales/en.yml",
72
- "test/rails_app/config/routes.rb",
73
- "test/rails_app/db/schema.rb",
74
- "test/rails_app/db/seeds.rb",
75
- "test/rails_app/lib/tasks/.gitkeep",
76
- "test/rails_app/public/404.html",
77
- "test/rails_app/public/422.html",
78
- "test/rails_app/public/500.html",
79
- "test/rails_app/script/rails",
80
- "test/rails_app/test/performance/browsing_test.rb",
81
- "test/rails_app/test/test_helper.rb",
82
- "test/rails_app/vendor/plugins/.gitkeep",
83
- "test/test_data_schema.rb",
84
- "test/test_migration_generator.rb",
85
- "test/verified_output/migrations/business_id.rb",
86
- "test/verified_output/migrations/create_business_categories.rb",
87
- "test/verified_output/migrations/create_businesses.rb",
88
- "test/verified_output/migrations/create_categories.rb",
89
- "test/verified_output/migrations/create_reviews.rb",
90
- "test/verified_output/migrations/create_users.rb",
91
- "test/verified_output/migrations/estimated_value_notes.rb",
92
- "test/verified_output/migrations/landline.rb"
20
+ "LICENSE",
21
+ "README.rdoc",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "lib/datatype/base.rb",
25
+ "lib/datatype/boolean.rb",
26
+ "lib/datatype/currency.rb",
27
+ "lib/datatype/date.rb",
28
+ "lib/datatype/float.rb",
29
+ "lib/datatype/foreign_key.rb",
30
+ "lib/datatype/hash.rb",
31
+ "lib/datatype/polymorphic.rb",
32
+ "lib/datatype/range.rb",
33
+ "lib/datatype/string.rb",
34
+ "lib/datatype/symbol.rb",
35
+ "lib/datatype/time.rb",
36
+ "lib/generators/migrations.rb",
37
+ "lib/migrant.rb",
38
+ "lib/migrant/migration_generator.rb",
39
+ "lib/migrant/model_extensions.rb",
40
+ "lib/migrant/schema.rb",
41
+ "lib/railtie.rb",
42
+ "lib/tasks/db.rake",
43
+ "migrant.gemspec",
44
+ "test/additional_models/review.rb",
45
+ "test/helper.rb",
46
+ "test/rails_app/.gitignore",
47
+ "test/rails_app/README",
48
+ "test/rails_app/Rakefile",
49
+ "test/rails_app/app/controllers/application_controller.rb",
50
+ "test/rails_app/app/helpers/application_helper.rb",
51
+ "test/rails_app/app/models/business.rb",
52
+ "test/rails_app/app/models/business_category.rb",
53
+ "test/rails_app/app/models/category.rb",
54
+ "test/rails_app/app/models/customer.rb",
55
+ "test/rails_app/app/models/user.rb",
56
+ "test/rails_app/app/views/layouts/application.html.erb",
57
+ "test/rails_app/config.ru",
58
+ "test/rails_app/config/application.rb",
59
+ "test/rails_app/config/boot.rb",
60
+ "test/rails_app/config/database.yml",
61
+ "test/rails_app/config/environment.rb",
62
+ "test/rails_app/config/environments/development.rb",
63
+ "test/rails_app/config/environments/production.rb",
64
+ "test/rails_app/config/environments/test.rb",
65
+ "test/rails_app/config/initializers/backtrace_silencers.rb",
66
+ "test/rails_app/config/initializers/inflections.rb",
67
+ "test/rails_app/config/initializers/mime_types.rb",
68
+ "test/rails_app/config/initializers/secret_token.rb",
69
+ "test/rails_app/config/initializers/session_store.rb",
70
+ "test/rails_app/config/locales/en.yml",
71
+ "test/rails_app/config/routes.rb",
72
+ "test/rails_app/db/schema.rb",
73
+ "test/rails_app/db/seeds.rb",
74
+ "test/rails_app/lib/tasks/.gitkeep",
75
+ "test/rails_app/public/404.html",
76
+ "test/rails_app/public/422.html",
77
+ "test/rails_app/public/500.html",
78
+ "test/rails_app/script/rails",
79
+ "test/rails_app/test/performance/browsing_test.rb",
80
+ "test/rails_app/test/test_helper.rb",
81
+ "test/rails_app/vendor/plugins/.gitkeep",
82
+ "test/test_data_schema.rb",
83
+ "test/test_migration_generator.rb",
84
+ "test/verified_output/migrations/business_id.rb",
85
+ "test/verified_output/migrations/create_business_categories.rb",
86
+ "test/verified_output/migrations/create_businesses.rb",
87
+ "test/verified_output/migrations/create_categories.rb",
88
+ "test/verified_output/migrations/create_reviews.rb",
89
+ "test/verified_output/migrations/create_users.rb",
90
+ "test/verified_output/migrations/estimated_value_notes.rb",
91
+ "test/verified_output/migrations/landline.rb"
93
92
  ]
94
93
  s.homepage = %q{http://github.com/pascalh1011/migrant}
95
- s.rdoc_options = ["--charset=UTF-8"]
96
94
  s.require_paths = ["lib"]
97
95
  s.rubygems_version = %q{1.3.7}
98
96
  s.summary = %q{All the fun of ActiveRecord, without writing your migrations, and a dash of mocking.}
99
97
  s.test_files = [
100
98
  "test/additional_models/review.rb",
101
- "test/test_migration_generator.rb",
102
- "test/rails_app/app/controllers/application_controller.rb",
103
- "test/rails_app/app/helpers/application_helper.rb",
104
- "test/rails_app/app/models/business.rb",
105
- "test/rails_app/app/models/user.rb",
106
- "test/rails_app/app/models/category.rb",
107
- "test/rails_app/app/models/business_category.rb",
108
- "test/rails_app/app/models/customer.rb",
109
- "test/rails_app/test/performance/browsing_test.rb",
110
- "test/rails_app/test/test_helper.rb",
111
- "test/rails_app/config/environments/development.rb",
112
- "test/rails_app/config/environments/test.rb",
113
- "test/rails_app/config/environments/production.rb",
114
- "test/rails_app/config/environment.rb",
115
- "test/rails_app/config/initializers/session_store.rb",
116
- "test/rails_app/config/initializers/inflections.rb",
117
- "test/rails_app/config/initializers/backtrace_silencers.rb",
118
- "test/rails_app/config/initializers/mime_types.rb",
119
- "test/rails_app/config/initializers/secret_token.rb",
120
- "test/rails_app/config/routes.rb",
121
- "test/rails_app/config/application.rb",
122
- "test/rails_app/config/boot.rb",
123
- "test/rails_app/db/schema.rb",
124
- "test/rails_app/db/seeds.rb",
125
- "test/verified_output/migrations/estimated_value_notes.rb",
126
- "test/verified_output/migrations/landline.rb",
127
- "test/verified_output/migrations/create_reviews.rb",
128
- "test/verified_output/migrations/create_businesses.rb",
129
- "test/verified_output/migrations/create_users.rb",
130
- "test/verified_output/migrations/create_business_categories.rb",
131
- "test/verified_output/migrations/create_categories.rb",
132
- "test/verified_output/migrations/business_id.rb",
133
- "test/helper.rb",
134
- "test/test_data_schema.rb"
99
+ "test/helper.rb",
100
+ "test/rails_app/app/controllers/application_controller.rb",
101
+ "test/rails_app/app/helpers/application_helper.rb",
102
+ "test/rails_app/app/models/business.rb",
103
+ "test/rails_app/app/models/business_category.rb",
104
+ "test/rails_app/app/models/category.rb",
105
+ "test/rails_app/app/models/customer.rb",
106
+ "test/rails_app/app/models/user.rb",
107
+ "test/rails_app/config/application.rb",
108
+ "test/rails_app/config/boot.rb",
109
+ "test/rails_app/config/environment.rb",
110
+ "test/rails_app/config/environments/development.rb",
111
+ "test/rails_app/config/environments/production.rb",
112
+ "test/rails_app/config/environments/test.rb",
113
+ "test/rails_app/config/initializers/backtrace_silencers.rb",
114
+ "test/rails_app/config/initializers/inflections.rb",
115
+ "test/rails_app/config/initializers/mime_types.rb",
116
+ "test/rails_app/config/initializers/secret_token.rb",
117
+ "test/rails_app/config/initializers/session_store.rb",
118
+ "test/rails_app/config/routes.rb",
119
+ "test/rails_app/db/schema.rb",
120
+ "test/rails_app/db/seeds.rb",
121
+ "test/rails_app/test/performance/browsing_test.rb",
122
+ "test/rails_app/test/test_helper.rb",
123
+ "test/test_data_schema.rb",
124
+ "test/test_migration_generator.rb",
125
+ "test/verified_output/migrations/business_id.rb",
126
+ "test/verified_output/migrations/create_business_categories.rb",
127
+ "test/verified_output/migrations/create_businesses.rb",
128
+ "test/verified_output/migrations/create_categories.rb",
129
+ "test/verified_output/migrations/create_reviews.rb",
130
+ "test/verified_output/migrations/create_users.rb",
131
+ "test/verified_output/migrations/estimated_value_notes.rb",
132
+ "test/verified_output/migrations/landline.rb"
135
133
  ]
136
134
 
137
135
  if s.respond_to? :specification_version then
@@ -10,7 +10,7 @@
10
10
  #
11
11
  # It's strongly recommended to check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(:version => 20101028213553) do
13
+ ActiveRecord::Schema.define(:version => 20101122122964) do
14
14
 
15
15
  create_table "business_categories", :force => true do |t|
16
16
  t.integer "business_id"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Pascal Houliston
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-28 00:00:00 +02:00
17
+ date: 2010-11-22 00:00:00 +02:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -128,7 +128,6 @@ extra_rdoc_files:
128
128
  - LICENSE
129
129
  - README.rdoc
130
130
  files:
131
- - .gitignore
132
131
  - LICENSE
133
132
  - README.rdoc
134
133
  - Rakefile
@@ -206,8 +205,8 @@ homepage: http://github.com/pascalh1011/migrant
206
205
  licenses: []
207
206
 
208
207
  post_install_message:
209
- rdoc_options:
210
- - --charset=UTF-8
208
+ rdoc_options: []
209
+
211
210
  require_paths:
212
211
  - lib
213
212
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -235,37 +234,37 @@ specification_version: 3
235
234
  summary: All the fun of ActiveRecord, without writing your migrations, and a dash of mocking.
236
235
  test_files:
237
236
  - test/additional_models/review.rb
238
- - test/test_migration_generator.rb
237
+ - test/helper.rb
239
238
  - test/rails_app/app/controllers/application_controller.rb
240
239
  - test/rails_app/app/helpers/application_helper.rb
241
240
  - test/rails_app/app/models/business.rb
242
- - test/rails_app/app/models/user.rb
243
- - test/rails_app/app/models/category.rb
244
241
  - test/rails_app/app/models/business_category.rb
242
+ - test/rails_app/app/models/category.rb
245
243
  - test/rails_app/app/models/customer.rb
246
- - test/rails_app/test/performance/browsing_test.rb
247
- - test/rails_app/test/test_helper.rb
244
+ - test/rails_app/app/models/user.rb
245
+ - test/rails_app/config/application.rb
246
+ - test/rails_app/config/boot.rb
247
+ - test/rails_app/config/environment.rb
248
248
  - test/rails_app/config/environments/development.rb
249
- - test/rails_app/config/environments/test.rb
250
249
  - test/rails_app/config/environments/production.rb
251
- - test/rails_app/config/environment.rb
252
- - test/rails_app/config/initializers/session_store.rb
253
- - test/rails_app/config/initializers/inflections.rb
250
+ - test/rails_app/config/environments/test.rb
254
251
  - test/rails_app/config/initializers/backtrace_silencers.rb
252
+ - test/rails_app/config/initializers/inflections.rb
255
253
  - test/rails_app/config/initializers/mime_types.rb
256
254
  - test/rails_app/config/initializers/secret_token.rb
255
+ - test/rails_app/config/initializers/session_store.rb
257
256
  - test/rails_app/config/routes.rb
258
- - test/rails_app/config/application.rb
259
- - test/rails_app/config/boot.rb
260
257
  - test/rails_app/db/schema.rb
261
258
  - test/rails_app/db/seeds.rb
262
- - test/verified_output/migrations/estimated_value_notes.rb
263
- - test/verified_output/migrations/landline.rb
264
- - test/verified_output/migrations/create_reviews.rb
265
- - test/verified_output/migrations/create_businesses.rb
266
- - test/verified_output/migrations/create_users.rb
259
+ - test/rails_app/test/performance/browsing_test.rb
260
+ - test/rails_app/test/test_helper.rb
261
+ - test/test_data_schema.rb
262
+ - test/test_migration_generator.rb
263
+ - test/verified_output/migrations/business_id.rb
267
264
  - test/verified_output/migrations/create_business_categories.rb
265
+ - test/verified_output/migrations/create_businesses.rb
268
266
  - test/verified_output/migrations/create_categories.rb
269
- - test/verified_output/migrations/business_id.rb
270
- - test/helper.rb
271
- - test/test_data_schema.rb
267
+ - test/verified_output/migrations/create_reviews.rb
268
+ - test/verified_output/migrations/create_users.rb
269
+ - test/verified_output/migrations/estimated_value_notes.rb
270
+ - test/verified_output/migrations/landline.rb
data/.gitignore DELETED
@@ -1,24 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC
22
- tmp/*
23
- test/rails_app/db/migrate/*.rb
24
- test/rails_app/db/schema.rb