fspath-mac 3.0.0 → 3.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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTQ0YjllNjljZjdmNDFkODY5ZDdlODU2OTAzY2FiYzMwZTA5MDBkZQ==
4
+ ZjEzYTE0MjBlY2I5MjcxYTU2MjM5NjY5ZjAzZmZjM2ViNzU0NzY0Nw==
5
5
  data.tar.gz: !binary |-
6
- NGEwYWQ2NzIyYzIxYTA0OWVhYTVmNjExMGI0YjM0NzI3ZjM5N2FlYg==
6
+ ZGE5N2U5NmFlMTY0ZGY4M2U3MzEwZTg2OGQ0OWExNTNiNTNjOWRhYg==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NTE5NTZhODUxNWY2MGY5MThhZmIwMzU2ODk3ZjQ1NDNiMzVkODEyMTI2NDU2
10
- MjhhMmY3OWI0NDdhYWNiYmI2MzQyMDdjZjU5ZThiYTI3ZDI2ZmI4OTRlNWNj
11
- YzVmZGJiZmZkMzcxMzNiNDlhZjVkNWQwM2EzNDc5ZWI2MmQwOTE=
9
+ MTQzODQ1MDhjMmE5ODYyNTI3ZDdiM2IwNjM4MTIzMDNhZTYzYzUyNGYyNDg2
10
+ ZjJjNTY5MDYwYmJjNzM1YTRmNDg0NzQxNWYzNzYyZmQ5N2Q5ZTFkZDU3OTgz
11
+ NWQ5YzMzNzkwNzY5Yzc4ZDkyMmU5N2NkNTdlODE0NjU1ZWZjNWU=
12
12
  data.tar.gz: !binary |-
13
- MTUzNWQyOTliMzY2YjI0Y2VlMjNlMDYyZjgyNGQ1NWFlNjE3MzQwODIwMGY3
14
- YzRkYmE1ZTMwYTY4MWE4OWFhMzg4YWU3YjlhYmZlMmQyMmViMTY0M2Y5Yzcw
15
- ZjNlYzViMmE0OTE4NzYwNzc4ZmM5NTNiMDg4YWYzMjExMDE2ZjE=
13
+ OTJjOWYwNTdhN2U2YzdhM2E0OWQ0OTg5MDM0MDcxMWFiNTZmZjNjZjM1MDRk
14
+ ZjUwNzNlZWYyNzllNzQ1NjZlODhlMjJlN2MwOWVkNjY3ZmE5ZjcwMzE1YjMy
15
+ ZGZmNGQ2MzQ4ZTM4NGVmZDI3MzU0OWZlYjlkZTU3N2FlMjFkM2Y=
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /.yardoc/
7
7
  /coverage/
8
8
 
9
+ Gemfile.lock
9
10
  Makefile
10
11
  *.o
11
12
  *.bundle
@@ -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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Better than Pathname
4
4
 
5
+ [![Build Status](https://travis-ci.org/toy/fspath-mac.png?branch=master)](https://travis-ci.org/toy/fspath-mac)
6
+
5
7
  ### OS X stuff
6
8
 
7
9
  Move to trash:
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
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'fspath-mac'
5
- s.version = '3.0.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.0'
19
+ s.add_dependency 'fspath', '~> 2.0'
20
20
  s.add_development_dependency 'rspec'
21
21
  end
@@ -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
- color = FINDER_LABEL_COLOR_ALIASES[color] || color
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
@@ -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!(:finder_label_number).and_return(index)
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.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-03-24 00:00:00.000000000 Z
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.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.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