Sha256: a6411c8b4100c830bf24f55df548f08c90a88364bf175cf0dc4bd577dbf1d477

Contents?: true

Size: 1.15 KB

Versions: 10

Compression:

Stored size: 1.15 KB

Contents

require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

desc 'Default: run unit tests.'
task :default => :test

desc 'Test the small_asset_helper plugin.'
Rake::TestTask.new(:test) do |t|
  t.libs << 'lib'
  t.libs << 'test'
  t.pattern = 'test/**/*_test.rb'
  t.verbose = true
end

desc 'Generate documentation for the small_asset_helper plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
  rdoc.rdoc_dir = 'rdoc'
  rdoc.title    = 'SmallAssetHelper'
  rdoc.options << '--line-numbers' << '--inline-source'
  rdoc.rdoc_files.include('README')
  rdoc.rdoc_files.include('lib/**/*.rb')
end

desc %{Update ".manifest" with the latest list of project filenames.}
task :manifest do
  list = `git ls-files --full-name --exclude=*.gemspec --exclude=.*`.chomp.split("\n")
  
  if spec_file = Dir['*.gemspec'].first
    spec = File.read spec_file
    spec.gsub! /^(\s* s.(test_)?files \s* = \s* )( \[ [^\]]* \] | %w\( [^)]* \) )/mx do
      assignment = $1
      bunch = $2 ? list.grep(/^test\//) : list
      '%s%%w(%s)' % [assignment, bunch.join(' ')]
    end
      
    File.open(spec_file, 'w') { |f| f << spec }
  end
  File.open('.manifest', 'w') { |f| f << list.join("\n") }
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
jeremyboles-smart-asset-helper-0.1.0 Rakefile
jeremyboles-smart-asset-helper-0.1.1 Rakefile
jeremyboles-smart-asset-helper-0.1.2 Rakefile
jeremyboles-smart-asset-helper-0.1.3 Rakefile
jeremyboles-smart-asset-helper-0.1.4 Rakefile
jeremyboles-smart-asset-helper-0.1.5 Rakefile
jeremyboles-smart-asset-helper-0.1.6 Rakefile
jeremyboles-smart-asset-helper-0.1.7 Rakefile
jeremyboles-smart-asset-helper-0.2.0 Rakefile
jeremyboles-smart-asset-helper-0.3.0 Rakefile