Sha256: 0a235544c69a801bd2c76b9af4da8c8fcc9958672df4e7e2f5ccacf3c5dfabcf

Contents?: true

Size: 896 Bytes

Versions: 1

Compression:

Stored size: 896 Bytes

Contents

require "bundler/gem_tasks"

namespace :pickadate do
  desc "Download latest assets"
  task :download do
    require 'fileutils'

    system "curl https://github.com/amsul/pickadate.js/archive/master.zip -f -L --create-dirs -o tmp/pickadate.zip"
    system "unzip -o tmp/pickadate.zip -d tmp/"
    system "rm tmp/pickadate.zip"

    Dir["tmp/pickadate*/lib/picker*.js"].each do |file|
      FileUtils.cp file, "vendor/assets/javascripts/pickadate/#{File.basename(file)}", preserve: false
    end

    Dir["tmp/pickadate*/lib/translations/*.js"].each do |file|
      FileUtils.cp file, "vendor/assets/javascripts/pickadate/translations/#{File.basename(file)}", preserve: false
    end

    Dir["tmp/pickadate*/lib/themes/*"].each do |file|
      FileUtils.cp file, "vendor/assets/stylesheets/pickadate/#{File.basename(file)}", preserve: false
    end

    system "rm -rf tmp/pickadate*"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pickadate-rails-3.5.6.0 Rakefile