dircat 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 7
4
+ :patch: 8
5
5
  :build:
data/dircat.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dircat}
8
- s.version = "0.1.7"
8
+ s.version = "0.1.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tokiro"]
12
- s.date = %q{2011-02-01}
12
+ s.date = %q{2011-02-08}
13
13
  s.default_executable = %q{dircat}
14
14
  s.description = %q{
15
15
  command line utilites to manage catalogs of directory
@@ -42,7 +42,7 @@ Gem::Specification.new do |s|
42
42
  ]
43
43
  s.homepage = %q{http://github.com/tokiro/dircat}
44
44
  s.require_paths = ["lib"]
45
- s.rubygems_version = %q{1.3.7}
45
+ s.rubygems_version = %q{1.5.0}
46
46
  s.summary = %q{command line utilites to manage catalogs of directory}
47
47
  s.test_files = [
48
48
  "spec/dircat/cat_spec.rb",
@@ -66,20 +66,19 @@ Gem::Specification.new do |s|
66
66
  ]
67
67
 
68
68
  if s.respond_to? :specification_version then
69
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
70
69
  s.specification_version = 3
71
70
 
72
71
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
73
- s.add_runtime_dependency(%q<treevisitor>, ["= 0.2.0"])
74
- s.add_runtime_dependency(%q<optparse-command>, ["= 0.1.1"])
72
+ s.add_runtime_dependency(%q<treevisitor>, ["= 0.2.1"])
73
+ s.add_runtime_dependency(%q<optparse-command>, ["= 0.1.4"])
75
74
  s.add_development_dependency(%q<jeweler>, [">= 0"])
76
75
  s.add_development_dependency(%q<rake>, [">= 0"])
77
76
  s.add_development_dependency(%q<yard>, [">= 0"])
78
77
  s.add_development_dependency(%q<bundler>, [">= 0"])
79
78
  s.add_development_dependency(%q<rspec>, [">= 0"])
80
79
  else
81
- s.add_dependency(%q<treevisitor>, ["= 0.2.0"])
82
- s.add_dependency(%q<optparse-command>, ["= 0.1.1"])
80
+ s.add_dependency(%q<treevisitor>, ["= 0.2.1"])
81
+ s.add_dependency(%q<optparse-command>, ["= 0.1.4"])
83
82
  s.add_dependency(%q<jeweler>, [">= 0"])
84
83
  s.add_dependency(%q<rake>, [">= 0"])
85
84
  s.add_dependency(%q<yard>, [">= 0"])
@@ -87,8 +86,8 @@ Gem::Specification.new do |s|
87
86
  s.add_dependency(%q<rspec>, [">= 0"])
88
87
  end
89
88
  else
90
- s.add_dependency(%q<treevisitor>, ["= 0.2.0"])
91
- s.add_dependency(%q<optparse-command>, ["= 0.1.1"])
89
+ s.add_dependency(%q<treevisitor>, ["= 0.2.1"])
90
+ s.add_dependency(%q<optparse-command>, ["= 0.1.4"])
92
91
  s.add_dependency(%q<jeweler>, [">= 0"])
93
92
  s.add_dependency(%q<rake>, [">= 0"])
94
93
  s.add_dependency(%q<yard>, [">= 0"])
@@ -38,7 +38,7 @@ class CommandBuild < OptParseCommand::CliCommand
38
38
  parser
39
39
  end
40
40
 
41
- def exec(options, rest)
41
+ def exec(main, options, rest)
42
42
  if rest.length < 1
43
43
  $stderr.puts "directory (from which build catalog) is missing"
44
44
  $stderr.puts "-h to print help"
@@ -14,7 +14,7 @@ class CommandQuery < OptParseCommand::CliCommand
14
14
  "Usage: query [options] <catalog> [<method>]"
15
15
  end
16
16
 
17
- def exec(options, rest)
17
+ def exec(main, options, rest)
18
18
  if rest.length < 1
19
19
  puts "missing catalog!"
20
20
  puts "-h to print help"
data/lib/dircat.rb CHANGED
@@ -12,10 +12,10 @@ require 'pp'
12
12
  #
13
13
  # rubygems
14
14
  #
15
- gem "optparse-command", "0.1.1"
15
+ gem "optparse-command", "0.1.4"
16
16
  require 'optparse-command'
17
17
 
18
- gem "treevisitor", "0.2.0"
18
+ gem "treevisitor", "0.2.1"
19
19
  require 'treevisitor'
20
20
 
21
21
  #
@@ -31,7 +31,7 @@ describe CommandBuild do
31
31
  expect_filename = File.join(@certified_output_dirname, "dircat1.yaml")
32
32
  result_filename = File.join(@tmp_output_dirname, "dircat1.yaml")
33
33
 
34
- out = with_stdout_captured do
34
+ capture_out do
35
35
  args = "build -f -o #{result_filename} #{@dir1_dirname}"
36
36
  CliDirCat.new.parse_and_execute(args.split)
37
37
  end
data/spec/spec_helper.rb CHANGED
@@ -7,12 +7,24 @@ $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
7
7
  require 'dircat'
8
8
  include DirCat
9
9
 
10
- TEST_DIR = File.expand_path( File.join( File.dirname(__FILE__), "fixtures" ) )
10
+ TEST_DIR = File.expand_path(File.join(File.dirname(__FILE__), "fixtures"))
11
+
12
+ def capture_out
13
+ old_stdout, old_stderr = $stdout, $stderr
14
+ out, err = StringIO.new, StringIO.new
15
+ $stdout, $stderr = out, err
16
+ begin
17
+ yield
18
+ ensure
19
+ $stdout, $stderr = old_stdout, old_stderr
20
+ end
21
+ OpenStruct.new(:out => out.string, :err => err.string)
22
+ end
11
23
 
12
24
  def with_stdout_captured
13
25
  old_stdout = $stdout
14
- out = StringIO.new
15
- $stdout = out
26
+ out = StringIO.new
27
+ $stdout = out
16
28
  begin
17
29
  yield
18
30
  ensure
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dircat
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 7
9
- version: 0.1.7
4
+ prerelease:
5
+ version: 0.1.8
10
6
  platform: ruby
11
7
  authors:
12
8
  - Tokiro
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-02-01 00:00:00 +01:00
13
+ date: 2011-02-08 00:00:00 +01:00
18
14
  default_executable: dircat
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -24,11 +20,7 @@ dependencies:
24
20
  requirements:
25
21
  - - "="
26
22
  - !ruby/object:Gem::Version
27
- segments:
28
- - 0
29
- - 2
30
- - 0
31
- version: 0.2.0
23
+ version: 0.2.1
32
24
  type: :runtime
33
25
  prerelease: false
34
26
  version_requirements: *id001
@@ -39,11 +31,7 @@ dependencies:
39
31
  requirements:
40
32
  - - "="
41
33
  - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- - 1
45
- - 1
46
- version: 0.1.1
34
+ version: 0.1.4
47
35
  type: :runtime
48
36
  prerelease: false
49
37
  version_requirements: *id002
@@ -54,8 +42,6 @@ dependencies:
54
42
  requirements:
55
43
  - - ">="
56
44
  - !ruby/object:Gem::Version
57
- segments:
58
- - 0
59
45
  version: "0"
60
46
  type: :development
61
47
  prerelease: false
@@ -67,8 +53,6 @@ dependencies:
67
53
  requirements:
68
54
  - - ">="
69
55
  - !ruby/object:Gem::Version
70
- segments:
71
- - 0
72
56
  version: "0"
73
57
  type: :development
74
58
  prerelease: false
@@ -80,8 +64,6 @@ dependencies:
80
64
  requirements:
81
65
  - - ">="
82
66
  - !ruby/object:Gem::Version
83
- segments:
84
- - 0
85
67
  version: "0"
86
68
  type: :development
87
69
  prerelease: false
@@ -93,8 +75,6 @@ dependencies:
93
75
  requirements:
94
76
  - - ">="
95
77
  - !ruby/object:Gem::Version
96
- segments:
97
- - 0
98
78
  version: "0"
99
79
  type: :development
100
80
  prerelease: false
@@ -106,8 +86,6 @@ dependencies:
106
86
  requirements:
107
87
  - - ">="
108
88
  - !ruby/object:Gem::Version
109
- segments:
110
- - 0
111
89
  version: "0"
112
90
  type: :development
113
91
  prerelease: false
@@ -173,21 +151,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
173
151
  requirements:
174
152
  - - ">="
175
153
  - !ruby/object:Gem::Version
176
- segments:
177
- - 0
178
154
  version: "0"
179
155
  required_rubygems_version: !ruby/object:Gem::Requirement
180
156
  none: false
181
157
  requirements:
182
158
  - - ">="
183
159
  - !ruby/object:Gem::Version
184
- segments:
185
- - 0
186
160
  version: "0"
187
161
  requirements: []
188
162
 
189
163
  rubyforge_project:
190
- rubygems_version: 1.3.7
164
+ rubygems_version: 1.5.0
191
165
  signing_key:
192
166
  specification_version: 3
193
167
  summary: command line utilites to manage catalogs of directory