Sha256: 051b1a2c8b7f52bb1a3bd8258d87a392c50018210b66e1bce8d498a1df2347d0

Contents?: true

Size: 1.71 KB

Versions: 1

Compression:

Stored size: 1.71 KB

Contents

class AppbombadoGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)
  argument :app_name, :type => :string, :default => "app"

def generate_appbombado

  remove_file "Gemfile"
  copy_file "Gemfile"
  run "bundle install"

  remove_file "config/database.yml"
  template "database.yml", "config/database.yml"
  run "rake db:create"

  copy_file ".bowerrc"

  run "bundle exec guard init"

  run "rails g start:slim"

  run "rails g start:heroku"
  run "rails g start:heroku_wake_up"
  run "rails g start:unicorn"

  run "rails g start:locales"


  application do
   "config.i18n.default_locale = 'pt-BR'
    config.time_zone = 'Brasilia'

    config.generators do |g|
      g.assets            false
      g.helper            false
      g.test_framework    nil
    end"
  end

  run "rails g simple_form:install --bootstrap"
  remove_file "config/initializers/simple_form_bootstrap.rb"
  copy_file "simple_form_bootstrap.rb", "config/initializers/simple_form_bootstrap.rb"

  remove_file "app/views/layouts/application.html.erb"
  template "application.html.slim", "app/views/layouts/application.html.slim"

  remove_file "app/assets/javascripts/application.js"
  copy_file "application.coffee", "app/assets/javascripts/application.coffee"

  remove_file "app/assets/stylesheets/application.css"
  copy_file "application.sass", "app/assets/stylesheets/application.sass"

  copy_file "layout.sass", "app/assets/stylesheets/layout.sass"

  run "bower install bootstrap"
  run "bower install bourbon"
  run "bower install animate.css"

  run "rails g controller home index"

  remove_file "config/routes.rb"
  copy_file "routes.rb", "config/routes.rb"

  end

  def file_name
    app_name.underscore
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
appbombado_startae-0.0.5 lib/generators/appbombado/appbombado_generator.rb