capistrano3-ridgepole 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/capistrano3-ridgepole.gemspec +1 -1
- data/lib/capistrano3/tasks/ridgepole.rake +18 -15
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 962d361b609f71189e143c2ff3ca3f34d42a66f1
|
|
4
|
+
data.tar.gz: afeba272b2d50e0e7f0500effd7a30c5f1a06959
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 291831989a7d3f7e0e4f263dbdf20b890be06eb5943a5e13a0c8c8bb951f4809e579057796baa87c527676becb03dfeb93fb457a6e79261e50dc907a0ac89d1d
|
|
7
|
+
data.tar.gz: 084df338bf890f5d2ecf403da2d73578349f7732bba0439ebd9551317f47467767372d8cf9ec1d9fcd2ab1970f552d788b0f1bc4136993afc1988b8335627451
|
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
|
4
4
|
|
|
5
5
|
Gem::Specification.new do |spec|
|
|
6
6
|
spec.name = "capistrano3-ridgepole"
|
|
7
|
-
spec.version = "0.0.
|
|
7
|
+
spec.version = "0.0.4"
|
|
8
8
|
spec.authors = ["timakin"]
|
|
9
9
|
spec.email = ["timaki.st@gmail.com"]
|
|
10
10
|
spec.summary = %q{Capistrano3 plugin for ridgepole schema application}
|
|
@@ -14,7 +14,15 @@ namespace :ridgepole do
|
|
|
14
14
|
task :apply do
|
|
15
15
|
on roles(fetch(:ridgepole_roles)) do
|
|
16
16
|
within current_path do
|
|
17
|
-
|
|
17
|
+
if test "! [ -f #{fetch(:ridgepole_schema_file)} ]"
|
|
18
|
+
error "Schema file is not found. Default path to specify Schemafile is #{fetch(:ridgepole_schema_file)}"
|
|
19
|
+
exit 1
|
|
20
|
+
elsif test "! [ -f #{fetch(:ridgepole_config_file)} ]"
|
|
21
|
+
error "Config file is not found. Default path to specify database.yml configuration file is #{fetch(:ridgepole_config_file)}"
|
|
22
|
+
exit 1
|
|
23
|
+
else
|
|
24
|
+
execute :bundle, :exec, "#{ridgepole_base_command}"
|
|
25
|
+
end
|
|
18
26
|
end
|
|
19
27
|
end
|
|
20
28
|
end
|
|
@@ -23,7 +31,15 @@ namespace :ridgepole do
|
|
|
23
31
|
task :dry_run do
|
|
24
32
|
on roles(fetch(:ridgepole_roles)) do
|
|
25
33
|
within current_path do
|
|
26
|
-
|
|
34
|
+
if test "! [ -f #{fetch(:ridgepole_schema_file)} ]"
|
|
35
|
+
error "Schema file is not found. Default path to specify Schemafile is #{fetch(:ridgepole_schema_file)}"
|
|
36
|
+
exit 1
|
|
37
|
+
elsif test "! [ -f #{fetch(:ridgepole_config_file)} ]"
|
|
38
|
+
error "Config file is not found. Default path to specify database.yml configuration file is #{fetch(:ridgepole_config_file)}"
|
|
39
|
+
exit 1
|
|
40
|
+
else
|
|
41
|
+
execute :bundle, :exec, "#{ridgepole_base_command} --dry-run"
|
|
42
|
+
end
|
|
27
43
|
end
|
|
28
44
|
end
|
|
29
45
|
end
|
|
@@ -42,16 +58,3 @@ namespace :ridgepole do
|
|
|
42
58
|
end
|
|
43
59
|
end
|
|
44
60
|
|
|
45
|
-
before "ridgepole:apply", "ridgepole:dry_run", "ridgepole:diff" do
|
|
46
|
-
unless test "[ -f #{fetch(:ridgepole_schema_file)} ]"
|
|
47
|
-
error "Schema file is not found. Default path to specify Schemafile is #{fetch(:ridgepole_schema_file)}"
|
|
48
|
-
exit 1
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
unless test "[ -f #{fetch(:ridgepole_config_file)} ]"
|
|
52
|
-
error "Config file is not found. Default path to specify database.yml configuration file is #{fetch(:ridgepole_config_file)}"
|
|
53
|
-
exit 1
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
logger.info "Loading Schemafile and database.yml for Ridgepole task"
|
|
57
|
-
end
|