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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a7c485ff34cd19c6999ef1761ef2b79c6803c70730c1e5a366bfcd9788fa10f6
4
- data.tar.gz: 0ed291f95adff055ccae289fd426c50f84caae12b2d7a21de8890b24c8523c79
3
+ metadata.gz: bf37bb130a8c4d14dd4560df43a3e98f6ea43ea7ad38c9b44525cf113e84b7b4
4
+ data.tar.gz: 504f47bbf850cae9fa91b898b460ec632fe6a64df77a8ab89f9d7b6c1abc67b7
5
5
  SHA512:
6
- metadata.gz: ad4420a7c41faa3d93bcdef7530593606758ec8fe9bf6f0b2d769a80bbd99f2ce4a74b939865d5b6677c33a8573b2fceeacdc3bcb573af09371ce49584bca0c3
7
- data.tar.gz: 4d114cbc673babd2326c51bf60d880d57a52ca4c8dd0520d8b0c438a48ddd51328035054ce94d9db19beaa45b38f5fc9aa6bec67116454e6c1031d70724938a9
6
+ metadata.gz: b977260d1670a0a391583c2f20cd5a0780fba2b6d5a8a6685370664fb8bf66e91a7cac5f9f77e01de3dffe89cf218581bf02df95a5ae4350789881adfbd11273
7
+ data.tar.gz: 124cd1a4e62ca11e516144e8e37c49808440d0e67904e7756eabc8c3f71da053bd3856b8f21e7ed2a8e5fb5372bd43e6510d17ae5a70b538d23cf0e9e0cab683
data/.vimproject CHANGED
@@ -171,6 +171,7 @@ scout-essentials=/$PWD filter="*.rb *.txt *.md *.conf *.yaml" {
171
171
  indiferent_hash=indiferent_hash{
172
172
  case_insensitive.rb
173
173
  options.rb
174
+ serialize.rb
174
175
  }
175
176
  log.rb
176
177
  log=log{
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.4
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
@@ -1,5 +1,6 @@
1
1
  require_relative 'indiferent_hash/options'
2
2
  require_relative 'indiferent_hash/case_insensitive'
3
+ require_relative 'indiferent_hash/serialize'
3
4
 
4
5
  module IndiferentHash
5
6
 
@@ -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.4 ruby lib
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.4".freeze
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.2".freeze
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
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.2
301
+ rubygems_version: 3.7.0.dev
301
302
  specification_version: 4
302
303
  summary: Scout essential tools
303
304
  test_files: []