forked from icicletech/bootstrap-tokenfield-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
21 lines (19 loc) · 894 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "bundler/gem_tasks"
require "fileutils"
desc 'Update the Bootstrap Tokenfield Javascript and CSS files'
task :update_bootstrap_tokenfield do
def download_assets(version)
base_url = 'https://raw.githubusercontent.com/sliptree/bootstrap-tokenfield'
puts "Downlading Bootstrap Tokenfield - #{version}"
`curl -o vendor/assets/javascripts/bootstrap-tokenfield.js \
#{base_url}/v#{version}/dist/bootstrap-tokenfield.js `
`curl -o vendor/assets/stylesheets/bootstrap-tokenfield.css \
#{base_url}/v#{version}/dist/css/bootstrap-tokenfield.css`
`curl -o vendor/assets/stylesheets/tokenfield-typeahead.css \
#{base_url}/v#{version}/dist/css/tokenfield-typeahead.css`
end
FileUtils.mkdir_p('vendor/assets/javascripts')
FileUtils.mkdir_p('vendor/assets/stylesheets')
download_assets(BootstrapTokenfieldRails::VERSION)
puts "Update Completed"
end