lib/capistrano/env/config.rb in capistrano-env-0.3.2 vs lib/capistrano/env/config.rb in capistrano-env-0.3.3

- old
+ new

@@ -2,10 +2,11 @@ module Capistrano module Env class Config attr_accessor :formatter + attr_accessor :filemode def initialize @values = {} @keys = [] end @@ -13,11 +14,17 @@ def formatter self.formatter = :dotenv unless @formatter @formatter end + def filemode + self.filemode = '0640' unless @filemode + @filemode + end + attr_writer :formatter + attr_writer :filemode def add(name_or_regexp, val = nil, &block) if val && name_or_regexp.is_a?(String) @values[name_or_regexp] = val else @@ -46,9 +53,13 @@ formatter_class.filename end def capenv_content formatter_class.format(envs) + end + + def capenv_filemode + filemode end end end end