intar 2.0 → 2.1
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/bin/intar +16 -13
- data/lib/intar/version.rb +1 -1
- 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: a9256c5df2f4a9179118e31faa21d54987f6aeb6e4427c9c6da60e66a2b0bb2d
|
4
|
+
data.tar.gz: 3d1fba05bda41fbeb2998333296a95346275a6eaf22e350970dd90241044595d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebd67c39d2f5638c9243cfc3d763492394d3297c998e2b90a5de8ff7a8f41dfe56fdfabfb0f1f763cc85ace000d058caaba6bfcce305d548f94b37df46a7b74a
|
7
|
+
data.tar.gz: f08dc9e6fb8098ce8f17ef7e06b39f49cb8d92f146859909db6f09b401c2cbf17e9c2d5c147ad231fc9d14601ebc59eee6f5b01448e2caca7bb2f8636a397784
|
data/bin/intar
CHANGED
@@ -28,9 +28,7 @@ class Intar::Appl < Application
|
|
28
28
|
|
29
29
|
EOT
|
30
30
|
|
31
|
-
attr_writer :show, :prompt, :histmax
|
32
|
-
def histfile= f ; @histfile = nil_if_none f ; end
|
33
|
-
def configfile= f ; @configfile = nil_if_none f ; end
|
31
|
+
attr_writer :show, :prompt, :histmax, :histfile, :configfile
|
34
32
|
attr_bang :quiet, :bw, :catch_exit, :histall
|
35
33
|
|
36
34
|
define_option "p", :prompt=, "STR", "prompt - see source code for % escapes"
|
@@ -51,7 +49,7 @@ class Intar::Appl < Application
|
|
51
49
|
"config file, NONE means none"
|
52
50
|
alias_option "c", "configfile"
|
53
51
|
|
54
|
-
define_option "H", :histfile=, "FILE",
|
52
|
+
define_option "H", :histfile=, "FILE",
|
55
53
|
"history file, NONE means none"
|
56
54
|
alias_option "H", "histfile"
|
57
55
|
|
@@ -75,7 +73,11 @@ class Intar::Appl < Application
|
|
75
73
|
define_option "V", :version, "show version"
|
76
74
|
alias_option "V", "version"
|
77
75
|
|
78
|
-
@params = {
|
76
|
+
@params = {
|
77
|
+
show: 5,
|
78
|
+
shownil: false,
|
79
|
+
histfile: ".intar_history",
|
80
|
+
}
|
79
81
|
class <<self
|
80
82
|
attr_reader :params
|
81
83
|
def set **kwargs
|
@@ -101,12 +103,12 @@ class Intar::Appl < Application
|
|
101
103
|
elsif @show then
|
102
104
|
p[ :show] = Integer @show
|
103
105
|
end
|
104
|
-
p[ :prompt ] = @prompt
|
105
|
-
p[ :color ] = false
|
106
|
-
p[ :catch_exit] = true
|
107
|
-
p[ :histhid ] = false
|
108
|
-
p[ :histfile ] = @histfile
|
109
|
-
p[ :histmax ] = Integer @histmax
|
106
|
+
p[ :prompt ] = @prompt if @prompt
|
107
|
+
p[ :color ] = false if @bw
|
108
|
+
p[ :catch_exit] = true if @catch_exit
|
109
|
+
p[ :histhid ] = false if @histall
|
110
|
+
p[ :histfile ] = nil_if_none @histfile if @histfile
|
111
|
+
p[ :histmax ] = Integer @histmax if @histmax
|
110
112
|
p
|
111
113
|
end
|
112
114
|
|
@@ -120,8 +122,9 @@ class Intar::Appl < Application
|
|
120
122
|
end
|
121
123
|
|
122
124
|
def read_cfg
|
123
|
-
|
124
|
-
|
125
|
+
cf = nil_if_none @configfile
|
126
|
+
return unless cf
|
127
|
+
c = File.expand_path cf, "~"
|
125
128
|
return unless File.exists? c
|
126
129
|
load c
|
127
130
|
rescue Exception
|
data/lib/intar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bertram Scharpf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: appl
|