capistrano-db-rollback 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,6 +2,11 @@
2
2
 
3
3
  A small capistrano recipe to rollback db migrations along with deploy:rollback
4
4
 
5
+ Usage:
6
+
7
+ 1. Add the dependency in Gemfile - gem "capistrano-db-rollback"
8
+ 2. Add the dependency in Capfile - require "capistrano-db-rollback"
9
+
5
10
  == Contributing to capistrano-db-rollback
6
11
 
7
12
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{capistrano-db-rollback}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Leena"]
@@ -3,14 +3,16 @@ configuration = Capistrano::Configuration.respond_to?(:instance) ?
3
3
  Capistrano.configuration(:must_exist)
4
4
 
5
5
  configuration.load do
6
- namespace :rollback do
7
- desc <<-DESC
8
- Rollbacks the migration to the version found in schema.rb file of the previous release path.\
9
- Uses sed command to read the version from schema.rb file.
10
- DESC
11
- task :migrations do
12
- run "cd #{current_release}; rake db:migrate RAILS_ENV=#{rails_env} VERSION=`grep \":version =>\" #{previous_release}/db/schema.rb | sed -e 's/[a-z A-Z = \> \: \. \( \)]//g'`"
6
+ namespace :deploy do
7
+ namespace :rollback do
8
+ desc <<-DESC
9
+ Rolls back the migration to the version found in schema.rb file of the previous release path.\
10
+ Uses sed command to read the version from schema.rb file.
11
+ DESC
12
+ task :migrations do
13
+ run "cd #{current_release}; rake db:migrate RAILS_ENV=#{rails_env} VERSION=`grep \":version =>\" #{previous_release}/db/schema.rb | sed -e 's/[a-z A-Z = \> \: \. \( \)]//g'`"
14
+ end
15
+ after "deploy:rollback","deploy:rollback:migrations"
13
16
  end
14
- after "deploy:rollback","deploy:rollback:migrations"
15
17
  end
16
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-db-rollback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &77454150 !ruby/object:Gem::Requirement
17
+ requirement: &89429330 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.0
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *77454150
25
+ version_requirements: *89429330
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: jeweler
28
- requirement: &77505320 !ruby/object:Gem::Requirement
28
+ requirement: &89429090 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 1.6.4
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *77505320
36
+ version_requirements: *89429090
37
37
  description: It assumes that the schema.rb is checked in with the correct version
38
38
  into the repository. Reads the version from the schema.rb file and runs the db:migrate
39
39
  with that task
@@ -68,7 +68,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  version: '0'
69
69
  segments:
70
70
  - 0
71
- hash: 548507983
71
+ hash: 1009804979
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements: