capistrano-multiyaml 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -7
- data/capistrano-multiyaml.gemspec +1 -1
- data/lib/capistrano-multiyaml.rb +4 -2
- metadata +3 -3
data/README.md
CHANGED
@@ -28,7 +28,7 @@ integration:
|
|
28
28
|
roles:
|
29
29
|
app:
|
30
30
|
'#{`hostname -f`}':
|
31
|
-
staging:
|
31
|
+
staging:
|
32
32
|
variables: &vars
|
33
33
|
:data_path: '/nfs/#{application}/#{stage}'
|
34
34
|
:clean_script: '/usr/local/bin/clean-cache.sh'
|
@@ -39,28 +39,31 @@ staging:
|
|
39
39
|
- type : before_callback
|
40
40
|
target: 'deploy:restart'
|
41
41
|
action: 'fooapp:run_scripts'
|
42
|
-
roles:
|
42
|
+
roles:
|
43
43
|
web:
|
44
44
|
'lb-stage1.foocorp.com':
|
45
45
|
db:
|
46
46
|
'sql-stage1.db.foocorp.com':
|
47
|
-
app:
|
48
|
-
'app-stage1.foocorp.com':
|
47
|
+
app:
|
48
|
+
'app-stage1.foocorp.com':
|
49
|
+
- :primary: true
|
49
50
|
'app-stage2.foocorp.com':
|
50
51
|
production:
|
51
52
|
variables: *vars
|
52
53
|
tasks: *tasks
|
53
|
-
roles:
|
54
|
+
roles:
|
54
55
|
web:
|
55
56
|
'lb-prod1.foocorp.com':
|
56
57
|
'lb-prod2.foocorp.com':
|
57
58
|
db:
|
58
59
|
'sql-prod1.db.foocorp.com':
|
59
60
|
app:
|
60
|
-
'app-prod1.foocorp.com':
|
61
|
+
'app-prod1.foocorp.com':
|
62
|
+
- :primary: true
|
61
63
|
'app-prod2.foocorp.com':
|
62
64
|
'app-prod3.foocorp.com':
|
63
|
-
'app-prod4.foocorp.com':
|
65
|
+
'app-prod4.foocorp.com':
|
66
|
+
- :read_only: true
|
64
67
|
```
|
65
68
|
|
66
69
|
* Variable keys are symbols
|
data/lib/capistrano-multiyaml.rb
CHANGED
@@ -2,7 +2,7 @@ require 'fileutils'
|
|
2
2
|
require 'yaml'
|
3
3
|
|
4
4
|
unless Capistrano::Configuration.respond_to?(:instance)
|
5
|
-
abort "capistrano
|
5
|
+
abort "capistrano-multiyaml requires Capistrano 2"
|
6
6
|
end
|
7
7
|
|
8
8
|
|
@@ -15,8 +15,10 @@ end
|
|
15
15
|
Capistrano::Configuration.instance.load do
|
16
16
|
begin
|
17
17
|
yamlfile = YAML.load_file(fetch(:multiyaml_stages, "config/stages.yaml"))
|
18
|
-
rescue
|
18
|
+
rescue Errno::ENOENT
|
19
19
|
abort "Multistage deployment configuration file missing. Populate config/stages.yaml or set :multiyaml_stages to another location to use capistrano/multiyaml for multistage deployment."
|
20
|
+
rescue Exception => e
|
21
|
+
abort "Configuration file load failed with message: #{e.message}."
|
20
22
|
end
|
21
23
|
|
22
24
|
stages = fetch(:stages, %w(staging production))
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-multiyaml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: capistrano
|
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubyforge_project:
|
65
|
-
rubygems_version: 1.8.
|
65
|
+
rubygems_version: 1.8.23
|
66
66
|
signing_key:
|
67
67
|
specification_version: 3
|
68
68
|
summary: Capistrano plugin for storing multistage configuration in a YAML file.
|