Sha256: 1007d821d1335b85575bf063e43f048cae673d588000c5a2049c85775a928432

Contents?: true

Size: 1.94 KB

Versions: 8

Compression:

Stored size: 1.94 KB

Contents

require 'rubygems'
require 'bundler/setup'

$: << File.expand_path(File.dirname(__FILE__))
$: << File.expand_path(File.dirname(__FILE__)) + '/test'

require 'rake'
require 'rdoc/task'
require 'rake/testtask'
require 'lib/w3c_validators'
require 'fileutils'

include W3CValidators

desc 'Run the unit tests.'
Rake::TestTask.new do |t|
  t.libs << 'lib'
  t.libs << 'lib/test'
  t.test_files = FileList['test/test*.rb'].exclude('test_helper.rb')
  t.verbose = true
end

desc 'Generate documentation for W3C Validators.'
RDoc::Task.new do |rdoc|
  rdoc.rdoc_dir = 'doc'
  rdoc.title    = 'Ruby W3C Validators'
  rdoc.options << '--all' << '--inline-source' << '--line-numbers'
  rdoc.rdoc_files.include('README.rdoc')
  rdoc.rdoc_files.include('LICENSE')
  rdoc.rdoc_files.include('CHANGELOG')
  rdoc.rdoc_files.include('lib/*.rb')
  rdoc.rdoc_files.include('lib/w3c_validators/*.rb')
end

desc 'Create the gem spec'
task :create_gemspec do
  File.open("w3c_validators.gemspec","w") do |file|
    file.puts <<-EOH
# Auto-generated gemspec
# Run 'rake generate_gemspec' to re-generate
Gem::Specification.new do |s|
  s.name     = "w3c_validators"
  s.platform = Gem::Platform::RUBY
  s.version  = "1.1.1"
  s.date     = "2010-10-20"
  s.summary  = "Wrapper for the World Wide Web Consortium's online validation services."
  s.email    = "code@dunae.ca"
  s.homepage = "http://code.dunae.ca/w3c_validators"
  s.description = "W3C Validators is a Ruby wrapper for the World Wide Web Consortium's online validation services."
  s.has_rdoc = true
  s.author  = "Alex Dunae"
  s.add_dependency('nokogiri', 'json')
  s.extra_rdoc_files = ['README.rdoc', 'CHANGELOG', 'LICENSE']
  s.rdoc_options << '--all' << '--inline-source' << '--line-numbers' << '--charset' << 'utf-8'
EOH
  
    file.puts "  s.test_files = ['" +  Dir.glob('test/test_*.rb').join("','") + "']"
    file.puts "  s.files = ['" +  FileList["{lib}/**/*"].join("','") + "']"
    file.puts 'end'
  end
end

task :default => :test

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
w3c_validators-1.3.7 Rakefile
w3c_validators-1.3.6 Rakefile
w3c_validators-1.3.5 Rakefile
w3c_validators-1.3.4 Rakefile
w3c_validators-1.3.3 Rakefile
w3c_validators-1.3.2 Rakefile
w3c_validators-1.3.1 Rakefile
w3c_validators-1.3 Rakefile