capistrano-env 0.3.2 → 0.3.3

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: 3320e4de218d6590db1e19b6f47bf39b0a246233
4
- data.tar.gz: eecaf52be3ce00550cd7753d9f48f69163e3d631
3
+ metadata.gz: de2601924f5b4619fe34ade9290073fbb837c14c
4
+ data.tar.gz: 7d16838643d9b9a305c9e07abc4c4c4ca366a778
5
5
  SHA512:
6
- metadata.gz: 32317e0121fe1a9a8748b47422d66fe3dc83b355b2c181b416c934a3f3e1c70a11083fc058ddf5ccf00c17270012a05b6a332fd796c962e23e4ae6a111153aca
7
- data.tar.gz: abb3e4404abbeb8934498e1568909b79766ba152e18895fc372ffec47275e1c929026fe709e068f2cd7d6c7df1976838838cc4134ac9b69078198ed940c0df2f
6
+ metadata.gz: 0dbdc4de385df677be57637d5759ca52bd1dc7baef4c29ee4499212b3991f9974e0ed01bd5ac778bd1b21584805ecd94a7e484772abfd55a79ad18cd4236ad52
7
+ data.tar.gz: 4e40b96b4b9c2d7f65a6eb971f2559f8aa720565f15601196a6f685d16eb0bb9941bf576e35a6868ec5148d9a9102b302487400253f43046a420ce59db20f701
data/README.md CHANGED
@@ -66,6 +66,7 @@ Capistrano::Env.use do |env|
66
66
  env.add 'UNICORN_PROCESSES'
67
67
  env.add 'HOGE', 'hage'
68
68
  env.formatter = :dotenv #=> default is :ruby, but it is deprecated now.
69
+ env.filemode = 0644 #=> default is 0640.
69
70
  end
70
71
  ```
71
72
 
@@ -18,6 +18,10 @@ module Capistrano
18
18
  config.capenv_file
19
19
  end
20
20
 
21
+ def self.filemode
22
+ config.capenv_filemode
23
+ end
24
+
21
25
  private
22
26
 
23
27
  def self.config
@@ -4,6 +4,7 @@ module Capistrano
4
4
  module Env
5
5
  class Config
6
6
  attr_accessor :formatter
7
+ attr_accessor :filemode
7
8
 
8
9
  def initialize
9
10
  @values = {}
@@ -15,7 +16,13 @@ module Capistrano
15
16
  @formatter
16
17
  end
17
18
 
19
+ def filemode
20
+ self.filemode = '0640' unless @filemode
21
+ @filemode
22
+ end
23
+
18
24
  attr_writer :formatter
25
+ attr_writer :filemode
19
26
 
20
27
  def add(name_or_regexp, val = nil, &block)
21
28
  if val && name_or_regexp.is_a?(String)
@@ -49,6 +56,10 @@ module Capistrano
49
56
  def capenv_content
50
57
  formatter_class.format(envs)
51
58
  end
59
+
60
+ def capenv_filemode
61
+ filemode
62
+ end
52
63
  end
53
64
  end
54
65
  end
@@ -2,7 +2,7 @@ namespace :capenv do
2
2
  desc 'copy .env to release_path'
3
3
  task :copy do
4
4
  on roles(:all) do
5
- upload! StringIO.new(Capistrano::Env.to_s), "#{release_path}/#{Capistrano::Env.filename}"
5
+ upload! StringIO.new(Capistrano::Env.to_s), "#{release_path}/#{Capistrano::Env.filename}", mode: Capistrano::Env.filemode
6
6
  end
7
7
  end
8
8
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Env
3
- VERSION = '0.3.2'
3
+ VERSION = '0.3.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-env
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - masarakki
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-09 00:00:00.000000000 Z
11
+ date: 2015-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano