migrant 1.2.1 → 1.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,16 +1,2 @@
1
1
  source :gemcutter
2
-
3
- gem "rails", ">= 3.0.0"
4
- gem "faker"
5
- gem "term-ansicolor"
6
-
7
- group :development do
8
- gem "thoughtbot-shoulda"
9
- gem "ansi"
10
- gem "jeweler"
11
- gem "turn"
12
- gem "sqlite3"
13
- gem "simplecov"
14
- gem "terminal-table"
15
- gem "term-ansicolor"
16
- end
2
+ gemspec
data/Rakefile CHANGED
@@ -9,17 +9,38 @@ rescue Bundler::BundlerError => e
9
9
  end
10
10
  require 'rake'
11
11
 
12
- require 'jeweler'
13
- Jeweler::Tasks.new do |gem|
14
- gem.name = "migrant"
15
- gem.summary = %Q{All the fun of ActiveRecord, without writing your migrations, and a dash of mocking.}
16
- gem.description = %Q{Easier schema management for Rails that compliments your domain model.}
17
- gem.email = "101pascal@gmail.com"
18
- gem.homepage = "http://github.com/pascalh1011/migrant"
19
- gem.authors = ["Pascal Houliston"]
20
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
12
+ begin
13
+ require 'jeweler'
14
+ Jeweler::Tasks.new do |gem|
15
+ gem.name = "migrant"
16
+ gem.summary = %Q{All the fun of ActiveRecord, without writing your migrations, and a dash of mocking.}
17
+ gem.description = %Q{Easier schema management for Rails that compliments your domain model.}
18
+ gem.email = "101pascal@gmail.com"
19
+ gem.homepage = "http://github.com/pascalh1011/migrant"
20
+ gem.authors = ["Pascal Houliston"]
21
+ gem.version = File.read('VERSION')
22
+
23
+ gem.add_runtime_dependency "rails", ">= 3.0.0"
24
+ gem.add_runtime_dependency "faker"
25
+ gem.add_runtime_dependency "term-ansicolor"
26
+
27
+ gem.add_development_dependency "thoughtbot-shoulda"
28
+ gem.add_development_dependency "ansi"
29
+ gem.add_development_dependency "jeweler"
30
+ gem.add_development_dependency "turn"
31
+ gem.add_development_dependency "sqlite3"
32
+ gem.add_development_dependency "simplecov"
33
+ gem.add_development_dependency "terminal-table"
34
+ gem.add_development_dependency "term-ansicolor"
35
+ gem.add_development_dependency "rake", "0.8.7" # Until API gets sorted
36
+
37
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
38
+ end
39
+ Jeweler::GemcutterTasks.new
40
+
41
+ rescue LoadError
42
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
21
43
  end
22
- Jeweler::RubygemsDotOrgTasks.new
23
44
 
24
45
  require 'rake/testtask'
25
46
  Rake::TestTask.new(:test) do |test|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.1
1
+ 1.2.2
@@ -1,19 +1,19 @@
1
1
  class <%= @activity.camelize.gsub(/\s/, '') %> < ActiveRecord::Migration
2
2
  def self.up
3
- <% @added_columns.each do |field, options| %>
3
+ <% @columns[:added].each do |field, options| %>
4
4
  add_column :<%= @table_name %>, :<%= field %>, :<%= options.delete(:type) %><%= (options.blank?)? '': ", "+options.inspect[1..-2] %>
5
5
  <% end -%>
6
- <% @changed_columns.each do |field, options, old_options| %>
6
+ <% @columns[:changed].each do |field, options, old_options| %>
7
7
  change_column :<%= @table_name %>, :<%= field %>, :<%= options.delete(:type) %><%= (options.blank?)? '': ", "+options.inspect[1..-2] %>
8
8
  <% end -%>
9
- <% @transferred_columns.each do |source, target| %>
9
+ <% @columns[:transferred].each do |source, target| %>
10
10
  puts "-- copy data from :<%= source %> to :<%= target %>"
11
11
  <%= @table_name.classify %>.update_all("<%= target %> = <%= source %>")
12
12
  <% end -%>
13
- <% @renamed_columns.each do |old_name, new_name| %>
13
+ <% @columns[:renamed].each do |old_name, new_name| %>
14
14
  rename_column :<%= @table_name %>, :<%= old_name %>, :<%= new_name %>
15
15
  <% end -%>
16
- <% @deleted_columns.each do |field, options| %>
16
+ <% @columns[:deleted].each do |field, options| %>
17
17
  remove_column :<%= @table_name %>, :<%= field %>
18
18
  <% end -%>
19
19
  <% @indexes.each do |index, options| %>
@@ -22,20 +22,20 @@ class <%= @activity.camelize.gsub(/\s/, '') %> < ActiveRecord::Migration
22
22
  end
23
23
 
24
24
  def self.down
25
- <% @deleted_columns.each do |field, options| %>
25
+ <% @columns[:deleted].each do |field, options| %>
26
26
  add_column :<%= @table_name %>, :<%= field %>, :<%= options.delete(:type) %><%= (options.blank?)? '': ", "+options.inspect[1..-2] %>
27
27
  <% end -%>
28
- <% @renamed_columns.each do |old_name, new_name| %>
28
+ <% @columns[:renamed].each do |old_name, new_name| %>
29
29
  rename_column :<%= @table_name %>, :<%= new_name %>, :<%= old_name %>
30
30
  <% end -%>
31
- <% @transferred_columns.each do |source, target| %>
31
+ <% @columns[:transferred].each do |source, target| %>
32
32
  puts "-- copy data from :<%= target %> to :<%= source %>"
33
33
  <%= @table_name.classify %>.update_all("<%= source %> = <%= target %>")
34
34
  <% end -%>
35
- <% @changed_columns.each do |field, options, old_options| %>
35
+ <% @columns[:changed].each do |field, options, old_options| %>
36
36
  change_column :<%= @table_name %>, :<%= field %>, :<%= old_options.delete(:type) %><%= (old_options.blank?)? '': ", "+old_options.inspect[1..-2] %>
37
37
  <% end -%>
38
- <% @added_columns.each do |field, options| %>
38
+ <% @columns[:added].each do |field, options| %>
39
39
  remove_column :<%= @table_name %>, :<%= field %>
40
40
  <% end -%>
41
41
  end
@@ -2,7 +2,7 @@ class <%= @activity.camelize.gsub(/\s/, '') %> < ActiveRecord::Migration
2
2
  def self.up
3
3
  create_table :<%= @table_name %> do |t|
4
4
  <% @columns.each do |field, options| %>
5
- t.<%= options.delete(:type) %> :<%= field %><%= (options.blank?)? '': ", "+options.inspect[1..-2] %>
5
+ t.<%= options.delete(:type) %> :<%= field %><%= (options.blank?)? '': ", "+options.to_a.collect { |o| ":#{o[0]}=>#{o[1]}" }.sort.join(', ') %>
6
6
  <% end %>
7
7
  end
8
8
  <% @indexes.each do |index| %>
@@ -11,7 +11,7 @@ module Migrant
11
11
  migrator = ActiveRecord::Migrator.new(:up, migrations_path)
12
12
 
13
13
  unless migrator.pending_migrations.blank?
14
- puts "You have some pending database migrations. You can either:\n1. Run them with rake db:migrate\n2. Delete them, in which case this task will probably recreate their actions (DON'T do this if they've been in SCM)."
14
+ log "You have some pending database migrations. You can either:\n1. Run them with rake db:migrate\n2. Delete them, in which case this task will probably recreate their actions (DON'T do this if they've been in SCM).", :error
15
15
  return false
16
16
  end
17
17
 
@@ -20,11 +20,10 @@ module Migrant
20
20
  # This needs to be done because Rails normally lazy-loads these files, resulting a blank descendants list of AR::Base
21
21
  Dir["#{Rails.root.to_s}/app/models/**/*.rb"].each { |f| require(f) }
22
22
 
23
- ActiveRecord::Base.descendants.each do |model|
24
- next if model.schema.nil? || !model.schema.requires_migration? # Skips inherited schemas (such as models with STI)
23
+ ActiveRecord::Base.descendants.select { |model| model.schema && model.schema.requires_migration? }.each do |model|
25
24
  model.reset_column_information # db:migrate doesn't do this
26
25
  @table_name = model.table_name
27
- @changed_columns, @added_columns, @deleted_columns, @renamed_columns, @transferred_columns = [], [], [], [], []
26
+ @columns = Hash[[:changed, :added, :deleted, :renamed, :transferred].collect { |a| [a,[]] }]
28
27
 
29
28
  if model.table_exists?
30
29
  # Structure ActiveRecord::Base's column information so we can compare it directly to the schema
@@ -47,10 +46,10 @@ module Migrant
47
46
  # Removed rows
48
47
  unless model.schema.partial?
49
48
  db_schema.reject { |field_name, options| field_name.to_s == model.primary_key || model.schema.columns.keys.include?(field_name) }.each do |removed_field_name, options|
50
- case ask_user("#{model}: '#{removed_field_name}' is no longer in use.", (@added_columns.blank?)? %W{Destroy Ignore} : %W{Destroy Move Ignore})
49
+ case ask_user("#{model}: '#{removed_field_name}' is no longer in use.", (@columns[:added].blank?)? %W{Destroy Ignore} : %W{Destroy Move Ignore})
51
50
  when 'Destroy' then delete_column(removed_field_name, db_schema[removed_field_name])
52
51
  when 'Move' then
53
- target = ask_user("Move '#{removed_field_name}' to:", @added_columns.collect(&:first))
52
+ target = ask_user("Move '#{removed_field_name}' to:", @columns[:added].collect(&:first))
54
53
  target_column = model.schema.columns[target]
55
54
  begin
56
55
  target_column.structure_changes_from(db_schema[removed_field_name])
@@ -63,11 +62,11 @@ module Migrant
63
62
  end
64
63
  end
65
64
  end
66
- destroyed_columns = @deleted_columns.reject { |field, options| @transferred_columns.collect(&:first).include?(field) }
65
+ destroyed_columns = @columns[:deleted].reject { |field, options| @columns[:transferred].collect(&:first).include?(field) }
67
66
  unless destroyed_columns.blank?
68
67
  if ask_user("#{model}: '#{destroyed_columns.collect(&:first).join(', ')}' and associated data will be DESTROYED in all environments. Continue?", %W{Yes No}, true) == 'No'
69
68
  log "Okay, not removing anything for now."
70
- @deleted_columns = []
69
+ @columns[:deleted] = []
71
70
  end
72
71
  end
73
72
 
@@ -76,14 +75,14 @@ module Migrant
76
75
  current_indexes = ActiveRecord::Base.connection.indexes(model.table_name).collect { |index| (index.columns.length == 1)? index.columns.first.to_sym : index.columns.collect(&:to_sym) }
77
76
  @indexes = model.schema.indexes.uniq.reject { |index| current_indexes.include?(index) }.collect { |field_name| [field_name, {}] }
78
77
  # Don't spam the user with indexes that columns are being created with
79
- @new_indexes = @indexes.reject { |index, options| @changed_columns.detect { |c| c.first == index } || @added_columns.detect { |c| c.first == index } }
78
+ @new_indexes = @indexes.reject { |index, options| @columns[:changed].detect { |c| c.first == index } || @columns[:added].detect { |c| c.first == index } }
80
79
  end
81
80
 
82
- next if @changed_columns.empty? && @added_columns.empty? && @renamed_columns.empty? && @transferred_columns.empty? && @deleted_columns.empty? && @indexes.empty? # Nothing to do for this table
81
+ next if @columns[:changed].empty? && @columns[:added].empty? && @columns[:renamed].empty? && @columns[:transferred].empty? && @columns[:deleted].empty? && @indexes.empty? # Nothing to do for this table
83
82
 
84
83
  # Example: changed_table_added_something_and_modified_something
85
- @activity = 'changed_'+model.table_name+[['added', @added_columns], ['modified', @changed_columns], ['deleted', destroyed_columns],
86
- ['moved', @transferred_columns], ['renamed', @renamed_columns], ['indexed', @new_indexes]].reject { |v| v[1].empty? }.collect { |v| "_#{v[0]}_"+v[1].collect(&:first).join('_') }.join('_and')
84
+ @activity = 'changed_'+model.table_name+[['added', @columns[:added]], ['modified', @columns[:changed]], ['deleted', destroyed_columns],
85
+ ['moved', @columns[:transferred]], ['renamed', @columns[:renamed]], ['indexed', @new_indexes]].reject { |v| v[1].empty? }.collect { |v| "_#{v[0]}_"+v[1].collect(&:first).join('_') }.join('_and')
87
86
  @activity = @activity.split('_')[0..2].join('_') if @activity.length >= 240 # Most filesystems will raise Errno::ENAMETOOLONG otherwise
88
87
 
89
88
  render('change_migration')
@@ -109,24 +108,24 @@ module Migrant
109
108
 
110
109
  private
111
110
  def add_column(name, options)
112
- @added_columns << [name, options]
111
+ @columns[:added] << [name, options]
113
112
  end
114
113
 
115
114
  def change_column(name, new_schema, old_schema)
116
- @changed_columns << [name, new_schema, old_schema]
115
+ @columns[:changed] << [name, new_schema, old_schema]
117
116
  end
118
117
 
119
118
  def delete_column(name, current_structure)
120
- @deleted_columns << [name, current_structure]
119
+ @columns[:deleted] << [name, current_structure]
121
120
  end
122
121
 
123
122
  def move_column(old_name, new_name, old_schema, new_schema)
124
123
  if new_schema == old_schema
125
- @renamed_columns << [old_name, new_name]
126
- @added_columns.reject! { |a| a.first == new_name } # Don't add the column too
124
+ @columns[:renamed] << [old_name, new_name]
125
+ @columns[:added].reject! { |a| a.first == new_name } # Don't add the column too
127
126
  else
128
127
  @possible_irreversible_migrations = true
129
- @transferred_columns << [old_name, new_name] # Still need to add the column, just transfer the data afterwards
128
+ @columns[:transferred] << [old_name, new_name] # Still need to add the column, just transfer the data afterwards
130
129
  delete_column(old_name, old_schema)
131
130
  end
132
131
  end
@@ -34,6 +34,8 @@ module Migrant
34
34
  end
35
35
 
36
36
  def mock(attributes={}, recursive=true)
37
+ raise NoStructureDefined.new("In order to mock() #{self.to_s}, you need to define a Migrant structure block") unless @schema
38
+
37
39
  attribs = {}
38
40
  attribs.merge!(self.superclass.mock_attributes(attributes, recursive)) unless self.superclass == ActiveRecord::Base
39
41
  new attribs.merge(mock_attributes(attributes, recursive))
@@ -59,5 +61,7 @@ module Migrant
59
61
  end
60
62
  end
61
63
  end
64
+
65
+ class NoStructureDefined < Exception; end;
62
66
  end
63
67
 
data/migrant.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{migrant}
8
- s.version = "1.2.1"
8
+ s.version = "1.2.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{2011-05-04}
12
+ s.date = %q{2011-05-23}
13
13
  s.description = %q{Easier schema management for Rails that compliments your domain model.}
14
14
  s.email = %q{101pascal@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -19,7 +19,6 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".rvmrc",
21
21
  "Gemfile",
22
- "Gemfile.lock",
23
22
  "LICENSE",
24
23
  "README.rdoc",
25
24
  "Rakefile",
@@ -104,57 +103,21 @@ Gem::Specification.new do |s|
104
103
  s.require_paths = ["lib"]
105
104
  s.rubygems_version = %q{1.5.2}
106
105
  s.summary = %q{All the fun of ActiveRecord, without writing your migrations, and a dash of mocking.}
107
- s.test_files = [
108
- "test/additional_models/review.rb",
109
- "test/helper.rb",
110
- "test/rails_app/app/controllers/application_controller.rb",
111
- "test/rails_app/app/helpers/application_helper.rb",
112
- "test/rails_app/app/models/business.rb",
113
- "test/rails_app/app/models/business_category.rb",
114
- "test/rails_app/app/models/category.rb",
115
- "test/rails_app/app/models/chameleon.rb",
116
- "test/rails_app/app/models/customer.rb",
117
- "test/rails_app/app/models/user.rb",
118
- "test/rails_app/config/application.rb",
119
- "test/rails_app/config/boot.rb",
120
- "test/rails_app/config/environment.rb",
121
- "test/rails_app/config/environments/development.rb",
122
- "test/rails_app/config/environments/production.rb",
123
- "test/rails_app/config/environments/test.rb",
124
- "test/rails_app/config/initializers/backtrace_silencers.rb",
125
- "test/rails_app/config/initializers/inflections.rb",
126
- "test/rails_app/config/initializers/mime_types.rb",
127
- "test/rails_app/config/initializers/secret_token.rb",
128
- "test/rails_app/config/initializers/session_store.rb",
129
- "test/rails_app/config/routes.rb",
130
- "test/rails_app/db/seeds.rb",
131
- "test/rails_app/test/performance/browsing_test.rb",
132
- "test/rails_app/test/test_helper.rb",
133
- "test/test_data_schema.rb",
134
- "test/test_migration_generator.rb",
135
- "test/test_validations.rb",
136
- "test/test_zzz_performance.rb",
137
- "test/verified_output/migrations/added_incompatible_spot_and_deleted_spots.rb",
138
- "test/verified_output/migrations/business_id.rb",
139
- "test/verified_output/migrations/chameleons_added_new_longer_spots_and_moved_new_spots.rb",
140
- "test/verified_output/migrations/create_business_categories.rb",
141
- "test/verified_output/migrations/create_businesses.rb",
142
- "test/verified_output/migrations/create_categories.rb",
143
- "test/verified_output/migrations/create_chameleons.rb",
144
- "test/verified_output/migrations/create_reviews.rb",
145
- "test/verified_output/migrations/create_users.rb",
146
- "test/verified_output/migrations/created_at.rb",
147
- "test/verified_output/migrations/deleted_incompatible_spot.rb",
148
- "test/verified_output/migrations/deleted_spots.rb",
149
- "test/verified_output/migrations/estimated_value_notes.rb",
150
- "test/verified_output/migrations/landline.rb",
151
- "test/verified_output/migrations/renamed_old_spots.rb"
152
- ]
153
106
 
154
107
  if s.respond_to? :specification_version then
155
108
  s.specification_version = 3
156
109
 
157
110
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
111
+ s.add_runtime_dependency(%q<migrant>, [">= 0"])
112
+ s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
113
+ s.add_development_dependency(%q<ansi>, [">= 0"])
114
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
115
+ s.add_development_dependency(%q<turn>, [">= 0"])
116
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
117
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
118
+ s.add_development_dependency(%q<terminal-table>, [">= 0"])
119
+ s.add_development_dependency(%q<term-ansicolor>, [">= 0"])
120
+ s.add_development_dependency(%q<rake>, ["= 0.8.7"])
158
121
  s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
159
122
  s.add_runtime_dependency(%q<faker>, [">= 0"])
160
123
  s.add_runtime_dependency(%q<term-ansicolor>, [">= 0"])
@@ -166,7 +129,18 @@ Gem::Specification.new do |s|
166
129
  s.add_development_dependency(%q<simplecov>, [">= 0"])
167
130
  s.add_development_dependency(%q<terminal-table>, [">= 0"])
168
131
  s.add_development_dependency(%q<term-ansicolor>, [">= 0"])
132
+ s.add_development_dependency(%q<rake>, ["= 0.8.7"])
169
133
  else
134
+ s.add_dependency(%q<migrant>, [">= 0"])
135
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
136
+ s.add_dependency(%q<ansi>, [">= 0"])
137
+ s.add_dependency(%q<jeweler>, [">= 0"])
138
+ s.add_dependency(%q<turn>, [">= 0"])
139
+ s.add_dependency(%q<sqlite3>, [">= 0"])
140
+ s.add_dependency(%q<simplecov>, [">= 0"])
141
+ s.add_dependency(%q<terminal-table>, [">= 0"])
142
+ s.add_dependency(%q<term-ansicolor>, [">= 0"])
143
+ s.add_dependency(%q<rake>, ["= 0.8.7"])
170
144
  s.add_dependency(%q<rails>, [">= 3.0.0"])
171
145
  s.add_dependency(%q<faker>, [">= 0"])
172
146
  s.add_dependency(%q<term-ansicolor>, [">= 0"])
@@ -178,8 +152,19 @@ Gem::Specification.new do |s|
178
152
  s.add_dependency(%q<simplecov>, [">= 0"])
179
153
  s.add_dependency(%q<terminal-table>, [">= 0"])
180
154
  s.add_dependency(%q<term-ansicolor>, [">= 0"])
155
+ s.add_dependency(%q<rake>, ["= 0.8.7"])
181
156
  end
182
157
  else
158
+ s.add_dependency(%q<migrant>, [">= 0"])
159
+ s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
160
+ s.add_dependency(%q<ansi>, [">= 0"])
161
+ s.add_dependency(%q<jeweler>, [">= 0"])
162
+ s.add_dependency(%q<turn>, [">= 0"])
163
+ s.add_dependency(%q<sqlite3>, [">= 0"])
164
+ s.add_dependency(%q<simplecov>, [">= 0"])
165
+ s.add_dependency(%q<terminal-table>, [">= 0"])
166
+ s.add_dependency(%q<term-ansicolor>, [">= 0"])
167
+ s.add_dependency(%q<rake>, ["= 0.8.7"])
183
168
  s.add_dependency(%q<rails>, [">= 3.0.0"])
184
169
  s.add_dependency(%q<faker>, [">= 0"])
185
170
  s.add_dependency(%q<term-ansicolor>, [">= 0"])
@@ -191,6 +176,7 @@ Gem::Specification.new do |s|
191
176
  s.add_dependency(%q<simplecov>, [">= 0"])
192
177
  s.add_dependency(%q<terminal-table>, [">= 0"])
193
178
  s.add_dependency(%q<term-ansicolor>, [">= 0"])
179
+ s.add_dependency(%q<rake>, ["= 0.8.7"])
194
180
  end
195
181
  end
196
182
 
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: migrant
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.2.1
5
+ version: 1.2.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Pascal Houliston
@@ -10,44 +10,44 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-05-04 00:00:00 +02:00
13
+ date: 2011-05-23 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
- name: rails
17
+ name: migrant
18
18
  requirement: &id001 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 3.0.0
23
+ version: "0"
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: *id001
27
27
  - !ruby/object:Gem::Dependency
28
- name: faker
28
+ name: thoughtbot-shoulda
29
29
  requirement: &id002 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: "0"
35
- type: :runtime
35
+ type: :development
36
36
  prerelease: false
37
37
  version_requirements: *id002
38
38
  - !ruby/object:Gem::Dependency
39
- name: term-ansicolor
39
+ name: ansi
40
40
  requirement: &id003 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
45
  version: "0"
46
- type: :runtime
46
+ type: :development
47
47
  prerelease: false
48
48
  version_requirements: *id003
49
49
  - !ruby/object:Gem::Dependency
50
- name: thoughtbot-shoulda
50
+ name: jeweler
51
51
  requirement: &id004 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
@@ -58,7 +58,7 @@ dependencies:
58
58
  prerelease: false
59
59
  version_requirements: *id004
60
60
  - !ruby/object:Gem::Dependency
61
- name: ansi
61
+ name: turn
62
62
  requirement: &id005 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
@@ -69,7 +69,7 @@ dependencies:
69
69
  prerelease: false
70
70
  version_requirements: *id005
71
71
  - !ruby/object:Gem::Dependency
72
- name: jeweler
72
+ name: sqlite3
73
73
  requirement: &id006 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
@@ -80,7 +80,7 @@ dependencies:
80
80
  prerelease: false
81
81
  version_requirements: *id006
82
82
  - !ruby/object:Gem::Dependency
83
- name: turn
83
+ name: simplecov
84
84
  requirement: &id007 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
@@ -91,7 +91,7 @@ dependencies:
91
91
  prerelease: false
92
92
  version_requirements: *id007
93
93
  - !ruby/object:Gem::Dependency
94
- name: sqlite3
94
+ name: terminal-table
95
95
  requirement: &id008 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
@@ -102,7 +102,7 @@ dependencies:
102
102
  prerelease: false
103
103
  version_requirements: *id008
104
104
  - !ruby/object:Gem::Dependency
105
- name: simplecov
105
+ name: term-ansicolor
106
106
  requirement: &id009 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
@@ -113,8 +113,52 @@ dependencies:
113
113
  prerelease: false
114
114
  version_requirements: *id009
115
115
  - !ruby/object:Gem::Dependency
116
- name: terminal-table
116
+ name: rake
117
117
  requirement: &id010 !ruby/object:Gem::Requirement
118
+ none: false
119
+ requirements:
120
+ - - "="
121
+ - !ruby/object:Gem::Version
122
+ version: 0.8.7
123
+ type: :development
124
+ prerelease: false
125
+ version_requirements: *id010
126
+ - !ruby/object:Gem::Dependency
127
+ name: rails
128
+ requirement: &id011 !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ">="
132
+ - !ruby/object:Gem::Version
133
+ version: 3.0.0
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: *id011
137
+ - !ruby/object:Gem::Dependency
138
+ name: faker
139
+ requirement: &id012 !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: "0"
145
+ type: :runtime
146
+ prerelease: false
147
+ version_requirements: *id012
148
+ - !ruby/object:Gem::Dependency
149
+ name: term-ansicolor
150
+ requirement: &id013 !ruby/object:Gem::Requirement
151
+ none: false
152
+ requirements:
153
+ - - ">="
154
+ - !ruby/object:Gem::Version
155
+ version: "0"
156
+ type: :runtime
157
+ prerelease: false
158
+ version_requirements: *id013
159
+ - !ruby/object:Gem::Dependency
160
+ name: thoughtbot-shoulda
161
+ requirement: &id014 !ruby/object:Gem::Requirement
118
162
  none: false
119
163
  requirements:
120
164
  - - ">="
@@ -122,10 +166,76 @@ dependencies:
122
166
  version: "0"
123
167
  type: :development
124
168
  prerelease: false
125
- version_requirements: *id010
169
+ version_requirements: *id014
170
+ - !ruby/object:Gem::Dependency
171
+ name: ansi
172
+ requirement: &id015 !ruby/object:Gem::Requirement
173
+ none: false
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ version: "0"
178
+ type: :development
179
+ prerelease: false
180
+ version_requirements: *id015
181
+ - !ruby/object:Gem::Dependency
182
+ name: jeweler
183
+ requirement: &id016 !ruby/object:Gem::Requirement
184
+ none: false
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ version: "0"
189
+ type: :development
190
+ prerelease: false
191
+ version_requirements: *id016
192
+ - !ruby/object:Gem::Dependency
193
+ name: turn
194
+ requirement: &id017 !ruby/object:Gem::Requirement
195
+ none: false
196
+ requirements:
197
+ - - ">="
198
+ - !ruby/object:Gem::Version
199
+ version: "0"
200
+ type: :development
201
+ prerelease: false
202
+ version_requirements: *id017
203
+ - !ruby/object:Gem::Dependency
204
+ name: sqlite3
205
+ requirement: &id018 !ruby/object:Gem::Requirement
206
+ none: false
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: "0"
211
+ type: :development
212
+ prerelease: false
213
+ version_requirements: *id018
214
+ - !ruby/object:Gem::Dependency
215
+ name: simplecov
216
+ requirement: &id019 !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: "0"
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: *id019
225
+ - !ruby/object:Gem::Dependency
226
+ name: terminal-table
227
+ requirement: &id020 !ruby/object:Gem::Requirement
228
+ none: false
229
+ requirements:
230
+ - - ">="
231
+ - !ruby/object:Gem::Version
232
+ version: "0"
233
+ type: :development
234
+ prerelease: false
235
+ version_requirements: *id020
126
236
  - !ruby/object:Gem::Dependency
127
237
  name: term-ansicolor
128
- requirement: &id011 !ruby/object:Gem::Requirement
238
+ requirement: &id021 !ruby/object:Gem::Requirement
129
239
  none: false
130
240
  requirements:
131
241
  - - ">="
@@ -133,7 +243,18 @@ dependencies:
133
243
  version: "0"
134
244
  type: :development
135
245
  prerelease: false
136
- version_requirements: *id011
246
+ version_requirements: *id021
247
+ - !ruby/object:Gem::Dependency
248
+ name: rake
249
+ requirement: &id022 !ruby/object:Gem::Requirement
250
+ none: false
251
+ requirements:
252
+ - - "="
253
+ - !ruby/object:Gem::Version
254
+ version: 0.8.7
255
+ type: :development
256
+ prerelease: false
257
+ version_requirements: *id022
137
258
  description: Easier schema management for Rails that compliments your domain model.
138
259
  email: 101pascal@gmail.com
139
260
  executables: []
@@ -146,7 +267,6 @@ extra_rdoc_files:
146
267
  files:
147
268
  - .rvmrc
148
269
  - Gemfile
149
- - Gemfile.lock
150
270
  - LICENSE
151
271
  - README.rdoc
152
272
  - Rakefile
@@ -240,7 +360,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
240
360
  requirements:
241
361
  - - ">="
242
362
  - !ruby/object:Gem::Version
243
- hash: 921409729
363
+ hash: 877019265
244
364
  segments:
245
365
  - 0
246
366
  version: "0"
@@ -257,48 +377,5 @@ rubygems_version: 1.5.2
257
377
  signing_key:
258
378
  specification_version: 3
259
379
  summary: All the fun of ActiveRecord, without writing your migrations, and a dash of mocking.
260
- test_files:
261
- - test/additional_models/review.rb
262
- - test/helper.rb
263
- - test/rails_app/app/controllers/application_controller.rb
264
- - test/rails_app/app/helpers/application_helper.rb
265
- - test/rails_app/app/models/business.rb
266
- - test/rails_app/app/models/business_category.rb
267
- - test/rails_app/app/models/category.rb
268
- - test/rails_app/app/models/chameleon.rb
269
- - test/rails_app/app/models/customer.rb
270
- - test/rails_app/app/models/user.rb
271
- - test/rails_app/config/application.rb
272
- - test/rails_app/config/boot.rb
273
- - test/rails_app/config/environment.rb
274
- - test/rails_app/config/environments/development.rb
275
- - test/rails_app/config/environments/production.rb
276
- - test/rails_app/config/environments/test.rb
277
- - test/rails_app/config/initializers/backtrace_silencers.rb
278
- - test/rails_app/config/initializers/inflections.rb
279
- - test/rails_app/config/initializers/mime_types.rb
280
- - test/rails_app/config/initializers/secret_token.rb
281
- - test/rails_app/config/initializers/session_store.rb
282
- - test/rails_app/config/routes.rb
283
- - test/rails_app/db/seeds.rb
284
- - test/rails_app/test/performance/browsing_test.rb
285
- - test/rails_app/test/test_helper.rb
286
- - test/test_data_schema.rb
287
- - test/test_migration_generator.rb
288
- - test/test_validations.rb
289
- - test/test_zzz_performance.rb
290
- - test/verified_output/migrations/added_incompatible_spot_and_deleted_spots.rb
291
- - test/verified_output/migrations/business_id.rb
292
- - test/verified_output/migrations/chameleons_added_new_longer_spots_and_moved_new_spots.rb
293
- - test/verified_output/migrations/create_business_categories.rb
294
- - test/verified_output/migrations/create_businesses.rb
295
- - test/verified_output/migrations/create_categories.rb
296
- - test/verified_output/migrations/create_chameleons.rb
297
- - test/verified_output/migrations/create_reviews.rb
298
- - test/verified_output/migrations/create_users.rb
299
- - test/verified_output/migrations/created_at.rb
300
- - test/verified_output/migrations/deleted_incompatible_spot.rb
301
- - test/verified_output/migrations/deleted_spots.rb
302
- - test/verified_output/migrations/estimated_value_notes.rb
303
- - test/verified_output/migrations/landline.rb
304
- - test/verified_output/migrations/renamed_old_spots.rb
380
+ test_files: []
381
+
data/Gemfile.lock DELETED
@@ -1,97 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- abstract (1.0.0)
5
- actionmailer (3.0.5)
6
- actionpack (= 3.0.5)
7
- mail (~> 2.2.15)
8
- actionpack (3.0.5)
9
- activemodel (= 3.0.5)
10
- activesupport (= 3.0.5)
11
- builder (~> 2.1.2)
12
- erubis (~> 2.6.6)
13
- i18n (~> 0.4)
14
- rack (~> 1.2.1)
15
- rack-mount (~> 0.6.13)
16
- rack-test (~> 0.5.7)
17
- tzinfo (~> 0.3.23)
18
- activemodel (3.0.5)
19
- activesupport (= 3.0.5)
20
- builder (~> 2.1.2)
21
- i18n (~> 0.4)
22
- activerecord (3.0.5)
23
- activemodel (= 3.0.5)
24
- activesupport (= 3.0.5)
25
- arel (~> 2.0.2)
26
- tzinfo (~> 0.3.23)
27
- activeresource (3.0.5)
28
- activemodel (= 3.0.5)
29
- activesupport (= 3.0.5)
30
- activesupport (3.0.5)
31
- ansi (1.2.2)
32
- arel (2.0.9)
33
- builder (2.1.2)
34
- erubis (2.6.6)
35
- abstract (>= 1.0.0)
36
- faker (0.9.5)
37
- i18n (~> 0.4)
38
- git (1.2.5)
39
- i18n (0.5.0)
40
- jeweler (1.5.2)
41
- bundler (~> 1.0.0)
42
- git (>= 1.2.5)
43
- rake
44
- mail (2.2.15)
45
- activesupport (>= 2.3.6)
46
- i18n (>= 0.4.0)
47
- mime-types (~> 1.16)
48
- treetop (~> 1.4.8)
49
- mime-types (1.16)
50
- polyglot (0.3.1)
51
- rack (1.2.2)
52
- rack-mount (0.6.14)
53
- rack (>= 1.0.0)
54
- rack-test (0.5.7)
55
- rack (>= 1.0)
56
- rails (3.0.5)
57
- actionmailer (= 3.0.5)
58
- actionpack (= 3.0.5)
59
- activerecord (= 3.0.5)
60
- activeresource (= 3.0.5)
61
- activesupport (= 3.0.5)
62
- bundler (~> 1.0)
63
- railties (= 3.0.5)
64
- railties (3.0.5)
65
- actionpack (= 3.0.5)
66
- activesupport (= 3.0.5)
67
- rake (>= 0.8.7)
68
- thor (~> 0.14.4)
69
- rake (0.8.7)
70
- simplecov (0.4.0)
71
- simplecov-html (~> 0.4.0)
72
- simplecov-html (0.4.3)
73
- sqlite3 (1.3.3)
74
- term-ansicolor (1.0.5)
75
- terminal-table (1.4.2)
76
- thor (0.14.6)
77
- thoughtbot-shoulda (2.11.1)
78
- treetop (1.4.9)
79
- polyglot (>= 0.3.1)
80
- turn (0.8.1)
81
- ansi (>= 1.2.2)
82
- tzinfo (0.3.25)
83
-
84
- PLATFORMS
85
- ruby
86
-
87
- DEPENDENCIES
88
- ansi
89
- faker
90
- jeweler
91
- rails (>= 3.0.0)
92
- simplecov
93
- sqlite3
94
- term-ansicolor
95
- terminal-table
96
- thoughtbot-shoulda
97
- turn