one could not include the include module the old way
This commit is contained in:
parent
6d45bb1ed6
commit
9475629eb5
@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
apache-config-generator (0.2.8)
|
||||
apache-config-generator (0.2.9)
|
||||
rainbow
|
||||
|
||||
GEM
|
||||
@ -15,7 +15,7 @@ GEM
|
||||
mocha (0.9.10)
|
||||
rake
|
||||
nokogiri (1.4.3.1)
|
||||
rainbow (1.1)
|
||||
rainbow (1.1.4)
|
||||
rake (0.8.7)
|
||||
reek (1.2.8)
|
||||
ruby2ruby (~> 1.2)
|
||||
|
@ -12,7 +12,6 @@ Gem::Specification.new do |s|
|
||||
s.summary = %q{A Ruby DSL for programmatically generating Apache configs}
|
||||
s.email = %q{john@coswellproductions.com}
|
||||
|
||||
s.date = Date.today.to_s
|
||||
s.files = `git ls-files`.split("\n")
|
||||
s.executables = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
|
||||
s.require_path = 'lib'
|
||||
|
@ -23,18 +23,22 @@ module Apache
|
||||
def build(*modules, &block)
|
||||
reset!
|
||||
|
||||
modules.each { |mod| self.send(mod) }
|
||||
modules.each { |mod| add_module(mod) }
|
||||
self.instance_eval(&block) if block
|
||||
|
||||
[ '' ] + @modules + [ '' ]
|
||||
end
|
||||
|
||||
# The method name becomes the module core name
|
||||
def method_missing(method, *args)
|
||||
def add_module(method, *args)
|
||||
module_name = "#{method}_module"
|
||||
module_path = args[0] || "modules/mod_#{method}.so"
|
||||
@modules << [ 'LoadModule', *[ module_name, module_path ].quoteize ] * " "
|
||||
end
|
||||
|
||||
# The method name becomes the module core name
|
||||
def method_missing(method, *args)
|
||||
add_module(method, *args)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,3 +1,3 @@
|
||||
module Apache
|
||||
VERSION = '0.2.8'
|
||||
VERSION = '0.2.9'
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user