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 +1 -1
 - data/lib/tagen/core/pa/dir.rb +3 -2
 - data/spec/tagen/core/pa/dir_spec.rb +5 -1
 - data/version.rb +1 -1
 - metadata +2 -2
 
    
        data/Rakefile
    CHANGED
    
    
    
        data/lib/tagen/core/pa/dir.rb
    CHANGED
    
    | 
         @@ -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 
     | 
    
         
            -
            			 
     | 
| 
      
 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 " 
     | 
| 
      
 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
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -2,7 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
            name: tagen
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version 
         
     | 
| 
       4 
4 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       5 
     | 
    
         
            -
              version: 0.2. 
     | 
| 
      
 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- 
     | 
| 
      
 13 
     | 
    
         
            +
            date: 2011-03-11 00:00:00 +08:00
         
     | 
| 
       14 
14 
     | 
    
         
             
            default_executable: 
         
     | 
| 
       15 
15 
     | 
    
         
             
            dependencies: 
         
     | 
| 
       16 
16 
     | 
    
         
             
            - !ruby/object:Gem::Dependency 
         
     |