Skip to content

Commit

Permalink
option to remove Rails Turbolinks for Rails 5
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKehoe committed May 16, 2018
1 parent 29f8df1 commit 5ae32b2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 16 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.textile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
h1. CHANGELOG

h3. 3.1.35 May 16, 2018

* option to remove Rails Turbolinks for Rails 5
* improve rails-signup-thankyou contributed application (no TurboLinks, drop mailing list)

h3. 3.1.34 May 14, 2018

* add rails-signup-thankyou contributed application
* add rails-signup-thankyou contributed application

h3. 3.1.33 February 21, 2018

Expand Down
4 changes: 4 additions & 0 deletions recipes/extras.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,18 @@
stage_two do
say_wizard "recipe stage two"
gsub_file 'Gemfile', /gem 'turbolinks'\n/, ''
gsub_file 'Gemfile', /gem 'turbolinks', '~> 5'\n/, ''
gsub_file 'app/assets/javascripts/application.js', "//= require turbolinks\n", ''
case prefs[:templates]
when 'erb'
gsub_file 'app/views/layouts/application.html.erb', /, 'data-turbolinks-track' => true/, ''
gsub_file 'app/views/layouts/application.html.erb', /, 'data-turbolinks-track' => 'reload'/, ''
when 'haml'
gsub_file 'app/views/layouts/application.html.haml', /, 'data-turbolinks-track' => true/, ''
gsub_file 'app/views/layouts/application.html.haml', /, 'data-turbolinks-track' => 'reload'/, ''
when 'slim'
gsub_file 'app/views/layouts/application.html.slim', /, 'data-turbolinks-track' => true/, ''
gsub_file 'app/views/layouts/application.html.slim', /, 'data-turbolinks-track' => 'reload'/, ''
end
end
end
Expand Down
15 changes: 1 addition & 14 deletions recipes/rails_signup_thankyou.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,21 @@
prefs[:local_env_file] = false
prefs[:prod_webserver] = 'same'
prefs[:pry] = false
prefs[:secrets] = ['mailchimp_list_id', 'mailchimp_api_key']
prefs[:pages] = 'about+users'
prefs[:templates] = 'erb'
prefs[:tests] = 'none'
prefs[:locale] = 'none'
prefs[:analytics] = 'none'
prefs[:rubocop] = false
prefs[:disable_turbolinks] = false
prefs[:disable_turbolinks] = true
prefs[:rvmrc] = true
prefs[:form_builder] = false
prefs[:jquery] = 'gem'

# gems
add_gem 'gibbon'
add_gem 'sucker_punch'

stage_three do
say_wizard "recipe stage three"
repo = 'https://raw.github.com/RailsApps/rails-signup-thankyou/master/'

# >-------------------------------[ Config ]---------------------------------<

copy_from_repo 'config/initializers/active_job.rb', :repo => repo

# >-------------------------------[ Models ]--------------------------------<

copy_from_repo 'app/models/user.rb', :repo => repo
Expand All @@ -55,10 +46,6 @@
copy_from_repo 'app/controllers/products_controller.rb', :repo => repo
copy_from_repo 'app/controllers/thank_you_controller.rb', :repo => repo

# >-------------------------------[ Jobs ]---------------------------------<

copy_from_repo 'app/jobs/mailing_list_signup_job.rb', :repo => repo

# >-------------------------------[ Views ]--------------------------------<

copy_from_repo 'app/views/visitors/index.html.erb', :repo => repo
Expand Down
2 changes: 1 addition & 1 deletion version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RailsWizard
VERSION = "3.1.34"
VERSION = "3.1.35"
end

0 comments on commit 5ae32b2

Please sign in to comment.