Last active
December 12, 2015 03:48
-
-
Save eboskma/4709230 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use Markdown instead of rdoc | |
remove_file "README.rdoc" | |
create_file "README.md", "TODO" | |
# Gemfile | |
add_source 'https://rails-assets.org' | |
gem 'haml-rails' | |
gem 'redcarpet' | |
gem 'simple_form' | |
gem 'semantic_navigation' | |
gem 'friendly_id' | |
# Assets through rails-assets.org | |
gem 'rails-assets-twbs-bootstrap-sass' | |
gem 'rails-assets-angular' | |
clearance = false | |
omniauth = false | |
# Authentication and authorization | |
if yes? "Would you like authentication with Clearance?" | |
clearance = true | |
gem 'clearance' | |
end | |
if yes? "Would you like authentication with OmniAuth?" | |
omniauth = true | |
gem 'omniauth' | |
strategy = ask("Would you like to add a strategy? Please type the full gem name or nothing if you are done.") | |
until strategy.empty? | |
gem strategy | |
strategy = ask("Would you like to add another strategy? Please type the full gem name or nothing if you are done.") | |
end | |
end | |
gem 'pundit' if clearance || omniauth | |
gem_group :test do | |
gem 'rspec-rails' | |
gem 'factory_girl_rails' | |
gem 'faker' | |
gem 'capybara' | |
gem 'poltergeist' | |
gem 'database_cleaner' | |
gem 'fuubar' | |
gem 'guard' | |
gem 'guard-rspec' | |
gem 'guard-livereload' | |
gem 'rb-fsevent', require: false | |
end | |
gem_group :development do | |
gem 'better_errors' | |
gem 'binding_of_caller' | |
end | |
application do | |
<<-GENERATORS | |
config.generators do |g| | |
g.test_framework :rspec, | |
fixtures: true, | |
view_specs: false, | |
helper_specs: false, | |
routing_specs: false, | |
controller_specs: true, | |
request_specs: true | |
g.fixture_replacement :factory_girl, dir: 'spec/factories' | |
g.template_engine :haml | |
end | |
GENERATORS | |
end | |
run 'bundle install' | |
if yes? "Create a root controller?" | |
name = ask("What should the controller be called? [static]").underscore | |
name = "static" if name.blank? | |
generate :controller, "#{name} index" | |
route "root to: '#{name}\#index'" | |
end | |
if yes? "Do you plan on using a list of countries in your app?" | |
puts "Allright, adding 'country_select' to the Gemfile." | |
gem 'country_select' | |
end | |
generate 'rspec:install' | |
generate 'simple_form:install --bootstrap' | |
generate 'pundit:install' | |
run 'bundle exec guard init livereload' | |
run 'bundle exec guard init rspec' | |
git :init | |
append_file ".gitignore", "config/database.yml" | |
run "cp config/database.yml config/database.yml.example" | |
git add: ".", commit: "-m 'initial commit'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment