chrislloyd-fancypath 0.4.0 → 0.5.0

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.
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'date'
5
5
  require 'spec/rake/spectask'
6
6
 
7
7
  GEM = "fancypath"
8
- GEM_VERSION = "0.4.0"
8
+ GEM_VERSION = "0.5.0"
9
9
  AUTHORS = ["Myles Byrne", "Chris Lloyd"]
10
10
  EMAIL = "myles@ducknewmedia.com"
11
11
  HOMEPAGE = "http://ducknewmedia.com/fancypath"
data/lib/fancypath.rb CHANGED
@@ -63,6 +63,11 @@ class Fancypath < Pathname
63
63
 
64
64
  def append(contents)
65
65
  write(contents,'a+')
66
+ self
67
+ end
68
+
69
+ def parent
70
+ super.to_path
66
71
  end
67
72
 
68
73
  alias_method :all_children, :children
@@ -17,6 +17,13 @@ describe '#join', 'aliased to #/' do
17
17
 
18
18
  end
19
19
 
20
+ describe '#parent' do
21
+
22
+ it('returns parent') { @file.parent.should == TMP_DIR.to_path }
23
+ it('returns Fancypath') { @file.parent.should be_instance_of(Fancypath) }
24
+
25
+ end
26
+
20
27
  describe '#touch', 'file does not exist' do
21
28
 
22
29
  it('returns self') { @file.touch.should == @file }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chrislloyd-fancypath
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Myles Byrne
@@ -10,7 +10,7 @@ autorequire: fancypath
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2008-12-01 00:00:00 -08:00
13
+ date: 2008-12-02 00:00:00 -08:00
14
14
  default_executable:
15
15
  dependencies: []
16
16