collectible 0.25.2 → 0.25.8

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: 2f64e15b7c09a1c1c37d44629d10b9560e0849ecb55506d44aa0e916c9b46ebe
4
- data.tar.gz: 343bcf517fe95486d86e3f51e2bc86e24132ad6f4e77328a5e1a3a5f6b97c2b2
3
+ metadata.gz: dd016ef036d65c450813ebee6438dcd5948d51d9b18af40fe09fe27c3a34cc26
4
+ data.tar.gz: d507923eb402780bc6de2b94c1859f057ae819d47c82a623b755d8b17d9f81a2
5
5
  SHA512:
6
- metadata.gz: f6196081a47c8af6a39b741689834560a5baa33fcb08ae499ae01ae9f3abbcb3896a6ee44660b77c6765c3d9404869fdebae9b2a20b6e9284e5991fd9ec01636
7
- data.tar.gz: f86bc8407f4612cfa85962cbf45ea6b7a13f86b5c19b0a41abc4e0446c2e9e71b116fc296cd23a66dddd45a364fa2e033a9a89b55afcc23689c890bf29a8e471
6
+ metadata.gz: 5d2b2158bacfdb2cf4faec31376c89c6664b1d664e696debeef4c3f4100c62fa1d0d7116d72b175d157befa96476dca8d4e67053b44dbeaaa31ae321fb759b83
7
+ data.tar.gz: 9160c1f1067a27774310629e79543aa58117a5079261a0bf15d282e3904a89e5e59fa98ea6c7c16ffd7ac63db70892878afbb211c00e97e09b3973096cfb18ee
@@ -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.2"
5
+ VERSION = "0.25.8"
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.2
4
+ version: 0.25.8
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-10-16 00:00:00.000000000 Z
12
+ date: 2021-04-12 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.2
34
+ version: 0.25.8
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.2
41
+ version: 0.25.8
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.2
48
+ version: 0.25.8
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.2
55
+ version: 0.25.8
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.2
82
+ documentation_uri: https://www.rubydoc.info/gems/collectible/0.25.8
83
83
  post_install_message:
84
84
  rdoc_options: []
85
85
  require_paths: