sxmrb 0.2.0 → 0.2.1

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: e4370ef087e7d021313422b6239db2412b76d7c63069d0b60b59730965641191
4
- data.tar.gz: 36617e023ae9a845f2ce859856d2b2f863fc3f4caf5c2fbe0ae1822755271f96
3
+ metadata.gz: a32f7570feba98247a5ba7eee62f0ee35102f5387654fd0a969128b4ddf9508d
4
+ data.tar.gz: 8cf9b37357c5966be3ea713d7afb9849e6d0cc9233c673923ee2a50daed6b21f
5
5
  SHA512:
6
- metadata.gz: 4bf2c8e5536a349c4e72f6f62c009ffa8cfb47796c94074b306d764861e0f20d968055fa877f214eb8b6fab113cba5441508ef93641bae4160f6976d7ae031fd
7
- data.tar.gz: acfdfd883bcd28fe6c7aa539f823182e9d004ba7ae19093e7a0133e5cb0a89abd823b740c0f730959a5aaaf117f4253c9a1aaaa7de1f4385806d2c98f0a4215b
6
+ metadata.gz: 47777ace329b09abe7706cfa0efe2955337e4050784bde10859815243195e332997e5738a5e1b387e84de4339f935606796cf6190da134a71fbbaf401f44d764
7
+ data.tar.gz: 8d2a1dac3f39aa5af129739a882bea4fc7afba0215be8c61c4ff7650c9ae421282e94d3dd861c05e809d076dd330ecadd509fbd082770919ec16afccc0ddf188
data/README.md CHANGED
@@ -76,7 +76,7 @@ end
76
76
 
77
77
  ### Auto-wrapped system commands
78
78
 
79
- Missing methods will automatically be wrap corresponding system commands:
79
+ Missing methods will automatically wrap the corresponding system commands:
80
80
 
81
81
  ```ruby
82
82
  Sxmrb.awk('{print $NF}')
data/lib/sxmrb.rb CHANGED
@@ -47,18 +47,14 @@ class Sxmrb
47
47
  #
48
48
  # @example
49
49
  # file = (sh('ls') | menu(prompt: 'File?')).to_s.chomp
50
- def menu(prompt: nil)
51
- sh String.new.tap { |cmd|
52
- if ENV['SSH_CLIENT'] || ENV['SSH_TTY']
53
- cmd << 'vis-menu -i -l 18'
54
- else
55
- cmd << 'dmenu -c -i -l 18'
56
- sh 'sxmo_keyboard.sh open'
57
- end
58
-
59
- cmd << " -p #{prompt.inspect}" if prompt
60
- }
50
+ # rubocop:disable Lint/AmbiguousOperator
51
+ def menu(prompt: nil, options: [])
52
+ sh *(['sxmo_dmenu_with_kb.sh'].tap { |cmd|
53
+ cmd.push *options
54
+ cmd.push '-p', prompt if prompt
55
+ })
61
56
  end
57
+ # rubocop:enable Lint/AmbiguousOperator
62
58
 
63
59
  # Use a blank #menu to prompt for a value.
64
60
  #
data/lib/sxmrb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Sxmrb
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sxmrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Frank J. Cameron
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-05-23 00:00:00.000000000 Z
11
+ date: 2021-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shell