capistrano-multiconfig 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a4a01eddf6db929483491f1ab6e8f1bee0c1de0
|
4
|
+
data.tar.gz: 37b27ad85cb0cdfb72562e666e3886c90a09256d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4125540d382803fa4f317d7452eeb83229bae15457aaefab91de85b1f5d2c3331d492b6e3dc9441c48c23d63ecd5e3818875f1141aaacc2f71c5811c7442d7a6
|
7
|
+
data.tar.gz: a1e9b7b9dbad421babef44a1704180a9a8d90156a87ca8e0b76d8f8048ead068cad6b234f80d08df0b335cc1d216d74142f76fbaff4d4256e2d1cc4e71f4be18
|
@@ -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.1"
|
7
7
|
s.authors = ["Andriy Yanko"]
|
8
8
|
s.email = ["andriy.yanko@gmail.com"]
|
9
9
|
s.homepage = "https://github.com/railsware/multiconfig"
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "hello from root"
|
@@ -0,0 +1 @@
|
|
1
|
+
set :message, "#{fetch(:message)} world"
|
@@ -9,11 +9,20 @@ config_names = Capistrano::Multiconfig::Configurations.find_names(config_root_pa
|
|
9
9
|
config_names.each do |config_name|
|
10
10
|
Rake::Task.define_task(config_name) do
|
11
11
|
set(:config_name, config_name)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
|
13
|
+
load "capistrano/defaults.rb"
|
14
|
+
|
15
|
+
paths = [ config_root_path + '.rb' ]
|
16
|
+
|
17
|
+
(segments = config_name.split(":")).size.times do |i|
|
18
|
+
paths << File.join([config_root_path] + segments[0..i]) + '.rb'
|
16
19
|
end
|
20
|
+
|
21
|
+
paths.each { |path| load(path) if File.exists?(path) }
|
22
|
+
|
23
|
+
load "capistrano/#{fetch(:scm)}.rb"
|
24
|
+
I18n.locale = fetch(:locale, :en)
|
25
|
+
configure_backend
|
17
26
|
end.add_description("Load #{config_name} configuration")
|
18
27
|
end
|
19
28
|
|
data/spec/integration_spec.rb
CHANGED
@@ -87,6 +87,14 @@ TEXT
|
|
87
87
|
subject.should == "hello from level0 level1 world\n"
|
88
88
|
end
|
89
89
|
end
|
90
|
+
|
91
|
+
context "configuration with root and nested" do
|
92
|
+
let(:config_root) { 'config/root_with_nested' }
|
93
|
+
subject { run_cap("app:config hello_world") }
|
94
|
+
it "should display nested message from root" do
|
95
|
+
subject.should == "hello from root world\n"
|
96
|
+
end
|
97
|
+
end
|
90
98
|
end
|
91
99
|
|
92
100
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andriy Yanko
|
@@ -58,6 +58,8 @@ files:
|
|
58
58
|
- fixtures/config/nested_with_shared_file/app.rb
|
59
59
|
- fixtures/config/nested_with_shared_file/app/production.rb
|
60
60
|
- fixtures/config/nested_with_shared_file/app/staging.rb
|
61
|
+
- fixtures/config/root_with_nested.rb
|
62
|
+
- fixtures/config/root_with_nested/app/config.rb
|
61
63
|
- fixtures/config/sample/apps/world1.rb
|
62
64
|
- fixtures/config/sample/apps/world2.rb
|
63
65
|
- fixtures/config/third_level_nested/app/blog/production.rb
|