intar 2.0 → 2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/intar +16 -13
  3. data/lib/intar/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebb1f8448fc1b1975a50bbc99cac9e601dfc5c8c949fc9c6bb3e2e9ccec5d556
4
- data.tar.gz: ac7e7ac5915357dd60db8e958a4c58fc15050c3b04d52746a0d3e3d05d971d98
3
+ metadata.gz: a9256c5df2f4a9179118e31faa21d54987f6aeb6e4427c9c6da60e66a2b0bb2d
4
+ data.tar.gz: 3d1fba05bda41fbeb2998333296a95346275a6eaf22e350970dd90241044595d
5
5
  SHA512:
6
- metadata.gz: 5e983cbc3b2773a4f3fc8297407f59aa56fd5156adaa5af2c2e7657e5e3523f8b16bfa193e5f088e1a5d4b259838f63444b7dea35a564c8133e85969ec055205
7
- data.tar.gz: bfeb03f9854a50f9f5c7d1ef7c658bd871a4f0896448009236c27f1125e2c6517e563c84b1c6a294c5289a7588e5f180e348af04b89e2949bcacc721be7fddcc
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", ".intar_history",
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 if @prompt
105
- p[ :color ] = false if @bw
106
- p[ :catch_exit] = true if @catch_exit
107
- p[ :histhid ] = false if @histall
108
- p[ :histfile ] = @histfile if @histfile
109
- p[ :histmax ] = Integer @histmax if @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
- return unless @configfile
124
- c = File.expand_path @configfile, "~"
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
@@ -4,7 +4,7 @@
4
4
 
5
5
  class Intar
6
6
 
7
- VERSION = "2.0".freeze
7
+ VERSION = "2.1".freeze
8
8
 
9
9
  end
10
10
 
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.0'
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: 2020-11-19 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: appl