scudco-taglob 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/History.txt CHANGED
@@ -1,3 +1,8 @@
1
+ === 1.0.1 / 2008-10-15
2
+
3
+ * Minor Changes
4
+ * Updated Documentation to be more accurate
5
+
1
6
  === 1.0.0 / 2008-10-08
2
7
 
3
8
  * Important changes
@@ -15,11 +20,11 @@
15
20
  require 'taglob/rake'
16
21
 
17
22
  Taglob::Rake::SpecTagsTask.new :spec_regression do |t|
18
- t.pattern = 'spec/**/*.rb'
23
+ t.pattern = 'spec/**/*_spec.rb'
19
24
  t.tags = "regression|smoke"
20
25
  end
21
26
  Taglob::Rake::TestTagsTask.new :test_regression do |t|
22
- t.pattern = 'test/**/*.rb'
27
+ t.pattern = 'test/**/test_*.rb'
23
28
  t.tags = "regression|smoke"
24
29
  end
25
30
  * CheckTagsTask will check all tags in a glob pattern against a valid list of tags
@@ -4,6 +4,15 @@ require 'taglob'
4
4
 
5
5
  module Taglob
6
6
  module Rake
7
+ # CheckTagsTask will check all tags in a glob pattern against a valid list of tags
8
+ #
9
+ # Example :
10
+ # require 'taglob/rake'
11
+ # task = Taglob::Rake::CheckTagsTask.new do |t|
12
+ # t.pattern = 'spec/**/*_spec.rb'
13
+ # t.valid_tag_source = 'config/valid_tags.txt'
14
+ # end
15
+ #
7
16
  class CheckTagsTask < ::Rake::TaskLib
8
17
  attr_accessor :pattern
9
18
  attr_accessor :valid_tag_source
@@ -28,4 +37,4 @@ module Taglob
28
37
 
29
38
  end
30
39
  end
31
- end
40
+ end
@@ -4,6 +4,21 @@ require 'spec/rake/spectask'
4
4
 
5
5
  module Taglob
6
6
  module Rake
7
+ # TagsTask will allow you to specify your own TestTagTasks in your Rakefile:
8
+ #
9
+ # Example : Using Unit Test Framework
10
+ # require 'taglob/rake'
11
+ # Taglob::Rake::SpecTagsTask.new :spec_regression do |t|
12
+ # t.pattern = 'spec/**/*_spec.rb'
13
+ # t.tags = "regression|smoke"
14
+ # end
15
+ #
16
+ # Example : Using RSpec Test Framework
17
+ # require 'taglob/rake'
18
+ # Taglob::Rake::TestTagsTask.new :test_regression do |t|
19
+ # t.pattern = 'test/**/test_*.rb'
20
+ # t.tags = "regression|smoke"
21
+ # end
7
22
  class TagsTask
8
23
  attr_accessor :pattern
9
24
  attr_accessor :tags
@@ -18,24 +33,38 @@ module Taglob
18
33
  Dir.taglob(pattern,tags) unless tags.nil? || pattern.nil?
19
34
  end
20
35
  end
21
-
36
+
37
+ # TestTagsTask : To run rake tasks on unit test framework
38
+ # Require 'taglob/rake/tasks' in your Rakefile to get test_tag.
39
+ # Example :
40
+ #
41
+ # * $ rake test_tag tags="for,the,win" #Contain all of these tags (AND condition)
42
+ # * $ rake test_tag tags="foo|bar" #Contain any of these tags (OR condition)
43
+ #
22
44
  class TestTagsTask < TagsTask
23
45
  def initialize(name = :test_tags)
24
46
  super(name)
25
47
  end
26
-
48
+
27
49
  def define
28
50
  ::Rake::TestTask.new @name do |t|
29
51
  t.test_files = test_files
30
52
  end
31
53
  end
32
54
  end
33
-
55
+
56
+ # SpecTagsTask : To run rake tasks on Rspec test framework
57
+ # require 'taglob/rake/tasks' in your Rakefile to get spec_tag.
58
+ #
59
+ # Example :
60
+ # * $ rake spec_tag tags="for,the,win" #Contain all of these tags (AND condition)
61
+ # * $ rake spec_tag tags="foo|bar" #Contain any of these tags (OR condition)
62
+ #
34
63
  class SpecTagsTask < TagsTask
35
64
  def initialize(name = :spec_tags)
36
65
  super(name)
37
66
  end
38
-
67
+
39
68
  def define
40
69
  ::Spec::Rake::SpecTask.new @name do |t|
41
70
  t.spec_files = test_files
@@ -44,4 +73,4 @@ module Taglob
44
73
  end
45
74
 
46
75
  end
47
- end
76
+ end
data/lib/taglob.rb CHANGED
@@ -18,7 +18,7 @@
18
18
  require 'taglob/extensions'
19
19
 
20
20
  module Taglob
21
- VERSION = '1.0.0'
21
+ VERSION = '1.0.1'
22
22
 
23
23
  def self.invalid_tags(pattern,valid_tags)
24
24
  invalids = {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scudco-taglob
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Anderson