more cleanup

This commit is contained in:
John Bintz 2012-10-09 14:42:07 -04:00
parent 9e9ce113cd
commit 4f88e3977f
6 changed files with 4 additions and 18 deletions

View File

@ -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'

View File

@ -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

View File

@ -1,14 +0,0 @@
module Penchant
class Properties
def initialize(template)
@properties = {}
@template = template.to_a
end
def process
end
end
end

View File

@ -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)

View File

@ -21,3 +21,4 @@ module Penchant
end end
end end
end end