zae 0.8.5 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 106f2b8766bfad6808958e5a5bc5acebb6af97bbddb07d6457353bd07bcbd8ad
4
- data.tar.gz: 94fc66fa4ad7031bf803dd1b9c4e24dbf62e3f6237d5a78b3fcbf2cf5ad9cb57
3
+ metadata.gz: d10168e53ad2660cfa4a30100ae31d55ff6fb562a9401211e847a9c7b030a366
4
+ data.tar.gz: 23b10ad7d8e9e95fdef5a8ad6b65ca3a6f28f4cb86e49c0df3d07c35079c3d06
5
5
  SHA512:
6
- metadata.gz: 06badcad035690c456d41adf3f76da3b3c040b0f3c4ccd449d358f09c667b2990da2e12967af62bfc1c29de479463907ced531ae9cbf74efc674fee7b3a26006
7
- data.tar.gz: 9e1415c9eadfe80df5f18698197065a4ae7eebd5f944b2758face0a43d6a73bd71241b43ab69e5679e63e47c4083b0b2b3e11cf3b92ea8816d8e6864a92b00bb
6
+ metadata.gz: f5fad01c2f48d902deceae0ef0886a7372928a3163c1dc7f027baba69d047b74dce73ef5b1c1a7b10087c4278ae17e461da6605780f3ee810b844e6089034e2c
7
+ data.tar.gz: 9cd056b8a8ded24bfa29752ccabb084a45945740e2ff0100c6fd664525882857b9f9fc13cfd7a851ac6946f530e905ed0c85f8a2fcbe94d09bddf270228e71bf
data/exe/zae CHANGED
@@ -20,89 +20,90 @@ require_relative '../lib/zae'
20
20
  require 'gli'
21
21
 
22
22
  # Cli main parser
23
- module Zae
24
- class Cli
25
- extend GLI::App
26
-
27
- # cli options
28
- subcommand_option_handling :normal
29
- arguments :strict
30
-
31
- # information
32
- program_desc 'One runner to handle them, package managers, all.'
33
- version VERSION
34
-
35
- # commands base
36
- commands = Commands.new
37
-
38
- desc 'install package(s) from repositories'
39
- arg_name 'package(s) name'
40
- command :install do |c|
41
- c.arg 'arguments'
42
- c.action { |_, _, args| commands.install args }
43
- end
44
-
45
- desc 'remove one or more installed packages'
46
- arg_name 'package(s) name'
47
- command :remove do |c|
48
- c.action { |_, _, args| commands.remove args }
49
- end
50
-
51
- desc 'search for matching packages of term'
52
- arg_name 'package name'
53
- command :search do |c|
54
- c.action { |_, _, args| commands.search args }
55
- end
56
-
57
- desc 'update database'
58
- arg_name ''
59
- command :update do |c|
60
- c.action { commands.update }
61
- end
62
-
63
- desc 'upgrade packages'
64
- arg_name ''
65
- command :upgrade do |c|
66
- c.arg 'arguments'
67
- c.action { commands.upgrade }
68
- end
69
-
70
- desc 'auto remove system residual packages dependencies'
71
- arg_name ''
72
- command :autoremove do |c|
73
- c.action { |_, _, args| commands.autoremove args }
74
- end
75
-
76
- desc 'download package binary'
77
- arg_name 'package name'
78
- command :download do |c|
79
- c.action { |_, _, args| commands.download args }
80
- end
81
-
82
- desc 'list installed packages'
83
- arg_name ''
84
- command :installed do |c|
85
- c.action { |_, _, args| commands.installed args }
86
- end
87
-
88
- desc 'view info about a specific package'
89
- arg_name 'package name'
90
- command :info do |c|
91
- c.action { |_, _, args| commands.info args }
92
- end
93
-
94
- desc 'fix system package manager issues'
95
- arg_name 'packages'
96
- command :fix do |c|
97
- c.action { |_, _, args| commands.fix args }
98
- end
99
-
100
- desc 'package manager version'
101
- arg_name ''
102
- command :fix do |c|
103
- c.action { commands.version }
104
- 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 }
105
106
  end
106
107
  end
107
108
 
108
- exit Zae::Cli.run(ARGV)
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[update upgrade deps autoremove depends install installed remove
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 "command: #{command}"
38
+ puts "❯: #{command}"
40
39
  system command
41
40
  })
42
41
  end
data/lib/zae/version.rb CHANGED
@@ -14,5 +14,6 @@
14
14
  # along with Zae. If not, see <https://www.gnu.org/licenses/>.
15
15
 
16
16
  module Zae
17
- VERSION = '0.8.5'
17
+ VERSION = '0.8.7'
18
+ DESCRIPTION = 'One runner to handle them, package managers, all.'
18
19
  end
data/lib/zae.rb CHANGED
@@ -1,5 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Zae is free software: you can redistribute it and/or modify
4
+ # it under the terms of the GNU General Public License as published by
5
+ # the Free Software Foundation, either version 3 of the License, or
6
+ # (at your option) any later version.
7
+ #
8
+ # Zae is distributed in the hope that it will be useful,
9
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
+ # GNU General Public License for more details.
12
+ #
13
+ # You should have received a copy of the GNU General Public License
14
+ # along with Zae. If not, see <https://www.gnu.org/licenses/>.
15
+
3
16
  require_relative 'zae/commands'
4
17
  require_relative 'zae/permission'
5
18
  require_relative 'zae/translate'
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.5
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-03-30 00:00:00.000000000 Z
11
+ date: 2023-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli