filetree 0.0.1 → 0.0.2

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e67c14781dc6c85ee01ba2c8168a532ea063d29b
4
- data.tar.gz: f3a115c9f24ff821d792ead2377ebeb6b6e2ef59
3
+ metadata.gz: 05d761d32074272dc9b464dd7222f347cf100ded
4
+ data.tar.gz: 160b0350362fff8d14090e0fcdc0929e17dd39c7
5
5
  SHA512:
6
- metadata.gz: 1206d7e6234e526823b53d1e795afc2960a56932d81a543aad0d6e4bf3d81347b4d94dc37a70f2cd70cd91f4f554d44831f23c2efe6109c13619a160b1d49846
7
- data.tar.gz: 60b2c4ffbe9e9af4f027c8c5e70eb320baabe8065d932bb5e561aa693f0c8e5967a00856f4f036e2584bf9c78046c4c4fa9c4aefc2a9b7af2d5ca70a10f0fd03
6
+ metadata.gz: 17b1e705f4b8a2f81e7ba207a0fc3faf9e01d5e72b98d855032735aedafd4b1d0169b9a8eaf59d66250ea3002ad2d2f40e268a7cc748c1fb8913d69b24260ee0
7
+ data.tar.gz: e0e5c3435fd350d2fc608ef21b6cadaa47f7f0ec391cbc6f934d23bf0a4220e236305bad7633aa61d7eb8de301eb7895372f118a2a352c87012d9eee2a389f17
data/README.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  A simple tree structure for working with FilePath objects in ruby. I simply took the simple_tree module from https://github.com/ealdent/simple-tree and hacked it into [Pathname](http://www.ruby-doc.org/stdlib-2.0/libdoc/pathname/rdoc/Pathname.html) from the std-lib. This means you get all the awesome features of working with Pathname, as well as making it easy to examine a filepath's ancestors and descendants.
4
4
 
5
+ ## Install
6
+
7
+ install with: `gem install filetree`
8
+
9
+
5
10
  # Usage
6
11
 
7
12
  ```ruby
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'filetree'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = '2013-05-27'
5
5
  s.summary = "A simple ruby library for manipulating filepaths as tree structures"
6
- s.description = "A simple tree structure for working with FilePath objects in ruby. I simply took the simple_tree module from https://github.com/ealdent/simple-tree and hacked it into [Pathname](http://www.ruby-doc.org/stdlib-2.0/libdoc/pathname/rdoc/Pathname.html) from the std-lib. This means you get all the awesome features of working with Pathname, as well as making it easy to examine a filepath's ancestors and descendants."
6
+ s.description = "A simple tree structure for working with FilePath objects in ruby. I simply took the simple_tree module from https://github.com/ealdent/simple-tree and hacked it into Pathname (http://www.ruby-doc.org/stdlib-2.0/libdoc/pathname/rdoc/Pathname.html) from the std-lib. This means you get all the awesome features of working with Pathname, as well as making it easy to examine a filepath's ancestors and descendants."
7
7
  s.authors = ["Eric West"]
8
8
  s.email = 'nick@quaran.to'
9
9
  s.files = ["lib/filetree.rb",
@@ -23,13 +23,13 @@ class FileTree < Pathname
23
23
  @identifier ||= self.inspect
24
24
  end
25
25
 
26
- # See #Pathname.parent
26
+ # See Pathname#parent
27
27
 
28
28
  def parent
29
29
  FileTree.new(_parent)
30
30
  end
31
31
 
32
- #See #Pathname.children
32
+ # See Pathname#children
33
33
 
34
34
  def children(*args)
35
35
  if self.directory?
@@ -109,6 +109,7 @@ module SimpleTree
109
109
  def ancestors
110
110
  d = Array.new
111
111
  current = self.parent()
112
+ d << current
112
113
 
113
114
  until d.include?(current.parent)
114
115
  current = current.parent
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filetree
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric West
@@ -12,7 +12,7 @@ date: 2013-05-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple tree structure for working with FilePath objects in ruby. I
14
14
  simply took the simple_tree module from https://github.com/ealdent/simple-tree and
15
- hacked it into [Pathname](http://www.ruby-doc.org/stdlib-2.0/libdoc/pathname/rdoc/Pathname.html)
15
+ hacked it into Pathname (http://www.ruby-doc.org/stdlib-2.0/libdoc/pathname/rdoc/Pathname.html)
16
16
  from the std-lib. This means you get all the awesome features of working with Pathname,
17
17
  as well as making it easy to examine a filepath's ancestors and descendants.
18
18
  email: nick@quaran.to