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 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
@@ -1,10 +1,12 @@
1
1
  /pkg/
2
+ /*.gem
2
3
 
3
4
  /doc/
4
5
  /rdoc/
5
6
  /.yardoc/
6
7
  /coverage/
7
8
 
9
+ Gemfile.lock
8
10
  Makefile
9
11
  *.o
10
12
  *.bundle
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language:
2
+ - objective-c
3
+ - ruby
4
+ rvm:
5
+ - system
6
+ - default
7
+ script: "bundle exec rspec"
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2011 Ivan Kuchin
1
+ Copyright (c) 2010-2013 Ivan Kuchin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.markdown CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Better than Pathname
4
4
 
5
+ [![Build Status](https://travis-ci.org/toy/fspath-xattr.png?branch=master)](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-2011 Ivan Kuchin. See LICENSE.txt for details.
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.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.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
@@ -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
- let(:path){ 'test.txt' }
6
- let(:link){ 'link.txt' }
5
+ file = 'file'
6
+ link = 'link'
7
7
 
8
8
  before do
9
- File.open(path, 'w'){ |io| io << 'some content' }
10
- File.symlink(path, link)
9
+ File.open(file, 'w'){ |io| io << 'some content' }
10
+ File.symlink(file, link)
11
11
  end
12
12
  after do
13
- File.delete(path)
13
+ File.delete(file)
14
14
  File.delete(link)
15
15
  end
16
16
 
17
17
  describe "xattr" do
18
- let(:xattr){ FSPath(link).xattr }
19
-
20
- it "should return instance of Xattr" do
21
- xattr.should be_kind_of(Xattr)
22
- end
23
-
24
- it "should point to same path" do
25
- xattr.instance_variable_get(:@path).should == link
26
- end
27
-
28
- it "should set xattr on linked path" do
29
- FSPath(path).xattr['user.hello'].should be_nil
30
- xattr['user.hello'] = 'foo'
31
- xattr['user.hello'].should == 'foo'
32
- FSPath(path).xattr['user.hello'].should == 'foo'
33
- end
34
- end
35
-
36
- describe "lxattr" do
37
- let(:xattr){ FSPath(link).lxattr }
38
-
39
- it "should return instance of Xattr" do
40
- xattr.should be_kind_of(Xattr)
41
- end
42
-
43
- it "should point to same path" do
44
- xattr.instance_variable_get(:@path).should == link
45
- end
46
-
47
- it "should set xattr on link itself" do
48
- FSPath(path).xattr['user.hello'].should be_nil
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
- hash: 23
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
- date: 2011-11-20 00:00:00 Z
19
- dependencies:
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
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
26
17
  - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 15
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
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
42
24
  - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 23
45
- segments:
46
- - 0
47
- - 0
48
- - 4
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
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
62
- - 0
63
- version: "0"
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
- version_requirements: *id003
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
- none: false
92
- requirements:
93
- - - ">="
94
- - !ruby/object:Gem::Version
95
- hash: 3
96
- segments:
97
- - 0
98
- version: "0"
99
- required_rubygems_version: !ruby/object:Gem::Requirement
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: 1.8.11
90
+ rubygems_version: 2.0.3
112
91
  signing_key:
113
- specification_version: 3
114
- summary: FSPath methods xattr and lxattr to work with extended attributes using ffi-xattr gem
115
- test_files:
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: