lib/chosen-rails/source_file.rb in chosen-rails-0.9.11.2 vs lib/chosen-rails/source_file.rb in chosen-rails-0.9.12
- old
+ new
@@ -2,20 +2,19 @@
class SourceFile < Thor
include Thor::Actions
desc 'fetch source files', 'fetch source files from GitHub'
- def fetch
+ def fetch remote, branch
self.destination_root = 'vendor/assets'
- remote = 'https://github.com/harvesthq/chosen'
- get "#{remote}/raw/master/chosen/chosen-sprite.png", 'images/chosen-sprite.png'
- get "#{remote}/raw/master/chosen/chosen-sprite@2x.png", 'images/chosen-sprite@2x.png'
- get "#{remote}/raw/master/chosen/chosen.css", 'stylesheets/chosen.css'
- get "#{remote}/raw/master/coffee/lib/abstract-chosen.coffee", 'javascripts/lib/abstract-chosen.coffee'
- get "#{remote}/raw/master/coffee/lib/select-parser.coffee", 'javascripts/lib/select-parser.coffee'
- get "#{remote}/raw/master/coffee/chosen.jquery.coffee", 'javascripts/chosen.jquery.coffee'
- get "#{remote}/raw/master/coffee/chosen.proto.coffee", 'javascripts/chosen.proto.coffee'
- get "#{remote}/raw/master/VERSION", 'VERSION'
+ get "#{remote}/raw/#{branch}/chosen/chosen-sprite.png", 'images/chosen-sprite.png'
+ get "#{remote}/raw/#{branch}/chosen/chosen-sprite@2x.png", 'images/chosen-sprite@2x.png'
+ get "#{remote}/raw/#{branch}/chosen/chosen.css", 'stylesheets/chosen.css'
+ get "#{remote}/raw/#{branch}/coffee/lib/abstract-chosen.coffee", 'javascripts/lib/abstract-chosen.coffee'
+ get "#{remote}/raw/#{branch}/coffee/lib/select-parser.coffee", 'javascripts/lib/select-parser.coffee'
+ get "#{remote}/raw/#{branch}/coffee/chosen.jquery.coffee", 'javascripts/chosen.jquery.coffee'
+ get "#{remote}/raw/#{branch}/coffee/chosen.proto.coffee", 'javascripts/chosen.proto.coffee'
+ get "#{remote}/raw/#{branch}/VERSION", 'VERSION'
bump_version
end
desc 'convert css to sass file', 'convert css to sass file by sass-convert'
def convert