Permalink
Browse files

Functioning Generators

  • Loading branch information...
1 parent 02fe8cf commit f9ce24db111b42ab69eaade4a3a0a947ffe607e6 @rposborne rposborne committed Jan 3, 2012
View
2 Rakefile
@@ -1 +1,3 @@
require "bundler/gem_tasks"
+
+Bundler::GemHelper.install_tasks
View
14 lib/qbwc/generators/install_generator.rb → ...erators/qbwc/install/install_generator.rb
@@ -1,18 +1,20 @@
+require 'rails/generators'
+
module QBWC
module Generators
class InstallGenerator < Rails::Generators::Base
- namespace "qbwc"
+ namespace "qbwc:install"
desc "Copy Quickbooks Web Connector default files"
source_root File.expand_path('../templates', __FILE__)
-
+
def copy_config
- template('templates/qbwc_controller.rb', "app/controllers/qbwc_controller.rb")
+ template('config/qbwc.rb', "config/initializers/qbwc.rb")
end
- def copy_controller
- template('templates/qbwc_controller.rb', "config/initializers/qbwc.rb")
+ def copy_controller
+ template('controllers/qbwc_controller.rb', "app/controllers/qbwc_controller.rb")
end
-
+
def setup_routes
route("match 'apis/quickbooks/:action', :controller => 'qbwc', :as => 'quickbooks'")
end
View
0 lib/qbwc/generators/templates/qbwc.rb → ...ors/qbwc/install/templates/config/qbwc.rb
File renamed without changes.
View
0 ...c/generators/templates/qbwc_controller.rb → .../templates/controllers/qbwc_controller.rb
File renamed without changes.
View
0 lib/qbwc/generators/usage.md → lib/generators/qbwc/install/usage.md
File renamed without changes.

0 comments on commit f9ce24d

Please sign in to comment.