marcosgz-cap-recipe 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,36 @@
1
+ # Example
2
+ # =======
3
+ #
4
+ # gateways_setup_settings:
5
+ # example1:
6
+ # login: 'username'
7
+ # password: 'secret'
8
+
9
+ Capistrano::Configuration.instance(:must_exist).load do
10
+ set(:gateways_remote_file) { File.join(shared_path, 'config/gateways.yml') } unless exists?(:gateways_remote_file)
11
+ set(:gateways_template, 'gateways.yml.erb') unless exists?(:gateways_template)
12
+
13
+
14
+ # Required attributes
15
+ # ===================
16
+ # *gateways_name* prod_db
17
+ namespace :gateways do
18
+ namespace :setup do
19
+ desc "Upload configs"
20
+ task :default, :roles => :db do
21
+ if exists?(:gateways_setup_settings)
22
+ set(:recipe_settings) { fetch(:gateways_setup_settings, {}) }
23
+ put template.render(fetch(:gateways_template)), fetch(:gateways_remote_file)
24
+ else
25
+ puts "[FATAL] - Gateway template settings were not found"
26
+ abort
27
+ end
28
+ end
29
+
30
+ desc "Download configs"
31
+ task :get, :roles => :db do
32
+ download fetch(:gateways_remote_file), File.join(local_rails_root, 'config/gateways.yml')
33
+ end
34
+ end
35
+ end
36
+ end
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "marcosgz-cap-recipe"
6
- s.version = "0.0.3"
6
+ s.version = "0.0.5"
7
7
  s.authors = ["Marcos G. Zimmermann"]
8
8
  s.email = ["mgzmaster@gmail.com"]
9
9
  s.homepage = "https://github.com/marcosgz/capistrano-recipe"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marcosgz-cap-recipe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-24 00:00:00.000000000 Z
12
+ date: 2013-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
@@ -57,6 +57,7 @@ files:
57
57
  - lib/capistrano/recipe.rb
58
58
  - lib/capistrano/recipes/application.rb
59
59
  - lib/capistrano/recipes/database.rb
60
+ - lib/capistrano/recipes/gateways.rb
60
61
  - lib/capistrano/recipes/mailer.rb
61
62
  - lib/capistrano/recipes/newrelic.rb
62
63
  - lib/capistrano/recipes/passenger.rb