re2 2.1.3-x86_64-linux → 2.2.0-x86_64-linux

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: c773fd3902e096981903c141c691737a6e702262bea3e3b546136d4cf858a6a2
4
- data.tar.gz: 6aedb8d577e18ccd23eb3e22f9589f2bf5a1c1171c652a374eda8bb96ffd6afe
3
+ metadata.gz: e9960963e5a225b22f605c8faae29f1d4cf14500479773e79cd8a16b9dead25f
4
+ data.tar.gz: 519de12c2db8a7a801b901b1a4b924dd45b727f2303eb0aafb7b1b42043b47a8
5
5
  SHA512:
6
- metadata.gz: 9a98f68d6543ad73360ed60267e42b4732fba66f20d7cc33c9de8d4d540e76be1e0b35365e43ec2c7e94191c8be2bc060f7417555cd0c52136f6991affbb9b40
7
- data.tar.gz: '088e928b1e57b0ccb8e5d77c2b077eae7aa7a043e86f37863924580da9ae6679cbd129b1e8dc2a3c4ef66e0e051ee9e49b7d0e88c35875823d0fa734e5ed5f08'
6
+ metadata.gz: 205b56ec06da2e759f9e1436552c3cd2ea3fa1d4905052d867b125c7cc7064fb2708b32a2da9aab40b4871a0207d725fb2fbbc0b90cc7fea59a41662dcadd1e8
7
+ data.tar.gz: 815b6a188aa125712c86e3ccae9bbd4e64e26eafd4d18c276f90d424a5685d26a7e1c675d6ba95bdcc8140869b2ee36751b339a21a5e61e68579f924b2cbe576
data/README.md CHANGED
@@ -5,7 +5,7 @@ Ruby bindings to [RE2][], a "fast, safe, thread-friendly alternative to
5
5
  backtracking regular expression engines like those used in PCRE, Perl, and
6
6
  Python".
7
7
 
8
- **Current version:** 2.1.3
8
+ **Current version:** 2.2.0
9
9
  **Supported Ruby versions:** 2.6, 2.7, 3.0, 3.1, 3.2
10
10
  **Bundled RE2 version:** libre2.11 (2023-09-01)
11
11
  **Supported RE2 versions:** libre2.0 (< 2020-03-02), libre2.1 (2020-03-02), libre2.6 (2020-03-03), libre2.7 (2020-05-01), libre2.8 (2020-07-06), libre2.9 (2020-11-01), libre2.10 (2022-12-01), libre2.11 (2023-07-01)
data/dependencies.yml CHANGED
@@ -1,9 +1,7 @@
1
+ ---
1
2
  libre2:
2
- version: "2023-09-01"
3
- sha256: "5bb6875ae1cd1e9fedde98018c346db7260655f86fdb8837e3075103acd3649b"
4
- # sha-256 hash provided in https://github.com/google/re2/releases/download/2023-09-01/re2-2023-09-01.tar.gz
5
-
3
+ version: '2023-09-01'
4
+ sha256: 5bb6875ae1cd1e9fedde98018c346db7260655f86fdb8837e3075103acd3649b
6
5
  abseil:
7
- version: "20230125.3"
8
- sha256: 5366d7e7fa7ba0d915014d387b66d0d002c03236448e1ba9ef98122c13b35c36
9
- # sha-256 hash provided in https://github.com/abseil/abseil-cpp/archive/refs/tags/20230125.3.tar.gz
6
+ version: '20230802.1'
7
+ sha256: 987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed
data/ext/re2/extconf.rb CHANGED
@@ -296,17 +296,18 @@ ABSL_LDFLAGS = %w[
296
296
  -labsl_crc32c
297
297
  -labsl_crc_internal
298
298
  -labsl_crc_cpu_detect
299
+ -labsl_raw_hash_set
299
300
  -labsl_hash
300
301
  -labsl_city
301
302
  -labsl_bad_variant_access
302
303
  -labsl_low_level_hash
303
- -labsl_raw_hash_set
304
304
  -labsl_hashtablez_sampler
305
305
  -labsl_exponential_biased
306
306
  -labsl_bad_optional_access
307
307
  -labsl_str_format_internal
308
308
  -labsl_synchronization
309
309
  -labsl_graphcycles_internal
310
+ -labsl_kernel_timeout_internal
310
311
  -labsl_stacktrace
311
312
  -labsl_symbolize
312
313
  -ldbghelp
@@ -316,9 +317,10 @@ ABSL_LDFLAGS = %w[
316
317
  -labsl_time
317
318
  -labsl_civil_time
318
319
  -labsl_strings
320
+ -labsl_string_view
319
321
  -labsl_strings_internal
320
- -ladvapi32
321
322
  -labsl_base
323
+ -ladvapi32
322
324
  -labsl_spinlock_wait
323
325
  -labsl_int128
324
326
  -labsl_throw_delegate
@@ -396,6 +398,8 @@ def build_with_vendored_libraries
396
398
 
397
399
  process_recipe(abseil_recipe) do |recipe|
398
400
  recipe.configure_options += ['-DABSL_PROPAGATE_CXX_STD=ON', '-DCMAKE_CXX_VISIBILITY_PRESET=hidden']
401
+ # Workaround for https://github.com/abseil/abseil-cpp/issues/1510
402
+ recipe.configure_options += ['-DCMAKE_CXX_FLAGS=-DABSL_FORCE_WAITER_MODE=4'] if windows?
399
403
  end
400
404
 
401
405
  process_recipe(re2_recipe) do |recipe|
data/ext/re2/recipes.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  PACKAGE_ROOT_DIR = File.expand_path('../..', __dir__)
2
- REQUIRED_MINI_PORTILE_VERSION = '~> 2.8.4' # keep this version in sync with the one in the gemspec
2
+ REQUIRED_MINI_PORTILE_VERSION = '~> 2.8.5' # keep this version in sync with the one in the gemspec
3
3
 
4
4
  def build_recipe(name, version)
5
5
  require 'rubygems'
@@ -10,7 +10,7 @@ def build_recipe(name, version)
10
10
  recipe.target = File.join(PACKAGE_ROOT_DIR, 'ports')
11
11
  recipe.configure_options += [
12
12
  # abseil needs a C++14 compiler
13
- '-DCMAKE_CXX_STANDARD=17',
13
+ '-DCMAKE_CXX_STANDARD=14',
14
14
  # needed for building the C extension shared library with -fPIC
15
15
  '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
16
16
  # ensures pkg-config and installed libraries will be in lib, not lib64
data/lib/2.6/re2.so CHANGED
Binary file
data/lib/2.7/re2.so CHANGED
Binary file
data/lib/3.0/re2.so CHANGED
Binary file
data/lib/3.1/re2.so CHANGED
Binary file
data/lib/3.2/re2.so CHANGED
Binary file
data/lib/re2/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RE2
4
- VERSION = "2.1.3"
4
+ VERSION = "2.2.0"
5
5
  end
data/re2.gemspec CHANGED
@@ -40,5 +40,5 @@ Gem::Specification.new do |s|
40
40
  s.add_development_dependency("rake-compiler", "~> 1.2.1")
41
41
  s.add_development_dependency("rake-compiler-dock", "~> 1.3.0")
42
42
  s.add_development_dependency("rspec", "~> 3.2")
43
- s.add_runtime_dependency("mini_portile2", "~> 2.8.4") # keep version in sync with extconf.rb
43
+ s.add_runtime_dependency("mini_portile2", "~> 2.8.5") # keep version in sync with extconf.rb
44
44
  end
data/spec/kernel_spec.rb CHANGED
@@ -9,5 +9,21 @@ RSpec.describe Kernel do
9
9
 
10
10
  expect(re).not_to be_case_sensitive
11
11
  end
12
+
13
+ it "raises an error if given an inappropriate type" do
14
+ expect { RE2(nil) }.to raise_error(TypeError)
15
+ end
16
+
17
+ it "allows invalid patterns to be created" do
18
+ re = RE2('???', :log_errors => false)
19
+
20
+ expect(re).to be_a(RE2::Regexp)
21
+ end
22
+
23
+ it "supports passing something that can be coerced to a String as input" do
24
+ re = RE2(StringLike.new('w(o)(o)'))
25
+
26
+ expect(re).to be_a(RE2::Regexp)
27
+ end
12
28
  end
13
29
  end
@@ -18,9 +18,15 @@ RSpec.describe RE2::Regexp do
18
18
  re = RE2::Regexp.new('???', :log_errors => false)
19
19
  expect(re).to be_a(RE2::Regexp)
20
20
  end
21
+
22
+ it "supports passing something that can be coerced to a String as input" do
23
+ re = RE2::Regexp.new(StringLike.new('w(o)(o)'))
24
+
25
+ expect(re).to be_a(RE2::Regexp)
26
+ end
21
27
  end
22
28
 
23
- describe "#compile" do
29
+ describe ".compile" do
24
30
  it "returns an instance given only a pattern" do
25
31
  re = RE2::Regexp.compile('woo')
26
32
  expect(re).to be_a(RE2::Regexp)
@@ -31,10 +37,20 @@ RSpec.describe RE2::Regexp do
31
37
  expect(re).to be_a(RE2::Regexp)
32
38
  end
33
39
 
40
+ it "raises an error if given an inappropriate type" do
41
+ expect { RE2::Regexp.compile(nil) }.to raise_error(TypeError)
42
+ end
43
+
34
44
  it "allows invalid patterns to be created" do
35
45
  re = RE2::Regexp.compile('???', :log_errors => false)
36
46
  expect(re).to be_a(RE2::Regexp)
37
47
  end
48
+
49
+ it "supports passing something that can be coerced to a String as input" do
50
+ re = RE2::Regexp.compile(StringLike.new('w(o)(o)'))
51
+
52
+ expect(re).to be_a(RE2::Regexp)
53
+ end
38
54
  end
39
55
 
40
56
  describe "#options" do
@@ -59,7 +75,7 @@ RSpec.describe RE2::Regexp do
59
75
 
60
76
  it "is populated with overridden options when specified" do
61
77
  options = RE2::Regexp.new('woo', :case_sensitive => false).options
62
- expect(options[:case_sensitive]).to eq(false)
78
+ expect(options).to include(:case_sensitive => false)
63
79
  end
64
80
  end
65
81
 
@@ -82,7 +98,7 @@ RSpec.describe RE2::Regexp do
82
98
  expect(error_arg).to be_nil
83
99
  end
84
100
 
85
- it "returns the offending portin of the regexp if there is an error" do
101
+ it "returns the offending portion of the regexp if there is an error" do
86
102
  error_arg = RE2::Regexp.new('wo(o', :log_errors => false).error_arg
87
103
  expect(error_arg).to eq("wo(o")
88
104
  end
data/spec/re2_spec.rb CHANGED
@@ -12,11 +12,12 @@ RSpec.describe RE2 do
12
12
  expect(RE2.Replace("Good morning", "(?i)gOOD MORNING", "hi")).to eq("hi")
13
13
  end
14
14
 
15
- it "does not perform replacements in-place" do
15
+ it "does not perform replacements in-place", :aggregate_failures do
16
16
  name = "Robert"
17
17
  replacement = RE2.Replace(name, "R", "Cr")
18
18
 
19
- expect(name).not_to equal(replacement)
19
+ expect(name).to eq("Robert")
20
+ expect(replacement).to eq("Crobert")
20
21
  end
21
22
 
22
23
  it "supports passing an RE2::Regexp as the pattern" do
@@ -89,11 +90,12 @@ RSpec.describe RE2 do
89
90
  expect(RE2.GlobalReplace("Robert", "(?i)r", "w")).to eq("wobewt")
90
91
  end
91
92
 
92
- it "does not perform replacement in-place" do
93
+ it "does not perform replacement in-place", :aggregate_failures do
93
94
  name = "Robert"
94
95
  replacement = RE2.GlobalReplace(name, "(?i)R", "w")
95
96
 
96
- expect(name).not_to equal(replacement)
97
+ expect(name).to eq("Robert")
98
+ expect(replacement).to eq("wobewt")
97
99
  end
98
100
 
99
101
  it "supports passing an RE2::Regexp as the pattern" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: re2
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.3
4
+ version: 2.2.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Paul Mucur
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-09-23 00:00:00.000000000 Z
12
+ date: 2023-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake-compiler