appl 1.5.1 → 1.6
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/lib/appl.rb +2 -1
- data/lib/intar.rb +6 -5
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d312ea2daf699e2d23d8733654e4ad8014c15dcbc27d8d3008e9832457ff48d1
|
4
|
+
data.tar.gz: 92b2213d100a74618c1ac62341bc291a1eb095461a9ec188e71f1f77b7272b46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 136ac972d7e584da9e0dbf4478516825a79f97f7f6f8755ad1c7301ea71a4c6e2ec15fe055067908566a3008b69ecc061e7e029e04d8ac41f63181fd1764b3ca
|
7
|
+
data.tar.gz: 7c08a7c5346e846c1efaed6cceafa90212d712bcb7165e85fc9010e1fc92d47ef21a658e87fdd308e404f0db7ea80a66c063c8e7390750fc24d23111f5a9d8d0
|
data/lib/appl.rb
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
class Application
|
7
7
|
|
8
|
-
APPL_VERSION = "1.
|
8
|
+
APPL_VERSION = "1.6".freeze
|
9
9
|
|
10
10
|
OPTIONS_ENV = nil
|
11
11
|
|
@@ -264,6 +264,7 @@ This base class does nothing by default.
|
|
264
264
|
h = a.length == 1 ? "Author" : "Authors"
|
265
265
|
puts "#{h}: #{j}"
|
266
266
|
end
|
267
|
+
puts "Ruby version: #{RUBY_VERSION}"
|
267
268
|
end
|
268
269
|
|
269
270
|
def show_message msg, extra = nil
|
data/lib/intar.rb
CHANGED
@@ -128,7 +128,7 @@ class Intar
|
|
128
128
|
|
129
129
|
class <<self
|
130
130
|
|
131
|
-
attr_accessor :prompt, :show, :colour
|
131
|
+
attr_accessor :prompt, :show, :shownil, :colour
|
132
132
|
|
133
133
|
attr_reader :histfile
|
134
134
|
def histfile= hf
|
@@ -158,6 +158,7 @@ class Intar
|
|
158
158
|
s = superclass
|
159
159
|
@prompt = s.prompt
|
160
160
|
@show = s.show
|
161
|
+
@shownil = s.shownil
|
161
162
|
@colour = s.colour
|
162
163
|
@histfile = s.histfile
|
163
164
|
@histmax = s.histmax
|
@@ -206,6 +207,7 @@ class Intar
|
|
206
207
|
|
207
208
|
self.prompt = "%(32)c%i%c:%1c%03n%c%> "
|
208
209
|
self.show = 1
|
210
|
+
self.shownil = false
|
209
211
|
self.colour = true
|
210
212
|
self.histfile = nil
|
211
213
|
self.histmax = 500
|
@@ -312,19 +314,18 @@ class Intar
|
|
312
314
|
# :startdoc:
|
313
315
|
|
314
316
|
def display r
|
315
|
-
return if r.nil?
|
317
|
+
return if r.nil? and not self.class.shownil
|
316
318
|
show = (self.class.show or return)
|
317
|
-
i =
|
319
|
+
i = ARROW.dup
|
320
|
+
i << r.inspect
|
318
321
|
if show > 0 then
|
319
322
|
siz, = $stdout.winsize
|
320
323
|
siz *= show
|
321
|
-
siz -= ARROW.length
|
322
324
|
if i.length > siz then
|
323
325
|
i.cut! siz-ELLIPSIS.length
|
324
326
|
i << ELLIPSIS
|
325
327
|
end
|
326
328
|
end
|
327
|
-
i.prepend ARROW
|
328
329
|
puts i
|
329
330
|
end
|
330
331
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.6'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
A base class for command line applications doing options parsing
|
@@ -43,8 +43,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
43
43
|
version: '0'
|
44
44
|
requirements:
|
45
45
|
- Just Ruby
|
46
|
-
|
47
|
-
rubygems_version: 2.7.8
|
46
|
+
rubygems_version: 3.0.3
|
48
47
|
signing_key:
|
49
48
|
specification_version: 4
|
50
49
|
summary: Easy option parsing
|