tree.rb 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. checksums.yaml +7 -0
  2. data/.gemtest +0 -0
  3. data/LICENSE.txt +0 -0
  4. data/README.md +0 -0
  5. data/Rakefile +0 -0
  6. data/examples/d3js_layout_partition/data.js +0 -0
  7. data/examples/d3js_layout_partition/index.html +0 -0
  8. data/examples/d3js_layout_partition/run.sh +0 -0
  9. data/examples/d3js_layout_partition/style.css +0 -0
  10. data/examples/d3js_layout_treemap/data.js +0 -0
  11. data/examples/d3js_layout_treemap/index.html +0 -0
  12. data/examples/d3js_layout_treemap/run.sh +0 -0
  13. data/examples/d3js_layout_treemap/style.css +0 -0
  14. data/examples/protovis/directory_to_json_visitor.rb +0 -0
  15. data/examples/protovis/index.html +0 -0
  16. data/examples/protovis/protovis-r3.2.js +0 -0
  17. data/examples/protovis/treevisitor.js +0 -0
  18. data/examples/protovis/treevisitor.png +0 -0
  19. data/examples/ruby_examples/find_directory_without_subdirectory.rb +2 -2
  20. data/examples/ruby_examples/find_files.rb +0 -0
  21. data/examples/ruby_examples/find_orphan_xmp.rb +17 -0
  22. data/examples/ruby_examples/print_files.rb +1 -2
  23. data/ext/mkrf_conf.rb +3 -2
  24. data/lib/colors.rb +39 -0
  25. data/lib/tree_rb.rb +2 -2
  26. data/lib/tree_rb/cli/cli_json.rb +3 -3
  27. data/lib/tree_rb/cli/cli_tree.rb +0 -0
  28. data/lib/tree_rb/core/abs_node.rb +2 -2
  29. data/lib/tree_rb/core/basic_tree_node_visitor.rb +0 -0
  30. data/lib/tree_rb/core/leaf_node.rb +0 -0
  31. data/lib/tree_rb/core/tree_node.rb +0 -0
  32. data/lib/tree_rb/core/tree_node_visitor.rb +0 -0
  33. data/lib/tree_rb/exception.rb +0 -0
  34. data/lib/tree_rb/extension_digest.rb +0 -0
  35. data/lib/tree_rb/extension_numeric.rb +0 -0
  36. data/lib/tree_rb/input_plugins/file_system/dir_processor.rb +0 -0
  37. data/lib/tree_rb/input_plugins/file_system/directory_walker.rb +3 -3
  38. data/lib/tree_rb/input_plugins/html_page/dom_walker.rb +0 -0
  39. data/lib/tree_rb/output_plugins/dircat/dircat_output.rb +0 -0
  40. data/lib/tree_rb/output_plugins/dircat/dircat_visitor.rb +0 -0
  41. data/lib/tree_rb/output_plugins/dircat/entry.rb +0 -0
  42. data/lib/tree_rb/output_plugins/html/d3js_output.rb +0 -0
  43. data/lib/tree_rb/output_plugins/html/directory_to_hash2_visitor.rb +0 -0
  44. data/lib/tree_rb/output_plugins/html/erb_render.rb +0 -0
  45. data/lib/tree_rb/output_plugins/sqlite/sqlite_dir_tree_visitor.rb +0 -0
  46. data/lib/tree_rb/output_plugins/sqlite/sqlite_output.rb +0 -0
  47. data/lib/tree_rb/version.rb +1 -1
  48. data/lib/tree_rb/visitors/block_tree_node_visitor.rb +0 -0
  49. data/lib/tree_rb/visitors/callback_tree_node_visitor2.rb +2 -2
  50. data/lib/tree_rb/visitors/clone_tree_node_visitor.rb +0 -0
  51. data/lib/tree_rb/visitors/depth_tree_node_visitor.rb +0 -0
  52. data/lib/tree_rb/visitors/flat_print_tree_node_visitor.rb +0 -0
  53. data/lib/tree_rb/visitors/print_dir_tree_visitor.rb +0 -0
  54. data/lib/tree_rb/visitors/print_tree_node_visitor.rb +0 -0
  55. data/lib/tree_rb/visitors_file_system/build_dir_tree_visitor.rb +0 -0
  56. data/lib/tree_rb/visitors_file_system/directory_to_hash_visitor.rb +0 -0
  57. data/lib/tree_rb_cli.rb +0 -0
  58. data/lib/tree_visitor.rb +0 -0
  59. data/lib/treevisitor.rb +0 -0
  60. data/lib/treevisitor_cli.rb +0 -0
  61. data/spec/fixtures/html_pages/test_1.html +0 -0
  62. data/spec/fixtures/test_dir_1/.dir_with_dot/dummy.txt +0 -0
  63. data/spec/fixtures/test_dir_1/dir.1/dir.1.2/file.1.2.1 +0 -0
  64. data/spec/fixtures/test_dir_1/dir.1/file.1.1 +0 -0
  65. data/spec/fixtures/test_dir_1/dir.2/file.2.1 +0 -0
  66. data/spec/fixtures/test_dir_2/[Dsube]/sub/.gitkeep +0 -0
  67. data/spec/fixtures/test_json/1.json +0 -0
  68. data/spec/fixtures/test_orphaned_xmp/img_001.jpg +0 -0
  69. data/spec/fixtures/test_orphaned_xmp/img_001.xmp +0 -0
  70. data/spec/fixtures/test_orphaned_xmp/img_002.xmp +0 -0
  71. data/spec/spec_helper.rb +2 -0
  72. data/spec/tree_rb/cli/cli_json_spec.rb +3 -3
  73. data/spec/tree_rb/cli/cli_tree_d3js_spec.rb +3 -3
  74. data/spec/tree_rb/cli/cli_tree_digest_spec.rb +2 -2
  75. data/spec/tree_rb/cli/cli_tree_generic_spec.rb +15 -15
  76. data/spec/tree_rb/cli/cli_tree_sqlite_spec.rb +2 -2
  77. data/spec/tree_rb/core/tree_dsl_spec.rb +3 -3
  78. data/spec/tree_rb/core/tree_dsl_with_derived_class1_spec.rb +1 -1
  79. data/spec/tree_rb/core/tree_dsl_with_derived_class_spec.rb +2 -2
  80. data/spec/tree_rb/core/tree_node_paths_spec.rb +25 -25
  81. data/spec/tree_rb/core/tree_node_spec.rb +41 -41
  82. data/spec/tree_rb/core/tree_node_visitor_delegate_spec.rb +3 -3
  83. data/spec/tree_rb/core/tree_node_visitor_dsl_spec.rb +13 -13
  84. data/spec/tree_rb/extension_digest_spec.rb +6 -7
  85. data/spec/tree_rb/extension_numeric_spec.rb +3 -3
  86. data/spec/tree_rb/input_file_system/dir_processor_spec.rb +2 -2
  87. data/spec/tree_rb/input_file_system/directory_walker_conf_spec.rb +59 -59
  88. data/spec/tree_rb/input_file_system/directory_walker_run_spec.rb +73 -62
  89. data/spec/tree_rb/input_html_page/dom_walker_spec.rb +12 -3
  90. data/spec/tree_rb/visitors/block_tree_node_visitor_spec.rb +2 -2
  91. data/spec/tree_rb/visitors/callback_tree_node_visitor2_spec.rb +3 -3
  92. data/spec/tree_rb/visitors/depth_tree_node_visitor_spec.rb +2 -2
  93. data/spec/tree_rb/visitors/tree_node_visitors_spec.rb +2 -2
  94. data/tasks/rspec.rake +1 -1
  95. data/tasks/tree_rb.rake +0 -0
  96. data/tasks/yard.rake +0 -0
  97. data/tree.rb.gemspec +3 -2
  98. metadata +99 -87
  99. data/spec/fixtures/tmp/test.db +0 -0
@@ -1,62 +1,73 @@
1
- # -*- coding: utf-8 -*-
2
- require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
3
-
4
- describe DirTreeWalker do
5
-
6
- it 'should raise exception when run on inexistent directory' do
7
-
8
- dtw = DirTreeWalker.new(match: /.jpg/)
9
- root_dir = 'C:\GioProg\interzone\Dropbox\foto.altro\wallpapers\1920x1200_dell_16x10\color'
10
- dtw.run root_dir do
11
- on_leaf do |pathname|
12
- puts "- #{pathname}"
13
- end
14
- end
15
-
16
- end
17
-
18
- it 'should accumulate file names' do
19
- dir_tree_walker = DirTreeWalker.new(File.join(FIXTURES, "test_dir_1"))
20
-
21
- accumulator = []
22
- visitor = BlockTreeNodeVisitor.new { |pathname| accumulator << File.basename(pathname) }
23
- dir_tree_walker.run(visitor)
24
- accumulator.length.should == 9
25
- accumulator.sort.should == %w{ test_dir_1 dir.1 dir.1.2 file.1.2.1 file.1.1 dir.2 file.2.1 .dir_with_dot dummy.txt }.sort
26
- end
27
-
28
- it 'should accumulate file names 2' do
29
- dir_tree_walker = DirTreeWalker.new(File.join(FIXTURES, "test_dir_2"))
30
- dir_tree_walker.ignore('sub')
31
-
32
- accumulator = []
33
- visitor = BlockTreeNodeVisitor.new { |pathname| accumulator << File.basename(pathname) }
34
- dir_tree_walker.run(visitor)
35
- accumulator.length.should == 2
36
- accumulator.sort.should == %w{ [Dsube] test_dir_2 }.sort
37
- end
38
-
39
- it 'should ignore not accessible directory' do
40
-
41
- dir = File.join(FIXTURES, 'test_dir_3_with_error')
42
-
43
- f1 = File.join(dir, 'no_accessible_dir')
44
- Dir.rmdir(f1) if File.exist?(f1)
45
- Dir.mkdir(f1, 0000)
46
-
47
- f2 = File.join(dir, "accessible_dir")
48
- Dir.rmdir(f2) if File.exist?(f2)
49
- Dir.mkdir(f2)
50
-
51
- dir_tree_walker = DirTreeWalker.new(File.join(FIXTURES, "test_dir_3_with_error"))
52
- accumulator = []
53
- visitor = BlockTreeNodeVisitor.new { |pathname| accumulator << File.basename(pathname) }
54
- dir_tree_walker.run(visitor)
55
- accumulator.length.should == 2
56
- accumulator.sort.should == %w{accessible_dir test_dir_3_with_error }.sort
57
-
58
- # Dir.rmdir(f1)
59
- # Dir.rmdir(f2)
60
- end
61
-
62
- end
1
+ # -*- coding: utf-8 -*-
2
+ require File.join(File.dirname(__FILE__), '..', '..', 'spec_helper')
3
+
4
+ describe DirTreeWalker do
5
+
6
+ it 'should raise exception when run on inexistent directory' do
7
+
8
+ captured = capture_output do
9
+ dtw = DirTreeWalker.new(match: /.jpg/)
10
+ root_dir = '/not_existent/'
11
+ dtw.run root_dir do
12
+ on_leaf do |pathname|
13
+ puts "- #{pathname}"
14
+ end
15
+ end
16
+ end
17
+ expected = /No such file or directory @ dir_initialize - \/not_existent\n/
18
+ expect(captured.err).to match expected
19
+
20
+ end
21
+
22
+ it 'should accumulate file names' do
23
+
24
+ dir_tree_walker = DirTreeWalker.new(File.join(FIXTURES, "test_dir_1"))
25
+
26
+ accumulator = []
27
+ visitor = BlockTreeNodeVisitor.new { |pathname| accumulator << File.basename(pathname) }
28
+ dir_tree_walker.run(visitor)
29
+ expect(accumulator.length).to be == 9
30
+ expect(accumulator.sort).to be == %w{ test_dir_1 dir.1 dir.1.2 file.1.2.1 file.1.1 dir.2 file.2.1 .dir_with_dot dummy.txt }.sort
31
+
32
+ end
33
+
34
+ it 'should accumulate file names 2' do
35
+
36
+ dir_tree_walker = DirTreeWalker.new(File.join(FIXTURES, "test_dir_2"))
37
+ dir_tree_walker.ignore('sub')
38
+
39
+ accumulator = []
40
+ visitor = BlockTreeNodeVisitor.new { |pathname| accumulator << File.basename(pathname) }
41
+ dir_tree_walker.run(visitor)
42
+ expect(accumulator.length).to be == 2
43
+ expect(accumulator.sort).to be == %w{ [Dsube] test_dir_2 }.sort
44
+
45
+ end
46
+
47
+ it 'should ignore not accessible directory' do
48
+
49
+ dir = File.join(FIXTURES, 'test_dir_3_with_error')
50
+
51
+ f1 = File.join(dir, 'no_accessible_dir')
52
+ Dir.rmdir(f1) if File.exist?(f1)
53
+ Dir.mkdir(f1, 0000)
54
+
55
+ f2 = File.join(dir, 'accessible_dir')
56
+ Dir.rmdir(f2) if File.exist?(f2)
57
+ Dir.mkdir(f2)
58
+
59
+ dir_tree_walker = DirTreeWalker.new(File.join(FIXTURES, 'test_dir_3_with_error'))
60
+ accumulator = []
61
+ visitor = BlockTreeNodeVisitor.new { |pathname| accumulator << File.basename(pathname) }
62
+
63
+ captured = capture_output do
64
+ dir_tree_walker.run(visitor)
65
+ end
66
+ expect(accumulator.length).to be == 2
67
+ expect(accumulator.sort).to be == %w{accessible_dir test_dir_3_with_error }.sort
68
+
69
+ # Dir.rmdir(f1)
70
+ # Dir.rmdir(f2)
71
+ end
72
+
73
+ end
@@ -3,15 +3,24 @@ require File.join(File.dirname(__FILE__), "..", "..", "spec_helper")
3
3
 
4
4
  describe DomWalker do
5
5
 
6
- it "should capture all files" do
6
+ it 'should capture all files' do
7
7
  value = Nokogiri::HTML.parse(File.read(File.join(FIXTURES, "test_json", "1.json")))
8
8
  # pp value
9
9
  parent = value.search("//body").first
10
10
  # recursive_search(parent)
11
11
 
12
12
  dom_walker = DomWalker.new(parent)
13
- dom_walker.run(FlatPrintTreeNodeVisitor.new)
14
- dom_walker.run(PrintTreeNodeVisitor.new)
13
+
14
+ captured = capture_output do
15
+ dom_walker.run(FlatPrintTreeNodeVisitor.new)
16
+ end
17
+ # puts captured.out
18
+
19
+ captured = capture_output do
20
+ dom_walker.run(PrintTreeNodeVisitor.new)
21
+ end
22
+ # puts captured.out
23
+
15
24
  end
16
25
 
17
26
  end
@@ -18,8 +18,8 @@ describe "Tree Node Visitors" do
18
18
  accumulator = []
19
19
  visitor = BlockTreeNodeVisitor.new { |node| accumulator << node.content}
20
20
  @tree.accept( visitor )
21
- accumulator.length.should == 5
22
- accumulator.should == %w{ a 1 2 b 3 }
21
+ expect(accumulator.length).to be == 5
22
+ expect(accumulator).to be == %w{ a 1 2 b 3 }
23
23
  end
24
24
 
25
25
  end
@@ -26,13 +26,13 @@ describe "Tree Node Visitors" do
26
26
  }
27
27
  @tree.accept( visitor )
28
28
  new_root = visitor.root
29
- new_root.content.should == "n" + @tree.content
29
+ expect(new_root.content).to be == "n" + @tree.content
30
30
 
31
31
  accumulator = []
32
32
  visitor = BlockTreeNodeVisitor.new { |node| accumulator << node.content}
33
33
  new_root.accept( visitor )
34
- accumulator.length.should == 5
35
- accumulator.should == %w{ na n1 n2 nb n3 }
34
+ expect(accumulator.length).to be == 5
35
+ expect(accumulator).to be == %w{ na n1 n2 nb n3 }
36
36
  end
37
37
 
38
38
  end
@@ -18,11 +18,11 @@ describe "Tree Node Visitors" do
18
18
  it DepthTreeNodeVisitor do
19
19
  visitor = DepthTreeNodeVisitor.new
20
20
  @tree.accept( visitor )
21
- visitor.depth.should == 0
21
+ expect(visitor.depth).to be == 0
22
22
 
23
23
  visitor = CloneTreeNodeVisitor.new
24
24
  @tree.accept( visitor )
25
- visitor.cloned_root.nr_nodes.should == @tree.nr_nodes
25
+ expect(visitor.cloned_root.nr_nodes).to be == @tree.nr_nodes
26
26
  end
27
27
 
28
28
  end
@@ -20,8 +20,8 @@ describe TreeNodeVisitor do
20
20
  visitor.on_enter_node{ |tree_node| accumulator << tree_node.content }
21
21
  visitor.on_leaf{ |leaf_node| accumulator << leaf_node.content }
22
22
  @tree.accept( visitor )
23
- accumulator.length.should == 5
24
- accumulator.should == %w{ a 1 2 b 3 }
23
+ expect(accumulator.length).to be == 5
24
+ expect(accumulator).to be == %w{ a 1 2 b 3 }
25
25
  end
26
26
 
27
27
  end
@@ -7,7 +7,7 @@ begin
7
7
  RSpec::Core::RakeTask.new(:spec)
8
8
 
9
9
  RSpec::Core::RakeTask.new do |t|
10
- t.rspec_opts = %w(--color --format spec --backtrace)
10
+ t.rspec_opts = %w(--color --format documentation --backtrace)
11
11
  t.pattern = 'spec/**/*_spec.rb'
12
12
  end
13
13
 
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env gem build
2
2
  # -*- encoding: utf-8; mode: ruby -*-
3
- $:.push File.expand_path("../lib", __FILE__)
3
+ $:.push File.expand_path('../lib', __FILE__)
4
4
  require 'tree_rb/version'
5
5
 
6
6
  Gem::Specification.new do |gem|
@@ -55,7 +55,8 @@ An example of DSL to build tree:
55
55
  gem.add_development_dependency(%q<yard>, ['>= 0'])
56
56
  gem.add_development_dependency(%q<bundler>, ['>= 0'])
57
57
  gem.add_development_dependency(%q<rspec>, ['>= 0'])
58
-
58
+ gem.add_development_dependency(%q<rspec-collection_matchers>, ['>= 0'])
59
+
59
60
  #
60
61
  # files
61
62
  #
metadata CHANGED
@@ -1,150 +1,157 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tree.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
5
- prerelease:
4
+ version: 0.3.13
6
5
  platform: ruby
7
6
  authors:
8
7
  - Tokiro
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-08-21 00:00:00.000000000 Z
11
+ date: 2016-03-07 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: ansi
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: sqlite3
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: nokogiri
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :runtime
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rake
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: yard
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: bundler
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: rspec
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - ">="
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - ">="
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
- description: ! "(This gem was named as treevisitor)\ntree.rb is a 'clone' of tree
143
- unix command. The gem implements a library to mange tree structures.\nThe gem contains
144
- also a library to build tree with a dsl (domain specific language), and\nan implementation
145
- of visitor design pattern.\nAn example of DSL to build tree:\n<pre>\n tree = TreeNode.create
146
- do\n node \"root\" do\n leaf \"l1\"\n node \"sub\" do\n leaf
147
- \"l3\"\n end\n node \"wo leaves\"\n end\n</pre>\n"
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec-collection_matchers
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ description: |
140
+ (This gem was named as treevisitor)
141
+ tree.rb is a 'clone' of tree unix command. The gem implements a library to mange tree structures.
142
+ The gem contains also a library to build tree with a dsl (domain specific language), and
143
+ an implementation of visitor design pattern.
144
+ An example of DSL to build tree:
145
+ <pre>
146
+ tree = TreeNode.create do
147
+ node "root" do
148
+ leaf "l1"
149
+ node "sub" do
150
+ leaf "l3"
151
+ end
152
+ node "wo leaves"
153
+ end
154
+ </pre>
148
155
  email: tokiro.oyama@gmail.com
149
156
  executables:
150
157
  - rjson.rb
@@ -154,14 +161,34 @@ executables:
154
161
  extensions: []
155
162
  extra_rdoc_files: []
156
163
  files:
164
+ - ".gemtest"
157
165
  - LICENSE.txt
158
166
  - README.md
159
167
  - Rakefile
160
- - tree.rb.gemspec
161
- - .gemtest
168
+ - bin/rjson.rb
169
+ - bin/rtree
170
+ - bin/tree.rb
171
+ - bin/tree_rb
172
+ - examples/d3js_layout_partition/data.js
173
+ - examples/d3js_layout_partition/index.html
174
+ - examples/d3js_layout_partition/run.sh
175
+ - examples/d3js_layout_partition/style.css
176
+ - examples/d3js_layout_treemap/data.js
177
+ - examples/d3js_layout_treemap/index.html
178
+ - examples/d3js_layout_treemap/run.sh
179
+ - examples/d3js_layout_treemap/style.css
180
+ - examples/protovis/directory_to_json_visitor.rb
181
+ - examples/protovis/index.html
182
+ - examples/protovis/protovis-r3.2.js
183
+ - examples/protovis/treevisitor.js
184
+ - examples/protovis/treevisitor.png
185
+ - examples/ruby_examples/find_directory_without_subdirectory.rb
186
+ - examples/ruby_examples/find_files.rb
187
+ - examples/ruby_examples/find_orphan_xmp.rb
188
+ - examples/ruby_examples/print_files.rb
162
189
  - ext/mkrf_conf.rb
163
- - lib/treevisitor.rb
164
- - lib/treevisitor_cli.rb
190
+ - lib/colors.rb
191
+ - lib/tree_rb.rb
165
192
  - lib/tree_rb/cli/cli_json.rb
166
193
  - lib/tree_rb/cli/cli_tree.rb
167
194
  - lib/tree_rb/core/abs_node.rb
@@ -172,8 +199,8 @@ files:
172
199
  - lib/tree_rb/exception.rb
173
200
  - lib/tree_rb/extension_digest.rb
174
201
  - lib/tree_rb/extension_numeric.rb
175
- - lib/tree_rb/input_plugins/file_system/directory_walker.rb
176
202
  - lib/tree_rb/input_plugins/file_system/dir_processor.rb
203
+ - lib/tree_rb/input_plugins/file_system/directory_walker.rb
177
204
  - lib/tree_rb/input_plugins/html_page/dom_walker.rb
178
205
  - lib/tree_rb/output_plugins/dircat/dircat_output.rb
179
206
  - lib/tree_rb/output_plugins/dircat/dircat_visitor.rb
@@ -193,28 +220,20 @@ files:
193
220
  - lib/tree_rb/visitors/print_tree_node_visitor.rb
194
221
  - lib/tree_rb/visitors_file_system/build_dir_tree_visitor.rb
195
222
  - lib/tree_rb/visitors_file_system/directory_to_hash_visitor.rb
196
- - lib/tree_rb.rb
197
223
  - lib/tree_rb_cli.rb
198
224
  - lib/tree_visitor.rb
199
- - tasks/rspec.rake
200
- - tasks/tree_rb.rake
201
- - tasks/yard.rake
202
- - examples/d3js_layout_partition/data.js
203
- - examples/d3js_layout_partition/index.html
204
- - examples/d3js_layout_partition/run.sh
205
- - examples/d3js_layout_partition/style.css
206
- - examples/d3js_layout_treemap/data.js
207
- - examples/d3js_layout_treemap/index.html
208
- - examples/d3js_layout_treemap/run.sh
209
- - examples/d3js_layout_treemap/style.css
210
- - examples/protovis/directory_to_json_visitor.rb
211
- - examples/protovis/index.html
212
- - examples/protovis/protovis-r3.2.js
213
- - examples/protovis/treevisitor.js
214
- - examples/protovis/treevisitor.png
215
- - examples/ruby_examples/find_directory_without_subdirectory.rb
216
- - examples/ruby_examples/find_files.rb
217
- - examples/ruby_examples/print_files.rb
225
+ - lib/treevisitor.rb
226
+ - lib/treevisitor_cli.rb
227
+ - spec/fixtures/html_pages/test_1.html
228
+ - spec/fixtures/test_dir_1/.dir_with_dot/dummy.txt
229
+ - spec/fixtures/test_dir_1/dir.1/dir.1.2/file.1.2.1
230
+ - spec/fixtures/test_dir_1/dir.1/file.1.1
231
+ - spec/fixtures/test_dir_1/dir.2/file.2.1
232
+ - spec/fixtures/test_dir_2/[Dsube]/sub/.gitkeep
233
+ - spec/fixtures/test_json/1.json
234
+ - spec/fixtures/test_orphaned_xmp/img_001.jpg
235
+ - spec/fixtures/test_orphaned_xmp/img_001.xmp
236
+ - spec/fixtures/test_orphaned_xmp/img_002.xmp
218
237
  - spec/spec_helper.rb
219
238
  - spec/tree_rb/cli/cli_json_spec.rb
220
239
  - spec/tree_rb/cli/cli_tree_d3js_spec.rb
@@ -230,49 +249,40 @@ files:
230
249
  - spec/tree_rb/core/tree_node_visitor_dsl_spec.rb
231
250
  - spec/tree_rb/extension_digest_spec.rb
232
251
  - spec/tree_rb/extension_numeric_spec.rb
252
+ - spec/tree_rb/input_file_system/dir_processor_spec.rb
233
253
  - spec/tree_rb/input_file_system/directory_walker_conf_spec.rb
234
254
  - spec/tree_rb/input_file_system/directory_walker_run_spec.rb
235
- - spec/tree_rb/input_file_system/dir_processor_spec.rb
236
255
  - spec/tree_rb/input_html_page/dom_walker_spec.rb
237
256
  - spec/tree_rb/visitors/block_tree_node_visitor_spec.rb
238
257
  - spec/tree_rb/visitors/callback_tree_node_visitor2_spec.rb
239
258
  - spec/tree_rb/visitors/depth_tree_node_visitor_spec.rb
240
259
  - spec/tree_rb/visitors/tree_node_visitors_spec.rb
241
- - spec/fixtures/html_pages/test_1.html
242
- - spec/fixtures/test_dir_1/dir.1/dir.1.2/file.1.2.1
243
- - spec/fixtures/test_dir_1/dir.1/file.1.1
244
- - spec/fixtures/test_dir_1/dir.2/file.2.1
245
- - spec/fixtures/test_json/1.json
246
- - spec/fixtures/tmp/test.db
247
- - spec/fixtures/test_dir_2/[Dsube]/sub/.gitkeep
248
- - spec/fixtures/test_dir_1/.dir_with_dot/dummy.txt
249
- - bin/rjson.rb
250
- - bin/rtree
251
- - bin/tree.rb
252
- - bin/tree_rb
260
+ - tasks/rspec.rake
261
+ - tasks/tree_rb.rake
262
+ - tasks/yard.rake
263
+ - tree.rb.gemspec
253
264
  homepage: http://github.com/tokiro/tree.rb
254
265
  licenses: []
266
+ metadata: {}
255
267
  post_install_message: Thank you to have installed tree.rb, any feedback is appreciated.
256
268
  rdoc_options: []
257
269
  require_paths:
258
270
  - lib
259
271
  required_ruby_version: !ruby/object:Gem::Requirement
260
- none: false
261
272
  requirements:
262
- - - ! '>='
273
+ - - ">="
263
274
  - !ruby/object:Gem::Version
264
275
  version: '0'
265
276
  required_rubygems_version: !ruby/object:Gem::Requirement
266
- none: false
267
277
  requirements:
268
- - - ! '>='
278
+ - - ">="
269
279
  - !ruby/object:Gem::Version
270
280
  version: '0'
271
281
  requirements: []
272
282
  rubyforge_project:
273
- rubygems_version: 1.8.23
283
+ rubygems_version: 2.4.8
274
284
  signing_key:
275
- specification_version: 3
285
+ specification_version: 4
276
286
  summary: tree.rb is a 'clone' of tree unix command. The gem implements a library to
277
287
  mange tree structures.
278
288
  test_files:
@@ -291,9 +301,9 @@ test_files:
291
301
  - spec/tree_rb/core/tree_node_visitor_dsl_spec.rb
292
302
  - spec/tree_rb/extension_digest_spec.rb
293
303
  - spec/tree_rb/extension_numeric_spec.rb
304
+ - spec/tree_rb/input_file_system/dir_processor_spec.rb
294
305
  - spec/tree_rb/input_file_system/directory_walker_conf_spec.rb
295
306
  - spec/tree_rb/input_file_system/directory_walker_run_spec.rb
296
- - spec/tree_rb/input_file_system/dir_processor_spec.rb
297
307
  - spec/tree_rb/input_html_page/dom_walker_spec.rb
298
308
  - spec/tree_rb/visitors/block_tree_node_visitor_spec.rb
299
309
  - spec/tree_rb/visitors/callback_tree_node_visitor2_spec.rb
@@ -304,7 +314,9 @@ test_files:
304
314
  - spec/fixtures/test_dir_1/dir.1/file.1.1
305
315
  - spec/fixtures/test_dir_1/dir.2/file.2.1
306
316
  - spec/fixtures/test_json/1.json
307
- - spec/fixtures/tmp/test.db
317
+ - spec/fixtures/test_orphaned_xmp/img_001.jpg
318
+ - spec/fixtures/test_orphaned_xmp/img_001.xmp
319
+ - spec/fixtures/test_orphaned_xmp/img_002.xmp
308
320
  - spec/fixtures/test_dir_2/[Dsube]/sub/.gitkeep
309
321
  - spec/fixtures/test_dir_1/.dir_with_dot/dummy.txt
310
322
  has_rdoc: