collectible 0.25.4 → 0.26.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa3196c0572ee8476d909f25109bc7e0e10fb6acbfb228db60ff6ec25bd9cf22
|
4
|
+
data.tar.gz: 0aaac31a8997d9f39efdee1834f6cede289573dac80b9629802fa291c81d136a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f99f91abd4428ffca84d94aeb49cc5c462b03017163cd62393efc842002b44cb719c3ac33c1880036b40beb902abe78f0bf0b4f4f9623f32ecbf6ac80725ab5
|
7
|
+
data.tar.gz: 74275bd999f6de6232905099cada0bbc0ad7a0f73581c1b62ae6949523c5c3c7edea96bfffccf13052a288538b7fa3e6d60ddab36949cf3bd1de8572fd238d81
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Perform operations on and pass around explicit collections of objects
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/collectible.svg)](https://badge.fury.io/rb/collectible)
|
6
|
-
[![Build Status](https://semaphoreci.com/api/v1/freshly/spicerack/branches/
|
6
|
+
[![Build Status](https://semaphoreci.com/api/v1/freshly/spicerack/branches/main/badge.svg)](https://semaphoreci.com/freshly/spicerack)
|
7
7
|
[![Maintainability](https://api.codeclimate.com/v1/badges/7e089c2617c530a85b17/maintainability)](https://codeclimate.com/github/Freshly/spicerack/maintainability)
|
8
8
|
[![Test Coverage](https://api.codeclimate.com/v1/badges/7e089c2617c530a85b17/test_coverage)](https://codeclimate.com/github/Freshly/spicerack/test_coverage)
|
9
9
|
|
@@ -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 |*
|
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(
|
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
|
-
|
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
|
-
|
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 } }
|
data/lib/collectible/version.rb
CHANGED
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.
|
4
|
+
version: 0.26.0.2
|
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-
|
12
|
+
date: 2021-04-28 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.
|
34
|
+
version: 0.26.0.2
|
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.
|
41
|
+
version: 0.26.0.2
|
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.
|
48
|
+
version: 0.26.0.2
|
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.
|
55
|
+
version: 0.26.0.2
|
56
56
|
description: Perform operations on and pass around explicit collections of objects
|
57
57
|
email:
|
58
58
|
- allen.rettberg@freshly.com
|
@@ -72,14 +72,14 @@ files:
|
|
72
72
|
- lib/collectible/collection/wraps_collection_methods.rb
|
73
73
|
- lib/collectible/collection_base.rb
|
74
74
|
- lib/collectible/version.rb
|
75
|
-
homepage: https://github.com/Freshly/spicerack/tree/
|
75
|
+
homepage: https://github.com/Freshly/spicerack/tree/main/collectible
|
76
76
|
licenses:
|
77
77
|
- MIT
|
78
78
|
metadata:
|
79
|
-
homepage_uri: https://github.com/Freshly/spicerack/tree/
|
80
|
-
source_code_uri: https://github.com/Freshly/spicerack/tree/
|
81
|
-
changelog_uri: https://github.com/Freshly/spicerack/blob/
|
82
|
-
documentation_uri: https://www.rubydoc.info/gems/collectible/0.
|
79
|
+
homepage_uri: https://github.com/Freshly/spicerack/tree/main/collectible
|
80
|
+
source_code_uri: https://github.com/Freshly/spicerack/tree/main/collectible
|
81
|
+
changelog_uri: https://github.com/Freshly/spicerack/blob/main/collectible/CHANGELOG.md
|
82
|
+
documentation_uri: https://www.rubydoc.info/gems/collectible/0.26.0.2
|
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.
|
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
|