fspath-mac 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitignore +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +3 -0
- data/README.markdown +2 -0
- data/TODO +1 -0
- data/ext/fspath/mac/finder_label_number.c +2 -2
- data/fspath-mac.gemspec +2 -2
- data/lib/fspath/mac.rb +1 -2
- data/spec/fspath/mac_spec.rb +1 -1
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjEzYTE0MjBlY2I5MjcxYTU2MjM5NjY5ZjAzZmZjM2ViNzU0NzY0Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGE5N2U5NmFlMTY0ZGY4M2U3MzEwZTg2OGQ0OWExNTNiNTNjOWRhYg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTQzODQ1MDhjMmE5ODYyNTI3ZDdiM2IwNjM4MTIzMDNhZTYzYzUyNGYyNDg2
|
10
|
+
ZjJjNTY5MDYwYmJjNzM1YTRmNDg0NzQxNWYzNzYyZmQ5N2Q5ZTFkZDU3OTgz
|
11
|
+
NWQ5YzMzNzkwNzY5Yzc4ZDkyMmU5N2NkNTdlODE0NjU1ZWZjNWU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OTJjOWYwNTdhN2U2YzdhM2E0OWQ0OTg5MDM0MDcxMWFiNTZmZjNjZjM1MDRk
|
14
|
+
ZjUwNzNlZWYyNzllNzQ1NjZlODhlMjJlN2MwOWVkNjY3ZmE5ZjcwMzE1YjMy
|
15
|
+
ZGZmNGQ2MzQ4ZTM4NGVmZDI3MzU0OWZlYjlkZTU3N2FlMjFkM2Y=
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.markdown
CHANGED
data/TODO
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
use NSFileManager#trashItemAtURL:resultingItemURL:error: for moving to trash
|
@@ -24,13 +24,13 @@ void raise_cf_error(CFErrorRef errorRef){
|
|
24
24
|
|
25
25
|
const char *errorDescriptionC = CFStringGetCStringPtr(errorDescriptionRef, kCFStringEncodingUTF8);
|
26
26
|
if (errorDescriptionC) {
|
27
|
-
rb_raise(rb_eRuntimeError, errorDescriptionC);
|
27
|
+
rb_raise(rb_eRuntimeError, "%s", errorDescriptionC);
|
28
28
|
} else {
|
29
29
|
CFIndex length = CFStringGetLength(errorDescriptionRef);
|
30
30
|
CFIndex maxSize = CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8);
|
31
31
|
char *errorDescription = (char *) malloc(maxSize);
|
32
32
|
CFStringGetCString(errorDescriptionRef, errorDescription, maxSize, kCFStringEncodingUTF8);
|
33
|
-
rb_raise(rb_eRuntimeError, errorDescription);
|
33
|
+
rb_raise(rb_eRuntimeError, "%s", errorDescription);
|
34
34
|
}
|
35
35
|
}
|
36
36
|
|
data/fspath-mac.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'fspath-mac'
|
5
|
-
s.version = '3.0.
|
5
|
+
s.version = '3.0.1'
|
6
6
|
s.summary = %q{FSPath methods for mac (move_to_trash, color labeling, spotlight comments, …)}
|
7
7
|
s.homepage = "http://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
@@ -16,6 +16,6 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.extensions = `git ls-files -- ext/**/extconf.rb`.split("\n")
|
17
17
|
s.require_paths = %w[lib]
|
18
18
|
|
19
|
-
s.add_dependency 'fspath', '~> 2.0
|
19
|
+
s.add_dependency 'fspath', '~> 2.0'
|
20
20
|
s.add_development_dependency 'rspec'
|
21
21
|
end
|
data/lib/fspath/mac.rb
CHANGED
@@ -17,8 +17,7 @@ class FSPath
|
|
17
17
|
|
18
18
|
# Set finder label (:grey is same as :gray, nil or false as :none)
|
19
19
|
def finder_label=(color)
|
20
|
-
|
21
|
-
index = FINDER_LABEL_COLORS.index(color)
|
20
|
+
index = FINDER_LABEL_COLORS.index(FINDER_LABEL_COLOR_ALIASES[color] || color)
|
22
21
|
raise "Unknown label #{color.inspect}" unless index
|
23
22
|
self.finder_label_number = index
|
24
23
|
end
|
data/spec/fspath/mac_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe FSPath::Mac do
|
|
27
27
|
@path = FSPath('to_label')
|
28
28
|
|
29
29
|
FSPath::FINDER_LABEL_COLORS.each_with_index do |label, index|
|
30
|
-
@path.stub
|
30
|
+
@path.stub(:finder_label_number).and_return(index)
|
31
31
|
@path.finder_label.should == label
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fspath-mac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fspath
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.0
|
19
|
+
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.0
|
26
|
+
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -46,8 +46,11 @@ extensions:
|
|
46
46
|
extra_rdoc_files: []
|
47
47
|
files:
|
48
48
|
- .gitignore
|
49
|
+
- .travis.yml
|
50
|
+
- Gemfile
|
49
51
|
- LICENSE.txt
|
50
52
|
- README.markdown
|
53
|
+
- TODO
|
51
54
|
- ext/fspath/mac/extconf.rb
|
52
55
|
- ext/fspath/mac/finder_label_number.c
|
53
56
|
- fspath-mac.gemspec
|