magister_cli 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +7 -0
  2. data/bin/magister +3 -0
  3. data/lib/magister_cli.rb +35 -0
  4. metadata +46 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: c679885476aafdf7a4ac673994d31396be72982161a554aebd78ed66b13814ab
4
+ data.tar.gz: d762dad23dcfb491ef7295241f663f6da9b310bf441e92f3db7a73043e12c5ce
5
+ SHA512:
6
+ metadata.gz: 89799db254ad526cfc7f05370809aa3923d83d9e1aca5f57d3061d18a11ed18f9472b6d5c9c8f32d54a063f68578a6b4dcd1d599189507f45f84658203a74395
7
+ data.tar.gz: bbb0d7a439c9d2d37d64222dfaa7eed37fbe92c00a621bb18a069bde8e652971e1d71a392753d5445b481c8424f2e37ed210be42b81314098cfbc190d052bd0e
data/bin/magister ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ require 'magister_cli'
3
+ MagisterCLI::main
@@ -0,0 +1,35 @@
1
+ # This Source Code Form is subject to the terms of the Mozilla Public
2
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
3
+ # file, You can obtain one at https://mozilla.org/MPL/2.0/.
4
+ require 'magister'
5
+
6
+ $magcli_runmode = "normal"
7
+
8
+ module MagisterCLI
9
+ extend self
10
+
11
+ def main
12
+ if ARGV.include?("-r") || ARGV.include?("--run")
13
+ $magcli_runmode = "inline"
14
+ args = ARGV
15
+ while args.include?("-r") do
16
+ i = args.find_index("-r")
17
+ args.delete_at(i)
18
+ end
19
+
20
+ while args.include?("--run") do
21
+ i = args.find_index("--run")
22
+ args.delete_at(i)
23
+ end
24
+ # TODO: tokenize command
25
+ # TODO: parse command
26
+ # TODO: run command
27
+ return
28
+ end
29
+
30
+ # TODO: ask for command
31
+ # TOOD: tokenize command
32
+ # TODO: parse command
33
+ # TODO: run command
34
+ end
35
+ end
metadata ADDED
@@ -0,0 +1,46 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: magister_cli
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Riley0122
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2024-02-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: The CLI for the 'magister' gem
14
+ email: contact@riley0122.dev
15
+ executables:
16
+ - magister
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - bin/magister
21
+ - lib/magister_cli.rb
22
+ homepage: https://github.com/riley0122/rubymag/cli#readme
23
+ licenses:
24
+ - MPL-2.0
25
+ metadata:
26
+ source_code_uri: https://github.com/riley0122/rubymag/cli
27
+ post_install_message:
28
+ rdoc_options: []
29
+ require_paths:
30
+ - lib
31
+ required_ruby_version: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
+ required_rubygems_version: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ requirements: []
42
+ rubygems_version: 3.4.10
43
+ signing_key:
44
+ specification_version: 4
45
+ summary: Cli for the magister API wrapper
46
+ test_files: []