zae 0.8.6 → 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: c4bcde79d7d06a93298f6fe7cd6e34857db41d900d0e3bc66ec619a36b9760a4
4
- data.tar.gz: 2c6051c44e368ea608fffec3c3997dc122f64a2e0a5fbb9121008d169394b6e3
3
+ metadata.gz: d10168e53ad2660cfa4a30100ae31d55ff6fb562a9401211e847a9c7b030a366
4
+ data.tar.gz: 23b10ad7d8e9e95fdef5a8ad6b65ca3a6f28f4cb86e49c0df3d07c35079c3d06
5
5
  SHA512:
6
- metadata.gz: 2870bdfdafab9c1810ce79648c653f4032779b1087f6d9f6bd5646f1ea1a6125370f793f71be26bec0b71a29141db1c15c8f0196225413acf16e86911c9447f0
7
- data.tar.gz: 62e5128d832d1b7cd19a07e5ba9910cacd2c1bc986dae26f62221d25ebbe774148b5b0f918bc10dabaf98a14d806c476d216890fb8d7117f0f3025ea1b4b8f77
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
- 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 'auto remove system residual packages dependencies'
39
- arg_name ''
40
- command :clean do |c|
41
- c.action { |_, _, args| commands.clean args }
42
- end
43
-
44
- desc 'install dependencies packages of package'
45
- arg_name ''
46
- command :build do |c|
47
- c.action { |_, _, args| commands.build args }
48
- end
49
-
50
- desc 'list all dependencies of package'
51
- arg_name ''
52
- command :depends do |c|
53
- c.action { |_, _, args| commands.depends args }
54
- end
55
-
56
- desc 'download package binary'
57
- arg_name 'package name'
58
- command :download do |c|
59
- c.action { |_, _, args| commands.download args }
60
- end
61
-
62
- desc 'help for one command'
63
- arg_name 'package name'
64
- command :help do |c|
65
- c.action { |_, _, args| commands.help args }
66
- end
67
-
68
- desc 'view info about a specific package'
69
- arg_name 'package name'
70
- command :info do |c|
71
- c.action { |_, _, args| commands.info args }
72
- end
73
-
74
- desc 'install package(s) from repositories'
75
- arg_name 'package(s) name'
76
- command :install do |c|
77
- c.arg 'arguments'
78
- c.action { |_, _, args| commands.install args }
79
- end
80
-
81
- desc 'list installed packages'
82
- arg_name ''
83
- command :installed do |c|
84
- c.action { |_, _, args| commands.installed args }
85
- end
86
-
87
- desc 'remove one or more installed packages'
88
- arg_name 'package(s) name'
89
- command :remove do |c|
90
- c.action { |_, _, args| commands.remove args }
91
- end
92
-
93
- desc 'search for matching packages of term'
94
- arg_name 'package name'
95
- command :search do |c|
96
- c.action { |_, _, args| commands.search args }
97
- end
98
-
99
- desc 'update database'
100
- arg_name ''
101
- command :update do |c|
102
- c.action { commands.update }
103
- end
104
-
105
- desc 'upgrade packages'
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 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
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.6
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-02 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