lib/dummier/app_generator.rb in dummier-0.1.1 vs lib/dummier/app_generator.rb in dummier-0.2.0

- old
+ new

@@ -18,11 +18,11 @@ def initialize(root, options={}) @behavior = :invoke @root_path = File.expand_path(root) @destination_stack = [] @options = defaults.merge(options) - self.source_paths << File.join(root_path, "lib", "dummy_hooks", "templates") + self.source_paths << File.join(root_path, "test", "dummy_hooks", "templates") self.destination_root = File.join(test_path, name) raise "Invalid directory!" unless Dir.exists?(@root_path) end # The name of the rails application @@ -72,10 +72,10 @@ # loads a hook file and evalutes its contents. # rescues any exceptions and logs their message. # store hooks in your_extension/lib/dummy_hooks def fire_hook(hook_name) begin - file = File.join(root_path, "lib/dummy_hooks/#{hook_name}.rb") + file = File.join(root_path, "test/dummy_hooks/#{hook_name}.rb") say_status "hook", hook_name, File.exists?(file) ? :cyan : :red if File.exists?(file) rb = File.read(file) eval(rb) end \ No newline at end of file