Sha256: bffe4587f2a1c0fa8465408bc516839e3b03dbf8c11efed739234d86391af0ab

Contents?: true

Size: 769 Bytes

Versions: 3

Compression:

Stored size: 769 Bytes

Contents

require 'thor/group'

module Playmo
  class Cli < Thor::Group
    include Thor::Actions
    
    argument :application_name, :type => :string, :desc => "The name of the rails application"
    desc "Generates a new Rails application with Playmo'"

    def run_playmo
      self.destination_root = application_name
      system "rails new #{application_name} -JT --skip-bundle"
      
      Playmo::Cookbook.instance.cook_recipes!(application_name)

      system %Q{echo "gem 'therubyracer'" >> ./#{application_name}/Gemfile}
      system %Q{echo "gem 'playmo', :group => :development" >> ./#{application_name}/Gemfile}
      system "cd #{application_name} && bundle install"

      Event.events.fire :after_install
      Event.events.fire :before_exit
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
playmo-0.0.18 lib/playmo/cli.rb
playmo-0.0.17 lib/playmo/cli.rb
playmo-0.0.14 lib/playmo/cli.rb