a9n 0.3.2 → 0.3.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/README.md +3 -3
- data/lib/a9n/capistrano.rb +4 -10
- data/lib/a9n/capistrano/tasks.cap +12 -0
- data/lib/a9n/capistrano/ver2x.rb +10 -0
- data/lib/a9n/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bc1f0f1add367dbf4d699062435857f876e5d0e
|
4
|
+
data.tar.gz: 89d0a68d3960fcb05326c88c86c1ad3e1bad671c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b916f7334a6806e541a3e26b3fdc4b895db2cc3fefb931fc1dc07cc0f486c4fafece467725d5549a71cd967d79821fd508c754cc28e008f8948f4bbb94bbd418
|
7
|
+
data.tar.gz: 2700af59f2b572a92b9c4980cbb53f49c350d5fa8534dd506e32771653085107e696c8ecce536cc10fbb3b18f593814fa53fbece9a984bd9c067f97bbf5371a7
|
data/README.md
CHANGED
@@ -75,15 +75,15 @@ You can access it by:
|
|
75
75
|
A9n.mandrill.username # => `joe`
|
76
76
|
A9n.mandrill.api_key # => `1234asdf`
|
77
77
|
|
78
|
-
|
78
|
+
|
79
79
|
## Capistrano
|
80
80
|
|
81
81
|
If you use capistrano and you feel safe enough to keep all your instance ( staging, production) configuration in the repository, you may find it useful to use capistrano extensions.
|
82
82
|
Just add an instance configuration file e.g. `configuration.yml.staging`, `configuration.yml.production` (NOTE: file extension must be consistent with the capistrano stage) and add
|
83
83
|
|
84
84
|
require 'a9n/capistrano'
|
85
|
-
|
86
|
-
to your
|
85
|
+
|
86
|
+
to your Capfile. This way `configuration.yml.<stage>` overrides `configuration.yml` on each deploy.
|
87
87
|
|
88
88
|
## Contributing
|
89
89
|
|
data/lib/a9n/capistrano.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
|
-
Capistrano::Configuration.instance
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
desc "Copy stage configuration to base file."
|
6
|
-
task :copy_stage_config, roles: :app do
|
7
|
-
run "cp #{fetch(:release_path)}/config/configuration.yml.#{fetch(:stage)} #{fetch(:release_path)}/config/configuration.yml"
|
8
|
-
end
|
9
|
-
end
|
1
|
+
if defined?(Capistrano::Configuration.instance)
|
2
|
+
require 'a9n/capistrano/ver2x.rb'
|
3
|
+
else
|
4
|
+
load File.expand_path('../capistrano/tasks.cap', __FILE__)
|
10
5
|
end
|
11
|
-
|
@@ -0,0 +1,12 @@
|
|
1
|
+
namespace :a9n do
|
2
|
+
desc "Copy stage configuration to the base file."
|
3
|
+
task :copy_stage_config do
|
4
|
+
on roles(:app) do
|
5
|
+
within fetch(:release_path) do
|
6
|
+
execute :cp, "config/configuration.yml.#{fetch(:stage)}", "config/configuration.yml"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
after "deploy:updating", "a9n:copy_stage_config"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Capistrano::Configuration.instance.load do
|
2
|
+
after "deploy:update_code", "a9n:copy_stage_config"
|
3
|
+
|
4
|
+
namespace :a9n do
|
5
|
+
desc "Copy stage configuration to base file."
|
6
|
+
task :copy_stage_config, roles: :app do
|
7
|
+
run "cp #{fetch(:release_path)}/config/configuration.yml.#{fetch(:stage)} #{fetch(:release_path)}/config/configuration.yml"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/a9n/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: a9n
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Knapik
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: a9n is a tool to keep ruby/rails apps extra configuration easily maintainable
|
14
14
|
and verifiable
|
@@ -28,6 +28,8 @@ files:
|
|
28
28
|
- a9n.gemspec
|
29
29
|
- lib/a9n.rb
|
30
30
|
- lib/a9n/capistrano.rb
|
31
|
+
- lib/a9n/capistrano/tasks.cap
|
32
|
+
- lib/a9n/capistrano/ver2x.rb
|
31
33
|
- lib/a9n/ext/hash.rb
|
32
34
|
- lib/a9n/loader.rb
|
33
35
|
- lib/a9n/struct.rb
|