tagen 0.2.0 → 0.2.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/Rakefile CHANGED
@@ -8,7 +8,7 @@ end
8
8
 
9
9
  desc "testing the library"
10
10
  task :test do
11
- sh "rspec --color spec"
11
+ sh "watchr tagen.watchr"
12
12
  end
13
13
 
14
14
  def sh cmd
@@ -62,7 +62,7 @@ module Directory
62
62
  #
63
63
  # @example
64
64
  # each '.' do |pa|
65
- # p pa.path
65
+ # p pa.path #=> "foo" not "./foo"
66
66
  # end
67
67
  # # => '/home' ..
68
68
  #
@@ -87,7 +87,8 @@ module Directory
87
87
  next if o[:nodot] and name=~/^\./
88
88
  next if o[:nobackup] and name=~/~$/
89
89
 
90
- blk.call pa.join(name)
90
+ # => "foo" not "./foo"
91
+ blk.call pa.p=="." ? Pa(name) : pa.join(name)
91
92
  end
92
93
  end
93
94
 
@@ -40,11 +40,15 @@ describe Pa do
40
40
  FileUtils.touch(%w(fa .fa fa~ dira/dirb/b))
41
41
  end
42
42
 
43
- it "each() -> Enumerator" do
43
+ it "return a Enumerator when call without block" do
44
44
  Pa.each.should be_an_instance_of Enumerator
45
45
  Pa.each.with_object([]){|pa,m|m<<pa.b}.sort.should == %w(.fa dira fa fa~)
46
46
  end
47
47
 
48
+ it "each(.) return 'foo' not '.foo'" do
49
+ Pa.each.with_object([]){|pa,m|m<<pa.p}.sort.should == %w(.fa dira fa fa~)
50
+ end
51
+
48
52
  it "each(nodot: true) -> list all files except dot file" do
49
53
  Pa.each(nodot: true).with_object([]){|pa,m|m<<pa.b}.sort.should == %w(dira fa fa~)
50
54
  end
data/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module VERSION
2
2
  MAJOR = 0
3
3
  MINOR = 2
4
- PATCH = 0
4
+ PATCH = 1
5
5
 
6
6
  IS = [MAJOR, MINOR, PATCH].join(".")
7
7
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: tagen
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.2.0
5
+ version: 0.2.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Guten
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-10 00:00:00 +08:00
13
+ date: 2011-03-11 00:00:00 +08:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency