fspath-xattr 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.
- checksums.yaml +15 -0
- data/.gitignore +2 -0
- data/.travis.yml +7 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +1 -1
- data/README.markdown +3 -1
- data/fspath-xattr.gemspec +2 -2
- data/spec/fspath/xattr_spec.rb +36 -39
- metadata +60 -81
    
        checksums.yaml
    ADDED
    
    | @@ -0,0 +1,15 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            !binary "U0hBMQ==":
         | 
| 3 | 
            +
              metadata.gz: !binary |-
         | 
| 4 | 
            +
                ZWFiYjA4YWI0MzQ0M2Q4M2U1MTQzNjUwZDI4ZThhMzNiYWU0NmEwMw==
         | 
| 5 | 
            +
              data.tar.gz: !binary |-
         | 
| 6 | 
            +
                OGIxMjNmMjQxYTJiODJlM2NjMTgxODdmNDQ5NGI5MWEwYjIzN2M1MQ==
         | 
| 7 | 
            +
            !binary "U0hBNTEy":
         | 
| 8 | 
            +
              metadata.gz: !binary |-
         | 
| 9 | 
            +
                YWNiZWRlNTE4MTJiZDk2NTFkN2I2MDc2OGMwOGY2OTcwNjU5MzM5ZjBhYTQ5
         | 
| 10 | 
            +
                NmFkZjhmZTM0NzY3NjYyNmM3NzkxNjU4MGMwMWU2OWNiZDIxNGE5NTVlOGIy
         | 
| 11 | 
            +
                ZmZkMGY3MmYwY2E5MTY1YzcwOTAyMjE1Y2E2Mzc4ZjUxNWIyODI=
         | 
| 12 | 
            +
              data.tar.gz: !binary |-
         | 
| 13 | 
            +
                YzY5MjdjMTQ4NTcyZWYxMDY1M2JkZjExNjEwMDUwNTlhYzlhMjBjNWZjNDg1
         | 
| 14 | 
            +
                NzY5YjVhMmI1Njc3ZTQ3NzA5NGIyMGJiMDVlYmRiNWRmNDBjNjI4ZWQ0ZGJh
         | 
| 15 | 
            +
                ZWY2NDFjOTdjN2FhNDU4MmJhNmRmODkwY2I0N2FlOTJiMTMwM2Y=
         | 
    
        data/.gitignore
    CHANGED
    
    
    
        data/.travis.yml
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/LICENSE.txt
    CHANGED
    
    
    
        data/README.markdown
    CHANGED
    
    | @@ -2,6 +2,8 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Better than Pathname
         | 
| 4 4 |  | 
| 5 | 
            +
            [](https://travis-ci.org/toy/fspath-xattr)
         | 
| 6 | 
            +
             | 
| 5 7 | 
             
            ### Extended attributes (using xattr gem)
         | 
| 6 8 |  | 
| 7 9 | 
             
            Get extended attribute:
         | 
| @@ -18,4 +20,4 @@ Set extended attribute on symlink itself: | |
| 18 20 |  | 
| 19 21 | 
             
            ## Copyright
         | 
| 20 22 |  | 
| 21 | 
            -
            Copyright (c) 2010- | 
| 23 | 
            +
            Copyright (c) 2010-2013 Ivan Kuchin. See LICENSE.txt for details.
         | 
    
        data/fspath-xattr.gemspec
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Gem::Specification.new do |s|
         | 
| 4 4 | 
             
              s.name        = 'fspath-xattr'
         | 
| 5 | 
            -
              s.version     = '1.0. | 
| 5 | 
            +
              s.version     = '1.0.1'
         | 
| 6 6 | 
             
              s.summary     = %q{FSPath methods xattr and lxattr to work with extended attributes using ffi-xattr gem}
         | 
| 7 7 | 
             
              s.homepage    = "http://github.com/toy/#{s.name}"
         | 
| 8 8 | 
             
              s.authors     = ['Ivan Kuchin']
         | 
| @@ -15,7 +15,7 @@ Gem::Specification.new do |s| | |
| 15 15 | 
             
              s.executables   = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
         | 
| 16 16 | 
             
              s.require_paths = %w[lib]
         | 
| 17 17 |  | 
| 18 | 
            -
              s.add_dependency 'fspath', '~> 2.0 | 
| 18 | 
            +
              s.add_dependency 'fspath', '~> 2.0'
         | 
| 19 19 | 
             
              s.add_dependency 'ffi-xattr', '~> 0.0.4'
         | 
| 20 20 | 
             
              s.add_development_dependency 'rspec'
         | 
| 21 21 | 
             
            end
         | 
    
        data/spec/fspath/xattr_spec.rb
    CHANGED
    
    | @@ -2,53 +2,50 @@ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
| 2 2 | 
             
            require 'fspath/xattr'
         | 
| 3 3 |  | 
| 4 4 | 
             
            describe FSPath::Xattr do
         | 
| 5 | 
            -
               | 
| 6 | 
            -
               | 
| 5 | 
            +
              file = 'file'
         | 
| 6 | 
            +
              link = 'link'
         | 
| 7 7 |  | 
| 8 8 | 
             
              before do
         | 
| 9 | 
            -
                File.open( | 
| 10 | 
            -
                File.symlink( | 
| 9 | 
            +
                File.open(file, 'w'){ |io| io << 'some content' }
         | 
| 10 | 
            +
                File.symlink(file, link)
         | 
| 11 11 | 
             
              end
         | 
| 12 12 | 
             
              after do
         | 
| 13 | 
            -
                File.delete( | 
| 13 | 
            +
                File.delete(file)
         | 
| 14 14 | 
             
                File.delete(link)
         | 
| 15 15 | 
             
              end
         | 
| 16 16 |  | 
| 17 17 | 
             
              describe "xattr" do
         | 
| 18 | 
            -
                 | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
                   | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 24 | 
            -
             | 
| 25 | 
            -
             | 
| 26 | 
            -
             | 
| 27 | 
            -
             | 
| 28 | 
            -
             | 
| 29 | 
            -
             | 
| 30 | 
            -
             | 
| 31 | 
            -
             | 
| 32 | 
            -
             | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 38 | 
            -
             | 
| 39 | 
            -
             | 
| 40 | 
            -
             | 
| 41 | 
            -
             | 
| 42 | 
            -
             | 
| 43 | 
            -
             | 
| 44 | 
            -
             | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
                   | 
| 49 | 
            -
                  xattr['user.hello'] = 'foo'
         | 
| 50 | 
            -
                  xattr['user.hello'].should == 'foo'
         | 
| 51 | 
            -
                  FSPath(path).xattr['user.hello'].should be_nil
         | 
| 18 | 
            +
                [
         | 
| 19 | 
            +
                  [file, :xattr],
         | 
| 20 | 
            +
                  [link, :xattr],
         | 
| 21 | 
            +
                  [file, :lxattr],
         | 
| 22 | 
            +
                  [link, :lxattr],
         | 
| 23 | 
            +
                ].each do |path, method|
         | 
| 24 | 
            +
                  describe "#{path}.#{method}" do
         | 
| 25 | 
            +
                    it "should return instance of Xattr" do
         | 
| 26 | 
            +
                      FSPath(path).send(method).should be_kind_of(Xattr)
         | 
| 27 | 
            +
                    end
         | 
| 28 | 
            +
             | 
| 29 | 
            +
                    it "should point to same path" do
         | 
| 30 | 
            +
                      FSPath(path).send(method).instance_variable_get(:@path).should == path
         | 
| 31 | 
            +
                    end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                    it "should set xattr on path" do
         | 
| 34 | 
            +
                      FSPath(file).lxattr['user.hello'].should be_nil
         | 
| 35 | 
            +
                      FSPath(link).lxattr['user.hello'].should be_nil
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                      FSPath(path).send(method)['user.hello'] = 'world'
         | 
| 38 | 
            +
                      FSPath(path).send(method)['user.hello'].should == 'world'
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                      if path == link && method == :lxattr
         | 
| 41 | 
            +
                        FSPath(file).lxattr['user.hello'].should be_nil
         | 
| 42 | 
            +
                        FSPath(link).lxattr['user.hello'].should == 'world'
         | 
| 43 | 
            +
                      else
         | 
| 44 | 
            +
                        FSPath(file).lxattr['user.hello'].should == 'world'
         | 
| 45 | 
            +
                        FSPath(link).lxattr['user.hello'].should be_nil
         | 
| 46 | 
            +
                      end
         | 
| 47 | 
            +
                    end
         | 
| 48 | 
            +
                  end
         | 
| 52 49 | 
             
                end
         | 
| 53 50 | 
             
              end
         | 
| 54 51 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,78 +1,66 @@ | |
| 1 | 
            -
            --- !ruby/object:Gem::Specification | 
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: fspath-xattr
         | 
| 3 | 
            -
            version: !ruby/object:Gem::Version | 
| 4 | 
            -
               | 
| 5 | 
            -
              prerelease: 
         | 
| 6 | 
            -
              segments: 
         | 
| 7 | 
            -
              - 1
         | 
| 8 | 
            -
              - 0
         | 
| 9 | 
            -
              - 0
         | 
| 10 | 
            -
              version: 1.0.0
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 1.0.1
         | 
| 11 5 | 
             
            platform: ruby
         | 
| 12 | 
            -
            authors: | 
| 6 | 
            +
            authors:
         | 
| 13 7 | 
             
            - Ivan Kuchin
         | 
| 14 8 | 
             
            autorequire: 
         | 
| 15 9 | 
             
            bindir: bin
         | 
| 16 10 | 
             
            cert_chain: []
         | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 11 | 
            +
            date: 2013-12-16 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies:
         | 
| 13 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 21 14 | 
             
              name: fspath
         | 
| 22 | 
            -
               | 
| 23 | 
            -
             | 
| 24 | 
            -
                none: false
         | 
| 25 | 
            -
                requirements: 
         | 
| 15 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            +
                requirements:
         | 
| 26 17 | 
             
                - - ~>
         | 
| 27 | 
            -
                  - !ruby/object:Gem::Version | 
| 28 | 
            -
                     | 
| 29 | 
            -
                    segments: 
         | 
| 30 | 
            -
                    - 2
         | 
| 31 | 
            -
                    - 0
         | 
| 32 | 
            -
                    - 0
         | 
| 33 | 
            -
                    version: 2.0.0
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: '2.0'
         | 
| 34 20 | 
             
              type: :runtime
         | 
| 35 | 
            -
              version_requirements: *id001
         | 
| 36 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 37 | 
            -
              name: ffi-xattr
         | 
| 38 21 | 
             
              prerelease: false
         | 
| 39 | 
            -
               | 
| 40 | 
            -
                 | 
| 41 | 
            -
                requirements: 
         | 
| 22 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            +
                requirements:
         | 
| 42 24 | 
             
                - - ~>
         | 
| 43 | 
            -
                  - !ruby/object:Gem::Version | 
| 44 | 
            -
                     | 
| 45 | 
            -
             | 
| 46 | 
            -
             | 
| 47 | 
            -
             | 
| 48 | 
            -
             | 
| 25 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            +
                    version: '2.0'
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: ffi-xattr
         | 
| 29 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            +
                requirements:
         | 
| 31 | 
            +
                - - ~>
         | 
| 32 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 49 33 | 
             
                    version: 0.0.4
         | 
| 50 34 | 
             
              type: :runtime
         | 
| 51 | 
            -
              version_requirements: *id002
         | 
| 52 | 
            -
            - !ruby/object:Gem::Dependency 
         | 
| 53 | 
            -
              name: rspec
         | 
| 54 35 | 
             
              prerelease: false
         | 
| 55 | 
            -
               | 
| 56 | 
            -
                 | 
| 57 | 
            -
                 | 
| 58 | 
            -
             | 
| 59 | 
            -
             | 
| 60 | 
            -
             | 
| 61 | 
            -
             | 
| 62 | 
            -
             | 
| 63 | 
            -
             | 
| 36 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            +
                requirements:
         | 
| 38 | 
            +
                - - ~>
         | 
| 39 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            +
                    version: 0.0.4
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: rspec
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - ! '>='
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '0'
         | 
| 64 48 | 
             
              type: :development
         | 
| 65 | 
            -
               | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ! '>='
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0'
         | 
| 66 55 | 
             
            description: 
         | 
| 67 56 | 
             
            email: 
         | 
| 68 57 | 
             
            executables: []
         | 
| 69 | 
            -
             | 
| 70 58 | 
             
            extensions: []
         | 
| 71 | 
            -
             | 
| 72 59 | 
             
            extra_rdoc_files: []
         | 
| 73 | 
            -
             | 
| 74 | 
            -
            files: 
         | 
| 60 | 
            +
            files:
         | 
| 75 61 | 
             
            - .gitignore
         | 
| 62 | 
            +
            - .travis.yml
         | 
| 63 | 
            +
            - Gemfile
         | 
| 76 64 | 
             
            - LICENSE.txt
         | 
| 77 65 | 
             
            - README.markdown
         | 
| 78 66 | 
             
            - fspath-xattr.gemspec
         | 
| @@ -80,39 +68,30 @@ files: | |
| 80 68 | 
             
            - spec/fspath/xattr_spec.rb
         | 
| 81 69 | 
             
            - spec/spec_helper.rb
         | 
| 82 70 | 
             
            homepage: http://github.com/toy/fspath-xattr
         | 
| 83 | 
            -
            licenses: | 
| 71 | 
            +
            licenses:
         | 
| 84 72 | 
             
            - MIT
         | 
| 73 | 
            +
            metadata: {}
         | 
| 85 74 | 
             
            post_install_message: 
         | 
| 86 75 | 
             
            rdoc_options: []
         | 
| 87 | 
            -
             | 
| 88 | 
            -
            require_paths: 
         | 
| 76 | 
            +
            require_paths:
         | 
| 89 77 | 
             
            - lib
         | 
| 90 | 
            -
            required_ruby_version: !ruby/object:Gem::Requirement | 
| 91 | 
            -
               | 
| 92 | 
            -
               | 
| 93 | 
            -
             | 
| 94 | 
            -
             | 
| 95 | 
            -
             | 
| 96 | 
            -
             | 
| 97 | 
            -
             | 
| 98 | 
            -
             | 
| 99 | 
            -
             | 
| 100 | 
            -
              none: false
         | 
| 101 | 
            -
              requirements: 
         | 
| 102 | 
            -
              - - ">="
         | 
| 103 | 
            -
                - !ruby/object:Gem::Version 
         | 
| 104 | 
            -
                  hash: 3
         | 
| 105 | 
            -
                  segments: 
         | 
| 106 | 
            -
                  - 0
         | 
| 107 | 
            -
                  version: "0"
         | 
| 78 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 79 | 
            +
              requirements:
         | 
| 80 | 
            +
              - - ! '>='
         | 
| 81 | 
            +
                - !ruby/object:Gem::Version
         | 
| 82 | 
            +
                  version: '0'
         | 
| 83 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 84 | 
            +
              requirements:
         | 
| 85 | 
            +
              - - ! '>='
         | 
| 86 | 
            +
                - !ruby/object:Gem::Version
         | 
| 87 | 
            +
                  version: '0'
         | 
| 108 88 | 
             
            requirements: []
         | 
| 109 | 
            -
             | 
| 110 89 | 
             
            rubyforge_project: fspath-xattr
         | 
| 111 | 
            -
            rubygems_version:  | 
| 90 | 
            +
            rubygems_version: 2.0.3
         | 
| 112 91 | 
             
            signing_key: 
         | 
| 113 | 
            -
            specification_version:  | 
| 114 | 
            -
            summary: FSPath methods xattr and lxattr to work with extended attributes using ffi-xattr | 
| 115 | 
            -
             | 
| 92 | 
            +
            specification_version: 4
         | 
| 93 | 
            +
            summary: FSPath methods xattr and lxattr to work with extended attributes using ffi-xattr
         | 
| 94 | 
            +
              gem
         | 
| 95 | 
            +
            test_files:
         | 
| 116 96 | 
             
            - spec/fspath/xattr_spec.rb
         | 
| 117 97 | 
             
            - spec/spec_helper.rb
         | 
| 118 | 
            -
            has_rdoc: 
         |