fspath 0.2.0-darwin → 1.0.0-darwin

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 1.0.0
data/fspath.gemspec CHANGED
@@ -5,12 +5,12 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fspath"
8
- s.version = "0.2.0"
8
+ s.version = "1.0.0"
9
9
  s.platform = "darwin"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.authors = ["Ivan Kuchin"]
13
- s.date = "2011-10-04"
13
+ s.date = "2011-10-29"
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE.txt",
16
16
  "README.markdown",
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
36
36
  s.homepage = "http://github.com/toy/fspath"
37
37
  s.licenses = ["MIT"]
38
38
  s.require_paths = ["lib"]
39
- s.rubygems_version = "1.8.10"
39
+ s.rubygems_version = "1.8.11"
40
40
  s.summary = "Better than Pathname"
41
41
 
42
42
  if s.respond_to? :specification_version then
data/lib/fspath.rb CHANGED
@@ -28,6 +28,11 @@ class FSPath < Pathname
28
28
  end
29
29
  end
30
30
 
31
+ # Fixing Pathname.relative_path_from
32
+ def relative_path_from(other)
33
+ self.class.new(super(self.class.new(other)))
34
+ end
35
+
31
36
  # Write data to file
32
37
  def write(data)
33
38
  open('wb') do |f|
data/spec/fspath_spec.rb CHANGED
@@ -62,6 +62,16 @@ describe FSPath do
62
62
  end
63
63
  end
64
64
 
65
+ describe "relative_path_from" do
66
+ it "should return instance of FSPath" do
67
+ (FSPath('a').relative_path_from('b')).should be_instance_of(FSPath)
68
+ end
69
+
70
+ it "should return relative path" do
71
+ (FSPath('b/a').relative_path_from('b')).should == FSPath('a')
72
+ end
73
+ end
74
+
65
75
  describe "writing" do
66
76
  before do
67
77
  @path = FSPath.new('test')
metadata CHANGED
@@ -4,10 +4,10 @@ version: !ruby/object:Gem::Version
4
4
  hash: 23
5
5
  prerelease:
6
6
  segments:
7
+ - 1
7
8
  - 0
8
- - 2
9
9
  - 0
10
- version: 0.2.0
10
+ version: 1.0.0
11
11
  platform: darwin
12
12
  authors:
13
13
  - Ivan Kuchin
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-04 00:00:00 Z
18
+ date: 2011-10-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: xattr
@@ -144,7 +144,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  requirements: []
145
145
 
146
146
  rubyforge_project:
147
- rubygems_version: 1.8.10
147
+ rubygems_version: 1.8.11
148
148
  signing_key:
149
149
  specification_version: 3
150
150
  summary: Better than Pathname