power_assert 2.0.0 → 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: 3d3d0e5985a6bb521449ef71f42225297f74cd879017bc0fa9fc43e1c7a612f4
4
- data.tar.gz: 63dbbb1eb926c54fcefc1fb3933f2a5bd7970d3e98a9074d103d378492581d49
3
+ metadata.gz: 47e0778736ea1f2970d83e7a01f0d2d9f02e08b7a9039303604b2eb27fb80c30
4
+ data.tar.gz: 3c31dbe167ebce5f5166b19ea4596718a9a236b336561bf06b7f0cf3f2139e38
5
5
  SHA512:
6
- metadata.gz: 72392cf0e4ab54507b191a3552664531933c554f3aa94883d75cea07b3c37d49c969ec6c06c0ff37b8704e7d7de5b5e500dc251d8de8f17561253e635dfc2f45
7
- data.tar.gz: f6b2be0b7dfa3e06a6f28bdec0dae7b63150cffc9f47a5499f07ffd94f1cf7b332d5d2b2796946cbddded9931676263a8064874697dbc9ee026e6a05b46eb7f4
6
+ metadata.gz: 40c03bdf0538e693eacee97e89e49e83424ce610e6b111bb2a8d39bc95a57dde407fd1091da8e2e56f4dd426440c9dd875d04163580826db575724519e688fd8
7
+ data.tar.gz: 37e8105b9b7d9b31c7af94a4e0d6e81232fa2d0d3f2d446b944b22d9568d93d83fd646e695d9c8a278a3fc613cdb028b076cc6188a576221b3a8d1a11b58e922
@@ -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 }}
data/README.md CHANGED
@@ -18,8 +18,10 @@ Use following test frameworks or extensions instead.
18
18
  * [Document](http://test-unit.github.io/test-unit/en/Test/Unit/Assertions.html#assert-instance_method)
19
19
  * [minitest-power_assert](https://github.com/hsbt/minitest-power_assert)
20
20
  * [rspec-power_assert](https://github.com/joker1007/rspec-power_assert)
21
+ * [rspec-matchers-power_assert_matchers](https://github.com/kachick/rspec-matchers-power_assert_matchers)
21
22
  * [pry-power_assert](https://github.com/yui-knk/pry-power_assert)
22
23
  * [pry-byebug-power_assert](https://github.com/k-tsj/pry-byebug-power_assert)
24
+ * [irb-power_assert](https://github.com/kachick/irb-power_assert)
23
25
  * [power_p](https://github.com/k-tsj/power_p)
24
26
 
25
27
  ## Requirement
@@ -21,8 +21,10 @@ if defined?(RubyVM)
21
21
  end
22
22
 
23
23
  basic_operators = [
24
- :+, :-, :*, :/, :%, :==, :===, :<, :<=, :<<, :[], :[]=,
25
- :length, :size, :empty?, :succ, :>, :>=, :!, :!=, :=~, :freeze, :-@, :max, :min, :nil?
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
- require 'io/console/size'
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
- width = [IO.console_size[1] - 1 - @indent, 10].max
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)
@@ -1,3 +1,3 @@
1
1
  module PowerAssert
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.2"
3
3
  end
data/power_assert.gemspec CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |s|
13
13
  s.description = "Power Assert shows each value of variables and method calls in the expression. It is useful for testing, providing which value wasn't correct when the condition is not satisfied."
14
14
 
15
15
  s.files = `git ls-files -z`.split("\x0").reject do |f|
16
- f.match(%r{^(test|spec|features|benchmark)/})
16
+ f.match(%r{\A(?:test|spec|features|benchmark|bin)/})
17
17
  end
18
18
  s.bindir = 'exe'
19
19
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
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.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: 2021-01-23 00:00:00.000000000 Z
11
+ date: 2022-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: test-unit
@@ -126,8 +126,6 @@ files:
126
126
  - LEGAL
127
127
  - README.md
128
128
  - Rakefile
129
- - bin/console
130
- - bin/setup
131
129
  - lib/power_assert.rb
132
130
  - lib/power_assert/colorize.rb
133
131
  - lib/power_assert/configuration.rb
@@ -159,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
159
157
  - !ruby/object:Gem::Version
160
158
  version: '0'
161
159
  requirements: []
162
- rubygems_version: 3.2.3
160
+ rubygems_version: 3.3.7
163
161
  signing_key:
164
162
  specification_version: 4
165
163
  summary: Power Assert for Ruby
data/bin/console DELETED
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'bundler/setup'
4
- require 'power_assert'
5
-
6
- begin
7
- require 'pry'
8
- Pry
9
- rescue LoadError
10
- require 'irb'
11
- IRB
12
- end.start
data/bin/setup DELETED
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install