Sha256: 1a357b7917005698863ce4d9adfeeb631a0715decd718b9dc46ad06db1731de9
Contents?: true
Size: 988 Bytes
Versions: 3
Compression:
Stored size: 988 Bytes
Contents
require 'rubygems' require 'rspec/core/rake_task' require 'bundler/gem_tasks' desc "Run Rspec tests." RSpec::Core::RakeTask.new(:spec) do |spec| spec.pattern = 'spec/**/*_spec.rb' spec.rspec_opts = ['--backtrace'] end desc "Download csslint jar and js file from Github." task :download_csslint do host_url = URI.parse("https://raw.github.com") dependencies = ['/stubbornella/csslint/master/lib/js.jar', '/stubbornella/csslint/master/release/csslint-rhino.js'] require 'net/http' http = Net::HTTP.new(host_url.host, host_url.port) http.use_ssl = true http.ssl_version = :TLSv1 http.start do |http| dependencies.each do |dependency| body = http.get(dependency).body file_name = File.basename(dependency) vendor_dir = "lib/vendor" mkdir(vendor_dir) unless File.directory? vendor_dir File.open("#{vendor_dir}/#{file_name}", "w") do |file| file.write(body) end end end end task :default => [:spec, :download_csslint]
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
css_lint-0.10.0.0 | Rakefile |
css_lint-0.9.10.1 | Rakefile |
css_lint-0.9.10.0 | Rakefile |