diff --git a/Gemfile b/Gemfile index 9d54627..9e9ddcc 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ -source :rubygems +source 'https://rubygems.org' gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 7a90983..6623f7a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/apache-config-generator.gemspec b/apache-config-generator.gemspec index 189618e..f83d560 100644 --- a/apache-config-generator.gemspec +++ b/apache-config-generator.gemspec @@ -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' diff --git a/lib/apache/modules.rb b/lib/apache/modules.rb index b93a87e..747b23a 100644 --- a/lib/apache/modules.rb +++ b/lib/apache/modules.rb @@ -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 diff --git a/lib/apache/version.rb b/lib/apache/version.rb index feda9b1..41fcffc 100644 --- a/lib/apache/version.rb +++ b/lib/apache/version.rb @@ -1,3 +1,3 @@ module Apache - VERSION = '0.2.8' + VERSION = '0.2.9' end