capifig 0.0.1 → 0.0.2
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.
- data/README.md +2 -2
- data/lib/capifig/capistrano.rb +1 -1
- data/lib/capifig/version.rb +1 -1
- data/spec/capistrano_spec.rb +2 -2
- metadata +1 -1
data/README.md
CHANGED
@@ -17,9 +17,9 @@ Add the following line to your Capistrano deploy.rb:
|
|
17
17
|
|
18
18
|
## Usage
|
19
19
|
|
20
|
-
For each stage, create a folder in `config/deploy
|
20
|
+
For each stage, create a folder in `config/deploy/<stage>`, containing all the config files specific to that
|
21
21
|
stage. On deployment (after deploy:update_code), these files will be copied to your app's root. Subfolders may be used,
|
22
|
-
but must already exist on the server. For example, if you have a folder `config/deploy/
|
22
|
+
but must already exist on the server. For example, if you have a folder `config/deploy/production/dbconfig`, you
|
23
23
|
also need a folder `dbconfig` in the root of your app.
|
24
24
|
|
25
25
|
## Contributing
|
data/lib/capifig/capistrano.rb
CHANGED
@@ -14,7 +14,7 @@ module Capifig
|
|
14
14
|
DESC
|
15
15
|
task :deploy do
|
16
16
|
stage = fetch(:stage, 'production')
|
17
|
-
config_path = fetch(:config_path, "config/deploy
|
17
|
+
config_path = fetch(:config_path, "config/deploy/#{stage}")
|
18
18
|
Capifig::Configuration.deploy(configuration, config_path)
|
19
19
|
logger.info "Configuration deployment complete."
|
20
20
|
end
|
data/lib/capifig/version.rb
CHANGED
data/spec/capistrano_spec.rb
CHANGED
@@ -15,14 +15,14 @@ describe Capifig::Capistrano do
|
|
15
15
|
end
|
16
16
|
|
17
17
|
it "should deploy config files on capifig:deploy" do
|
18
|
-
Capifig::Configuration.should_receive(:deploy).with(cap, 'config/deploy/
|
18
|
+
Capifig::Configuration.should_receive(:deploy).with(cap, 'config/deploy/production')
|
19
19
|
|
20
20
|
cap.find_and_execute_task('capifig:deploy')
|
21
21
|
end
|
22
22
|
|
23
23
|
it "should should get config path from the current stage" do
|
24
24
|
cap.set(:stage, 'test-stage')
|
25
|
-
Capifig::Configuration.should_receive(:deploy).with(cap, 'config/deploy/
|
25
|
+
Capifig::Configuration.should_receive(:deploy).with(cap, 'config/deploy/test-stage')
|
26
26
|
|
27
27
|
cap.find_and_execute_task('capifig:deploy')
|
28
28
|
end
|