ex_aequo_args 0.1.0 → 0.1.1

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: 03413f631488a7ebec1c262139bbb2789d950ac9740e32b24603e70fed594c9d
4
- data.tar.gz: aeb582c568cdc3cb8c36ae23d179cc39840ca724dacfe897dd30a3f18773c069
3
+ metadata.gz: d8287836234ce84bc4334f25d1aa3463a674c45cfb222d7a93cdbc5c0b427109
4
+ data.tar.gz: 3d180da623eb7fa58e2bbc81e2c5a81d8fbf0842fd27c57999904d80117bd0f6
5
5
  SHA512:
6
- metadata.gz: f2dbf03f8ef145f482f7e48df9e3b7b0c497f016be12f044d5453532dbacb823ee69224f78d31504b0efbc5dafea5f26c1fb812d9417ad235d606c33853f1df3
7
- data.tar.gz: 40dcac7aaa590005e80cb940dffd2654496f58d26350d4d7ac8dc997e0369d2c970ab425aa591a72c0cb18a6a57c071ec1c0405608bb6fe8f56f08cdd7156fa0
6
+ metadata.gz: 701c1a082c2877b0c12ebc7964f703cdb71825c7f601de3cc7d3b5b94b7c1a8826d29a59bff2e734deee73af86c4df0e456ab9dd3c74c2c31dc33bffc66fd140
7
+ data.tar.gz: 3f02f088b4c05a0602d75e59d797587fd057abfe009485d886f4c69a652995cf1179130394f3b199ad72715003efaa6c9f4ae177c360943a36de9a215e8a2591
data/README.md CHANGED
@@ -1,3 +1,51 @@
1
1
  # rb_ex_aequo_args
2
2
 
3
- args as I need them
3
+ args as I need them
4
+
5
+ ## How it works:
6
+
7
+ ### Install:
8
+
9
+ ```sh
10
+ gem install ex_aequo_args
11
+ ```
12
+
13
+ ### Context: Usage
14
+
15
+ Given we import the `Args` parser
16
+ ```ruby
17
+ require 'ex_aequo/args/import'
18
+ ```
19
+
20
+ And the parser
21
+ ```ruby
22
+ let(:parser) { Args.new }
23
+ ```
24
+
25
+ #### Context: Simple Usecase allow some kwds
26
+
27
+
28
+ Then we can parse arguments as a hash and an array
29
+ ```ruby
30
+ parser.parse(%w[:help verbose: 3 hello world]) => {kwds:, positionals:}
31
+
32
+ expect(kwds).to eq(help: true, verbose: '3')
33
+
34
+ expect(positionals).to eq(%w[hello world])
35
+ ```
36
+
37
+
38
+ #### Context: Kwds as OpenStruct
39
+
40
+ Then we can parse arguments as an OpenStruct and an array
41
+ ```ruby
42
+ parser.parse(%w[:debug name: robert -- :help], :ostruct) => {kwds:, positionals:}
43
+
44
+ expect(kwds.debug).to eq(true)
45
+ expect(kwds.name).to eq('robert')
46
+
47
+ expect(positionals).to eq(%w[:help])
48
+ ```
49
+
50
+
51
+ <!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
@@ -9,8 +9,6 @@ module ExAequo
9
9
  def initialize(**options, &blk)
10
10
  @options = options
11
11
  @blk = blk
12
-
13
-
14
12
  end
15
13
  end
16
14
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module ExAequo
4
4
  class Args
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
 
7
7
  end
8
8
  end
data/lib/ex_aequo/args.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'open_struct'
3
+ require 'ex_aequo/base/open_struct'
4
4
  require_relative 'args/parser'
5
5
  module ExAequo
6
6
  class Args
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ex_aequo_args
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Dober
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-02-02 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: ex_aequo_base
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 0.1.0
18
+ version: 0.3.9
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 0.1.0
25
+ version: 0.3.9
26
26
  description: The arg parser I need
27
27
  email: robert.dober@gmail.com
28
28
  executables: []
@@ -46,14 +46,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 3.4.1
49
+ version: 3.4.5
50
50
  required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
- rubygems_version: 3.6.3
56
+ rubygems_version: 3.7.2
57
57
  specification_version: 4
58
58
  summary: The arg parser I need
59
59
  test_files: []