re2 2.9.0 → 2.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ext/re2/recipes.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # re2 (https://github.com/mudge/re2)
2
4
  # Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to
3
5
  # backtracking regular expression engines like those used in PCRE, Perl, and
@@ -7,27 +9,7 @@
7
9
  # Released under the BSD Licence, please see LICENSE.txt
8
10
 
9
11
  PACKAGE_ROOT_DIR = File.expand_path('../..', __dir__)
10
- REQUIRED_MINI_PORTILE_VERSION = '~> 2.8.5' # keep this version in sync with the one in the gemspec
11
-
12
- def build_recipe(name, version)
13
- require 'rubygems'
14
- gem('mini_portile2', REQUIRED_MINI_PORTILE_VERSION) # gemspec is not respected at install time
15
- require 'mini_portile2'
16
-
17
- MiniPortileCMake.new(name, version).tap do |recipe|
18
- recipe.target = File.join(PACKAGE_ROOT_DIR, 'ports')
19
- recipe.configure_options += [
20
- # abseil needs a C++14 compiler
21
- '-DCMAKE_CXX_STANDARD=14',
22
- # needed for building the C extension shared library with -fPIC
23
- '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
24
- # ensures pkg-config and installed libraries will be in lib, not lib64
25
- '-DCMAKE_INSTALL_LIBDIR=lib'
26
- ]
27
-
28
- yield recipe
29
- end
30
- end
12
+ REQUIRED_MINI_PORTILE_VERSION = '~> 2.8.9' # keep this version in sync with the one in the gemspec
31
13
 
32
14
  def load_recipes
33
15
  require 'yaml'
@@ -49,3 +31,24 @@ def load_recipes
49
31
 
50
32
  [abseil_recipe, re2_recipe]
51
33
  end
34
+
35
+ def build_recipe(name, version)
36
+ require 'rubygems'
37
+ gem('mini_portile2', REQUIRED_MINI_PORTILE_VERSION) # gemspec is not respected at install time
38
+ require 'mini_portile2'
39
+
40
+ MiniPortileCMake.new(name, version).tap do |recipe|
41
+ recipe.target = File.join(PACKAGE_ROOT_DIR, 'ports')
42
+ recipe.configure_options += [
43
+ # abseil needs a C++17 compiler
44
+ '-DCMAKE_CXX_STANDARD=17',
45
+ # needed for building the C extension shared library with -fPIC
46
+ '-DCMAKE_POSITION_INDEPENDENT_CODE=ON',
47
+ # ensures pkg-config and installed libraries will be in lib, not lib64
48
+ '-DCMAKE_INSTALL_LIBDIR=lib',
49
+ '-DCMAKE_CXX_VISIBILITY_PRESET=hidden'
50
+ ]
51
+
52
+ yield recipe
53
+ end
54
+ end
data/lib/re2/regexp.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # re2 (https://github.com/mudge/re2)
2
4
  # Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to
3
5
  # backtracking regular expression engines like those used in PCRE, Perl, and
data/lib/re2/scanner.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # re2 (https://github.com/mudge/re2)
2
4
  # Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to
3
5
  # backtracking regular expression engines like those used in PCRE, Perl, and
data/lib/re2/string.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # re2 (https://github.com/mudge/re2)
2
4
  # Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to
3
5
  # backtracking regular expression engines like those used in PCRE, Perl, and
@@ -11,14 +13,14 @@ require "re2"
11
13
  module RE2
12
14
  # @deprecated Use methods on {RE2} and {RE2::Regexp} instead.
13
15
  module String
14
- # @deprecated Use {RE2.Replace} instead.
16
+ # @deprecated Use {RE2.replace} instead.
15
17
  def re2_sub(*args)
16
- RE2.Replace(self, *args)
18
+ RE2.replace(self, *args)
17
19
  end
18
20
 
19
- # @deprecated Use {RE2.GlobalReplace} instead.
21
+ # @deprecated Use {RE2.global_replace} instead.
20
22
  def re2_gsub(*args)
21
- RE2.GlobalReplace(self, *args)
23
+ RE2.global_replace(self, *args)
22
24
  end
23
25
 
24
26
  # @deprecated Use {RE2::Regexp#match} instead.
@@ -26,9 +28,9 @@ module RE2
26
28
  RE2::Regexp.new(pattern).match(self, *args)
27
29
  end
28
30
 
29
- # @deprecated Use {RE2.QuoteMeta} instead.
31
+ # @deprecated Use {RE2.escape} instead.
30
32
  def re2_escape
31
- RE2.QuoteMeta(self)
33
+ RE2.escape(self)
32
34
  end
33
35
 
34
36
  alias_method :re2_quote, :re2_escape
data/lib/re2/version.rb CHANGED
@@ -10,5 +10,5 @@
10
10
 
11
11
 
12
12
  module RE2
13
- VERSION = "2.9.0"
13
+ VERSION = "2.27.0"
14
14
  end
data/lib/re2.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # re2 (https://github.com/mudge/re2)
2
4
  # Ruby bindings to RE2, a "fast, safe, thread-friendly alternative to
3
5
  # backtracking regular expression engines like those used in PCRE, Perl, and
Binary file
data/re2.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/re2/version'
2
4
 
3
5
  Gem::Specification.new do |s|
@@ -9,7 +11,7 @@ Gem::Specification.new do |s|
9
11
  s.homepage = "https://github.com/mudge/re2"
10
12
  s.extensions = ["ext/re2/extconf.rb"]
11
13
  s.license = "BSD-3-Clause"
12
- s.required_ruby_version = ">= 2.6.0"
14
+ s.required_ruby_version = ">= 3.1.0"
13
15
  s.files = [
14
16
  "dependencies.yml",
15
17
  "ext/re2/extconf.rb",
@@ -38,8 +40,8 @@ Gem::Specification.new do |s|
38
40
  "spec/re2/set_spec.rb",
39
41
  "spec/re2/scanner_spec.rb"
40
42
  ]
41
- s.add_development_dependency("rake-compiler", "~> 1.2.5")
42
- s.add_development_dependency("rake-compiler-dock", "~> 1.4.0")
43
+ s.add_development_dependency("rake-compiler", "~> 1.3.1")
44
+ s.add_development_dependency("rake-compiler-dock", "~> 1.11.0")
43
45
  s.add_development_dependency("rspec", "~> 3.2")
44
- s.add_runtime_dependency("mini_portile2", "~> 2.8.5") # keep version in sync with extconf.rb
46
+ s.add_runtime_dependency("mini_portile2", "~> 2.8.9") # keep version in sync with extconf.rb
45
47
  end
data/spec/kernel_spec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec.describe Kernel do
2
4
  describe ".RE2" do
3
5
  it "returns an RE2::Regexp instance given a pattern" do