migrant 1.4.3 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -3,3 +3,6 @@ rvm:
3
3
  - 2.0.0
4
4
  - 1.9.3
5
5
  - rbx-19mode
6
+ env:
7
+ - "RAILS_VERSION='~> 3.2'"
8
+ - "RAILS_VERSION='~> 4.0'"
data/Gemfile CHANGED
@@ -1,2 +1,7 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
+
4
+ if ENV['RAILS_VERSION']
5
+ gem 'rails', ENV['RAILS_VERSION']
6
+ end
7
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.3
1
+ 1.5.0
data/changelog.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 1.5.0
2
+
3
+ [full changelog](http://github.com/pascalh1011/migrant/compare/v1.4.3...v1.5.0)
4
+
5
+ * Autoswitch compatibility between Rails 3.2 and Rails 4
6
+ * Add automated Travis testing for multiple Rails versions
7
+
1
8
  ### 1.4.3
2
9
 
3
10
  [full changelog](http://github.com/pascalh1011/migrant/compare/v1.4.0...v1.4.3)
@@ -8,7 +8,9 @@ module Migrant
8
8
  FileUtils.mkdir_p(Rails.root.join('db', 'migrate'))
9
9
  @possible_irreversible_migrations = false
10
10
 
11
- migrator = ActiveRecord::Migrator.open(migrations_path)
11
+ migrator = (ActiveRecord::Migrator.public_methods.include?(:open))?
12
+ ActiveRecord::Migrator.open(migrations_path) :
13
+ ActiveRecord::Migrator.new(:up, migrations_path)
12
14
 
13
15
  unless migrator.pending_migrations.blank?
14
16
  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
data/migrant.gemspec CHANGED
@@ -6,7 +6,6 @@ Gem::Specification.new do |s|
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Pascal Houliston"]
9
- s.date = Date.today
10
9
  s.description = %q{Easier schema management for Rails that complements your domain model.}
11
10
  s.email = %q{101pascal@gmail.com}
12
11
  s.extra_rdoc_files = [
data/test/helper.rb CHANGED
@@ -52,10 +52,6 @@ class << STDIN
52
52
  end
53
53
  end
54
54
 
55
- # Reset database
56
- db_path = File.join(File.dirname(__FILE__), 'rails_app', 'db', 'test.sqlite3')
57
- File.delete(db_path) if File.exists?(db_path)
58
-
59
55
  # Remove migrations
60
56
  Dir.glob(File.join(File.dirname(__FILE__), 'rails_app', 'db', 'migrate', '*')).each do |file|
61
57
  File.delete(file)
@@ -2,6 +2,6 @@
2
2
  # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
3
  test:
4
4
  adapter: sqlite3
5
- database: db/test.sqlite3
5
+ database: ":memory:"
6
6
  pool: 5
7
7
  timeout: 5000
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: migrant
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.5.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-07-11 00:00:00.000000000 Z
12
+ date: 2013-08-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thoughtbot-shoulda