quotypie 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +24 -0
- data/README.md +31 -0
- data/Rakefile +12 -0
- data/lib/quotypie/core_ext.rb +21 -0
- data/lib/quotypie/version.rb +5 -0
- data/lib/quotypie.rb +4 -0
- metadata +52 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 11da760af6019774efc9fd98694d96b980d12600602d7410020ffc1c61871939
|
4
|
+
data.tar.gz: 1e36e73fa49d75841f201b7cfc181d56c2594bbb57d29aeee4ac09c58d024697
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ba5c32bfb878596ab3cdb5c25865092610feeb2b5090591101440eab68fecb3f0e7f6c8414b4708f17d9e4f7475d1b07318093d81a36f5bb0f5ff3d33c6554b0
|
7
|
+
data.tar.gz: 93e0ae54e828e07f4fa65d64c1bdf36d35dffd03f31cae54bc37208de812e6a1d37856e20d89edc500ade87b8ece65abab2f8f8e3f78aec82e795f5bdbc5825d
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
quotypie (0.0.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
power_assert (2.0.1)
|
10
|
+
rake (13.0.6)
|
11
|
+
test-unit (3.5.3)
|
12
|
+
power_assert
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
arm64-darwin-21
|
16
|
+
x86_64-linux
|
17
|
+
|
18
|
+
DEPENDENCIES
|
19
|
+
quotypie!
|
20
|
+
rake (~> 13.0)
|
21
|
+
test-unit (~> 3.0)
|
22
|
+
|
23
|
+
BUNDLED WITH
|
24
|
+
2.4.11
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# Quotypie
|
2
|
+
|
3
|
+
Are you tired of
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
(irb):1:in `<main>': undefined local variable or method `foo' for main:Object (NameError)
|
7
|
+
from /Users/nashby/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/irb-1.6.3/exe/irb:9:in `<top (required)>'
|
8
|
+
from /Users/nashby/.rbenv/versions/3.1.2/bin/irb:25:in `load'
|
9
|
+
from /Users/nashby/.rbenv/versions/3.1.2/bin/irb:25:in `<main>'
|
10
|
+
```
|
11
|
+
|
12
|
+
this nonsense, where \` and ' are used together for some ISO-8859-1 reason? Me either. Just add `quotypie` to your Gemfile
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'quotypie'
|
16
|
+
```
|
17
|
+
|
18
|
+
and you won't see it again. What you'll see is:
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
(irb):1:in '<main>': undefined local variable or method 'foo' for main:Object (NameError)
|
22
|
+
from /Users/nashby/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/irb-1.6.3/exe/irb:9:in '<top (required)>'
|
23
|
+
from /Users/nashby/.rbenv/versions/3.1.2/bin/irb:25:in 'load'
|
24
|
+
from /Users/nashby/.rbenv/versions/3.1.2/bin/irb:25:in '<main>'
|
25
|
+
```
|
26
|
+
|
27
|
+
So you can copy-paste it and don't fear that it'll mess up your markdown or whatever you use.
|
28
|
+
|
29
|
+
Don't use it in production though. I guess. Or do, you're an adult.
|
30
|
+
|
31
|
+
P.S It's known issue https://bugs.ruby-lang.org/issues/16495. Let's hope it'll be fixed anytime soon.
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
module Quotypie
|
2
|
+
module CoreExt
|
3
|
+
def full_message(...)
|
4
|
+
replace_tick_qith_quote(super)
|
5
|
+
end
|
6
|
+
|
7
|
+
def backtrace
|
8
|
+
super&.map { |b| replace_tick_qith_quote(b) }
|
9
|
+
end
|
10
|
+
|
11
|
+
def to_s
|
12
|
+
replace_tick_qith_quote(super)
|
13
|
+
end
|
14
|
+
|
15
|
+
def replace_tick_qith_quote(message)
|
16
|
+
message.gsub('`', '\'')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Exception.prepend(CoreExt)
|
21
|
+
end
|
data/lib/quotypie.rb
ADDED
metadata
ADDED
@@ -0,0 +1,52 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: quotypie
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Vasiliy Ermolovich
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-04-20 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Write a longer description or delete this line.
|
14
|
+
email:
|
15
|
+
- younash@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- Gemfile
|
21
|
+
- Gemfile.lock
|
22
|
+
- README.md
|
23
|
+
- Rakefile
|
24
|
+
- lib/quotypie.rb
|
25
|
+
- lib/quotypie/core_ext.rb
|
26
|
+
- lib/quotypie/version.rb
|
27
|
+
homepage: https://github.com/nashby/quotypie
|
28
|
+
licenses: []
|
29
|
+
metadata:
|
30
|
+
homepage_uri: https://github.com/nashby/quotypie
|
31
|
+
source_code_uri: https://github.com/nashby/quotypie
|
32
|
+
changelog_uri: https://github.com/nashby/quotypie
|
33
|
+
post_install_message:
|
34
|
+
rdoc_options: []
|
35
|
+
require_paths:
|
36
|
+
- lib
|
37
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 3.1.0
|
42
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
requirements: []
|
48
|
+
rubygems_version: 3.4.7
|
49
|
+
signing_key:
|
50
|
+
specification_version: 4
|
51
|
+
summary: Write a short summary, because RubyGems requires one.
|
52
|
+
test_files: []
|