capistrano-multiconfig 3.0.2 → 3.0.3
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/capistrano-multiconfig.gemspec +1 -1
- data/lib/capistrano/multiconfig.rb +3 -43
- data/lib/capistrano/multiconfig/dsl.rb +50 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c1e8a8be26cfd8349472dbc6013a02fd36056c18
|
4
|
+
data.tar.gz: b992c1903781777c583fdcceb81845ab43287ed8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bc569b7091409b2602ca41dffa40ca93260546226a3cb957e26435097c65d1ca0f30daaa5522e9c415abb25b733538a76e35159dc78abf5473d7aa2aabd3c38
|
7
|
+
data.tar.gz: 064e4e979761a097b04f7f163d797c5548c145c324eea1c9787ae8bac682eda66d04a7b03ab0bae8517978e15db8221b9f4e8c61080cd5c2a6e5204aa9b92291
|
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "capistrano-multiconfig"
|
6
|
-
s.version = "3.0.
|
6
|
+
s.version = "3.0.3"
|
7
7
|
s.authors = ["Andriy Yanko"]
|
8
8
|
s.email = ["andriy.yanko@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/railsware/multiconfig"
|
@@ -1,47 +1,7 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
def stages_root
|
4
|
-
fetch(:stages_root, 'config/deploy')
|
5
|
-
end
|
1
|
+
require 'capistrano/multiconfig/dsl'
|
6
2
|
|
7
|
-
|
8
|
-
|
9
|
-
# @example simple stages
|
10
|
-
#
|
11
|
-
# config
|
12
|
-
# ├── deploy
|
13
|
-
# │ ├── production.rb
|
14
|
-
# │ └── staging.rb
|
15
|
-
# └── deploy.rb
|
16
|
-
#
|
17
|
-
# * cap production
|
18
|
-
# * cap staging
|
19
|
-
#
|
20
|
-
# @example stages with nested configurations
|
21
|
-
#
|
22
|
-
# config
|
23
|
-
# ├── deploy
|
24
|
-
# │ ├── soa
|
25
|
-
# │ │ ├── blog
|
26
|
-
# │ │ │ ├── production.rb
|
27
|
-
# │ │ │ └── staging.rb
|
28
|
-
# │ │ └── wiki
|
29
|
-
# │ │ └── qa.rb
|
30
|
-
# │ └── soa.rb
|
31
|
-
# └── deploy.rb
|
32
|
-
#
|
33
|
-
# * cap soa:blog:production
|
34
|
-
# * cap soa:blog:staging
|
35
|
-
# * cap soa:wiki:qa
|
36
|
-
def stages
|
37
|
-
Dir["#{stages_root}/**/*.rb"].map { |file|
|
38
|
-
file.slice(stages_root.size + 1 .. -4).tr('/', ':')
|
39
|
-
}.tap { |paths|
|
40
|
-
paths.reject! { |path|
|
41
|
-
paths.any? { |another| another != path && another.start_with?(path) }
|
42
|
-
}
|
43
|
-
}.sort
|
44
|
-
end
|
3
|
+
include Capistrano::DSL
|
4
|
+
include Capistrano::Multiconfig::DSL
|
45
5
|
|
46
6
|
stages.each do |stage|
|
47
7
|
Rake::Task.define_task(stage) do
|
@@ -0,0 +1,50 @@
|
|
1
|
+
module Capistrano
|
2
|
+
module Multiconfig
|
3
|
+
module DSL
|
4
|
+
def stages_root
|
5
|
+
fetch(:stages_root, 'config/deploy')
|
6
|
+
end
|
7
|
+
|
8
|
+
# Build stages with nested configurations
|
9
|
+
#
|
10
|
+
# @example simple stages
|
11
|
+
#
|
12
|
+
# config
|
13
|
+
# ├── deploy
|
14
|
+
# │ ├── production.rb
|
15
|
+
# │ └── staging.rb
|
16
|
+
# └── deploy.rb
|
17
|
+
#
|
18
|
+
# * cap production
|
19
|
+
# * cap staging
|
20
|
+
#
|
21
|
+
# @example stages with nested configurations
|
22
|
+
#
|
23
|
+
# config
|
24
|
+
# ├── deploy
|
25
|
+
# │ ├── soa
|
26
|
+
# │ │ ├── blog
|
27
|
+
# │ │ │ ├── production.rb
|
28
|
+
# │ │ │ └── staging.rb
|
29
|
+
# │ │ └── wiki
|
30
|
+
# │ │ └── qa.rb
|
31
|
+
# │ └── soa.rb
|
32
|
+
# └── deploy.rb
|
33
|
+
#
|
34
|
+
# * cap soa:blog:production
|
35
|
+
# * cap soa:blog:staging
|
36
|
+
# * cap soa:wiki:qa
|
37
|
+
def stages
|
38
|
+
Dir["#{stages_root}/**/*.rb"].map { |file|
|
39
|
+
file.slice(stages_root.size + 1 .. -4).tr('/', ':')
|
40
|
+
}.tap { |paths|
|
41
|
+
paths.reject! { |path|
|
42
|
+
paths.any? { |another| another != path && another.start_with?(path) }
|
43
|
+
}
|
44
|
+
}.sort
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
self.extend Capistrano::Multiconfig::DSL
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-multiconfig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andriy Yanko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- fixtures/config/with_foreign_file/readme.md
|
77
77
|
- fixtures/config/with_foreign_file/staging.rb
|
78
78
|
- lib/capistrano/multiconfig.rb
|
79
|
+
- lib/capistrano/multiconfig/dsl.rb
|
79
80
|
- spec/integration_spec.rb
|
80
81
|
homepage: https://github.com/railsware/multiconfig
|
81
82
|
licenses: []
|