Sha256: c82d910d9dd945bf197bd19d5a128214d5d6650fa09c1723d9cd1cbf99ecbf5d

Contents?: true

Size: 721 Bytes

Versions: 2

Compression:

Stored size: 721 Bytes

Contents

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'

desc "Run specs"
RSpec::Core::RakeTask.new do |t|
  t.pattern = 'spec/**/*_spec.rb'
end

desc "Download csslint jar and js file from Github"
task :download_csslint do
  vendor_dir = 'vendor'
  mkdir(vendor_dir) unless File.directory? vendor_dir

  host_url = 'https://raw.github.com/CSSLint/csslint'
  dependencies = [ "#{host_url}/master/lib/js.jar", "#{host_url}/master/release/csslint-rhino.js" ]
  dependencies.each do |dependency|
    puts "Downloading #{dependency}..."

    file_name = File.basename(dependency)

    File.open("#{vendor_dir}/#{file_name}", "w") do |file|
      file.write open(dependency).read
    end
  end
end

task default: [ :spec ]

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
css_validator-3.0.0 Rakefile
css_validator-2.0.0 Rakefile