Sha256: 7fe350ced0d9f377920d7f535336f86a8595c401d505befb93e2354052780eb5

Contents?: true

Size: 1.19 KB

Versions: 1

Compression:

Stored size: 1.19 KB

Contents

class AppBuilder < Rails::AppBuilder
  include Thor::Actions
  include Thor::Shell

  RUBY_VERSION   = "2.0.0"
  LALALA_VERSION = "4.0.0.dev"

  # You can test the generator locally by pointing to your local gems:
  #
  # gem 'lalala',             path: "~/Github/mrhenry/lalala-ng"
  # gem 'lalala-development', path: "~/Github/mrhenry/lalala-ng", groups: [:development]
  # gem 'lalala-assets',      path: "~/Github/mrhenry/lalala-ng", groups: [:development, :assets]
  # gem 'lalala-test',        path: "~/Github/mrhenry/lalala-ng", groups: [:test]
  def gemfile
    create_file 'Gemfile', <<-DOC

source 'https://rubygems.org'

ruby "#{RUBY_VERSION}"

gem 'lalala',             "~> #{LALALA_VERSION}"
gem 'lalala-development', "~> #{LALALA_VERSION}", groups: [:development]
gem 'lalala-assets',      "~> #{LALALA_VERSION}", groups: [:development, :assets]
gem 'lalala-test',        "~> #{LALALA_VERSION}", groups: [:test]

DOC
  end

  def ruby_version
    create_file ".ruby-version", RUBY_VERSION
  end

  def leftovers
    ruby_version
  end

end

class Rails::Generators::AppGenerator

  alias_method :lng_run_bundle, :run_bundle

  def run_bundle
    lng_run_bundle
    generate "lalala:install"
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lalala-4.0.0.dev.374 lib/lalala/utils/install_template.rb