capistrano-cluster 0.0.10 → 0.0.11

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: fa90fd5d8eae1aaf2d4aa230f76320ba995dec08
4
- data.tar.gz: 4d91af93a532d6e6cb415d9a816a20dd98307afe
3
+ metadata.gz: fc9b753f489afca2558a25ce4c560fe3e9b75c9f
4
+ data.tar.gz: 8f2c741da839dfec4e66baf47582515cc091bf49
5
5
  SHA512:
6
- metadata.gz: 23475010ea2f0222d2672d943b027f24d12c55ebb70dccbbdefcdd94fa3d1156fdaf14684d0329cced5f97e576e5c6b77d8a4b2a21333fcca868f81feadfe126
7
- data.tar.gz: 2e25210c2cec9319d4fe16c89733cda6048e77b338ad916864427651b4c5b66fa7f5b1f718e5677796cd7e16488c49e986da2c45d95c65b242be88215d923dcc
6
+ metadata.gz: 32c0c5538940616eaec1620c9e32ac1f928e764970bf81a843c99a0119f8d1d891cc66a00760dd67243d84e0b48e7c71049e531c1f0b161cc0d5aca2522c467d
7
+ data.tar.gz: 42bdba119df846fe251e1f804954d920c6bed0206e8671c89b2d0652efe84ddbce022486193d4b0a767ba35fd4999cc74f7df1cc16f64389ba0469547fbcb0a7
@@ -32,11 +32,11 @@ module Capistrano
32
32
 
33
33
  def login_as(user, on: nil, &block)
34
34
  if on
35
- old_user,on.user = on.user, user
35
+ old_user,on.user = on.user, "#{user}"
36
36
  end
37
37
  yield
38
38
  ensure
39
- on.user = old_user if on
39
+ on.user = "#{old_user}" if on
40
40
  end
41
41
 
42
42
  def with_application(application, &block)
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Cluster
3
- VERSION = "0.0.10"
3
+ VERSION = "0.0.11"
4
4
  end
5
5
  end
@@ -29,11 +29,17 @@ namespace :deploy do
29
29
  "RUBY_FREE_MIN" => 100000,
30
30
  "RUBY_GC_MALLOC_LIMIT" => 59000000
31
31
  }
32
+
32
33
  fetch(:secrets, {}).merge(gc_settings).each_pair do |key,value|
33
- env.puts "export #{"#{key}".upcase}=#{value}"
34
+ env.puts "export #{"#{key}".upcase}='#{Shellwords.shellescape(value)}'"
34
35
  end
35
36
  env.rewind
37
+
36
38
  upload! env, shared_path.join(".env")
39
+ yaml = StringIO.new({ "#{fetch(:framework_env)}" => fetch(:secrets, {}) }.to_yaml)
40
+
41
+ upload! yaml, shared_path.join("config/secrets.yml")
42
+
37
43
  end
38
44
 
39
45
  end
@@ -36,7 +36,7 @@ namespace :setup do
36
36
  end
37
37
 
38
38
 
39
- on roles(:proxy).each do |server|
39
+ on roles(:proxy) do |server|
40
40
  ufw :allow, "in http"
41
41
  ufw :allow, "in https"
42
42
  end
data/tasks/setup.rake CHANGED
@@ -42,7 +42,7 @@ namespace :setup do
42
42
  on roles(:all) do |host|
43
43
  login_as :root, on: host do
44
44
  unless (hostname = capture(:hostname).strip).empty?
45
- upload_as :root, file("etc/hosts", hostname: hostname), "/etc/hosts"
45
+ upload_as "root", file("etc/hosts", hostname: hostname), "/etc/hosts"
46
46
  end
47
47
  end
48
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-cluster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlad Verestiuc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-15 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -213,9 +213,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
213
  version: '0'
214
214
  requirements: []
215
215
  rubyforge_project:
216
- rubygems_version: 2.2.2
216
+ rubygems_version: 2.4.5
217
217
  signing_key:
218
218
  specification_version: 4
219
219
  summary: Environment setup automation.
220
220
  test_files: []
221
- has_rdoc: