Sha256: 9030344d1f6bf3380a5d598057cd165ae8c239daf323cc50ba5c1bd51319fc93
Contents?: true
Size: 909 Bytes
Versions: 29
Compression:
Stored size: 909 Bytes
Contents
require 'bundler/gem_tasks' require 'fileutils' desc 'Update the Bootstrap-slider Javascript and CSS files' task :update do def download(version) base_url = 'https://raw.githubusercontent.com/seiyria/bootstrap-slider' puts "Downlading Bootstrap-slider #{version} ..." js = system("curl -fo vendor/assets/javascripts/bootstrap-slider.js " \ "#{base_url}/v#{version}/dist/bootstrap-slider.js") css = system("curl -fo vendor/assets/stylesheets/bootstrap-slider.css " \ "#{base_url}/v#{version}/dist/css/bootstrap-slider.css") puts 'ERROR: Unable to fetch the Javascript file !' unless js puts 'ERROR: Unable to fetch the CSS file !' unless css exit 1 unless js || css end FileUtils.mkdir_p('vendor/assets/javascripts') FileUtils.mkdir_p('vendor/assets/stylesheets') download(BootstrapSlider::Rails::VERSION) puts "\e[32mDone!\e[0m" end
Version data entries
29 entries across 29 versions & 1 rubygems