power_assert 2.0.2 → 2.0.4
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 +18 -4
- data/Gemfile +10 -0
- data/lib/power_assert/inspector.rb +2 -2
- data/lib/power_assert/version.rb +1 -1
- data/lib/power_assert.rb +3 -1
- data/power_assert.gemspec +0 -7
- metadata +5 -105
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78530e1cd3f057675120222ef1adf2fbee2ca63d506a34eaf00ed3114a164696
|
4
|
+
data.tar.gz: b32df2def0d81af3e0d5ed7b75e0e3777a5c9e97be94c80cbf8a05b35c603dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7c404914cf9d363baa712200fdefa9668b500a75b508841e0a28ce1319a3282e95c496ba17bd9ac257b8a14a4a34a8d6f487912a86db2082cce79b9ffbb6c26
|
7
|
+
data.tar.gz: ebf9c19942031def42f2950594c0288727f8000de3847181e4f28d5564c2330af2e7caab65f7146c69f7ef5859319b2e4b9a309203b800f03172cac60205e197
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,21 +1,35 @@
|
|
1
1
|
on: [ push, pull_request ]
|
2
2
|
|
3
3
|
jobs:
|
4
|
+
ruby-versions:
|
5
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
6
|
+
with:
|
7
|
+
engine: cruby
|
8
|
+
min_version: 2.5
|
4
9
|
test:
|
10
|
+
needs: ruby-versions
|
5
11
|
name: >-
|
6
12
|
Test (${{ matrix.ruby-version }} / ${{ matrix.os }} / TEST_SYMLINK: ${{ matrix.TEST_SYMLINK }})
|
7
13
|
strategy:
|
8
14
|
fail-fast: false
|
9
15
|
matrix:
|
10
|
-
ruby-version:
|
11
|
-
os: [ ubuntu-latest, macos-latest ]
|
16
|
+
ruby-version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
17
|
+
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
12
18
|
TEST_SYMLINK: [ yes, no ]
|
19
|
+
include:
|
20
|
+
- ruby-version: "3.3"
|
21
|
+
os: "ubuntu-latest"
|
22
|
+
TEST_SYMLINK: yes
|
23
|
+
rubyopt: "--enable-frozen-string-literal"
|
24
|
+
exclude:
|
25
|
+
- ruby-version: "2.5"
|
26
|
+
os: "macos-latest"
|
13
27
|
runs-on: ${{ matrix.os }}
|
14
28
|
env:
|
15
29
|
TEST_SYMLINK: ${{ matrix.TEST_SYMLINK }}
|
16
30
|
continue-on-error: ${{ matrix.ruby-version == 'head' }}
|
17
31
|
steps:
|
18
|
-
- uses: actions/checkout@
|
32
|
+
- uses: actions/checkout@v4
|
19
33
|
- name: Set up Ruby
|
20
34
|
uses: ruby/setup-ruby@v1
|
21
35
|
with:
|
@@ -26,7 +40,7 @@ jobs:
|
|
26
40
|
bundle exec rake before_script
|
27
41
|
- name: Run the test suite
|
28
42
|
run: |
|
29
|
-
bundle exec rake
|
43
|
+
bundle exec rake RUBYOPT="${{ matrix.rubyopt }}"
|
30
44
|
- name: Run after_script
|
31
45
|
run: |
|
32
46
|
bundle exec rake after_script
|
data/Gemfile
CHANGED
@@ -7,3 +7,13 @@ local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
|
|
7
7
|
if File.exist?(local_gemfile)
|
8
8
|
eval_gemfile local_gemfile
|
9
9
|
end
|
10
|
+
|
11
|
+
group :development do
|
12
|
+
gem 'test-unit'
|
13
|
+
gem 'rake'
|
14
|
+
gem 'simplecov'
|
15
|
+
gem 'bundler'
|
16
|
+
gem 'irb', '>= 1.3.1'
|
17
|
+
gem 'byebug'
|
18
|
+
gem 'benchmark-ips'
|
19
|
+
end
|
@@ -49,13 +49,13 @@ module PowerAssert
|
|
49
49
|
if PowerAssert.configuration.inspector == :pp
|
50
50
|
console_width = IO.respond_to?(:console_size) ? IO.console_size[1] : 80
|
51
51
|
width = [console_width - 1 - @indent, 10].max
|
52
|
-
IRB::ColorPrinter.pp(@value, '', width)
|
52
|
+
IRB::ColorPrinter.pp(@value, +'', width)
|
53
53
|
else
|
54
54
|
IRB::Color.colorize_code(@value.to_s, ignore_error: true)
|
55
55
|
end
|
56
56
|
else
|
57
57
|
if PowerAssert.configuration.inspector == :pp
|
58
|
-
PP.pp(@value, '')
|
58
|
+
PP.pp(@value, +'')
|
59
59
|
else
|
60
60
|
@value.inspect
|
61
61
|
end
|
data/lib/power_assert/version.rb
CHANGED
data/lib/power_assert.rb
CHANGED
@@ -5,9 +5,11 @@
|
|
5
5
|
begin
|
6
6
|
unless defined?(Byebug)
|
7
7
|
captured = false
|
8
|
+
target_thread = Thread.current
|
8
9
|
TracePoint.new(:return, :c_return) do |tp|
|
10
|
+
next unless Thread.current == target_thread
|
9
11
|
captured = true
|
10
|
-
unless tp.
|
12
|
+
unless tp.return_value and tp.callee_id
|
11
13
|
raise ''
|
12
14
|
end
|
13
15
|
end.enable { __id__ }
|
data/power_assert.gemspec
CHANGED
@@ -18,13 +18,6 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.bindir = 'exe'
|
19
19
|
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
s.require_paths = ['lib']
|
21
|
-
s.add_development_dependency 'test-unit'
|
22
|
-
s.add_development_dependency 'rake'
|
23
|
-
s.add_development_dependency 'simplecov'
|
24
|
-
s.add_development_dependency 'bundler'
|
25
|
-
s.add_development_dependency 'irb', '>= 1.3.1'
|
26
|
-
s.add_development_dependency 'byebug'
|
27
|
-
s.add_development_dependency 'benchmark-ips'
|
28
21
|
s.extra_rdoc_files = ['README.md']
|
29
22
|
s.rdoc_options = ['--main', 'README.md']
|
30
23
|
s.licenses = ['BSD-2-Clause', "Ruby"]
|
metadata
CHANGED
@@ -1,113 +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.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuki Tsujimoto
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: test-unit
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: simplecov
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: irb
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 1.3.1
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 1.3.1
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: byebug
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: benchmark-ips
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
10
|
+
date: 2024-10-03 00:00:00.000000000 Z
|
11
|
+
dependencies: []
|
111
12
|
description: Power Assert shows each value of variables and method calls in the expression.
|
112
13
|
It is useful for testing, providing which value wasn't correct when the condition
|
113
14
|
is not satisfied.
|
@@ -118,6 +19,7 @@ extensions: []
|
|
118
19
|
extra_rdoc_files:
|
119
20
|
- README.md
|
120
21
|
files:
|
22
|
+
- ".github/dependabot.yml"
|
121
23
|
- ".github/workflows/ci.yml"
|
122
24
|
- ".gitignore"
|
123
25
|
- BSDL
|
@@ -140,7 +42,6 @@ licenses:
|
|
140
42
|
- BSD-2-Clause
|
141
43
|
- Ruby
|
142
44
|
metadata: {}
|
143
|
-
post_install_message:
|
144
45
|
rdoc_options:
|
145
46
|
- "--main"
|
146
47
|
- README.md
|
@@ -157,8 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
58
|
- !ruby/object:Gem::Version
|
158
59
|
version: '0'
|
159
60
|
requirements: []
|
160
|
-
rubygems_version: 3.
|
161
|
-
signing_key:
|
61
|
+
rubygems_version: 3.6.0.dev
|
162
62
|
specification_version: 4
|
163
63
|
summary: Power Assert for Ruby
|
164
64
|
test_files: []
|