Class: KauiCmd::Installer
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- KauiCmd::Installer
- Includes:
- Thor::Actions
- Defined in:
- lib/kaui/installer/installer.rb
Instance Method Summary collapse
Instance Method Details
#add_gems ⇒ Object
55 56 57 58 59 60 |
# File 'lib/kaui/installer/installer.rb', line 55 def add_gems inside @app_path do gem :kaui, @kaui_gem_options run 'bundle install', :capture => true unless [:skip_bundle] end end |
#initialize_kaui ⇒ Object
62 63 64 65 66 |
# File 'lib/kaui/installer/installer.rb', line 62 def initialize_kaui inside @app_path do run "rails generate kaui:install", :verbose => false end end |
#prepare_options ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/kaui/installer/installer.rb', line 35 def @kaui_gem_options = {} if [:edge] @kaui_gem_options[:git] = 'git://github.com/killbill/killbill-admin-ui.git' elsif [:path] @kaui_gem_options[:path] = [:path] elsif [:git] @kaui_gem_options[:git] = [:git] @kaui_gem_options[:ref] = [:ref] if [:ref] @kaui_gem_options[:branch] = [:branch] if [:branch] @kaui_gem_options[:tag] = [:tag] if [:tag] elsif [:version] @kaui_gem_options[:version] = [:version] else version = Kaui::VERSION @kaui_gem_options[:version] = version.to_s end end |
#verify_rails ⇒ Object
28 29 30 31 32 33 |
# File 'lib/kaui/installer/installer.rb', line 28 def verify_rails unless rails_project? say "#{@app_path} is not a rails project." exit 1 end end |