irb-power_assert 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 527bbd045ba6df2be55749ae8f04b571103b8ce8b86e69b9cdc40f4c1968f461
4
- data.tar.gz: 83ab0a1bc1e2dc065ee75c42cc5e1878ab8e406e98ae28bb20596fa9ade0f579
3
+ metadata.gz: 6c7d86f7b11fc69ce48487d130a5e3b32fb65925ba3f96a99034d676b2ffea0a
4
+ data.tar.gz: 48c6d1db24acd71805152e9212f4d3f2a1885523f54d773697c31004a9d3a940
5
5
  SHA512:
6
- metadata.gz: dec87c56e9bbf5e58ba1ec8a08fbd18ebacb877f202ba7e3c3112d00c4453b5a84aebcab0c424afe7b6d3de01c9ba4da1aea190d36288dcba8631179ad8c4534
7
- data.tar.gz: 6a7008d7509e30b7754d5cdcdbf4b867e58c67055c1720fe62daca4deeae897232def645441a6d47ddbcd509c755dbb30f324638b39071d54adb2ac55fef1e59
6
+ metadata.gz: a9e5c07f853b5b654bfc53479b213c2c548f1c66f57d625ee835453bccb94c414b25e6d46dd4f09b10e5fdf5334249cda29e4284782a67eac0a5a4846b115417
7
+ data.tar.gz: 52e92b6370fa6ef874955b7ca859d4b74b578e0dd68e3c6db6699b7197e1db97fd7b2f3548a0b872c832c245cb71cd6f9c1477b4f0331f543394dcf08442e3eb
data/README.md CHANGED
@@ -1,27 +1,27 @@
1
1
  # irb-power_assert
2
2
 
3
- ![Build Status](https://github.com/kachick/irb-power_assert/actions/workflows/test.yml/badge.svg?branch=main)
3
+ [![Build Status](https://github.com/kachick/irb-power_assert/actions/workflows/ci-ruby.yml/badge.svg?branch=main)](https://github.com/kachick/irb-power_assert/actions/workflows/ci-ruby.yml?query=branch%3Amain+)
4
4
  [![Gem Version](https://badge.fury.io/rb/irb-power_assert.svg)](http://badge.fury.io/rb/irb-power_assert)
5
5
 
6
6
  ## Overview
7
7
 
8
8
  ![screenshot - expression](https://user-images.githubusercontent.com/1180335/119386011-efc1bb00-bd01-11eb-80c4-1aea86fa3781.png)
9
9
 
10
- [ruby/power_assert](https://github.com/ruby/power_assert) is a recent My favorites. (the author is [@k-tsj](https://github.com/k-tsj), thank you!)
10
+ [ruby/power_assert](https://github.com/ruby/power_assert) is a recent my favorites.\
11
+ (the author is [@k-tsj](https://github.com/k-tsj), thank you!)
11
12
 
12
13
  It is super helpful in complex testing.
13
14
 
14
15
  Don't say [ruby/irb](https://github.com/ruby/irb) is old-fashioned.
15
16
 
16
- I just would get irb version of [yui-knk/pry-power_assert](https://github.com/yui-knk/pry-power_assert)
17
+ I just would get irb version of
18
+ [yui-knk/pry-power_assert](https://github.com/yui-knk/pry-power_assert)
17
19
 
18
20
  Honor should be bestowed upon them.
19
21
 
20
22
  ## Usage
21
23
 
22
- Require Ruby 2.7 or later
23
-
24
- This command will install the latest version into your environment
24
+ Require Ruby 3.1 or higher # Tested only in ruby-head and the last 2 stable versions
25
25
 
26
26
  ```console
27
27
  $ gem install irb-power_assert
@@ -61,29 +61,10 @@ result: false
61
61
  => nil
62
62
  ```
63
63
 
64
- So you can see, the `pa` just takes strings of the code.
65
-
66
- If you want to directly pass `expression`, below is the hack for single line code.
64
+ The `pa` just takes strings of the code.
67
65
 
68
- Write below code in your `~/.irbrc`
69
-
70
- ```ruby
71
- # This logic taken from following reference, @k0kubun thank you!
72
- # * https://github.com/k0kubun/dotfiles/blob/8762ee623adae0fba20ed0a5ef7c8ff5825dc20a/config/.irbrc#L241-L262
73
- # * https://k0kubun.hatenablog.com/entry/2021/04/02/211455
74
- IRB::Context.prepend(Module.new{
75
- kwargs = Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.7.0') ? ', **' : ''
76
- line = __LINE__; eval %q{
77
- def evaluate(line, *__ARGS__)
78
- case line
79
- when /\Apa /
80
- line.replace("pa #{line.sub(/\Apa +/, '').strip.dump}\n")
81
- end
82
- super
83
- end
84
- }.sub(/__ARGS__/, kwargs), nil, __FILE__, line
85
- })
86
- ```
66
+ If you want to directly pass `expression`, [.irbrc](examples/.irbrc) is the hack for single line code.\
67
+ if you don't have the file yet, putting the file as one of your `$IRBRC`, `$XDG_CONFIG_HOME/irb/irbrc` or `$HOME/.irbrc`
87
68
 
88
69
  Then you can use the `pa` as below...
89
70
 
@@ -102,16 +83,8 @@ result: false
102
83
  => nil
103
84
  ```
104
85
 
105
- This repository has the example [.irbrc](examples/.irbrc), if you don't have the file yet, trying it may be fun.
106
-
107
- ```shell
108
- gem install irb-power_assert
109
- wget 'https://raw.githubusercontent.com/kachick/irb-power_assert/main/examples/.irbrc' -P "$HOME"
110
- irb
111
- ```
112
-
113
86
  ## References
114
87
 
115
- * [power-assert-js/power-assert](https://github.com/power-assert-js/power-assert)
116
- * [Power Assert in Ruby](https://speakerdeck.com/k_tsj/power-assert-in-ruby)
117
- * [ja - IRB is new than Pry](https://k0kubun.hatenablog.com/entry/2021/04/02/211455)
88
+ - [power-assert-js/power-assert](https://github.com/power-assert-js/power-assert)
89
+ - [Power Assert in Ruby](https://speakerdeck.com/k_tsj/power-assert-in-ruby)
90
+ - [ja - IRB is new than Pry](https://k0kubun.hatenablog.com/entry/2021/04/02/211455)
@@ -3,6 +3,6 @@
3
3
 
4
4
  module IRB
5
5
  module PowerAssert
6
- VERSION = '0.1.0'
6
+ VERSION = '0.2.0'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irb-power_assert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenichi Kamiya
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-25 00:00:00.000000000 Z
11
+ date: 1980-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: irb
@@ -36,7 +36,7 @@ dependencies:
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 2.0.1
39
+ version: 2.0.3
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
42
  version: '3.0'
@@ -46,7 +46,7 @@ dependencies:
46
46
  requirements:
47
47
  - - ">="
48
48
  - !ruby/object:Gem::Version
49
- version: 2.0.1
49
+ version: 2.0.3
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
52
  version: '3.0'
@@ -67,12 +67,11 @@ homepage: https://github.com/kachick/irb-power_assert
67
67
  licenses:
68
68
  - MIT
69
69
  metadata:
70
- documentation_uri: https://kachick.github.io/irb-power_assert/
71
70
  homepage_uri: https://github.com/kachick/irb-power_assert
72
71
  source_code_uri: https://github.com/kachick/irb-power_assert
73
72
  bug_tracker_uri: https://github.com/kachick/irb-power_assert/issues
74
73
  rubygems_mfa_required: 'true'
75
- post_install_message:
74
+ post_install_message:
76
75
  rdoc_options: []
77
76
  require_paths:
78
77
  - lib
@@ -80,15 +79,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
79
  requirements:
81
80
  - - ">="
82
81
  - !ruby/object:Gem::Version
83
- version: '2.7'
82
+ version: '3.1'
84
83
  required_rubygems_version: !ruby/object:Gem::Requirement
85
84
  requirements:
86
85
  - - ">="
87
86
  - !ruby/object:Gem::Version
88
87
  version: '0'
89
88
  requirements: []
90
- rubygems_version: 3.4.1
91
- signing_key:
89
+ rubygems_version: 3.4.10
90
+ signing_key:
92
91
  specification_version: 4
93
92
  summary: power_assert in irb
94
93
  test_files: []