Sha256: faad38a97c2c7b16ce8d27e8b488dab93c62e46b92bf7c39ec87f9056df4702a
Contents?: true
Size: 913 Bytes
Versions: 3
Compression:
Stored size: 913 Bytes
Contents
APPLICATION_LAYOUT_PATH = Rails.root.join("app/views/layouts/application.html.erb") if APPLICATION_LAYOUT_PATH.exist? say "Yield head in application layout for cache helper" insert_into_file APPLICATION_LAYOUT_PATH.to_s, "\n <%= yield :head %>", before: /\s*<\/head>/ say "Add Turbo include tags in application layout" insert_into_file APPLICATION_LAYOUT_PATH.to_s, "\n <%= turbo_include_tags %>", before: /\s*<\/head>/ else say "Default application.html.erb is missing!", :red say " Add <%= turbo_include_tags %> and <%= yield :head %> within the <head> tag in your custom layout." end say "Enable redis in bundle" uncomment_lines "Gemfile", %(gem 'redis') say "Switch development cable to use redis" gsub_file "config/cable.yml", /development:\n\s+adapter: async/, "development:\n adapter: redis\n url: redis://localhost:6379/1" say "Turbo successfully installed ⚡️", :green
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
turbo-rails-0.5.4 | lib/install/turbo_with_asset_pipeline.rb |
turbo-rails-0.5.3 | lib/install/turbo_with_asset_pipeline.rb |
turbo-rails-0.5.2 | lib/install/turbo_with_asset_pipeline.rb |