zae 0.8.6 → 0.8.7
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 +4 -4
- data/exe/zae +84 -89
- data/lib/zae/commands.rb +2 -3
- data/lib/zae/version.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d10168e53ad2660cfa4a30100ae31d55ff6fb562a9401211e847a9c7b030a366
|
4
|
+
data.tar.gz: 23b10ad7d8e9e95fdef5a8ad6b65ca3a6f28f4cb86e49c0df3d07c35079c3d06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5fad01c2f48d902deceae0ef0886a7372928a3163c1dc7f027baba69d047b74dce73ef5b1c1a7b10087c4278ae17e461da6605780f3ee810b844e6089034e2c
|
7
|
+
data.tar.gz: 9cd056b8a8ded24bfa29752ccabb084a45945740e2ff0100c6fd664525882857b9f9fc13cfd7a851ac6946f530e905ed0c85f8a2fcbe94d09bddf270228e71bf
|
data/exe/zae
CHANGED
@@ -20,95 +20,90 @@ require_relative '../lib/zae'
|
|
20
20
|
require 'gli'
|
21
21
|
|
22
22
|
# Cli main parser
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
arg_name ''
|
107
|
-
command :upgrade do |c|
|
108
|
-
c.arg 'arguments'
|
109
|
-
c.action { commands.upgrade }
|
110
|
-
end
|
23
|
+
class Cli
|
24
|
+
extend GLI::App
|
25
|
+
|
26
|
+
# cli options
|
27
|
+
subcommand_option_handling :normal
|
28
|
+
arguments :strict
|
29
|
+
|
30
|
+
# information
|
31
|
+
program_desc Zae::DESCRIPTION
|
32
|
+
version Zae::VERSION
|
33
|
+
|
34
|
+
# commands base
|
35
|
+
commands = Zae::Commands.new
|
36
|
+
|
37
|
+
desc 'auto remove system residual packages dependencies'
|
38
|
+
arg_name 'package name'
|
39
|
+
command :clean do |c|
|
40
|
+
c.action { |_, _, args| commands.clean args }
|
41
|
+
end
|
42
|
+
|
43
|
+
desc 'install dependencies packages of package'
|
44
|
+
|
45
|
+
command :build do |c|
|
46
|
+
c.action { |_, _, args| commands.build args }
|
47
|
+
end
|
48
|
+
|
49
|
+
desc 'list all dependencies of package'
|
50
|
+
arg_name 'package name'
|
51
|
+
command :depends do |c|
|
52
|
+
c.action { |_, _, args| commands.depends args }
|
53
|
+
end
|
54
|
+
|
55
|
+
desc 'download package binary'
|
56
|
+
arg_name 'package name'
|
57
|
+
command :download do |c|
|
58
|
+
c.action { |_, _, args| commands.download args }
|
59
|
+
end
|
60
|
+
|
61
|
+
# desc 'help for one command'
|
62
|
+
# arg_name 'package name'
|
63
|
+
# command :help do |c|
|
64
|
+
# c.action { |_, _, args| commands.help args }
|
65
|
+
# end
|
66
|
+
|
67
|
+
desc 'view info about a specific package'
|
68
|
+
arg_name 'package name'
|
69
|
+
command :info do |c|
|
70
|
+
c.action { |_, _, args| commands.info args }
|
71
|
+
end
|
72
|
+
|
73
|
+
desc 'install package(s) from repositories'
|
74
|
+
arg_name 'package(s) name'
|
75
|
+
command :install do |c|
|
76
|
+
c.arg 'arguments'
|
77
|
+
c.action { |_, _, args| commands.install args }
|
78
|
+
end
|
79
|
+
|
80
|
+
desc 'list installed packages'
|
81
|
+
command :installed do |c|
|
82
|
+
c.action { commands.installed args }
|
83
|
+
end
|
84
|
+
|
85
|
+
desc 'remove one or more installed packages'
|
86
|
+
arg_name 'package(s) name'
|
87
|
+
command :remove do |c|
|
88
|
+
c.action { |_, _, args| commands.remove args }
|
89
|
+
end
|
90
|
+
|
91
|
+
desc 'search for matching packages of term'
|
92
|
+
arg_name 'package name'
|
93
|
+
command :search do |c|
|
94
|
+
c.action { |_, _, args| commands.search args }
|
95
|
+
end
|
96
|
+
|
97
|
+
desc 'update database'
|
98
|
+
command :update do |c|
|
99
|
+
c.action { commands.update }
|
100
|
+
end
|
101
|
+
|
102
|
+
desc 'upgrade packages'
|
103
|
+
command :upgrade do |c|
|
104
|
+
c.arg 'arguments'
|
105
|
+
c.action { commands.upgrade }
|
111
106
|
end
|
112
107
|
end
|
113
108
|
|
114
|
-
exit
|
109
|
+
exit Cli.run(ARGV)
|
data/lib/zae/commands.rb
CHANGED
@@ -20,8 +20,7 @@ module Zae
|
|
20
20
|
Commands.create_commands
|
21
21
|
end
|
22
22
|
|
23
|
-
ACTIONS = %i[
|
24
|
-
fix search help show info version].freeze
|
23
|
+
ACTIONS = %i[clean build depends download info install installed remove search update upgrade].freeze
|
25
24
|
|
26
25
|
# generate dynamically methods of every command
|
27
26
|
def self.create_commands
|
@@ -36,7 +35,7 @@ module Zae
|
|
36
35
|
Translate.new(...)
|
37
36
|
.to_s
|
38
37
|
.then(&lambda { |command|
|
39
|
-
puts "
|
38
|
+
puts "❯: #{command}"
|
40
39
|
system command
|
41
40
|
})
|
42
41
|
end
|
data/lib/zae/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zae
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- EAS Barbosa
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|