collectible 0.25.6 → 0.25.7

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: 5c00e9019c5bd11322d226d74ea011016930fe9cea6948742da132719cc6217c
4
- data.tar.gz: f820ce5612ba74d6360c6c9e5410015edcd4566cc87b1c98d891edf5635d1e59
3
+ metadata.gz: d7cd54242bcaca5816b9b81d58ea3eb70985768948eadaaaac6f2b90e90659c5
4
+ data.tar.gz: 64e7fe2470a95a145e446ddee6fb7a06e104eed7b8a9a67c1c690cb96a207733
5
5
  SHA512:
6
- metadata.gz: fc3780a2e339029d33bf9a3cfec7ca2ef8d64dd48cbcbbd26d09661a16e726e7e246781c7aed87312ce738d3f1db2646268fa2c236e94b777cf7c6406725dabc
7
- data.tar.gz: adef32f5d4339532e5d430e61ff65a2294470c9c94c2298b034c5964b88ab83f5904a1ab263b3527f4fc3db72f1e0ed5ff0cfa013641023623132a1c4522f435
6
+ metadata.gz: c019de4a205780a0d2596be846f099c67639371689c45e32e2a3716f7dde44aed4dc3016d70726c806c4654aadbc636b972901ccfe36e4bec92502801bcba3c0
7
+ data.tar.gz: f5af017e1c4d58a0d9ba41eeeea3d00a9befbf7691500809790455589f6b26fcf31a9bb78947979d773545f3926b3ba8629d6c7d7f76f9cc88aca100ca92f93c
@@ -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.6"
5
+ VERSION = "0.25.7"
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.6
4
+ version: 0.25.7
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: 2021-02-24 00:00:00.000000000 Z
12
+ date: 2021-04-09 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.6
34
+ version: 0.25.7
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.6
41
+ version: 0.25.7
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.6
48
+ version: 0.25.7
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.6
55
+ version: 0.25.7
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.6
82
+ documentation_uri: https://www.rubydoc.info/gems/collectible/0.25.7
83
83
  post_install_message:
84
84
  rdoc_options: []
85
85
  require_paths: