taglob 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ === 1.0.2 / 2008-11-04
2
+
3
+ * Minor Changes
4
+ * Fixed a small bug where rake tasks could not be required unless all of taglob was required
5
+
6
+ === 1.0.1 / 2008-10-15
7
+
8
+ * Minor Changes
9
+ * Updated Documentation to be more accurate
10
+
1
11
  === 1.0.0 / 2008-10-08
2
12
 
3
13
  * Important changes
@@ -15,11 +25,11 @@
15
25
  require 'taglob/rake'
16
26
 
17
27
  Taglob::Rake::SpecTagsTask.new :spec_regression do |t|
18
- t.pattern = 'spec/**/*.rb'
28
+ t.pattern = 'spec/**/*_spec.rb'
19
29
  t.tags = "regression|smoke"
20
30
  end
21
31
  Taglob::Rake::TestTagsTask.new :test_regression do |t|
22
- t.pattern = 'test/**/*.rb'
32
+ t.pattern = 'test/**/test_*.rb'
23
33
  t.tags = "regression|smoke"
24
34
  end
25
35
  * 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
@@ -1,9 +1,25 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
3
  require 'spec/rake/spectask'
4
+ require 'taglob'
4
5
 
5
6
  module Taglob
6
7
  module Rake
8
+ # TagsTask will allow you to specify your own TestTagTasks in your Rakefile:
9
+ #
10
+ # Example : Using Unit Test Framework
11
+ # require 'taglob/rake'
12
+ # Taglob::Rake::SpecTagsTask.new :spec_regression do |t|
13
+ # t.pattern = 'spec/**/*_spec.rb'
14
+ # t.tags = "regression|smoke"
15
+ # end
16
+ #
17
+ # Example : Using RSpec Test Framework
18
+ # require 'taglob/rake'
19
+ # Taglob::Rake::TestTagsTask.new :test_regression do |t|
20
+ # t.pattern = 'test/**/test_*.rb'
21
+ # t.tags = "regression|smoke"
22
+ # end
7
23
  class TagsTask
8
24
  attr_accessor :pattern
9
25
  attr_accessor :tags
@@ -18,24 +34,38 @@ module Taglob
18
34
  Dir.taglob(pattern,tags) unless tags.nil? || pattern.nil?
19
35
  end
20
36
  end
21
-
37
+
38
+ # TestTagsTask : To run rake tasks on unit test framework
39
+ # Require 'taglob/rake/tasks' in your Rakefile to get test_tag.
40
+ # Example :
41
+ #
42
+ # * $ rake test_tag tags="for,the,win" #Contain all of these tags (AND condition)
43
+ # * $ rake test_tag tags="foo|bar" #Contain any of these tags (OR condition)
44
+ #
22
45
  class TestTagsTask < TagsTask
23
46
  def initialize(name = :test_tags)
24
47
  super(name)
25
48
  end
26
-
49
+
27
50
  def define
28
51
  ::Rake::TestTask.new @name do |t|
29
52
  t.test_files = test_files
30
53
  end
31
54
  end
32
55
  end
33
-
56
+
57
+ # SpecTagsTask : To run rake tasks on Rspec test framework
58
+ # require 'taglob/rake/tasks' in your Rakefile to get spec_tag.
59
+ #
60
+ # Example :
61
+ # * $ rake spec_tag tags="for,the,win" #Contain all of these tags (AND condition)
62
+ # * $ rake spec_tag tags="foo|bar" #Contain any of these tags (OR condition)
63
+ #
34
64
  class SpecTagsTask < TagsTask
35
65
  def initialize(name = :spec_tags)
36
66
  super(name)
37
67
  end
38
-
68
+
39
69
  def define
40
70
  ::Spec::Rake::SpecTask.new @name do |t|
41
71
  t.spec_files = test_files
@@ -44,4 +74,4 @@ module Taglob
44
74
  end
45
75
 
46
76
  end
47
- end
77
+ 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.2'
22
22
 
23
23
  def self.invalid_tags(pattern,valid_tags)
24
24
  invalids = {}
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
2
  require 'spec/spec_helper'
3
- require 'taglob/rake'
3
+ require 'taglob/rake/test_tags_task'
4
4
 
5
5
  describe "Test/Spec Tags Task" do
6
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taglob
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Anderson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-11 00:00:00 -07:00
12
+ date: 2008-11-13 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.7.0
23
+ version: 1.8.2
24
24
  version:
25
25
  description: Tagging for Ruby files
26
26
  email: adamandersonis@gmail.com
@@ -83,7 +83,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements: []
84
84
 
85
85
  rubyforge_project: taglob
86
- rubygems_version: 1.2.0
86
+ rubygems_version: 1.3.1
87
87
  signing_key:
88
88
  specification_version: 2
89
89
  summary: Dir.taglob selects tagged Ruby files