asimov-config-cli 25.0.0.dev.4

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.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/VERSION +1 -0
  3. data/bin/asimov-config +44 -0
  4. metadata +117 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 5a482e235dbcf035ad0311838084eb5c0705878b041eaf404d332edc74b337c4
4
+ data.tar.gz: 0a4e92a54fd1e2fa7f5c65ca8504e3b1f99b05bcaa01a42238d185ee95e75ae6
5
+ SHA512:
6
+ metadata.gz: d071d1db87ce43f7709f10e1ab93a4f6c5cf443aca9c3a23d0f3e20d40f608872e17287d17cb1da5e9a575a2643619027fc4de6a15fdf02c7645181a22af4c83
7
+ data.tar.gz: 89a0f540ace4100a4005792ca7295814b255b4ed31b99d30fe56eb231fa9b244961262a85a1d9ec409e6902e9050f753386ea4753fb17c970de314b316830415
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 25.0.0.dev.4
data/bin/asimov-config ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env ruby
2
+ require "bundler/setup"
3
+
4
+ require "asimov/config"
5
+ require "dry/cli"
6
+
7
+ trap(:SIGINT) { abort "" }
8
+
9
+ module ASIMOV::Config; end
10
+
11
+ module ASIMOV::Config::CLI
12
+ extend Dry::CLI::Registry
13
+
14
+ class Help < Dry::CLI::Command
15
+ desc "Print help"
16
+
17
+ argument :command, type: :string, desc: "Command"
18
+ option :format, type: :string, default: "text", aliases: %w(-o), values: %w(text json), desc: "Format"
19
+
20
+ def call(command: nil, format:, **)
21
+ # TODO
22
+ end
23
+ end # Help
24
+
25
+ class Get < Dry::CLI::Command
26
+ desc "Print a configuration value"
27
+
28
+ argument :key, type: :string, required: true, desc: "Configuration key"
29
+
30
+ def call(key:, **)
31
+ value = case key.to_s
32
+ when "path" then ASIMOV::Config.path
33
+ when "path.constructs" then ASIMOV::Config.constructs_dir
34
+ when "path.modules" then ASIMOV::Config.modules_dir
35
+ end
36
+ puts value
37
+ end
38
+ end # Get
39
+
40
+ register :help.to_s, Help, aliases: %w()
41
+ register :get.to_s, Get, aliases: %w()
42
+ end # ASIMOV::Config::CLI
43
+
44
+ Dry::CLI.new(ASIMOV::Config::CLI).call
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: asimov-config-cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 25.0.0.dev.4
5
+ platform: ruby
6
+ authors:
7
+ - ASIMOV Protocol
8
+ bindir: bin
9
+ cert_chain: []
10
+ date: 2025-02-15 00:00:00.000000000 Z
11
+ dependencies:
12
+ - !ruby/object:Gem::Dependency
13
+ name: rake
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - ">="
17
+ - !ruby/object:Gem::Version
18
+ version: '13'
19
+ type: :development
20
+ prerelease: false
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: '13'
26
+ - !ruby/object:Gem::Dependency
27
+ name: rspec
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '3.12'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '3.12'
40
+ - !ruby/object:Gem::Dependency
41
+ name: yard
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0.9'
47
+ type: :development
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0.9'
54
+ - !ruby/object:Gem::Dependency
55
+ name: asimov-config
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '='
59
+ - !ruby/object:Gem::Version
60
+ version: 25.0.0.dev.4
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '='
66
+ - !ruby/object:Gem::Version
67
+ version: 25.0.0.dev.4
68
+ - !ruby/object:Gem::Dependency
69
+ name: dry-cli
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: '1.2'
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.2'
82
+ description: ''
83
+ email: support@asimov.so
84
+ executables:
85
+ - asimov-config
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - VERSION
90
+ - bin/asimov-config
91
+ homepage: https://cli.asimov.so
92
+ licenses:
93
+ - Unlicense
94
+ metadata:
95
+ bug_tracker_uri: https://github.com/asimov-platform/asimov-cli/issues
96
+ changelog_uri: https://github.com/asimov-platform/asimov-cli/blob/master/CHANGES.md
97
+ documentation_uri: https://github.com/asimov-platform/asimov-cli/blob/master/README.md
98
+ homepage_uri: https://cli.asimov.so
99
+ source_code_uri: https://github.com/asimov-platform/asimov-cli
100
+ rdoc_options: []
101
+ require_paths:
102
+ - lib
103
+ required_ruby_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '3.2'
108
+ required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: '0'
113
+ requirements: []
114
+ rubygems_version: 3.6.2
115
+ specification_version: 4
116
+ summary: ASIMOV Command-Line Interface (CLI)
117
+ test_files: []