Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

allow remote args for update-chosen

  • Loading branch information...
commit 30defd4eb42629498a5bc7d956cc1faf3fb249aa 1 parent 8f25248
@tsechingho authored
Showing with 4 additions and 4 deletions.
  1. +3 −2 Rakefile
  2. +1 −2  lib/chosen-rails/source_file.rb
View
5 Rakefile
@@ -3,9 +3,10 @@ require 'bundler/gem_tasks'
require File.expand_path('../lib/chosen-rails/source_file', __FILE__)
desc "Update with Harvest's Chosen Library"
-task 'update-chosen' do
+task 'update-chosen', 'remote' do |task, args|
+ remote = args['remote'] || 'https://github.com/harvesthq/chosen'
files = SourceFile.new
- files.fetch
+ files.fetch remote
files.convert
files.cleanup
end
View
3  lib/chosen-rails/source_file.rb
@@ -4,9 +4,8 @@ class SourceFile < Thor
include Thor::Actions
desc 'fetch source files', 'fetch source files from GitHub'
- def fetch
+ def fetch remote
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'

0 comments on commit 30defd4

Please sign in to comment.
Something went wrong with that request. Please try again.