refactor a little
This commit is contained in:
parent
f7b1cc1b9c
commit
003c7ab2cb
@ -3,4 +3,5 @@ module Penchant
|
|||||||
autoload :Repo, 'penchant/repo'
|
autoload :Repo, 'penchant/repo'
|
||||||
autoload :DotPenchant, 'penchant/dot_penchant'
|
autoload :DotPenchant, 'penchant/dot_penchant'
|
||||||
autoload :Hooks, 'penchant/hooks'
|
autoload :Hooks, 'penchant/hooks'
|
||||||
|
autoload :Env, 'penchant/env'
|
||||||
end
|
end
|
||||||
|
18
lib/penchant/env.rb
Normal file
18
lib/penchant/env.rb
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
module Penchant
|
||||||
|
class Env
|
||||||
|
attr_accessor :name
|
||||||
|
|
||||||
|
def initialize(name)
|
||||||
|
@name = name.to_s
|
||||||
|
end
|
||||||
|
|
||||||
|
def ==(other)
|
||||||
|
@name == other.name
|
||||||
|
end
|
||||||
|
|
||||||
|
def to_s
|
||||||
|
"@#{name}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -1,5 +1,3 @@
|
|||||||
require 'erb'
|
|
||||||
|
|
||||||
module Penchant
|
module Penchant
|
||||||
class Gemfile
|
class Gemfile
|
||||||
attr_reader :path, :is_deployment
|
attr_reader :path, :is_deployment
|
||||||
@ -83,22 +81,6 @@ module Penchant
|
|||||||
gemfile_header['deployment mode'] != nil
|
gemfile_header['deployment mode'] != nil
|
||||||
end
|
end
|
||||||
|
|
||||||
class Env
|
|
||||||
attr_accessor :name
|
|
||||||
|
|
||||||
def initialize(name)
|
|
||||||
@name = name.to_s
|
|
||||||
end
|
|
||||||
|
|
||||||
def ==(other)
|
|
||||||
@name == other.name
|
|
||||||
end
|
|
||||||
|
|
||||||
def to_s
|
|
||||||
"@#{name}"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class FileProcessor
|
class FileProcessor
|
||||||
attr_reader :environment, :is_deployment, :available_environments, :defined_git_repos
|
attr_reader :environment, :is_deployment, :available_environments, :defined_git_repos
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user