Sha256: 7f87f16c93fb13407c3ef373c5ee02c7feb2f68fdc5fb677e0809dd433e0b215

Contents?: true

Size: 1.75 KB

Versions: 6

Compression:

Stored size: 1.75 KB

Contents

# Application template recipe for the rails_apps_composer. Change the recipe here:
# https://github.com/RailsApps/rails_apps_composer/blob/master/recipes/frontend.rb

after_bundler do
  say_wizard "recipe running after 'bundle install'"
  # set up a front-end framework using the rails_layout gem
  case prefs[:frontend]
    when 'simple'
      generate 'layout simple -f'
    when 'bootstrap2'
      generate 'layout bootstrap2 -f'
    when 'bootstrap3'
      generate 'layout bootstrap3 -f'
    when 'foundation4'
      generate 'layout foundation4 -f'
    when 'foundation5'
      generate 'layout foundation5 -f'
  end

  ### GIT ###
  git :add => '-A' if prefer :git, true
  git :commit => '-qm "rails_apps_composer: front-end framework"' if prefer :git, true
end # after_bundler

after_everything do
  say_wizard "recipe running after everything"
  # create navigation links using the rails_layout gem
  generate 'navigation -f'
  # replace with specialized navigation partials
  if prefer :authentication, 'omniauth'
    if prefer :authorization, 'cancan'
      copy_from 'https://raw.github.com/RailsApps/rails-composer/master/files/app/views/layouts/_navigation-cancan-omniauth.html.erb', 'app/views/layouts/_navigation.html.erb'
    else
      copy_from_repo 'app/views/layouts/_navigation-omniauth.html.erb', :prefs => 'omniauth'
    end
  end
  copy_from_repo 'app/views/layouts/_navigation-subdomains_app.html.erb', :prefs => 'subdomains_app'

  ### GIT ###
  git :add => '-A' if prefer :git, true
  git :commit => '-qm "rails_apps_composer: navigation links"' if prefer :git, true
end # after_everything

__END__

name: frontend
description: "Install a front-end framework for HTML5 and CSS."
author: RailsApps

requires: [setup, gems]
run_after: [setup, gems]
category: frontend

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_apps_composer-2.4.19 recipes/frontend.rb
rails_apps_composer-2.4.18 recipes/frontend.rb
rails_apps_composer-2.4.17 recipes/frontend.rb
rails_apps_composer-2.4.16 recipes/frontend.rb
rails_apps_composer-2.4.15 recipes/frontend.rb
rails_apps_composer-2.4.14 recipes/frontend.rb