power_assert 2.0.1 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/ci.yml +2 -2
- data/lib/power_assert/enable_tracepoint_events.rb +4 -2
- data/lib/power_assert/inspector.rb +6 -2
- data/lib/power_assert/version.rb +1 -1
- data/lib/power_assert.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef3a6c41c62e422518ce4af1079ff4adafdd89622bf9c3bcbfaec37c54e40a79
|
4
|
+
data.tar.gz: 9bc30cc7170a6e4e9512a332500e4ec1fe5b6f6f1a0d392a8c291405e6c908f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7eca57c8c6ab384ccb03cab66038762d0f044be57a4e7f6487a17f5c7ed9b0f25eea605e0c71001100d7c8406c34642bb3a6e2f7d05afc7bab70474038857623
|
7
|
+
data.tar.gz: 1e3891703480bfd37a6ac590cd9b7c66dee25890dff8b28ee5994e39f5285fee55957b68641f799b121d1c5e0c453fc8a1cf9ba9c9b3e17e8816ceb9b9145bcc
|
data/.github/workflows/ci.yml
CHANGED
@@ -7,7 +7,7 @@ jobs:
|
|
7
7
|
strategy:
|
8
8
|
fail-fast: false
|
9
9
|
matrix:
|
10
|
-
ruby-version: [ '3.0', 2.7, 2.6, 2.5, head ]
|
10
|
+
ruby-version: [ 3.1, '3.0', 2.7, 2.6, 2.5, head ]
|
11
11
|
os: [ ubuntu-latest, macos-latest ]
|
12
12
|
TEST_SYMLINK: [ yes, no ]
|
13
13
|
runs-on: ${{ matrix.os }}
|
@@ -15,7 +15,7 @@ jobs:
|
|
15
15
|
TEST_SYMLINK: ${{ matrix.TEST_SYMLINK }}
|
16
16
|
continue-on-error: ${{ matrix.ruby-version == 'head' }}
|
17
17
|
steps:
|
18
|
-
- uses: actions/checkout@
|
18
|
+
- uses: actions/checkout@v3
|
19
19
|
- name: Set up Ruby
|
20
20
|
uses: ruby/setup-ruby@v1
|
21
21
|
with:
|
@@ -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
data/lib/power_assert.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.3
|
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-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -118,6 +118,7 @@ extensions: []
|
|
118
118
|
extra_rdoc_files:
|
119
119
|
- README.md
|
120
120
|
files:
|
121
|
+
- ".github/dependabot.yml"
|
121
122
|
- ".github/workflows/ci.yml"
|
122
123
|
- ".gitignore"
|
123
124
|
- BSDL
|
@@ -157,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
158
|
- !ruby/object:Gem::Version
|
158
159
|
version: '0'
|
159
160
|
requirements: []
|
160
|
-
rubygems_version: 3.3.
|
161
|
+
rubygems_version: 3.3.7
|
161
162
|
signing_key:
|
162
163
|
specification_version: 4
|
163
164
|
summary: Power Assert for Ruby
|