Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

use minimal standalone migrations

  • Loading branch information...
commit 8eeb73e64499a3e755e31e43cf876c5a6b3c6fab 1 parent 53b93af
@svenfuchs svenfuchs authored
View
4 Gemfile
@@ -18,10 +18,6 @@ platform :jruby do
gem 'activerecord-jdbc-adapter', '1.2.2'
end
-group :development do
- gem 'standalone_migrations', '~> 1.0.5'
-end
-
group :test do
gem 'rspec', '~> 2.8.0'
gem 'factory_girl', '~> 2.6.0'
View
4 Rakefile
@@ -1,9 +1,7 @@
# need to add this path for stand-alone migrations that use models
-$: << 'lib/travis/model'
-require 'rake'
require 'rspec/core/rake_task'
-require 'tasks/standalone_migrations'
+require File.expand_path('lib/migrations')
require 'travis'
desc 'Run specs'
View
0  db/config.yml → config/database.yml
File renamed without changes
View
3  db/migrate/20110411172518_add_admin_flag_to_user.rb
@@ -1,6 +1,3 @@
-$: << 'lib/travis/model'
-require 'user'
-
class AddAdminFlagToUser < ActiveRecord::Migration
def self.up
change_table(:users) do |t|
View
1  db/migrate/20110801161819_create_requests_commits_and_tasks.rb
@@ -1,5 +1,4 @@
require 'data_migrations'
-require 'build'
class CreateRequestsCommitsAndTasks < ActiveRecord::Migration
def self.up
View
15 lib/migrations.rb
@@ -0,0 +1,15 @@
+# Standalone migrations
+
+require 'rubygems'
+require 'bundler/setup'
+require 'rails'
+require 'active_record/railtie'
+
+Bundler.require
+
+Class.new(Rails::Application) do
+ config.active_support.deprecation = :log
+ initialize!
+ load_tasks
+end
+
Please sign in to comment.
Something went wrong with that request. Please try again.