filetree 0.0.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 83caa925feb3d507378725abfb1ce9d716bf8feb
4
- data.tar.gz: 6a2fedebf430894e6060da4853f7ec51b6d81026
3
+ metadata.gz: ddf6cfb9534643ce2b003839f0b320471825fbc2
4
+ data.tar.gz: 8edc86da17750bebb39991e17e4068c4ee5a3cca
5
5
  SHA512:
6
- metadata.gz: cc66fe7961828d31cdc9886b775782d5286c1ba584d2bb06870ab296e6859c3d01f4a7f8488f1c517399a865dca794821674c99ef75d56ad26757e641f30220a
7
- data.tar.gz: e4d5b096363991caa752d655a6e51d85fb03425fdc78697b33e3a6962c3b8ce3fe1b6c55f2254a0a9c457b945f476030bd402b4b568cca29e57d81f96a8373d8
6
+ metadata.gz: 34aa0920cdacc98a1bf6650e72e1ad6554ac788df5e5b77229a0276f8f43277c18493a34d2883da672b4dc82127eb9d61f85d146b7c4bc9393411d063731c138
7
+ data.tar.gz: dbb5d4f94b200bc266b6bcfee082b9ce23001184ed31252b4a63ef6bdc2e0fbb5c62e75dbdb9afe8b76e6066fbbcc1103adb00ff1ce4f38bc003df8b5923050d
@@ -0,0 +1,45 @@
1
+ # rcov generated
2
+ coverage
3
+
4
+ # rdoc generated
5
+ rdoc
6
+
7
+ # yard generated
8
+ doc
9
+ .yardoc
10
+
11
+ # jeweler generated
12
+ pkg
13
+
14
+ .bundle
15
+
16
+ # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
17
+ #
18
+ # * Create a file at ~/.gitignore
19
+ # * Include files you want ignored
20
+ # * Run: git config --global core.excludesfile ~/.gitignore
21
+ #
22
+ # After doing this, these files will be ignored in all your git projects,
23
+ # saving you from having to 'pollute' every project you touch with them
24
+ #
25
+ # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
26
+ #
27
+ # For MacOS:
28
+ #
29
+ .DS_Store
30
+ #
31
+ # For TextMate
32
+ #*.tmproj
33
+ #tmtags
34
+ #
35
+ # For emacs:
36
+ *~
37
+ \#*
38
+ .\#*
39
+ #
40
+ # For vim:
41
+ *.swp
42
+ #
43
+ # For IDEA:
44
+ .idea/
45
+ *.iml
data/Gemfile ADDED
@@ -0,0 +1,22 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in rsense.gemspec
4
+ gemspec
5
+
6
+ group :linux do
7
+ gem 'libnotify'
8
+ end
9
+
10
+ group :darwin do
11
+ gem 'terminal-notifier-guard'
12
+ end
13
+
14
+ group :development do
15
+ gem 'minitest'
16
+ gem 'guard'
17
+ gem 'guard-minitest'
18
+ gem 'minitest-colorize'
19
+ gem 'pry'
20
+ gem "bundler", "~> 1.6"
21
+ gem "rake"
22
+ end
@@ -0,0 +1,65 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ filetree (1.0.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ celluloid (0.15.2)
10
+ timers (~> 1.1.0)
11
+ celluloid-io (0.15.0)
12
+ celluloid (>= 0.15.0)
13
+ nio4r (>= 0.5.0)
14
+ coderay (1.1.0)
15
+ ffi (1.9.3)
16
+ formatador (0.2.4)
17
+ guard (2.6.1)
18
+ formatador (>= 0.2.4)
19
+ listen (~> 2.7)
20
+ lumberjack (~> 1.0)
21
+ pry (>= 0.9.12)
22
+ thor (>= 0.18.1)
23
+ guard-minitest (2.3.0)
24
+ guard (~> 2.0)
25
+ minitest (>= 3.0)
26
+ libnotify (0.8.2)
27
+ ffi (>= 1.0.11)
28
+ listen (2.7.4)
29
+ celluloid (>= 0.15.2)
30
+ celluloid-io (>= 0.15.0)
31
+ rb-fsevent (>= 0.9.3)
32
+ rb-inotify (>= 0.9)
33
+ lumberjack (1.0.5)
34
+ method_source (0.8.2)
35
+ minitest (5.3.3)
36
+ minitest-colorize (0.0.5)
37
+ minitest (>= 2.0)
38
+ nio4r (1.0.0)
39
+ pry (0.9.12.6)
40
+ coderay (~> 1.0)
41
+ method_source (~> 0.8)
42
+ slop (~> 3.4)
43
+ rake (10.3.1)
44
+ rb-fsevent (0.9.4)
45
+ rb-inotify (0.9.4)
46
+ ffi (>= 0.5.0)
47
+ slop (3.5.0)
48
+ terminal-notifier-guard (1.5.3)
49
+ thor (0.18.1)
50
+ timers (1.1.0)
51
+
52
+ PLATFORMS
53
+ ruby
54
+
55
+ DEPENDENCIES
56
+ bundler (~> 1.6)
57
+ filetree!
58
+ guard
59
+ guard-minitest
60
+ libnotify
61
+ minitest
62
+ minitest-colorize
63
+ pry
64
+ rake
65
+ terminal-notifier-guard
@@ -0,0 +1,5 @@
1
+ guard :minitest do
2
+ watch(%r{^spec/(.*)_spec\.rb})
3
+ watch(%r{^lib/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
4
+ watch(%r{^spec/spec_helper\.rb}) { 'spec' }
5
+ end
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -1,19 +1,22 @@
1
+ lib = File.expand_path('../lib', __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
+ require 'filetree'
4
+
1
5
  Gem::Specification.new do |s|
2
6
  s.name = 'filetree'
3
- s.version = '0.0.3'
7
+ s.version = FileTree::VERSION
4
8
  s.date = '2013-05-27'
5
9
  s.summary = "A simple ruby library for manipulating filepaths as tree structures"
6
10
  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
11
  s.authors = ["Eric West"]
8
- s.email = 'nick@quaran.to'
9
- s.files = ["lib/filetree.rb",
10
- "lib/filetree/simple_tree.rb",
11
- "LICENSE",
12
- "README.md",
13
- "examples/simple_filetree.rb",
14
- "filetree.gemspec"
15
- ]
12
+ s.email = 'esw9999@gmail.com'
13
+
14
+ s.files = `git ls-files -z`.split("\x0")
15
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
16
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
17
+ s.require_paths = ["lib"]
18
+
16
19
  s.licenses = ["BSD"]
17
20
  s.homepage =
18
21
  'https://github.com/edubkendo/FileTree'
19
- end
22
+ end
@@ -1,5 +1,5 @@
1
1
  require "pathname"
2
- require "filetree/simple_tree"
2
+ require_relative "./filetree/simple_tree"
3
3
 
4
4
  class Pathname
5
5
  alias :_parent :parent
@@ -9,6 +9,8 @@ end
9
9
  class FileTree < Pathname
10
10
  include SimpleTree
11
11
 
12
+ VERSION = "1.0.0"
13
+
12
14
  attr_accessor :name, :id, :identifier
13
15
 
14
16
  def name
@@ -45,4 +47,10 @@ class FileTree < Pathname
45
47
  end
46
48
  end
47
49
 
48
- end
50
+ #
51
+ # Joins the given pathnames onto self to create a new FileTree object.
52
+ def join(*args)
53
+ FileTree.new(super(*args))
54
+ end
55
+
56
+ end
@@ -10,6 +10,7 @@
10
10
  # * The name of Jason M. Adams may not be used to endorse or promote products derived from this software without specific prior written permission.
11
11
  #
12
12
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13
+
13
14
  #
14
15
  # To use this interface, drop it in your current class with +include+.
15
16
  # You must then simply implement the +parent+ and +children+ methods.
@@ -183,4 +184,4 @@ module SimpleTree
183
184
  outp
184
185
  end
185
186
 
186
- end
187
+ end
@@ -0,0 +1,11 @@
1
+ require_relative "./spec_helper"
2
+
3
+ describe FileTree do
4
+ before do
5
+ @ft = FileTree.new("/tmp/")
6
+ end
7
+
8
+ it "returns a FileTree object after join" do
9
+ @ft.join("text.txt").class.to_s.must_match /FileTree/
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ require "minitest/autorun"
2
+
3
+ require_relative "../lib/filetree"
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.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric West
@@ -15,17 +15,24 @@ description: A simple tree structure for working with FilePath objects in ruby.
15
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
- email: nick@quaran.to
18
+ email: esw9999@gmail.com
19
19
  executables: []
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
- - lib/filetree.rb
24
- - lib/filetree/simple_tree.rb
23
+ - ".gitignore"
24
+ - Gemfile
25
+ - Gemfile.lock
26
+ - Guardfile
25
27
  - LICENSE
26
28
  - README.md
29
+ - Rakefile
27
30
  - examples/simple_filetree.rb
28
31
  - filetree.gemspec
32
+ - lib/filetree.rb
33
+ - lib/filetree/simple_tree.rb
34
+ - spec/filetree_spec.rb
35
+ - spec/spec_helper.rb
29
36
  homepage: https://github.com/edubkendo/FileTree
30
37
  licenses:
31
38
  - BSD
@@ -36,19 +43,20 @@ require_paths:
36
43
  - lib
37
44
  required_ruby_version: !ruby/object:Gem::Requirement
38
45
  requirements:
39
- - - '>='
46
+ - - ">="
40
47
  - !ruby/object:Gem::Version
41
48
  version: '0'
42
49
  required_rubygems_version: !ruby/object:Gem::Requirement
43
50
  requirements:
44
- - - '>='
51
+ - - ">="
45
52
  - !ruby/object:Gem::Version
46
53
  version: '0'
47
54
  requirements: []
48
55
  rubyforge_project:
49
- rubygems_version: 2.0.0.rc.2
56
+ rubygems_version: 2.2.2
50
57
  signing_key:
51
58
  specification_version: 4
52
59
  summary: A simple ruby library for manipulating filepaths as tree structures
53
- test_files: []
54
- has_rdoc:
60
+ test_files:
61
+ - spec/filetree_spec.rb
62
+ - spec/spec_helper.rb