Skip to content

Commit

Permalink
Updated RDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
scudco committed Oct 16, 2008
1 parent f9767cd commit 49dbe75
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 8 deletions.
9 changes: 7 additions & 2 deletions History.txt
@@ -1,3 +1,8 @@
=== 1.0.1 / 2008-10-15

* Minor Changes
* Updated Documentation to be more accurate

=== 1.0.0 / 2008-10-08

* Important changes
Expand All @@ -15,11 +20,11 @@
require 'taglob/rake'

Taglob::Rake::SpecTagsTask.new :spec_regression do |t|
t.pattern = 'spec/**/*.rb'
t.pattern = 'spec/**/*_spec.rb'
t.tags = "regression|smoke"
end
Taglob::Rake::TestTagsTask.new :test_regression do |t|
t.pattern = 'test/**/*.rb'
t.pattern = 'test/**/test_*.rb'
t.tags = "regression|smoke"
end
* CheckTagsTask will check all tags in a glob pattern against a valid list of tags
Expand Down
11 changes: 10 additions & 1 deletion lib/taglob/rake/check_tags_task.rb
Expand Up @@ -4,6 +4,15 @@

module Taglob
module Rake
# CheckTagsTask will check all tags in a glob pattern against a valid list of tags
#
# Example :
# require 'taglob/rake'
# task = Taglob::Rake::CheckTagsTask.new do |t|
# t.pattern = 'spec/**/*_spec.rb'
# t.valid_tag_source = 'config/valid_tags.txt'
# end
#
class CheckTagsTask < ::Rake::TaskLib
attr_accessor :pattern
attr_accessor :valid_tag_source
Expand All @@ -28,4 +37,4 @@ def valid_tag_list

end
end
end
end
39 changes: 34 additions & 5 deletions lib/taglob/rake/test_tags_task.rb
Expand Up @@ -4,6 +4,21 @@

module Taglob
module Rake
# TagsTask will allow you to specify your own TestTagTasks in your Rakefile:
#
# Example : Using Unit Test Framework
# require 'taglob/rake'
# Taglob::Rake::SpecTagsTask.new :spec_regression do |t|
# t.pattern = 'spec/**/*_spec.rb'
# t.tags = "regression|smoke"
# end
#
# Example : Using RSpec Test Framework
# require 'taglob/rake'
# Taglob::Rake::TestTagsTask.new :test_regression do |t|
# t.pattern = 'test/**/test_*.rb'
# t.tags = "regression|smoke"
# end
class TagsTask
attr_accessor :pattern
attr_accessor :tags
Expand All @@ -18,24 +33,38 @@ def test_files
Dir.taglob(pattern,tags) unless tags.nil? || pattern.nil?
end
end


# TestTagsTask : To run rake tasks on unit test framework
# Require 'taglob/rake/tasks' in your Rakefile to get test_tag.
# Example :
#
# * $ rake test_tag tags="for,the,win" #Contain all of these tags (AND condition)
# * $ rake test_tag tags="foo|bar" #Contain any of these tags (OR condition)
#
class TestTagsTask < TagsTask
def initialize(name = :test_tags)
super(name)
end

def define
::Rake::TestTask.new @name do |t|
t.test_files = test_files
end
end
end


# SpecTagsTask : To run rake tasks on Rspec test framework
# require 'taglob/rake/tasks' in your Rakefile to get spec_tag.
#
# Example :
# * $ rake spec_tag tags="for,the,win" #Contain all of these tags (AND condition)
# * $ rake spec_tag tags="foo|bar" #Contain any of these tags (OR condition)
#
class SpecTagsTask < TagsTask
def initialize(name = :spec_tags)
super(name)
end

def define
::Spec::Rake::SpecTask.new @name do |t|
t.spec_files = test_files
Expand All @@ -44,4 +73,4 @@ def define
end

end
end
end

0 comments on commit 49dbe75

Please sign in to comment.