trailblazer-core-utils 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/trailblazer/core/utils/inspect.rb +8 -11
- data/lib/trailblazer/core/utils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af512b40998be4b879e0cf9d98d69281ff32f5744314f6d182876f4018bf7083
|
4
|
+
data.tar.gz: c09107e6e03086da057c28ec62ca9f3229dd477e2aaf06fae7b559075dade14a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ded16b8aa275b3347701b1ba0670cfb6d5340d47c48b3ba2dbde284d6ddbc1379d2fd6f4bc25be6959250926d5737d2ce5daccae68cdf4f12ee3c3b54ff9e5bb
|
7
|
+
data.tar.gz: 7cf816374b9950a298bdc354688839f0295fc6c051cfef84abd01dfde82887e5c8a4909a7aa1d775ee0929816af46e74403d541e3fa65bd9b6004a5ba7b0bbc0
|
data/CHANGELOG.md
CHANGED
@@ -2,22 +2,19 @@ module Trailblazer
|
|
2
2
|
module Core
|
3
3
|
module Utils
|
4
4
|
def self.inspect(object)
|
5
|
+
return Inspect.convert_hash_inspect(object) if object.is_a?(String)
|
5
6
|
return object.inspect unless object.is_a?(Hash)
|
6
7
|
|
7
8
|
old_string = object.inspect
|
8
|
-
# old_string = %({{symbol: 1, "string" => 2},"string" => 1})
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
return new_string
|
14
|
-
"asdfafasdff"
|
10
|
+
Inspect.convert_hash_inspect(old_string)
|
11
|
+
end
|
15
12
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
13
|
+
module Inspect
|
14
|
+
def self.convert_hash_inspect(hash_inspect)
|
15
|
+
new_string = hash_inspect.gsub(/([{ ])(\w+): /, '\1:\2=>')
|
16
|
+
new_string.gsub(" => ", "=>")
|
17
|
+
end
|
21
18
|
end
|
22
19
|
end
|
23
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trailblazer-core-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Sutterer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|