argvise 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8558fd9dd7cf152d33787d2c15c101a18e28d3064e2ecfe54c77d4d488e16119
4
- data.tar.gz: 1ef9387ef135826ee91e6409b1c585ba92ee7411487a1fc6dec25a47e7268718
3
+ metadata.gz: e50f3f629a6b160ae07376bdade25677509ce0b6bb525e62b06170450bb39ea3
4
+ data.tar.gz: a86b5387f5202ce188b1b652643444f206127eb300bd49661f297faeb820253e
5
5
  SHA512:
6
- metadata.gz: d39ff4e6428417cd801f08f077a9f92b742d85bb91a2fd15cfed5bead4b432d4a999a592f93f7339334ec11b5ec4ec5d88fc719a126afc4341cf28424a2d94c0
7
- data.tar.gz: cec50ddc41188e914a4967ff97fe914e84ad620f7033823d322d25284d9f7933cf9e1f7f2186f06dfc57f3c92221d0e54828a9739c7681a3eba8f119f792062e
6
+ metadata.gz: 0c261cc3a5591aa7947f496dd60e8caa7ecf45f3b0cb85a6a22a786f0450f4763298963fbe883a7dced42618f6281051e2f6c8b3ad53f6773057cc0c4087de1b
7
+ data.tar.gz: 124e02d8d29c6b23047bad71b89afc42a78407b1d9e6ec7ca4800c90e8adeacc29989c09b7a83354db4a5b7832d6e809bff88a86950334509ea96a5bfa72502c
data/docs/Readme.md CHANGED
@@ -60,7 +60,7 @@ Argvise.build(options)
60
60
  ### Lambda Shortcut
61
61
 
62
62
  ```ruby
63
- { v: true, dir: '/path/to/dir' }.then(&hash_to_args)
63
+ { v: true, dir: '/path/to/dir' }.then(&hash_to_argv)
64
64
  # => ["-v", "--dir", "/path/to/dir"]
65
65
  ```
66
66
 
@@ -69,26 +69,26 @@ Argvise.build(options)
69
69
  ### 1. Simple Flags
70
70
 
71
71
  ```ruby
72
- { verbose: true }.then(&hash_to_args) # => ["--verbose"]
72
+ { verbose: true }.then(&hash_to_argv) # => ["--verbose"]
73
73
  ```
74
74
 
75
75
  ### 2. Boolean Values
76
76
 
77
77
  ```ruby
78
- { silent: false }.then(&hash_to_args) # => []
78
+ { silent: false }.then(&hash_to_argv) # => []
79
79
  ```
80
80
 
81
81
  ### 3. Array Values
82
82
 
83
83
  ```ruby
84
- { tag: %w[a b] }.then(&hash_to_args)
84
+ { tag: %w[a b] }.then(&hash_to_argv)
85
85
  # => ["--tag", "a", "--tag", "b"]
86
86
  ```
87
87
 
88
88
  ### 4. Hash Values
89
89
 
90
90
  ```ruby
91
- { label: { env: 'test', k2: 'v2' } }.then(&hash_to_args)
91
+ { label: { env: 'test', k2: 'v2' } }.then(&hash_to_argv)
92
92
  # => ["--label", "env=test", "--label", "k2=v2"]
93
93
  ```
94
94
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Argvise
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
data/lib/core.rb CHANGED
@@ -96,10 +96,10 @@ end
96
96
  # A convenient lambda method: converts a hash into command-line arguments
97
97
  #
98
98
  # Example:
99
- # { v: true, path: '/path/to/dir' }.then(&hash_to_args) # => ["-v", "--path", "/path/to/dir"]
99
+ # { v: true, path: '/path/to/dir' }.then(&hash_to_argv) # => ["-v", "--path", "/path/to/dir"]
100
100
  #
101
101
  # sig { returns(T.proc.params(options: Hash).returns(T::Array[String])) }
102
- def hash_to_args
102
+ def hash_to_argv
103
103
  ->(options) do
104
104
  Argvise.build(options)
105
105
  end
data/rbi/lib/argvise.rbi CHANGED
@@ -9,4 +9,4 @@ class Argvise
9
9
  end
10
10
 
11
11
  sig { returns(T.proc.params(options: Hash).returns(T::Array[String])) }
12
- def hash_to_args; end
12
+ def hash_to_argv; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argvise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - 2moe