chump 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/chump.gemspec +1 -1
- data/lib/chump.rb +4 -4
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b9afb5c1c48d6e7def5928c9b5fae7529e9087af3f1e72f2813f27516e9b44a
|
4
|
+
data.tar.gz: 63832ad7ab48fe058a93f4ef25dc88f116ab8f7e680c0994a88554346f44cafd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bef10f11d83752b4978c34c5fb5cec6c3a076f7f47df1398eef5f26d95c11a3da5f0bfd972c8f525e5e533a8c1cf64e39c131f990d31fbe3f6ad9f1b3aaad7f
|
7
|
+
data.tar.gz: c165cda057bf908c0f294db450daf838aa86e4ec6e9d9aff1993f2721687694f625b918005ad50e86ef39dbca96188e5e498e0419a5438eeb5358ce931da0c87
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.5
|
1
|
+
2.6.5
|
data/chump.gemspec
CHANGED
data/lib/chump.rb
CHANGED
@@ -188,7 +188,7 @@ class Chump
|
|
188
188
|
back = item
|
189
189
|
talk = !talk if item.nil?
|
190
190
|
break
|
191
|
-
when String,
|
191
|
+
when String, Integer, Float # [literal]
|
192
192
|
item = item.to_s
|
193
193
|
if talk # talker
|
194
194
|
send(item)
|
@@ -221,7 +221,7 @@ class Chump
|
|
221
221
|
next
|
222
222
|
when Symbol # yielder
|
223
223
|
case val
|
224
|
-
when String,
|
224
|
+
when String, Integer, Float # comparer
|
225
225
|
val = val.to_s
|
226
226
|
if index = @buff.index(val)
|
227
227
|
back = @buff.slice!(0..(index + val.size - 1))
|
@@ -242,7 +242,7 @@ class Chump
|
|
242
242
|
else
|
243
243
|
raise "Hash symbols don't support #{val.class} matchers"
|
244
244
|
end
|
245
|
-
when String,
|
245
|
+
when String, Integer, Float, Regexp # comparer/matcher (ugly, but shares actions)
|
246
246
|
key = key.to_s unless regx = key.is_a?(Regexp)
|
247
247
|
if fast
|
248
248
|
back = :else
|
@@ -258,7 +258,7 @@ class Chump
|
|
258
258
|
end
|
259
259
|
unless regx.nil?
|
260
260
|
case val
|
261
|
-
when String,
|
261
|
+
when String, Integer, Float
|
262
262
|
send(val.to_s)
|
263
263
|
when Array
|
264
264
|
back = chat(nil, *val) unless val.empty?
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Chump can be used to easily script terminal interactions.
|
14
14
|
email: steve.shreeve@gmail.com
|
@@ -26,7 +26,7 @@ homepage: https://github.com/shreeve/chump
|
|
26
26
|
licenses:
|
27
27
|
- MIT
|
28
28
|
metadata: {}
|
29
|
-
post_install_message:
|
29
|
+
post_install_message:
|
30
30
|
rdoc_options: []
|
31
31
|
require_paths:
|
32
32
|
- lib
|
@@ -41,8 +41,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '0'
|
43
43
|
requirements: []
|
44
|
-
rubygems_version: 3.
|
45
|
-
signing_key:
|
44
|
+
rubygems_version: 3.2.16
|
45
|
+
signing_key:
|
46
46
|
specification_version: 4
|
47
47
|
summary: Chump is an interactive session scripting tool
|
48
48
|
test_files: []
|