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

Version Path
bootstrap-slider-rails-9.8.0 Rakefile
bootstrap-slider-rails-9.7.0 Rakefile
bootstrap-slider-rails-9.6.0 Rakefile
bootstrap-slider-rails-9.5.0 Rakefile
bootstrap-slider-rails-9.4.0 Rakefile
bootstrap-slider-rails-9.3.0 Rakefile
bootstrap-slider-rails-9.2.0 Rakefile
bootstrap-slider-rails-9.1.3 Rakefile
bootstrap-slider-rails-9.1.2 Rakefile
bootstrap-slider-rails-9.1.1 Rakefile
bootstrap-slider-rails-9.1.0 Rakefile
bootstrap-slider-rails-9.0.0 Rakefile
bootstrap-slider-rails-8.0.0 Rakefile
bootstrap-slider-rails-7.1.2 Rakefile
bootstrap-slider-rails-7.1.1 Rakefile
bootstrap-slider-rails-7.0.5 Rakefile
bootstrap-slider-rails-7.0.3 Rakefile
bootstrap-slider-rails-7.0.1 Rakefile
bootstrap-slider-rails-6.1.8 Rakefile
bootstrap-slider-rails-6.1.6 Rakefile