Sha256: 45867b6529919bb52a07395b10dd2a48d33ac0d48ffe6893b88f5adb194e6305

Contents?: true

Size: 972 Bytes

Versions: 7

Compression:

Stored size: 972 Bytes

Contents

# encoding: utf-8

require 'agilib'
require 'thor'

module Agilib
  module Composer
  	class Command < Thor
      include Thor::Actions

      desc "composer APP_NAME", "Cria uma nova aplicação Rails nos padrões da Agivis"

      method_option :all, :type => :boolean, :aliases => "-a", :default => false
      def composer(name)
        Agilib::Composer.options = options

        # Instala uma aplicação Rails
        system("rails new #{name} --skip-bundle --skip-test-unit -d mysql -m #{Agilib::Composer.template_runner}")
      end

      desc "setup", "Prepara o ambiente para a aplicação"
      def setup()
        
        say("\n\nInstalando RVM\n\n\n")
        system("curl -sSL https://get.rvm.io | bash -s stable")
        
        system("source ~/.profile")

        say("\n\nInstalando Ruby\n\n")

        system("rvm install 2.1.0")
      
        say("\n\nInstando a gem Bundler")
        system("gem install bundler")

      end


  	end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
agilib-0.1.9 lib/agilib/composer/command.rb
agilib-0.1.8 lib/agilib/composer/command.rb
agilib-0.1.7 lib/agilib/composer/command.rb
agilib-0.1.6 lib/agilib/composer/command.rb
agilib-0.1.5 lib/agilib/composer/command.rb
agilib-0.1.4 lib/agilib/composer/command.rb
agilib-0.1.3 lib/agilib/composer/command.rb