moister 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/moister.rb +4 -2
- data/lib/moister/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b02c0dfdcf4ec83c6750efcb5589a09173de2293
|
4
|
+
data.tar.gz: 887ee4e75b941f2eefade7f92bab78c11164c623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc1da69c1ac94657a716d7f5c36c63f34f8b06a5eaae1c0780a98c9313c6e89b626fe8d4e2dd05a4ae442137f4d8461c44979fa8325a506a8b04d07d6cbe0259
|
7
|
+
data.tar.gz: a29a1316c3f16077b66e199f66d45efc3c0fafc53c63c97cc85cc011d87aaebb74657012dd0745cc4d8641fc16c9cd1169b87ab04b4d643bd30849a65388ae3b
|
data/lib/moister.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require_relative 'moister/version'
|
2
2
|
|
3
3
|
module Moister
|
4
|
+
ParseResults = Struct.new :command, :positionals, :config
|
5
|
+
|
4
6
|
class OptionParserExtra < OptionParser
|
5
7
|
def initialize(config = {})
|
6
8
|
@config = config
|
@@ -56,7 +58,7 @@ module Moister
|
|
56
58
|
apply_for_all self
|
57
59
|
order! args
|
58
60
|
if args.empty?
|
59
|
-
|
61
|
+
ParseResults.new(nil, [], @config)
|
60
62
|
else
|
61
63
|
cmd = args.first
|
62
64
|
subcmd_meta = @subcommands[cmd]
|
@@ -70,7 +72,7 @@ module Moister
|
|
70
72
|
parse_cmdline.call(subop) if parse_cmdline
|
71
73
|
end.order! args
|
72
74
|
|
73
|
-
|
75
|
+
ParseResults.new(cmd, positionals, @config)
|
74
76
|
end
|
75
77
|
end
|
76
78
|
|
data/lib/moister/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: moister
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Pike
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|