sickle 0.4.0 → 0.5.1

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: b2f5904d330566cc14a1192320f794ea44fbbe0e
4
- data.tar.gz: a923b565c28675350b0a39ec8c18a9c99d218d83
3
+ metadata.gz: 00debd3cc7b7f30f2b93827acf9f2a99326d33a6
4
+ data.tar.gz: 23b4aae6aaf7d49f0b7e904c3da149d4c99fc600
5
5
  SHA512:
6
- metadata.gz: 6f0fab73721dfde86f4998b092e9258bf4f5c74f4e77de1dc8946d069a9591d614b3f21c0f9ea2be394c6170cdaafabe1b3112075a3f6c53445f0b05756ee190
7
- data.tar.gz: 457d31092578700dde68a3caa60ba193985998914308edec4630152050e6d73b404b1d43b52be8a5036dd26c662fb2347f61bbddb7520a16a7468a013c6c7784
6
+ metadata.gz: 5e5bba1d613fd703374564c5429529fc709bbee9b2f0db4c08935cc8241fe7fce1ece26b1b60af28999bd4775f0535e14e67d75e7fd4bf17fa604557584974b1
7
+ data.tar.gz: 9222f26977e84917bcb8b85dff642dd201ecfb0fe0f46ae88fa023adb565929a2f23d59b6b72ef17d6c81af49e1f54713bbcc7f7ab2232f1fbc2f8f0264f77ab
data/.travis.yml CHANGED
@@ -5,5 +5,4 @@ rvm:
5
5
  - 2.0.0
6
6
  - jruby-19mode
7
7
  - rbx-19mode
8
- - ruby-head
9
8
  - jruby-head
data/lib/sickle.rb CHANGED
@@ -146,7 +146,7 @@ module Sickle
146
146
  r == :req ? p.upcase : "[#{p.upcase}]"
147
147
  end
148
148
 
149
- ["#{name} #{params.join(" ")}", command]
149
+ ["#{name.gsub("_", "-")} #{params.join(" ")}", command]
150
150
  end
151
151
 
152
152
  def __display_help
@@ -230,6 +230,8 @@ module Sickle
230
230
  # puts "ARGV: #{argv.inspect}"
231
231
 
232
232
  if command_name = argv.shift
233
+ command_name = command_name.gsub("-", "_")
234
+
233
235
  if command = __commands[command_name]
234
236
  all = __global_options.values + command.options.values
235
237
 
@@ -1,3 +1,3 @@
1
1
  module Sickle
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.1"
3
3
  end
data/spec/main_spec.rb CHANGED
@@ -67,8 +67,8 @@ describe Sickle do
67
67
  end
68
68
 
69
69
  it "option with nil default" do
70
- App.run(%w(test_option)).must_equal ["test_option", nil]
71
- App.run(%w(test_option --null foo)).must_equal ["test_option", "foo"]
70
+ App.run(%w(test-option)).must_equal ["test_option", nil]
71
+ App.run(%w(test-option --null foo)).must_equal ["test_option", "foo"]
72
72
  end
73
73
  end
74
74
  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.4.0
4
+ version: 0.5.1
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-02 00:00:00.000000000 Z
11
+ date: 2013-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler