lino 1.0.0 → 1.1.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: f9f6cf4b79d9262b01413a60d6f0fa83bce2f831
4
- data.tar.gz: 9f88a2482f3cb2d6bee52b173d7a59cbc2af4b76
3
+ metadata.gz: 7b36c03a77ef327bea4c389661d4d618d4d2b4d3
4
+ data.tar.gz: a85b277a63bf4b4e6a1e7df8899cd0e54fcae4e0
5
5
  SHA512:
6
- metadata.gz: df1cb5b66c36b08d91d0a4ef851b7c3eb527cba980347a0855b64d132f5f451a0c98b24f8bd03edb49fac4142f76a541976bb3c055115bf6bb799d8fe09059d8
7
- data.tar.gz: b6557f3d7038e507165a5c34af7924c00ef72ad9d71693fb5d61f34b5ff66a29edc7bbcba7ec0ea257efc3d304887c8eca840c429ffa73c5ad0cb7a03c2a672f
6
+ metadata.gz: 7d1d049455494042b8b3341a4bb14e639a1fd5939c230816e78e7fb896b9fbb4a4c9983945253dbcffbe6decbbca1de163efb309df993b51dd6a03c4c32996b1
7
+ data.tar.gz: 16925165519ae6a3521a7a940022d480cbbd9d3bb0bb6f94ca976bd9a6ff8119b5c86cdfc5f69c37198295498cdbc5781eb6588d1eb6b4ad1e2907bc667599a1
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lino (1.0.0)
4
+ lino (1.1.0)
5
5
  hamster (~> 3.0)
6
6
  open4 (~> 1.3)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- concurrent-ruby (1.0.2)
11
+ concurrent-ruby (1.0.4)
12
12
  diff-lcs (1.3)
13
13
  gem-release (0.7.4)
14
14
  hamster (3.0.0)
@@ -33,8 +33,8 @@ module Lino
33
33
  SubcommandBuilder.for_subcommand(subcommand))))
34
34
  end
35
35
 
36
- def with_option(switch, value)
37
- with(switches: @switches.add([switch, value]))
36
+ def with_option(switch, value, separator: nil)
37
+ with(switches: @switches.add({components: [switch, value], separator: separator}))
38
38
  end
39
39
 
40
40
  def with_option_separator(option_separator)
@@ -42,11 +42,11 @@ module Lino
42
42
  end
43
43
 
44
44
  def with_flag(flag)
45
- with(switches: @switches.add([flag]))
45
+ with(switches: @switches.add({components: [flag]}))
46
46
  end
47
47
 
48
48
  def with_argument(argument)
49
- with(arguments: @arguments.add([argument]))
49
+ with(arguments: @arguments.add({components: [argument]}))
50
50
  end
51
51
 
52
52
  def with_environment_variable(environment_variable, value)
@@ -18,12 +18,12 @@ module Lino
18
18
  @switches = Hamster::Vector.new(switches)
19
19
  end
20
20
 
21
- def with_option(switch, value)
22
- with(switches: @switches.add([switch, value]))
21
+ def with_option(switch, value, separator: nil)
22
+ with(switches: @switches.add({components: [switch, value], separator: separator}))
23
23
  end
24
24
 
25
25
  def with_flag(flag)
26
- with(switches: @switches.add([flag]))
26
+ with(switches: @switches.add({components: [flag]}))
27
27
  end
28
28
 
29
29
  def build(option_separator)
@@ -5,7 +5,7 @@ module Lino
5
5
  end
6
6
 
7
7
  def join_with(separator)
8
- lambda { |item| item.join(separator) }
8
+ lambda { |item| item[:components].join(item[:separator] || separator) }
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Lino
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lino
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Toby Clemson