sickle 0.5.1 → 0.5.2

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: 00debd3cc7b7f30f2b93827acf9f2a99326d33a6
4
- data.tar.gz: 23b4aae6aaf7d49f0b7e904c3da149d4c99fc600
3
+ metadata.gz: 1395831ed21bc25480ccea83d34c99251520e03a
4
+ data.tar.gz: f7e7bb6cc6aed1be1818a988fb7ce75c1e297fbc
5
5
  SHA512:
6
- metadata.gz: 5e5bba1d613fd703374564c5429529fc709bbee9b2f0db4c08935cc8241fe7fce1ece26b1b60af28999bd4775f0535e14e67d75e7fd4bf17fa604557584974b1
7
- data.tar.gz: 9222f26977e84917bcb8b85dff642dd201ecfb0fe0f46ae88fa023adb565929a2f23d59b6b72ef17d6c81af49e1f54713bbcc7f7ab2232f1fbc2f8f0264f77ab
6
+ metadata.gz: 1285b1aefad50bd5902610370c3f0bb2fa873c46f54f4bf1f67e65b274394f629fc9fe690c18cc22db30b8dfb5a9a8fb266f25fd2f8716e036187e85d18296a8
7
+ data.tar.gz: 4f1a96bfeb568e42358996e139d98c8b7f5952bded27d584aae459bc3643a28439754d807a9b4dab68627c6d8ecca148522fc083f9295487c6ba0b3c59b5c770
data/lib/sickle.rb CHANGED
@@ -257,6 +257,7 @@ module Sickle
257
257
  puts "\e[31mCommand '#{command_name}' not found\e[0m"
258
258
  puts
259
259
  run(["help"])
260
+ exit 127
260
261
  end
261
262
  else
262
263
  run(["help"])
@@ -1,3 +1,3 @@
1
1
  module Sickle
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
data/spec/main_spec.rb CHANGED
@@ -71,4 +71,16 @@ describe Sickle do
71
71
  App.run(%w(test-option --null foo)).must_equal ["test_option", "foo"]
72
72
  end
73
73
  end
74
+
75
+ describe "Exit code" do
76
+ it "should be zero for successful command" do
77
+ system "spec/test_run.rb task1 a b c"
78
+ $?.must_equal 0
79
+ end
80
+
81
+ it "should be 127 if command was not found" do
82
+ system "spec/test_run.rb i-do-not-exist"
83
+ $?.wont_equal 127
84
+ end
85
+ end
74
86
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sickle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tymon Tobolski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-03 00:00:00.000000000 Z
11
+ date: 2014-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubyforge_project:
95
- rubygems_version: 2.0.0
95
+ rubygems_version: 2.1.11
96
96
  signing_key:
97
97
  specification_version: 4
98
98
  summary: Sickle is dead simple library for building complex command line tools.
@@ -100,4 +100,3 @@ test_files:
100
100
  - spec/main_spec.rb
101
101
  - spec/test_app.rb
102
102
  - spec/test_run.rb
103
- has_rdoc: