You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
863 B
Ruby

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

copy_file "app/controllers/home_controller.rb"
copy_file "app/controllers/concerns/basic_auth.rb"
copy_file "app/helpers/layout_helper.rb"
insert_into_file "app/controllers/application_controller.rb", after: /^class ApplicationController.*\n/ do
<<-RUBY
include BasicAuth
RUBY
end
File.rename "app/views/layouts/application.html.erb", "app/views/layouts/application.html.erb.old"
run_with_clean_bundler_env "rails generate haml:application_layout convert"
copy_file "app/views/layouts/application.haml"
gsub_file "app/views/layouts/application.haml", "%title", <<-HAML
%title
= strip_tags(yield(:title)) + " " if content_for?(:title)
#{app_const_base.titleize}
%meta{:content => "#{app_const_base.titleize}", :name => "apple-mobile-web-app-title"}
HAML
copy_file "app/views/shared/_flash.haml"
copy_file "app/views/home/index.haml"