nazar 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/README.md +1 -1
- data/lib/nazar/renderer.rb +6 -1
- data/lib/nazar/version.rb +1 -1
- data/lib/nazar.rb +4 -2
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: caea3f0827d9d39e782cf749a4e4d1d4828ef5e6c0fc1293eceb4aa084ea77c7
|
4
|
+
data.tar.gz: 3dcb286c61452847f5c5d0d6aa8ea03d36943ba76c322cf0c09995cb6655efe5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66df708fe14e78480c65ef01f1353e0454b4f423aa2a47888c6b9ce3c19a2ddec26d53ce64f18d4b6339eaaa64c4ae5591e2d680e5e90721f86ac50baf932658
|
7
|
+
data.tar.gz: 79976a910bf1bd58c8a0b60bbe9d50d4c0a24d61d2dcc756f5fe3404e672263e332ea5feeae1f20631addc0c991c216b6e93d84e03d34b02a37e613883418495
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Nazar [![Build Status](https://github.com/krzyzak/nazar/actions/workflows/main.yml/badge.svg)](https://github.com/krzyzak/nazar/actions) [![Code Climate](https://codeclimate.com/github/krzyzak/nazar/badges/gpa.svg)](https://codeclimate.com/github/krzyzak/nazar)
|
1
|
+
# Nazar [![Build Status](https://github.com/krzyzak/nazar/actions/workflows/main.yml/badge.svg)](https://github.com/krzyzak/nazar/actions) [![Gem Version](https://badge.fury.io/rb/nazar.svg)](https://badge.fury.io/rb/nazar) [![Code Climate](https://codeclimate.com/github/krzyzak/nazar/badges/gpa.svg)](https://codeclimate.com/github/krzyzak/nazar)
|
2
2
|
|
3
3
|
Nazar improves defvault inspect output for console applications (supports IRB and Pry).
|
4
4
|
|
data/lib/nazar/renderer.rb
CHANGED
data/lib/nazar/version.rb
CHANGED
data/lib/nazar.rb
CHANGED
@@ -60,7 +60,8 @@ module Nazar
|
|
60
60
|
::IRB::Irb.class_eval do
|
61
61
|
alias_method :__original_output_value__, :output_value
|
62
62
|
def output_value(omit = false) # rubocop:disable Style/OptionalBooleanParameter
|
63
|
-
|
63
|
+
renderer = Nazar::Renderer.new(@context.last_value)
|
64
|
+
renderer.valid? ? renderer.render : __original_output_value__(omit)
|
64
65
|
end
|
65
66
|
end
|
66
67
|
end
|
@@ -68,7 +69,8 @@ module Nazar
|
|
68
69
|
def enable_for_pry!
|
69
70
|
@__original_pry_print = Pry.config.print
|
70
71
|
Pry.config.print = proc do |output, value, instance|
|
71
|
-
|
72
|
+
renderer = Nazar::Renderer.new(value)
|
73
|
+
renderer.valid? ? renderer.render : @__original_pry_print.call(output, value, instance)
|
72
74
|
end
|
73
75
|
end
|
74
76
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|