power_assert 2.0.1 → 2.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47e0778736ea1f2970d83e7a01f0d2d9f02e08b7a9039303604b2eb27fb80c30
|
4
|
+
data.tar.gz: 3c31dbe167ebce5f5166b19ea4596718a9a236b336561bf06b7f0cf3f2139e38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40c03bdf0538e693eacee97e89e49e83424ce610e6b111bb2a8d39bc95a57dde407fd1091da8e2e56f4dd426440c9dd875d04163580826db575724519e688fd8
|
7
|
+
data.tar.gz: 37e8105b9b7d9b31c7af94a4e0d6e81232fa2d0d3f2d446b944b22d9568d93d83fd646e695d9c8a278a3fc613cdb028b076cc6188a576221b3a8d1a11b58e922
|
data/.github/workflows/ci.yml
CHANGED
@@ -21,8 +21,10 @@ if defined?(RubyVM)
|
|
21
21
|
end
|
22
22
|
|
23
23
|
basic_operators = [
|
24
|
-
:+, :-, :*, :/, :%, :==, :===, :<, :<=, :<<, :[], :[]=,
|
25
|
-
:
|
24
|
+
:+, :-, :*, :/, :%, :==, :===, :<, :<=, :<<, :[], :[]=, :length, :size,
|
25
|
+
:empty?, :nil?, :succ, :>, :>=, :!, :!=, :=~, :freeze, :-@, :max, :min,
|
26
|
+
# :call (it is just used for block call optimization)
|
27
|
+
:&, :|
|
26
28
|
]
|
27
29
|
|
28
30
|
basic_classes.each do |klass|
|
@@ -1,5 +1,8 @@
|
|
1
1
|
require 'power_assert/configuration'
|
2
|
-
|
2
|
+
begin
|
3
|
+
require 'io/console/size'
|
4
|
+
rescue LoadError
|
5
|
+
end
|
3
6
|
|
4
7
|
module PowerAssert
|
5
8
|
class InspectedValue
|
@@ -44,7 +47,8 @@ module PowerAssert
|
|
44
47
|
def inspect
|
45
48
|
if PowerAssert.configuration.colorize_message
|
46
49
|
if PowerAssert.configuration.inspector == :pp
|
47
|
-
|
50
|
+
console_width = IO.respond_to?(:console_size) ? IO.console_size[1] : 80
|
51
|
+
width = [console_width - 1 - @indent, 10].max
|
48
52
|
IRB::ColorPrinter.pp(@value, '', width)
|
49
53
|
else
|
50
54
|
IRB::Color.colorize_code(@value.to_s, ignore_error: true)
|
data/lib/power_assert/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: power_assert
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuki Tsujimoto
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
|
-
rubygems_version: 3.3.
|
160
|
+
rubygems_version: 3.3.7
|
161
161
|
signing_key:
|
162
162
|
specification_version: 4
|
163
163
|
summary: Power Assert for Ruby
|