u-menu 0.2.0 → 0.4.0
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/README.md +3 -2
- data/bin/u-menu +12 -15
- data/lib/micro/menu/version.rb +1 -1
- data/lib/micro/menu.rb +1 -0
- 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: 413a453b9fa4da63d069763afd994f5fe0afe3298057dbc58afc5a25df3fe2a0
|
4
|
+
data.tar.gz: fa0edfa226e1026d15556b429706bd4b6f17d407c58c8bafd01aa9783e0f31c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c76ebb0ccad068b713cd1adfdc32b796748a51a7dba9a657dafcffc73f005df750ff3371600c6607659f850b235fd3e314360b03fab06f8876ef58ab70aa30df
|
7
|
+
data.tar.gz: c4f80d5d1abc512a810eac30d4c4f79a70097594f9bdec0f54074c74a72e8b7ce5a948091899cd4600a1813ab8501170b5a2318b82ace4f87b80a82923f20456
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# u-menu
|
2
2
|
|
3
|
-
|
3
|
+
[](https://codeclimate.com/github/dvinciguerra/u-menu/maintainability)
|
4
|
+
[](https://codeclimate.com/github/dvinciguerra/u-menu/test_coverage)
|
4
5
|
|
5
|
-
|
6
|
+
micro-menu is a command line tool that delivers a simple and customized command pallet.
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
data/bin/u-menu
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require '
|
4
|
-
|
5
|
-
gemfile do
|
6
|
-
source 'https://rubygems.org'
|
7
|
-
|
8
|
-
gem 'pastel'
|
9
|
-
gem 'tty-prompt'
|
10
|
-
end
|
3
|
+
require 'pastel'
|
4
|
+
require 'tty-prompt'
|
11
5
|
|
12
6
|
require 'yaml'
|
13
7
|
|
14
|
-
|
15
|
-
|
8
|
+
paths = [
|
9
|
+
File.expand_path("#{Dir.home}/.umenurc.yml", __dir__),
|
10
|
+
File.expand_path("#{Dir.home}/.umenu/umenurc.yml", __dir__),
|
11
|
+
]
|
16
12
|
|
13
|
+
config_path = paths.first { |path| File.exist? path }
|
17
14
|
config = YAML.load_file(config_path, symbolize_names: true)
|
18
15
|
|
19
16
|
pastel = Pastel.new
|
@@ -30,9 +27,9 @@ icons = {
|
|
30
27
|
}
|
31
28
|
|
32
29
|
thanks = [
|
33
|
-
|
34
|
-
|
35
|
-
|
30
|
+
pastel.green('Great job! o/'),
|
31
|
+
pastel.green('See you later! =)'),
|
32
|
+
pastel.green('Baby bye bye bye...'),
|
36
33
|
"Bring me #{pastel.green('a cookie')} when you come back!?",
|
37
34
|
"Have a nice #{pastel.cyan('day')}! =)",
|
38
35
|
"See you later #{pastel.green('olligator')}! =)"
|
@@ -50,7 +47,7 @@ options << {
|
|
50
47
|
name: '{{settings}} Edit Settings',
|
51
48
|
type: 'edit',
|
52
49
|
value: 'settings',
|
53
|
-
execute:
|
50
|
+
execute: config_path
|
54
51
|
}
|
55
52
|
options = options.sort { |a, b| a[:name] <=> b[:name] }
|
56
53
|
|
@@ -70,7 +67,7 @@ loop do
|
|
70
67
|
|
71
68
|
case action[:type]
|
72
69
|
when 'command'
|
73
|
-
system
|
70
|
+
system action[:execute]
|
74
71
|
when 'link'
|
75
72
|
puts "#{pastel.bold('Sure... opening link')} '#{pastel.cyan(action[:execute])}'"
|
76
73
|
system "open #{action[:execute]} &"
|
data/lib/micro/menu/version.rb
CHANGED
data/lib/micro/menu.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: u-menu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Vinciguerra
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-05-
|
11
|
+
date: 2023-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pastel
|