dircat 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/VERSION.yml +1 -1
- data/bin/dircat +7 -0
- data/dircat.gemspec +18 -9
- data/lib/dircat/cat.rb +1 -0
- data/lib/dircat/cli/cli_dircat.rb +29 -0
- data/lib/dircat/cli/command_build.rb +201 -0
- data/lib/dircat/cli/command_diff.rb +158 -0
- data/lib/dircat/cli/command_query.rb +138 -0
- data/lib/dircat/entry.rb +1 -0
- data/lib/dircat/extension_md5.rb +3 -2
- data/lib/dircat/extension_numeric.rb +1 -0
- data/lib/dircat/report.rb +1 -0
- data/lib/dircat.rb +11 -4
- data/spec/dircat/cli/cli_dircat_spec.rb +30 -0
- data/spec/dircat/cli/command_build_spec.rb +49 -0
- data/spec/dircat/cli/command_diff_spec.rb +13 -0
- data/spec/dircat/cli/command_query_spec.rb +26 -0
- data/spec/dircat/md5_spec.rb +1 -1
- metadata +55 -28
- data/bin/dircat-build +0 -6
- data/bin/dircat-diff +0 -6
- data/bin/dircat-query +0 -6
- data/lib/dircat/cli/dircat_build.rb +0 -114
- data/lib/dircat/cli/dircat_diff.rb +0 -85
- data/lib/dircat/cli/dircat_query.rb +0 -69
- data/spec/dircat/cli/dircat_build_spec.rb +0 -59
- data/spec/dircat/cli/dircat_query_diff_spec.rb +0 -26
- data/spec/dircat/cli/dircat_query_spec.rb +0 -35
@@ -1,35 +0,0 @@
|
|
1
|
-
require File.expand_path( File.join(File.dirname(__FILE__), "..", "..", "spec_helper") )
|
2
|
-
|
3
|
-
describe DirCatQuery do
|
4
|
-
|
5
|
-
before do
|
6
|
-
@testdata_dirname = TEST_DIR
|
7
|
-
@certified_output_dirname = File.join( @testdata_dirname, "certified_output" )
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should accept -h (help) option" do
|
11
|
-
out = with_stdout_captured do
|
12
|
-
args = %w{-h}
|
13
|
-
DirCatQuery.new.parse_args(args)
|
14
|
-
end
|
15
|
-
out.should match /Usage:/
|
16
|
-
end
|
17
|
-
|
18
|
-
it "should accept --version option" do
|
19
|
-
out = with_stdout_captured do
|
20
|
-
args = %w{--version}
|
21
|
-
DirCatQuery.new.parse_args(args)
|
22
|
-
end
|
23
|
-
out.should match /#{DirCat::version}/
|
24
|
-
end
|
25
|
-
|
26
|
-
it "should show catalogs info" do
|
27
|
-
cat_filename = File.join( @certified_output_dirname, "dircat1.yaml" )
|
28
|
-
out = with_stdout_captured do
|
29
|
-
args = "#{cat_filename}"
|
30
|
-
DirCatQuery.new.parse_args(args.split)
|
31
|
-
end
|
32
|
-
out.should match /file: 2/
|
33
|
-
out.should match /Bytes: 4/
|
34
|
-
end
|
35
|
-
end
|