capistrano-multiconfig 0.0.4 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/LICENSE +22 -0
- data/README.md +19 -0
- data/capistrano-multiconfig.gemspec +2 -2
- data/fixtures/Capfile +7 -0
- data/fixtures/config/double_nested_shared_file/level0.rb +1 -0
- data/fixtures/config/double_nested_shared_file/level0/level1.rb +1 -0
- data/fixtures/config/double_nested_shared_file/level0/level1/config.rb +1 -0
- data/fixtures/config/empty/.gitkeep +0 -0
- data/fixtures/config/nested/app/production.rb +0 -0
- data/fixtures/config/nested/app/staging.rb +0 -0
- data/fixtures/config/nested_with_another_file/app/production.rb +0 -0
- data/fixtures/config/nested_with_another_file/app/staging.rb +0 -0
- data/fixtures/config/nested_with_another_file/deploy.rb +0 -0
- data/fixtures/config/nested_with_shared_and_another_file/app.rb +0 -0
- data/fixtures/config/nested_with_shared_and_another_file/app/production.rb +0 -0
- data/fixtures/config/nested_with_shared_and_another_file/app/staging.rb +0 -0
- data/fixtures/config/nested_with_shared_and_another_file/deploy.rb +0 -0
- data/fixtures/config/nested_with_shared_file/app.rb +1 -0
- data/fixtures/config/nested_with_shared_file/app/production.rb +1 -0
- data/fixtures/config/nested_with_shared_file/app/staging.rb +0 -0
- data/fixtures/config/sample/apps/world1.rb +1 -0
- data/fixtures/config/sample/apps/world2.rb +1 -0
- data/fixtures/config/third_level_nested/app/blog/production.rb +0 -0
- data/fixtures/config/third_level_nested/app/blog/staging.rb +0 -0
- data/fixtures/config/third_level_nested/app/wiki/production.rb +0 -0
- data/fixtures/config/third_level_nested/app/wiki/qa.rb +0 -0
- data/fixtures/config/two_files/production.rb +0 -0
- data/fixtures/config/two_files/staging.rb +0 -0
- data/fixtures/config/two_nested/api/production.rb +0 -0
- data/fixtures/config/two_nested/api/staging.rb +0 -0
- data/fixtures/config/two_nested/app/production.rb +0 -0
- data/fixtures/config/two_nested/app/staging.rb +0 -0
- data/fixtures/config/with_foreign_file/production.rb +0 -0
- data/fixtures/config/with_foreign_file/readme.md +0 -0
- data/fixtures/config/with_foreign_file/staging.rb +0 -0
- data/lib/capistrano/multiconfig.rb +23 -1
- data/lib/capistrano/multiconfig/configurations.rb +35 -76
- data/spec/capistrano/multiconfig/configurations_spec.rb +100 -0
- data/spec/integration_spec.rb +92 -0
- metadata +77 -66
- data/lib/capistrano/multiconfig/ensure.rb +0 -15
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2444c019b2164fb48b8c2b07ad2b92f43852cfb7
|
4
|
+
data.tar.gz: 22c2d78e1dfeaf94989f2f4a0f0d6f7478db8852
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cd67f960281c7c3e633c1c9cdd9562ebf4c9b4f9ee848a93b8d1229b6e53c446f0ef01dfa2facbd2ff7c8bb5348e99da003b19c0314c9f4af307dafee4124302
|
7
|
+
data.tar.gz: 2e2f10fc4c5f9e4ad3257d1feac61495a50bdd0d3a68c92537e3f204d7ed4b3027771a1b4ec14208b24e2702c745afc0bedae1b5731b15586ec221f2aeb6f955
|
data/Gemfile
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Railsware (www.railsware.com)
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -21,6 +21,14 @@ Add to `Capfile`
|
|
21
21
|
set :config, 'path/to/your/configurations'
|
22
22
|
require 'capistrano/multiconfig'
|
23
23
|
|
24
|
+
## Capistrano3
|
25
|
+
|
26
|
+
Use multiconfig v3.x.x
|
27
|
+
|
28
|
+
## Capistrano2
|
29
|
+
|
30
|
+
For legacy capistrano v2.x.x use multiconfig gem v0.0.x
|
31
|
+
|
24
32
|
## Example
|
25
33
|
|
26
34
|
Assume we need next configurations:
|
@@ -88,3 +96,14 @@ For example for *:config_root* `config/deploy` task `cap apps/blog/qa.rb` loads
|
|
88
96
|
* config/deploy/apps/blog/qa.rb
|
89
97
|
|
90
98
|
So it's easy to put shared configuration.
|
99
|
+
|
100
|
+
|
101
|
+
## Testing
|
102
|
+
|
103
|
+
$ bundle install
|
104
|
+
$ rspec -fs spec
|
105
|
+
|
106
|
+
## License
|
107
|
+
|
108
|
+
* Copyright (c) 2013 Railsware [www.railsware.com](http://www.railsware.com)
|
109
|
+
* [MIT](www.opensource.org/licenses/MIT)
|
@@ -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 = "0.0
|
6
|
+
s.version = "3.0.0"
|
7
7
|
s.authors = ["Andriy Yanko"]
|
8
8
|
s.email = ["andriy.yanko@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/railsware/multiconfig"
|
@@ -22,5 +22,5 @@ Each configuration loads recursively configuration from namespace files and own
|
|
22
22
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
23
23
|
s.require_paths = ["lib"]
|
24
24
|
|
25
|
-
s.add_runtime_dependency "capistrano", ">=
|
25
|
+
s.add_runtime_dependency "capistrano", ">=3.0.0"
|
26
26
|
end
|
data/fixtures/Capfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "hello from level0"
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "#{fetch(:message)} level1"
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "#{fetch(:message)} world"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "hello from shared world"
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "hello from production world"
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "hello from world1"
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "hello from world2"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,2 +1,24 @@
|
|
1
1
|
require 'capistrano/multiconfig/configurations'
|
2
|
-
|
2
|
+
|
3
|
+
include Capistrano::DSL
|
4
|
+
|
5
|
+
config_root_path = File.expand_path(fetch(:config_root, "config/deploy"))
|
6
|
+
|
7
|
+
config_names = Capistrano::Multiconfig::Configurations.find_names(config_root_path)
|
8
|
+
|
9
|
+
config_names.each do |config_name|
|
10
|
+
Rake::Task.define_task(config_name) do
|
11
|
+
set(:config_name, config_name)
|
12
|
+
segments = config_name.split(":")
|
13
|
+
segments.size.times do |i|
|
14
|
+
path = File.join([config_root_path] + segments[0..i]) + '.rb'
|
15
|
+
load(path) if File.exists?(path)
|
16
|
+
end
|
17
|
+
end.add_description("Load #{config_name} configuration")
|
18
|
+
end
|
19
|
+
|
20
|
+
set(:config_names, config_names)
|
21
|
+
|
22
|
+
def stages
|
23
|
+
fetch(:config_names)
|
24
|
+
end
|
@@ -1,90 +1,49 @@
|
|
1
|
-
Capistrano
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
module Capistrano
|
2
|
+
module Multiconfig
|
3
|
+
class Configurations
|
4
|
+
def self.find_names(root_path)
|
5
|
+
new(root_path).find_names
|
6
|
+
end
|
7
7
|
|
8
|
-
|
9
|
-
config_files.reject! do |config_file|
|
10
|
-
config_dir = config_file.gsub(/\.rb$/, '/')
|
11
|
-
config_files.any? { |file| file[0, config_dir.size] == config_dir }
|
12
|
-
end
|
8
|
+
attr_reader :root_path
|
13
9
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
10
|
+
def initialize(root_path)
|
11
|
+
@root_path = root_path
|
12
|
+
end
|
18
13
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
14
|
+
# find configuration names
|
15
|
+
def find_names
|
16
|
+
files = scan_files
|
17
|
+
files.sort!
|
18
|
+
remove_shared_files!(files)
|
19
|
+
build_names(files)
|
25
20
|
end
|
26
|
-
end
|
27
|
-
end
|
28
21
|
|
29
|
-
|
30
|
-
config_names.each do |config_name|
|
31
|
-
segments = config_name.split(':')
|
32
|
-
namespace_names = segments[0, segments.size - 1]
|
33
|
-
task_name = segments.last
|
22
|
+
private
|
34
23
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
desc "Load #{config_name} configuration"
|
40
|
-
task(task_name) do
|
41
|
-
# set configuration name as :config_name variable
|
42
|
-
top.set(:config_name, config_name)
|
24
|
+
# Scan recursively root path
|
25
|
+
def scan_files
|
26
|
+
Dir["#{root_path}/**/*.rb"]
|
27
|
+
end
|
43
28
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
29
|
+
# Remove path when there is the same directory with child.
|
30
|
+
#
|
31
|
+
# app/staging.rb (is shared configuration for 'alpha' and 'beta')
|
32
|
+
# app/staging/alpha.rb
|
33
|
+
# app/staging/beta.rb
|
34
|
+
def remove_shared_files!(files)
|
35
|
+
files.reject! do |file|
|
36
|
+
dir = file.gsub(/\.rb$/, '/')
|
37
|
+
files.any? { |f| f[0, dir.size] == dir }
|
48
38
|
end
|
49
39
|
end
|
50
|
-
end
|
51
40
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
# desc "DESC"
|
58
|
-
# task(:task_name) { TASK }
|
59
|
-
# end
|
60
|
-
# block = block1 = lambda { |parent| parent.namespace(:ns1, &block0) }
|
61
|
-
# block = block2 = lambda { |parent| parent.namespace(:ns2, &block1) }
|
62
|
-
# ...
|
63
|
-
# block = blockN = lambda { |parent| parent.namespace(:nsN, &blockN-1) }
|
64
|
-
#
|
65
|
-
block = namespace_names.reverse.inject(block) do |child, name|
|
66
|
-
lambda do |parent|
|
67
|
-
parent.namespace(name, &child)
|
41
|
+
# Convert "app/blog/production" to "app:blog:production"
|
42
|
+
def build_names(files)
|
43
|
+
files.map do |file|
|
44
|
+
file.sub("#{root_path}/", '').sub(/\.rb$/, '').gsub('/', ':')
|
45
|
+
end
|
68
46
|
end
|
69
47
|
end
|
70
|
-
|
71
|
-
# create namespaced configuration task
|
72
|
-
#
|
73
|
-
# block = lambda do
|
74
|
-
# namespace :nsN do
|
75
|
-
# ...
|
76
|
-
# namespace :ns2 do
|
77
|
-
# namespace :ns1 do
|
78
|
-
# desc "DESC"
|
79
|
-
# task(:task_name) { TASK }
|
80
|
-
# end
|
81
|
-
# end
|
82
|
-
# ...
|
83
|
-
# end
|
84
|
-
# end
|
85
|
-
block.call(top)
|
86
48
|
end
|
87
|
-
|
88
|
-
# set configuration names list
|
89
|
-
set(:config_names, config_names)
|
90
49
|
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require 'capistrano/multiconfig/configurations'
|
2
|
+
|
3
|
+
describe Capistrano::Multiconfig::Configurations do
|
4
|
+
|
5
|
+
describe ".find_names" do
|
6
|
+
subject { described_class.find_names(config_root) }
|
7
|
+
|
8
|
+
context "empty root" do
|
9
|
+
let(:config_root) { 'fixtures/config/empty' }
|
10
|
+
it { should == [] }
|
11
|
+
end
|
12
|
+
|
13
|
+
context "root with two files" do
|
14
|
+
let(:config_root) { 'fixtures/config/two_files' }
|
15
|
+
it {
|
16
|
+
should == [
|
17
|
+
'production',
|
18
|
+
'staging'
|
19
|
+
]
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
context "root with nested directory and two files inside" do
|
24
|
+
let(:config_root) { 'fixtures/config/nested' }
|
25
|
+
it {
|
26
|
+
should == [
|
27
|
+
'app:production',
|
28
|
+
'app:staging'
|
29
|
+
]
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
context "root with two nested directories and two files inside" do
|
34
|
+
let(:config_root) { 'fixtures/config/two_nested' }
|
35
|
+
it {
|
36
|
+
should == [
|
37
|
+
'api:production',
|
38
|
+
'api:staging',
|
39
|
+
'app:production',
|
40
|
+
'app:staging'
|
41
|
+
]
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
context "root with third nested directories" do
|
46
|
+
let(:config_root) { 'fixtures/config/third_level_nested' }
|
47
|
+
it {
|
48
|
+
should == [
|
49
|
+
'app:blog:production',
|
50
|
+
'app:blog:staging',
|
51
|
+
'app:wiki:production',
|
52
|
+
'app:wiki:qa'
|
53
|
+
]
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
context "root nested with shared file" do
|
58
|
+
let(:config_root) { 'fixtures/config/nested_with_shared_file' }
|
59
|
+
it {
|
60
|
+
should == [
|
61
|
+
'app:production',
|
62
|
+
'app:staging',
|
63
|
+
]
|
64
|
+
}
|
65
|
+
end
|
66
|
+
|
67
|
+
context "root nested with another file" do
|
68
|
+
let(:config_root) { 'fixtures/config/nested_with_another_file' }
|
69
|
+
it {
|
70
|
+
should == [
|
71
|
+
'app:production',
|
72
|
+
'app:staging',
|
73
|
+
'deploy'
|
74
|
+
]
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
context "root nested with shared and another file" do
|
79
|
+
let(:config_root) { 'fixtures/config/nested_with_shared_and_another_file' }
|
80
|
+
it {
|
81
|
+
should == [
|
82
|
+
'app:production',
|
83
|
+
'app:staging',
|
84
|
+
'deploy'
|
85
|
+
]
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
context "root with foreign file" do
|
90
|
+
let(:config_root) { 'fixtures/config/with_foreign_file' }
|
91
|
+
it {
|
92
|
+
should == [
|
93
|
+
'production',
|
94
|
+
'staging'
|
95
|
+
]
|
96
|
+
}
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,92 @@
|
|
1
|
+
describe "integration" do
|
2
|
+
def run_cap(args)
|
3
|
+
Dir.chdir 'fixtures' do
|
4
|
+
`env CONFIG_ROOT=#{config_root} bundle exec cap #{args}`
|
5
|
+
end
|
6
|
+
end
|
7
|
+
|
8
|
+
describe "displaying tasks" do
|
9
|
+
subject do
|
10
|
+
run_cap("-T")
|
11
|
+
end
|
12
|
+
|
13
|
+
context "two files root" do
|
14
|
+
let(:config_root) { "config/two_files" }
|
15
|
+
|
16
|
+
it "should display configurations" do
|
17
|
+
subject.should == <<-TEXT
|
18
|
+
cap production # Load production configuration
|
19
|
+
cap staging # Load staging configuration
|
20
|
+
TEXT
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context "third level nested root" do
|
25
|
+
let(:config_root) { "config/third_level_nested" }
|
26
|
+
|
27
|
+
it "should display configurations" do
|
28
|
+
subject.should == <<-TEXT
|
29
|
+
cap app:blog:production # Load app:blog:production configuration
|
30
|
+
cap app:blog:staging # Load app:blog:staging configuration
|
31
|
+
cap app:wiki:production # Load app:wiki:production configuration
|
32
|
+
cap app:wiki:qa # Load app:wiki:qa configuration
|
33
|
+
TEXT
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe "task invocation" do
|
39
|
+
|
40
|
+
context "sample configurations" do
|
41
|
+
let(:config_root) { 'config/sample' }
|
42
|
+
|
43
|
+
context "without configuration" do
|
44
|
+
subject { run_cap("hello_world") }
|
45
|
+
it "should require configuration" do
|
46
|
+
subject.should include("Stage not set")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
context "with apps:world1 configuration" do
|
51
|
+
subject { run_cap("apps:world1 hello_world") }
|
52
|
+
|
53
|
+
it "should use value set in configuration" do
|
54
|
+
subject.should == "hello from world1\n"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
context "with apps:world2 configuration" do
|
59
|
+
subject { run_cap("apps:world2 hello_world") }
|
60
|
+
|
61
|
+
it "should use value set in configuration" do
|
62
|
+
subject.should == "hello from world2\n"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
context "configurations with shared file" do
|
68
|
+
let(:config_root) { 'config/nested_with_shared_file' }
|
69
|
+
context "with app:production" do
|
70
|
+
subject { run_cap("app:production hello_world") }
|
71
|
+
it "should display certain message" do
|
72
|
+
subject.should == "hello from production world\n"
|
73
|
+
end
|
74
|
+
end
|
75
|
+
context "with app:staging" do
|
76
|
+
subject { run_cap("app:staging hello_world") }
|
77
|
+
it "should display shared message" do
|
78
|
+
subject.should == "hello from shared world\n"
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
context "configuration with double nested shared file" do
|
84
|
+
let(:config_root) { 'config/double_nested_shared_file' }
|
85
|
+
subject { run_cap("level0:level1:config hello_world") }
|
86
|
+
it "should display nested message from all levels" do
|
87
|
+
subject.should == "hello from level0 level1 world\n"
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
metadata
CHANGED
@@ -1,94 +1,105 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-multiconfig
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 4
|
10
|
-
version: 0.0.4
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.0
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Andriy Yanko
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-10-16 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: capistrano
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 17
|
30
|
-
segments:
|
31
|
-
- 2
|
32
|
-
- 5
|
33
|
-
- 5
|
34
|
-
version: 2.5.5
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.0.0
|
35
20
|
type: :runtime
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.0.0
|
27
|
+
description: "\nMulticonfig extension is similar to [multistage](https://github.com/capistrano/capistrano-ext)
|
28
|
+
extenstion.\nBut it's not only about 'stage' configurations. It's about any configuration
|
29
|
+
that you may need.\nExtension recursively builds configuration list from configuration
|
30
|
+
root directory.\nEach configuration loads recursively configuration from namespace
|
31
|
+
files and own configuration file.\n "
|
32
|
+
email:
|
43
33
|
- andriy.yanko@gmail.com
|
44
34
|
executables: []
|
45
|
-
|
46
35
|
extensions: []
|
47
|
-
|
48
36
|
extra_rdoc_files: []
|
49
|
-
|
50
|
-
files:
|
37
|
+
files:
|
51
38
|
- .gitignore
|
52
39
|
- Gemfile
|
40
|
+
- LICENSE
|
53
41
|
- README.md
|
54
42
|
- Rakefile
|
55
43
|
- capistrano-multiconfig.gemspec
|
44
|
+
- fixtures/Capfile
|
45
|
+
- fixtures/config/double_nested_shared_file/level0.rb
|
46
|
+
- fixtures/config/double_nested_shared_file/level0/level1.rb
|
47
|
+
- fixtures/config/double_nested_shared_file/level0/level1/config.rb
|
48
|
+
- fixtures/config/empty/.gitkeep
|
49
|
+
- fixtures/config/nested/app/production.rb
|
50
|
+
- fixtures/config/nested/app/staging.rb
|
51
|
+
- fixtures/config/nested_with_another_file/app/production.rb
|
52
|
+
- fixtures/config/nested_with_another_file/app/staging.rb
|
53
|
+
- fixtures/config/nested_with_another_file/deploy.rb
|
54
|
+
- fixtures/config/nested_with_shared_and_another_file/app.rb
|
55
|
+
- fixtures/config/nested_with_shared_and_another_file/app/production.rb
|
56
|
+
- fixtures/config/nested_with_shared_and_another_file/app/staging.rb
|
57
|
+
- fixtures/config/nested_with_shared_and_another_file/deploy.rb
|
58
|
+
- fixtures/config/nested_with_shared_file/app.rb
|
59
|
+
- fixtures/config/nested_with_shared_file/app/production.rb
|
60
|
+
- fixtures/config/nested_with_shared_file/app/staging.rb
|
61
|
+
- fixtures/config/sample/apps/world1.rb
|
62
|
+
- fixtures/config/sample/apps/world2.rb
|
63
|
+
- fixtures/config/third_level_nested/app/blog/production.rb
|
64
|
+
- fixtures/config/third_level_nested/app/blog/staging.rb
|
65
|
+
- fixtures/config/third_level_nested/app/wiki/production.rb
|
66
|
+
- fixtures/config/third_level_nested/app/wiki/qa.rb
|
67
|
+
- fixtures/config/two_files/production.rb
|
68
|
+
- fixtures/config/two_files/staging.rb
|
69
|
+
- fixtures/config/two_nested/api/production.rb
|
70
|
+
- fixtures/config/two_nested/api/staging.rb
|
71
|
+
- fixtures/config/two_nested/app/production.rb
|
72
|
+
- fixtures/config/two_nested/app/staging.rb
|
73
|
+
- fixtures/config/with_foreign_file/production.rb
|
74
|
+
- fixtures/config/with_foreign_file/readme.md
|
75
|
+
- fixtures/config/with_foreign_file/staging.rb
|
56
76
|
- lib/capistrano/multiconfig.rb
|
57
77
|
- lib/capistrano/multiconfig/configurations.rb
|
58
|
-
-
|
59
|
-
|
78
|
+
- spec/capistrano/multiconfig/configurations_spec.rb
|
79
|
+
- spec/integration_spec.rb
|
60
80
|
homepage: https://github.com/railsware/multiconfig
|
61
81
|
licenses: []
|
62
|
-
|
82
|
+
metadata: {}
|
63
83
|
post_install_message:
|
64
84
|
rdoc_options: []
|
65
|
-
|
66
|
-
require_paths:
|
85
|
+
require_paths:
|
67
86
|
- lib
|
68
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
none: false
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
hash: 3
|
83
|
-
segments:
|
84
|
-
- 0
|
85
|
-
version: "0"
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - '>='
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '0'
|
92
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
86
97
|
requirements: []
|
87
|
-
|
88
98
|
rubyforge_project: capistrano-multiconfig
|
89
|
-
rubygems_version:
|
99
|
+
rubygems_version: 2.0.3
|
90
100
|
signing_key:
|
91
|
-
specification_version:
|
101
|
+
specification_version: 4
|
92
102
|
summary: Capistrano extension that allows to use multiple configurations
|
93
|
-
test_files:
|
94
|
-
|
103
|
+
test_files:
|
104
|
+
- spec/capistrano/multiconfig/configurations_spec.rb
|
105
|
+
- spec/integration_spec.rb
|
@@ -1,15 +0,0 @@
|
|
1
|
-
Capistrano::Configuration.instance(true).load do
|
2
|
-
namespace :multiconfig do
|
3
|
-
desc "[internal] Ensure that a configuration has been selected"
|
4
|
-
task :ensure do
|
5
|
-
unless exists?(:config_name)
|
6
|
-
puts "No configuration specified. Please specify one of:"
|
7
|
-
config_names.each { |name| puts " * #{name}" }
|
8
|
-
puts "(e.g. `cap #{config_names.first} #{ARGV.last}')"
|
9
|
-
abort
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
on :start, 'multiconfig:ensure', :except => config_names
|
15
|
-
end
|