capistrano-detect-migrations 0.5.1 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/capistrano/detect_migrations.rb +5 -1
- metadata +72 -49
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Capistrano Detect Migrations
|
2
2
|
============================
|
3
|
-
This plugin to Capistrano leverages the capistrano-
|
3
|
+
This plugin to Capistrano leverages the capistrano-deploytags plugin
|
4
4
|
to have Git identify Rails migrations before you deploy code to any
|
5
5
|
remote systems. This is handy in an environment where you deploy
|
6
6
|
often and want to release the newest code but only if it's not
|
@@ -3,12 +3,16 @@ require 'capistrano-deploytags'
|
|
3
3
|
module Capistrano
|
4
4
|
module DetectMigrations
|
5
5
|
|
6
|
+
def last_git_tag_for(stage)
|
7
|
+
`git tag -l #{stage}-[0-9]*`.split(/\n/).last
|
8
|
+
end
|
9
|
+
|
6
10
|
def pending_migrations?
|
7
11
|
!(`git diff --shortstat #{cdt.last_git_tag_for(stage)} #{branch} db/migrate`.strip.empty?)
|
8
12
|
end
|
9
13
|
|
10
14
|
def show_pending_migrations
|
11
|
-
cdt.safe_run 'git', 'diff', '--summary', '--color',
|
15
|
+
cdt.safe_run 'git', 'diff', '--summary', '--color', last_git_tag_for(stage), branch, 'db/migrate'
|
12
16
|
end
|
13
17
|
|
14
18
|
def approved?
|
metadata
CHANGED
@@ -1,86 +1,109 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-detect-migrations
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Karl Matthias
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-04-11 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: capistrano
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: capistrano-ext
|
27
|
-
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
38
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
33
46
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
37
49
|
name: capistrano-deploytags
|
38
|
-
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
52
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
44
60
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
description: ! ' Capistrano Detect Migrations lets you detect pending Rails migrations
|
48
|
-
before you deploy to any remote hosts. It leverages Git tagging to determine changes
|
49
|
-
that have happened since the last deployment. At deployment time you can choose
|
50
|
-
to continue to deploy or not after being presented with a list of pending migrations.
|
51
|
-
|
52
|
-
'
|
61
|
+
version_requirements: *id003
|
62
|
+
description: " Capistrano Detect Migrations lets you detect pending Rails migrations before you deploy to any remote hosts. It leverages Git tagging to determine changes that have happened since the last deployment. At deployment time you can choose to continue to deploy or not after being presented with a list of pending migrations.\n"
|
53
63
|
email: relistan@gmail.com
|
54
64
|
executables: []
|
65
|
+
|
55
66
|
extensions: []
|
67
|
+
|
56
68
|
extra_rdoc_files: []
|
57
|
-
|
69
|
+
|
70
|
+
files:
|
58
71
|
- lib/capistrano/detect_migrations.rb
|
59
72
|
- lib/capistrano-detect-migrations.rb
|
60
73
|
- README.md
|
61
74
|
- LICENSE
|
62
75
|
homepage: http://github.com/mydrive/capistrano-detect-migrations
|
63
76
|
licenses: []
|
77
|
+
|
64
78
|
post_install_message:
|
65
79
|
rdoc_options: []
|
66
|
-
|
80
|
+
|
81
|
+
require_paths:
|
67
82
|
- lib
|
68
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
83
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
84
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
hash: 3
|
89
|
+
segments:
|
90
|
+
- 0
|
91
|
+
version: "0"
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
93
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
hash: 3
|
98
|
+
segments:
|
99
|
+
- 0
|
100
|
+
version: "0"
|
80
101
|
requirements: []
|
102
|
+
|
81
103
|
rubyforge_project:
|
82
|
-
rubygems_version: 1.8.
|
104
|
+
rubygems_version: 1.8.21
|
83
105
|
signing_key:
|
84
106
|
specification_version: 3
|
85
107
|
summary: Detect pending Rails migrations with Git before you deploy.
|
86
108
|
test_files: []
|
109
|
+
|