standalone_migrations 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.markdown CHANGED
@@ -7,13 +7,12 @@ Install Ruby, RubyGems and a ruby-database driver (e.g. `gem install mysql`) the
7
7
 
8
8
  Add to `Rakefile` in your projects base directory:
9
9
  begin
10
- require 'standalone_migrations'
11
- StandaloneMigrations.tasks
10
+ require 'tasks/standalone_migrations'
12
11
  rescue LoadError => e
13
12
  puts "gem install standalone_migrations to get db:migrate:* tasks! (Error: #{e})"
14
13
  end
15
14
 
16
- Add database configuration to `config/database.yml` in your projects base directory e.g.:
15
+ Add database configuration to `db/config.yml` in your projects base directory e.g.:
17
16
  development:
18
17
  adapter: mysql
19
18
  encoding: utf8
@@ -30,7 +29,7 @@ Add database configuration to `config/database.yml` in your projects base direct
30
29
  ### To create a new database migration:
31
30
 
32
31
  rake db:new_migration name=FooBarMigration
33
- edit migrations/20081220234130_foo_bar_migration.rb
32
+ edit db/migrations/20081220234130_foo_bar_migration.rb
34
33
 
35
34
  ... and fill in the up and down migrations [Cheatsheet](http://dizzy.co.uk/ruby_on_rails/cheatsheets/rails-migrations).
36
35
 
@@ -60,10 +59,16 @@ If you're lazy and want to just execute raw SQL:
60
59
 
61
60
  rake db:migrate:up VERSION=20081220234130
62
61
 
62
+ ### To overwrite the default options
63
+ [Possible options](http://github.com/thuss/standalone-migrations/blob/master/tasks/standalone_migrations.rake)
64
+ MIGRATION_OPTIONS = {:config=>'database/config.yml', ... }
65
+ gem 'standalone_migrations'
66
+ require 'tasks/standalone_migrations'
67
+
63
68
  Contributors
64
69
  ============
65
70
  This work is based on [Lincoln Stoll's blog post](http://lstoll.net/2008/04/stand-alone-activerecord-migrations/) and [David Welton's post](http://journal.dedasys.com/2007/01/28/using-migrations-outside-of-rails).
66
71
 
67
72
  - [Todd Huss](http://gabrito.com/)
68
73
  - [Michael Grosser](http://pragmatig.wordpress.com)
69
- - [Steve Hodgkiss](http://stevehodgkiss.com/)`s [activerecord-migrator-standalone](http://github.com/stevehodgkiss/activerecord-migrator-standalone)
74
+ - [Steve Hodgkiss](http://stevehodgkiss.com/)`s [activerecord-migrator-standalone](http://github.com/stevehodgkiss/activerecord-migrator-standalone)
data/Rakefile CHANGED
@@ -9,6 +9,7 @@ begin
9
9
  gem.email = "thuss@gabrito.com"
10
10
  gem.homepage = "http://github.com/thuss/standalone-migrations"
11
11
  gem.authors = ["Todd Huss", "Michael Grosser"]
12
+ gem.files += ["lib/tasks/*"]
12
13
  %w[rake activerecord].each{|d| gem.add_dependency d}
13
14
  end
14
15
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -1,5 +1,4 @@
1
- # This file should stay copy-pasteable, so do not depend on StandaloneMigrations
2
- # Every important option can be overwritten with MIGRATION_OPTIONS
1
+ # Every important should be overwriteable with MIGRATION_OPTIONS
3
2
  base = File.expand_path('.')
4
3
  here = File.expand_path(File.dirname(File.dirname(__FILE__)))
5
4
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{standalone_migrations}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Todd Huss", "Michael Grosser"]
@@ -19,10 +19,8 @@ Gem::Specification.new do |s|
19
19
  "README.markdown",
20
20
  "Rakefile",
21
21
  "VERSION",
22
- "database.yml",
23
- "lib/standalone_migrations.rb",
22
+ "lib/tasks/standalone_migrations.rb",
24
23
  "standalone_migrations.gemspec",
25
- "tasks/standalone_migrations.rake",
26
24
  "vendor/migration_helpers/MIT-LICENSE",
27
25
  "vendor/migration_helpers/README.markdown",
28
26
  "vendor/migration_helpers/init.rb",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Todd Huss
@@ -55,10 +55,8 @@ files:
55
55
  - README.markdown
56
56
  - Rakefile
57
57
  - VERSION
58
- - database.yml
59
- - lib/standalone_migrations.rb
58
+ - lib/tasks/standalone_migrations.rb
60
59
  - standalone_migrations.gemspec
61
- - tasks/standalone_migrations.rake
62
60
  - vendor/migration_helpers/MIT-LICENSE
63
61
  - vendor/migration_helpers/README.markdown
64
62
  - vendor/migration_helpers/init.rb
data/database.yml DELETED
@@ -1,29 +0,0 @@
1
- development:
2
- adapter: mysql
3
- encoding: utf8
4
- reconnect: false
5
- database: somedatabase_dev
6
- pool: 5
7
- username: root
8
- password:
9
- socket: /var/run/mysqld/mysqld.sock
10
-
11
- test:
12
- adapter: mysql
13
- encoding: utf8
14
- reconnect: false
15
- database: somedatabase_test
16
- pool: 5
17
- username: root
18
- password:
19
- socket: /var/run/mysqld/mysqld.sock
20
-
21
- production:
22
- adapter: mysql
23
- encoding: utf8
24
- reconnect: false
25
- database: somedatabase
26
- pool: 5
27
- username: root
28
- password:
29
- socket: /var/run/mysqld/mysqld.sock
@@ -1,5 +0,0 @@
1
- class StandaloneMigrations
2
- def self.tasks
3
- load "#{File.dirname(__FILE__)}/../tasks/standalone_migrations.rake"
4
- end
5
- end