Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 32 lines (24 sloc) 1.641 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
if @use_haml
  get "#{File.dirname(__FILE__)}/resources/reset.scss", "public/stylesheets/sass/reset.scss"

  append_file ".gitignore" do
    "public/stylesheets/*.css"
  end

else
  get "#{File.dirname(__FILE__)}/resources/reset.css", "public/stylesheets/reset.css"
end

inside "app/views/layouts" do
  remove_file "application.html.erb"

  if @use_haml
    get "#{File.dirname(__FILE__)}/resources/layout.html.haml", "application.html.haml"

    gsub_file "application.html.haml", /\/ insert javascript here\n/, "= include_javascripts :application\n" if @use_jammit.present?
    gsub_file "application.html.haml", /\/ insert javascript here\n/, "= javascript_include_tag :defaults\n" if @use_jammit.nil?

    gsub_file "application.html.haml", /\/ insert stylesheet here\n/, "= include_stylesheets :application\n" if @use_jammit.present?
    gsub_file "application.html.haml", /\/ insert stylesheet here\n/, "= stylesheet_link_tag 'reset'\n" if @use_jammit.nil?
  else
    get "#{File.dirname(__FILE__)}/resources/layout.html.erb", "application.html.erb"

    gsub_file "application.html.erb", /<!-- insert javascript here -->\n/, "<%= include_javascripts :application %>\n" if @use_jammit.present?
    gsub_file "application.html.erb", /<!-- insert javascript here -->\n/, "<%= javascript_include_tag :defaults %>\n" if @use_jammit.nil?

    gsub_file "application.html.erb", /<!-- insert stylesheet here -->\n/, "<%= include_stylesheets :application %>\n" if @use_jammit.present?
    gsub_file "application.html.erb", /<!-- insert stylesheet here -->\n/, "<%= stylesheet_include_tag 'reset' %>\n" if @use_jammit.nil?
  end
end
Something went wrong with that request. Please try again.