lib/suspenders/app_builder.rb in welaika-suspenders-2.26.0 vs lib/suspenders/app_builder.rb in welaika-suspenders-2.27.0
- old
+ new
@@ -42,18 +42,10 @@
def raise_on_delivery_errors
replace_in_file 'config/environments/development.rb',
'raise_delivery_errors = false', 'raise_delivery_errors = true'
end
- def remove_turbolinks
- replace_in_file(
- "app/assets/javascripts/application.js",
- "//= require turbolinks",
- ""
- )
- end
-
def set_test_delivery_method
inject_into_file(
"config/environments/development.rb",
"\n config.action_mailer.delivery_method = :letter_opener",
after: "config.action_mailer.raise_delivery_errors = true",
@@ -289,12 +281,12 @@
def configure_action_mailer_in_specs
copy_file 'action_mailer.rb', 'spec/support/action_mailer.rb'
end
- def configure_capybara_webkit
- copy_file "capybara_webkit.rb", "spec/support/capybara_webkit.rb"
+ def configure_capybara
+ copy_file "capybara.rb", "spec/support/capybara.rb"
end
def configure_locales_and_time_zone
remove_file "config/locales/en.yml"
template "config_locales_it.yml.erb", "config/locales/it.yml"
@@ -322,10 +314,22 @@
def configure_simple_form
bundle_command "exec rails generate simple_form:install"
end
+ def configure_draper
+ bundle_command "exec rails generate draper:install"
+ end
+
+ def configure_active_interaction
+ copy_file "sample_service.rb", "app/services/sample_service.rb"
+ end
+
+ def configure_errbit
+ copy_file "errbit.rb", "config/initializers/errbit.rb"
+ end
+
def configure_action_mailer
action_mailer_host "development", %{"localhost:3000"}
action_mailer_host "test", %{"www.example.com"}
action_mailer_host "production", %{ENV.fetch("APPLICATION_HOST")}
end
@@ -405,13 +409,19 @@
def setup_brakeman
copy_file "brakeman.rake", "lib/tasks/brakeman.rake"
end
+ def setup_slim_lint
+ copy_file "slim-lint.rake", "lib/tasks/slim-lint.rake"
+ copy_file "slim-lint.yml", ".slim-lint.yml"
+ end
+
def setup_rubocop
copy_file "rubocop.rake", "lib/tasks/rubocop.rake"
copy_file "rubocop.yml", ".rubocop.yml"
+ copy_file "rubocop_todo.yml", ".rubocop_todo.yml"
end
def setup_bundler_audit
copy_file "bundler_audit.rake", "lib/tasks/bundler_audit.rake"
end
@@ -421,10 +431,11 @@
end
def create_binstubs
bundle_command "binstubs brakeman"
bundle_command "binstubs rubocop"
+ bundle_command "binstubs slim_lint"
end
def copy_miscellaneous_files
copy_file "browserslist", "browserslist"
copy_file "errors.rb", "config/initializers/errors.rb"
@@ -483,12 +494,13 @@
t.verbose = false
end
end
task default: :rubocop
+task default: :slim_lint
+task default: 'brakeman:check'
+task default: 'bundle:audit'
task default: :spec
-task default: "brakeman:check"
-task default: "bundle:audit"
EOS
end
end
private