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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e5a4316b304704261f0c53542c8f73282d5d6bf
4
- data.tar.gz: caff7bfd22800ebe917051b76f506ad25cf41d48
3
+ metadata.gz: b02c0dfdcf4ec83c6750efcb5589a09173de2293
4
+ data.tar.gz: 887ee4e75b941f2eefade7f92bab78c11164c623
5
5
  SHA512:
6
- metadata.gz: 4a0ad300ffcfb7d728a2969cff0994162e1b577fbd134825ccbbfcde7139f3774b3c9778605d981aa6dbe0e441a87f92fa37422d9a8ab6cd278f7acd98a4e60f
7
- data.tar.gz: fa104027d06dbc77863490a37bc8a9bf545fa7d27226277387d64189de9a6f912374a1a79898e30b700db31ba9547783b229e430b18894e670d1e29590091647
6
+ metadata.gz: dc1da69c1ac94657a716d7f5c36c63f34f8b06a5eaae1c0780a98c9313c6e89b626fe8d4e2dd05a4ae442137f4d8461c44979fa8325a506a8b04d07d6cbe0259
7
+ data.tar.gz: a29a1316c3f16077b66e199f66d45efc3c0fafc53c63c97cc85cc011d87aaebb74657012dd0745cc4d8641fc16c9cd1169b87ab04b4d643bd30849a65388ae3b
@@ -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
- { cmd: nil, positionals: [], config: @config }
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
- { cmd: cmd, positionals: positionals, config: @config }
75
+ ParseResults.new(cmd, positionals, @config)
74
76
  end
75
77
  end
76
78
 
@@ -1,3 +1,3 @@
1
1
  module Moister
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.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-08 00:00:00.000000000 Z
11
+ date: 2016-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler