scout-essentials 1.8.4 → 1.8.5
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 +4 -4
- data/.vimproject +1 -0
- data/VERSION +1 -1
- data/lib/scout/indiferent_hash/serialize.rb +24 -0
- data/lib/scout/indiferent_hash.rb +1 -0
- data/scout-essentials.gemspec +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bf37bb130a8c4d14dd4560df43a3e98f6ea43ea7ad38c9b44525cf113e84b7b4
|
|
4
|
+
data.tar.gz: 504f47bbf850cae9fa91b898b460ec632fe6a64df77a8ab89f9d7b6c1abc67b7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b977260d1670a0a391583c2f20cd5a0780fba2b6d5a8a6685370664fb8bf66e91a7cac5f9f77e01de3dffe89cf218581bf02df95a5ae4350789881adfbd11273
|
|
7
|
+
data.tar.gz: 124cd1a4e62ca11e516144e8e37c49808440d0e67904e7756eabc8c3f71da053bd3856b8f21e7ed2a8e5fb5372bd43e6510d17ae5a70b538d23cf0e9e0cab683
|
data/.vimproject
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.8.
|
|
1
|
+
1.8.5
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
module IndiferentHash
|
|
2
|
+
def self.serializable(obj)
|
|
3
|
+
case obj
|
|
4
|
+
when Hash
|
|
5
|
+
obj.each_with_object({}) do |(k, v), h|
|
|
6
|
+
h[k] = serializable(v)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
when Array
|
|
10
|
+
if obj.length <= 100
|
|
11
|
+
obj.map { |v| serializable(v) }
|
|
12
|
+
else
|
|
13
|
+
first = obj.first(70).map { |v| serializable(v) }
|
|
14
|
+
last = obj.last(30).map { |v| serializable(v) }
|
|
15
|
+
truncated_msg = "TRUNCATED only 100 out of #{obj.length} shown"
|
|
16
|
+
|
|
17
|
+
first + ['...'] + last + [truncated_msg]
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
else
|
|
21
|
+
obj
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/scout-essentials.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
|
-
# stub: scout-essentials 1.8.
|
|
5
|
+
# stub: scout-essentials 1.8.5 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "scout-essentials".freeze
|
|
9
|
-
s.version = "1.8.
|
|
9
|
+
s.version = "1.8.5".freeze
|
|
10
10
|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
|
12
12
|
s.require_paths = ["lib".freeze]
|
|
@@ -50,6 +50,7 @@ Gem::Specification.new do |s|
|
|
|
50
50
|
"lib/scout/indiferent_hash.rb",
|
|
51
51
|
"lib/scout/indiferent_hash/case_insensitive.rb",
|
|
52
52
|
"lib/scout/indiferent_hash/options.rb",
|
|
53
|
+
"lib/scout/indiferent_hash/serialize.rb",
|
|
53
54
|
"lib/scout/log.rb",
|
|
54
55
|
"lib/scout/log/color.rb",
|
|
55
56
|
"lib/scout/log/color_class.rb",
|
|
@@ -158,7 +159,7 @@ Gem::Specification.new do |s|
|
|
|
158
159
|
]
|
|
159
160
|
s.homepage = "http://github.com/mikisvaz/scout-essentials".freeze
|
|
160
161
|
s.licenses = ["MIT".freeze]
|
|
161
|
-
s.rubygems_version = "3.7.
|
|
162
|
+
s.rubygems_version = "3.7.0.dev".freeze
|
|
162
163
|
s.summary = "Scout essential tools".freeze
|
|
163
164
|
|
|
164
165
|
s.specification_version = 4
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scout-essentials
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.8.
|
|
4
|
+
version: 1.8.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Miguel Vazquez
|
|
@@ -174,6 +174,7 @@ files:
|
|
|
174
174
|
- lib/scout/indiferent_hash.rb
|
|
175
175
|
- lib/scout/indiferent_hash/case_insensitive.rb
|
|
176
176
|
- lib/scout/indiferent_hash/options.rb
|
|
177
|
+
- lib/scout/indiferent_hash/serialize.rb
|
|
177
178
|
- lib/scout/log.rb
|
|
178
179
|
- lib/scout/log/color.rb
|
|
179
180
|
- lib/scout/log/color_class.rb
|
|
@@ -297,7 +298,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
297
298
|
- !ruby/object:Gem::Version
|
|
298
299
|
version: '0'
|
|
299
300
|
requirements: []
|
|
300
|
-
rubygems_version: 3.7.
|
|
301
|
+
rubygems_version: 3.7.0.dev
|
|
301
302
|
specification_version: 4
|
|
302
303
|
summary: Scout essential tools
|
|
303
304
|
test_files: []
|