Sha256: 069345c3a854ba82dcac055f2213f35694633098d5b7666efa9a17e5a028e3f3
Contents?: true
Size: 847 Bytes
Versions: 8
Compression:
Stored size: 847 Bytes
Contents
require 'bundler/gem_tasks' require 'fileutils' desc 'Update the Ezdz Javascript and CSS files' task :update do def download(version) base_url = 'https://raw.githubusercontent.com/jaysalvat/ezdz' puts "Downlading ezdz-slider #{version} ..." js = system("curl -fo vendor/assets/javascripts/jquery.ezdz.js " \ "#{base_url}/v#{version}/dist/jquery.ezdz.js") css = system("curl -fo vendor/assets/stylesheets/jquery.ezdz.css " \ "#{base_url}/v#{version}/dist/jquery.ezdz.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(Ezdz::Rails::VERSION) puts "\e[32mDone!\e[0m" end
Version data entries
8 entries across 8 versions & 1 rubygems