Sha256: 4099653e238c7d284e3d1088376b20601a845b3b2318fffc07748e395e275653

Contents?: true

Size: 927 Bytes

Versions: 48

Compression:

Stored size: 927 Bytes

Contents

#!/usr/bin/env ruby

##
# Script to generate a new rails app using the Incline gem.

if Object.const_defined?(:Rails)

  ##    Template for 'rails new'     ##
  require 'incline/version'

  # Add the incline gem.
  gem 'incline', "~> #{Incline::VERSION}"

  # Install the gem.
  run 'bundle install'

  # Add a root route.
  route "root 'incline/welcome#home'"

  # Perform the Incline install.
  generate 'incline:install'

  # Create & migrate the db.
  run 'rake db:migrate', capture: true

  # Initialize git repo and push to github.
  run 'git init', capture: true
  run 'git add -A', capture: true
  run 'git commit -m "Initialize repo"', capture: true
  
else

  if ARGV.count < 1
    puts "Usage: $0 app_name [rails-options]\n"
  else
    args = %w(rails new)
    args += ARGV.to_a
    args += [ '-m', File.expand_path(__FILE__), '--skip-turbolinks', '--skip-spring', '--skip-bundle' ]
    Kernel.exec *args
  end

end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
incline-0.3.14 exe/new_incline_app
incline-0.3.13 exe/new_incline_app
incline-0.3.12 exe/new_incline_app
incline-0.3.11 exe/new_incline_app
incline-0.3.10 exe/new_incline_app
incline-0.3.9 exe/new_incline_app
incline-0.3.8 exe/new_incline_app
incline-0.3.7 exe/new_incline_app
incline-0.3.6 exe/new_incline_app
incline-0.3.5 exe/new_incline_app
incline-0.3.4 exe/new_incline_app
incline-0.3.3 exe/new_incline_app
incline-0.3.2 exe/new_incline_app
incline-0.3.1 exe/new_incline_app
incline-0.3.0 exe/new_incline_app
incline-0.2.36 exe/new_incline_app
incline-0.2.35 exe/new_incline_app
incline-0.2.34 exe/new_incline_app
incline-0.2.28 exe/new_incline_app
incline-0.2.27 exe/new_incline_app