serbea 2.1.0 → 2.2.0

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: cbaec081de265cae08c41dbcbfe2ea7686447ff169d8756f45ea446d756a4519
4
- data.tar.gz: 40d58553c10c8c10299064ce1ae88a030b947ac6c0b92aea8e8c9282cca7ac16
3
+ metadata.gz: 328bb1110c02d6c0da3abf6d0f1c26ed1c49d6f0265b82e35dafb945320ca1d5
4
+ data.tar.gz: 3ec4e316fb6c126a845b22490c944d2eedcd2c91a724a3aa5125866c56b44c53
5
5
  SHA512:
6
- metadata.gz: e4762251bb0285d122b59ac3611cbda5afdfedb6c075f97b2746456ce6be3fffd6362a82967d9bbedbc8fa092649f9e8240de293e58826dd79e4128be15c4922
7
- data.tar.gz: 3e224dbdf536ac4f8207a217cb216151ce5609c3be8e984971470267cce69b7c1ab85fa3f6c88f95467fcc553d7f6f790ef5ba54563647203b114d4221a8800c
6
+ metadata.gz: 7a657dce3ddf4ca466cffd7e22af1785f026a887b0103d783f9350a60640b518243140229dd140d2c7e6d8ca61e5170f1a2dc98ec8055bfca418a99d1243937b
7
+ data.tar.gz: 6d604bfc2749f265352cfbd75fdebd1a77be2ff02b78000b9774265f17db53833fe7b515df72531ec1de6f38aaed4ea4676121ba944ec08c40ff0245283581b4
@@ -13,7 +13,7 @@ jobs:
13
13
  runs-on: ubuntu-latest
14
14
  strategy:
15
15
  matrix:
16
- ruby_version: [2.7.2, 3.0.0, 3.2.0]
16
+ ruby_version: [3.1.0, 3.2.0, 3.3.0]
17
17
  continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
18
18
  # Has to be top level to cache properly
19
19
  env:
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.1.4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.0
4
+
5
+ - Add functionality to purge certain `Object`-based method pollution which interferes with the workings of Serbea's `Pipeline` in pure Ruby.
6
+ - Ruby 3.1 is now the minimum required version.
7
+
3
8
  ## 2.1.0
4
9
 
5
10
  - Remove Active Support as a dependency
@@ -72,7 +72,27 @@ module Serbea
72
72
  @value_methods_denylist ||= Set.new
73
73
  end
74
74
 
75
+ def self.purge_class_pollution
76
+ @pollution_purged ||= begin
77
+ polluted_methods_list.each do |name|
78
+ define_method name do |*args, **kwargs|
79
+ filter(name, *args, **kwargs)
80
+ end
81
+ end
82
+
83
+ true
84
+ end
85
+ end
86
+
87
+ def self.polluted_method(name)
88
+ polluted_methods_list.merge Array(name)
89
+ end
90
+ def self.polluted_methods_list
91
+ @polluted_methods_list ||= Set.new(%i(select to_json))
92
+ end
93
+
75
94
  def initialize(binding, value)
95
+ self.class.purge_class_pollution
76
96
  @binding = binding
77
97
  @context = binding.receiver
78
98
  @value = value
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Serbea
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
data/serbea.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.homepage = "https://github.com/bridgetownrb/serbea"
12
12
  spec.license = "MIT"
13
13
 
14
- spec.required_ruby_version = ">= 2.7"
14
+ spec.required_ruby_version = ">= 3.1"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|docs|serbea-rails)/!) }
17
17
  spec.require_paths = ["lib"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serbea
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bridgetown Team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-04 00:00:00.000000000 Z
11
+ date: 2024-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erubi
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '13.0'
55
- description:
55
+ description:
56
56
  email: maintainers@bridgetownrb.com
57
57
  executables: []
58
58
  extensions: []
@@ -77,7 +77,7 @@ homepage: https://github.com/bridgetownrb/serbea
77
77
  licenses:
78
78
  - MIT
79
79
  metadata: {}
80
- post_install_message:
80
+ post_install_message:
81
81
  rdoc_options: []
82
82
  require_paths:
83
83
  - lib
@@ -85,15 +85,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: '2.7'
88
+ version: '3.1'
89
89
  required_rubygems_version: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - ">="
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0'
94
94
  requirements: []
95
- rubygems_version: 3.1.4
96
- signing_key:
95
+ rubygems_version: 3.3.26
96
+ signing_key:
97
97
  specification_version: 4
98
98
  summary: Similar to ERB, Except Awesomer
99
99
  test_files: []