Class: CoffeeGrinderGenerator
- Inherits:
-
Genosaurus
- Object
- Genosaurus
- CoffeeGrinderGenerator
- Defined in:
- lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb
Instance Method Summary collapse
- #after_generate ⇒ Object
- #app ⇒ Object
- #author ⇒ Object
- #backbone? ⇒ Boolean
- #backbone_code ⇒ Object
- #jquery_code ⇒ Object
- #jquery_ui_code ⇒ Object
- #underscore_code ⇒ Object
- #version ⇒ Object
Instance Method Details
#after_generate ⇒ Object
39 40 41 42 43 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 39 def after_generate cmd = "cd #{app}; gem install bundler; bundle; npm install coffeegrinder; cake test" # puts cmd system cmd end |
#app ⇒ Object
7 8 9 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 7 def app param(:app) end |
#author ⇒ Object
19 20 21 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 19 def param(:author) || (ENV["USERNAME"] || ENV["USER"]) end |
#backbone? ⇒ Boolean
15 16 17 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 15 def backbone? param(:backbone) end |
#backbone_code ⇒ Object
35 36 37 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 35 def backbone_code slurp_url("http://documentcloud.github.com/backbone/backbone-min.js") end |
#jquery_code ⇒ Object
23 24 25 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 23 def jquery_code slurp_url("http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js") end |
#jquery_ui_code ⇒ Object
27 28 29 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 27 def jquery_ui_code slurp_url("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js") end |
#underscore_code ⇒ Object
31 32 33 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 31 def underscore_code slurp_url("http://documentcloud.github.com/underscore/underscore-min.js") end |
#version ⇒ Object
11 12 13 |
# File 'lib/coffee_grinder/coffee_grinder_generator/coffee_grinder_generator.rb', line 11 def version param(:version) || '0.0.1' end |