Skip to content
This repository
Browse code

Functioning Generators

  • Loading branch information...
commit f9ce24db111b42ab69eaade4a3a0a947ffe607e6 1 parent 02fe8cf
rposborne rposborne authored
2  Rakefile
... ... @@ -1 +1,3 @@
1 1 require "bundler/gem_tasks"
  2 +
  3 +Bundler::GemHelper.install_tasks
14 lib/qbwc/generators/install_generator.rb → lib/generators/qbwc/install/install_generator.rb
... ... @@ -1,18 +1,20 @@
  1 +require 'rails/generators'
  2 +
1 3 module QBWC
2 4 module Generators
3 5 class InstallGenerator < Rails::Generators::Base
4   - namespace "qbwc"
  6 + namespace "qbwc:install"
5 7 desc "Copy Quickbooks Web Connector default files"
6 8 source_root File.expand_path('../templates', __FILE__)
7   -
  9 +
8 10 def copy_config
9   - template('templates/qbwc_controller.rb', "app/controllers/qbwc_controller.rb")
  11 + template('config/qbwc.rb', "config/initializers/qbwc.rb")
10 12 end
11 13
12   - def copy_controller
13   - template('templates/qbwc_controller.rb', "config/initializers/qbwc.rb")
  14 + def copy_controller
  15 + template('controllers/qbwc_controller.rb', "app/controllers/qbwc_controller.rb")
14 16 end
15   -
  17 +
16 18 def setup_routes
17 19 route("match 'apis/quickbooks/:action', :controller => 'qbwc', :as => 'quickbooks'")
18 20 end
0  lib/qbwc/generators/templates/qbwc.rb → lib/generators/qbwc/install/templates/config/qbwc.rb
File renamed without changes
0  lib/qbwc/generators/templates/qbwc_controller.rb → .../install/templates/controllers/qbwc_controller.rb
File renamed without changes
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.
Something went wrong with that request. Please try again.