Class: Bundler::Bower::Rake
- Inherits:
-
Object
- Object
- Bundler::Bower::Rake
- Defined in:
- lib/bundler/bower/rake.rb
Instance Method Summary collapse
- #command ⇒ Object
-
#initialize(options) ⇒ Rake
constructor
A new instance of Rake.
- #perform ⇒ Object
- #update? ⇒ Boolean
Constructor Details
#initialize(options) ⇒ Rake
7 8 9 |
# File 'lib/bundler/bower/rake.rb', line 7 def initialize() @options = end |
Instance Method Details
#command ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/bundler/bower/rake.rb', line 29 def command if update? 'bower update' else 'bower install' end end |
#perform ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bundler/bower/rake.rb', line 11 def perform dsl = BowerRails::Dsl.evalute("Gemfile") dsl.write_bower_json dsl.write_dotbowerrc dsl.directories.each do |dir| Dir.chdir(dir) do system(command) system('bower list') end end end |
#update? ⇒ Boolean
25 26 27 |
# File 'lib/bundler/bower/rake.rb', line 25 def update? @options["update"] end |