Skip to content

Commit

Permalink
Merge pull request #36 from tomdracz/master
Browse files Browse the repository at this point in the history
Fix webhook generator
  • Loading branch information
tardate committed Nov 28, 2015
2 parents ac002db + 2949c28 commit 713f1ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Mandrill
module Rails
module Generators
class WebHookGenerator < ::Rails::Generators::Base
class MandrillGenerator < ::Rails::Generators::NamedBase
namespace 'mandrill'
desc 'Generates a controller and routes for Mandrill web hooks.'
argument :name, type: :string
Expand All @@ -14,7 +14,7 @@ class WebHookGenerator < ::Rails::Generators::Base
class_option :controller, type: :boolean, default: true,
desc: 'Creates a controller for web hooks'

source_root File.expand_path("../templates", __FILE__)
source_root File.expand_path("../../templates", __FILE__)

def initialize(args, *options)
args[0] = args[0].dup if args[0].is_a?(String) && args[0].frozen?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'spec_helper'
require 'generator_spec'
require 'generators/web_hook_generator'
require 'generators/mandrill/mandrill_generator'

describe Mandrill::Rails::Generators::WebHookGenerator, type: :generator do
describe Mandrill::Rails::Generators::MandrillGenerator, type: :generator do
destination File.expand_path("../../tmp", __FILE__)

before do
Expand Down

0 comments on commit 713f1ef

Please sign in to comment.