dynport_tools 0.2.0 → 0.2.1

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.
data/.rbenv-version ADDED
@@ -0,0 +1 @@
1
+ ree-1.8.7-2011.03
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dynport_tools}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tobias Schwab"]
12
- s.date = %q{2011-08-16}
12
+ s.date = %q{2011-08-17}
13
13
  s.description = %q{Collection of various tools}
14
14
  s.email = %q{tobias.schwab@dynport.de}
15
15
  s.executables = ["xmldiff", "redis_dumper"]
@@ -19,6 +19,7 @@ Gem::Specification.new do |s|
19
19
  ]
20
20
  s.files = [
21
21
  ".document",
22
+ ".rbenv-version",
22
23
  ".rspec",
23
24
  "Gemfile",
24
25
  "Gemfile.lock",
@@ -43,9 +43,11 @@ class DynportTools::RedisDumper
43
43
  dump_hash(zset_to_hash(key))
44
44
  else
45
45
  puts "only zsets are supported for now"
46
+ exit(1)
46
47
  end
47
48
  else
48
49
  print_usage
50
+ exit(1)
49
51
  end
50
52
  end
51
53
 
@@ -53,17 +53,20 @@ describe "DynportTools::RedisDumper" do
53
53
  hash = { "a" => 1 }
54
54
  dumper.should_receive(:zset_to_hash).and_return(hash)
55
55
  dumper.should_receive(:dump_hash).with(hash)
56
+ dumper.should_not_receive(:exit)
56
57
  dumper.run_from_args(["host", "port", "key"])
57
58
  end
58
59
 
59
60
  it "prints a message when type is not zset" do
60
61
  redis.should_receive(:type).with("key").and_return "hash"
62
+ dumper.should_receive(:exit).with(1)
61
63
  dumper.should_receive(:puts).with("only zsets are supported for now")
62
64
  dumper.run_from_args(["host", "port", "key"])
63
65
  end
64
66
 
65
67
  it "calls print_usage when not enough parameters" do
66
68
  dumper.should_receive(:print_usage)
69
+ dumper.should_receive(:exit).with(1)
67
70
  dumper.run_from_args(["host", "port"])
68
71
  end
69
72
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynport_tools
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tobias Schwab
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-16 00:00:00 +02:00
18
+ date: 2011-08-17 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -178,6 +178,7 @@ extra_rdoc_files:
178
178
  - README.rdoc
179
179
  files:
180
180
  - .document
181
+ - .rbenv-version
181
182
  - .rspec
182
183
  - Gemfile
183
184
  - Gemfile.lock