more cleanup
This commit is contained in:
parent
9e9ce113cd
commit
4f88e3977f
@ -7,7 +7,6 @@ module Penchant
|
|||||||
autoload :FileProcessor, 'penchant/file_processor'
|
autoload :FileProcessor, 'penchant/file_processor'
|
||||||
autoload :PenchantFile, 'penchant/penchant_file'
|
autoload :PenchantFile, 'penchant/penchant_file'
|
||||||
autoload :Defaults, 'penchant/defaults'
|
autoload :Defaults, 'penchant/defaults'
|
||||||
autoload :Properties, 'penchant/properties'
|
|
||||||
autoload :CustomProperty, 'penchant/custom_property'
|
autoload :CustomProperty, 'penchant/custom_property'
|
||||||
autoload :PropertyStack, 'penchant/property_stack'
|
autoload :PropertyStack, 'penchant/property_stack'
|
||||||
autoload :PropertyStackBuilder, 'penchant/property_stack_builder'
|
autoload :PropertyStackBuilder, 'penchant/property_stack_builder'
|
||||||
|
@ -131,8 +131,6 @@ module Penchant
|
|||||||
end
|
end
|
||||||
|
|
||||||
def process_options(gem_name, template = {})
|
def process_options(gem_name, template = {})
|
||||||
properties = Properties.new(template)
|
|
||||||
|
|
||||||
original_properties = process_option_stack(gem_name, property_stack)
|
original_properties = process_option_stack(gem_name, property_stack)
|
||||||
|
|
||||||
if @_strip_pathing_options
|
if @_strip_pathing_options
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
module Penchant
|
|
||||||
class Properties
|
|
||||||
def initialize(template)
|
|
||||||
@properties = {}
|
|
||||||
|
|
||||||
@template = template.to_a
|
|
||||||
end
|
|
||||||
|
|
||||||
def process
|
|
||||||
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
|||||||
module Penchant
|
module Penchant
|
||||||
class PropertyStack
|
class PropertyStack
|
||||||
|
PATHING_OPTIONS = [ :git, :branch, :path ].freeze
|
||||||
|
|
||||||
def initialize(builder, property_stack, strip_pathing_options)
|
def initialize(builder, property_stack, strip_pathing_options)
|
||||||
@builder, @property_stack, @strip_pathing_options = builder, property_stack.dup, strip_pathing_options
|
@builder, @property_stack, @strip_pathing_options = builder, property_stack.dup, strip_pathing_options
|
||||||
end
|
end
|
||||||
@ -12,7 +14,7 @@ module Penchant
|
|||||||
properties = processor.process(gem_name, @property_stack)
|
properties = processor.process(gem_name, @property_stack)
|
||||||
|
|
||||||
if @strip_pathing_options
|
if @strip_pathing_options
|
||||||
[ :git, :branch, :path ].each { |key| properties.delete(key) }
|
PATHING_OPTIONS.each { |key| properties.delete(key) }
|
||||||
end
|
end
|
||||||
|
|
||||||
properties = processor.process(gem_name, @builder.defaults[gem_name].merge(additional_env)).merge(properties)
|
properties = processor.process(gem_name, @builder.defaults[gem_name].merge(additional_env)).merge(properties)
|
||||||
|
@ -21,3 +21,4 @@ module Penchant
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user