Class: Frame::Generators::BlueprintGenerator
- Defined in:
- lib/generators/frame/blueprint/blueprint_generator.rb
Instance Method Summary collapse
Methods inherited from Base
Instance Method Details
#adjust_app_css ⇒ Object
26 27 28 29 30 31 |
# File 'lib/generators/frame/blueprint/blueprint_generator.rb', line 26 def adjust_app_css file=destination_path('app/assets/stylesheets/application.css') add_if_missing(file, " *= require screen\n", :after => " *= require_self\n") add_if_missing(file, " *= require ie\n", :after => " *= require_self\n") gsub_file file, / \*\= require_tree \.\n/, '' end |
#clone_blueprint ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/generators/frame/blueprint/blueprint_generator.rb', line 11 def clone_blueprint tmp_dir=File.join(Rails.root, 'tmp/blueprint') dest_dir=File.join(Rails.root, 'app/assets/stylesheets') if Dir.exist?(tmp_dir) FileUtils.rm_rf(tmp_dir) end system("git clone [email protected]:joshuaclayton/blueprint-css #{tmp_dir}") Dir.chdir tmp_dir system("git checkout v1.0.1") Dir.chdir File.join(tmp_dir, 'lib') system("bundle install --without test") system("ruby compress.rb -o #{dest_dir}") end |