collectible 0.25.3 → 0.25.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72fa5fc41d036a160ca32bf462c512376314abfa0fee855310e9cabcb21100fa
4
- data.tar.gz: 0434ad992c781e01dd6a65fb465609ad85317c0661356045b9838555cdaf3d37
3
+ metadata.gz: 2498e1435258543c4040ee64ba34dbc52e0b9eb383bfef55d47ba7c615eb70c2
4
+ data.tar.gz: f17b4652d504c0816a4d1ea784b07d62d4a504970d425db3bf82699c2880e126
5
5
  SHA512:
6
- metadata.gz: f719c903f44034c1fdb13736aacc45a6a6fc16e25e4426c8beb6fd76fab77cc8ad61cc9dfcaa5b5e03421ef6950a2b5e72d4f46db52c7aad9b15e0e94eb481a7
7
- data.tar.gz: f0123940ce4dac5e76c85a44d92d825651f9fb8718d7a4dc1aa5d1fbd93028874ca979c88e2803566a075f2296907611c407d8079712d70dd698750a73eea610
6
+ metadata.gz: 2597ee20897f2282b2809c70ed0f972a3f067d966b18ac6988503015a10036bd6f029e4a6cf5d8eb12cd832fa5f536c774e6e886c00d45dcf7330c13dd58763f
7
+ data.tar.gz: 87b242b6faf1dc32101811fffb683b44710975c832fca0f60a2012c19ed56acd46b515675bd498fb5a7cc2cf8ba5ac16f7e2b00e132fe196e302f47514f8e607
@@ -42,10 +42,15 @@ module Collectible
42
42
 
43
43
  def disallow_when_sorted(*methods)
44
44
  methods.each do |method_name|
45
- around_method(method_name, prevent_double_wrapping_for: "MaintainSortingOrder") do |*arguments, &block|
45
+ around_method(method_name, prevent_double_wrapping_for: "MaintainSortingOrder") do |*args, **opts, &block|
46
46
  raise Collectible::MethodNotAllowedError, "cannot call #{method_name} when sorted" if maintain_sort_order?
47
47
 
48
- super(*arguments, &block)
48
+ # TODO: replace with `super(...)` when <= 2.6 support is dropped
49
+ if RUBY_VERSION < "2.7" && opts.blank?
50
+ super(*args, &block)
51
+ else
52
+ super(*args, **opts, &block)
53
+ end
49
54
  end
50
55
  end
51
56
  end
@@ -38,8 +38,13 @@ module Collectible
38
38
 
39
39
  def collection_wrap_on(*methods)
40
40
  methods.each do |method_name|
41
- around_method(method_name, prevent_double_wrapping_for: PROXY_MODULE_NAME) do |*args, &block|
42
- result = super(*args, &block)
41
+ around_method(method_name, prevent_double_wrapping_for: PROXY_MODULE_NAME) do |*args, **opts, &block|
42
+ # TODO: replace with `super(*args, **opts, &block)` when <= 2.6 support is dropped
43
+ result = if RUBY_VERSION < "2.7" && opts.blank?
44
+ super(*args, &block)
45
+ else
46
+ super(*args, **opts, &block)
47
+ end
43
48
 
44
49
  return self if result.equal?(items)
45
50
 
@@ -50,8 +55,13 @@ module Collectible
50
55
 
51
56
  def collection_wrap_values_on(*methods)
52
57
  methods.each do |method_name|
53
- around_method(method_name, prevent_double_wrapping_for: PROXY_MODULE_NAME) do |*args, &block|
54
- result = super(*args, &block)
58
+ around_method(method_name, prevent_double_wrapping_for: PROXY_MODULE_NAME) do |*args, **opts, &block|
59
+ # TODO: replace with `super(...)` when <= 2.6 support is dropped
60
+ result = if RUBY_VERSION < "2.7" && opts.blank?
61
+ super(*args, &block)
62
+ else
63
+ super(*args, **opts, &block)
64
+ end
55
65
 
56
66
  if result.respond_to?(:transform_values)
57
67
  result.transform_values { |collection| collection_wrap { collection } }
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Collectible
4
4
  # This constant is managed by spicerack
5
- VERSION = "0.25.3"
5
+ VERSION = "0.25.8.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collectible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.3
4
+ version: 0.25.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Allen Rettberg
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-23 00:00:00.000000000 Z
12
+ date: 2021-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -31,28 +31,28 @@ dependencies:
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 0.25.3
34
+ version: 0.25.8.1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 0.25.3
41
+ version: 0.25.8.1
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: tablesalt
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - '='
47
47
  - !ruby/object:Gem::Version
48
- version: 0.25.3
48
+ version: 0.25.8.1
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
53
  - - '='
54
54
  - !ruby/object:Gem::Version
55
- version: 0.25.3
55
+ version: 0.25.8.1
56
56
  description: Perform operations on and pass around explicit collections of objects
57
57
  email:
58
58
  - allen.rettberg@freshly.com
@@ -79,7 +79,7 @@ metadata:
79
79
  homepage_uri: https://github.com/Freshly/spicerack/tree/master/collectible
80
80
  source_code_uri: https://github.com/Freshly/spicerack/tree/master/collectible
81
81
  changelog_uri: https://github.com/Freshly/spicerack/blob/master/collectible/CHANGELOG.md
82
- documentation_uri: https://www.rubydoc.info/gems/collectible/0.25.3
82
+ documentation_uri: https://www.rubydoc.info/gems/collectible/0.25.8.1
83
83
  post_install_message:
84
84
  rdoc_options: []
85
85
  require_paths:
@@ -95,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  requirements: []
98
- rubygems_version: 3.1.4
98
+ rubygems_version: 3.1.6
99
99
  signing_key:
100
100
  specification_version: 4
101
101
  summary: Provides an extensible framework for building array-like object collections