New Upstream Release - ruby-regexp-property-values

Ready changes

Summary

Merged new upstream version: 1.3.0 (was: 1.0.0).

Resulting package

Built on 2022-05-21T06:53 (took 4m20s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases ruby-regexp-property-values-dbgsymapt install -t fresh-releases ruby-regexp-property-values

Lintian Result

Diff

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644
index 0000000..1df8e9a
--- /dev/null
+++ b/.github/workflows/tests.yml
@@ -0,0 +1,22 @@
+name: tests
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    strategy:
+      matrix:
+        ruby: [ '2.3', '3.1', 'jruby-head' ] # TODO: 'ruby-head' after https://github.com/knu/sorted_set/issues/11
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Set up Ruby ${{ matrix.ruby }}
+        uses: ruby/setup-ruby@v1
+        with:
+          ruby-version: ${{ matrix.ruby }}
+      - name: Install dependencies
+        run: bundle install --jobs 4
+      - name: Test with Rake
+        run: bundle exec rake
diff --git a/.gitignore b/.gitignore
index 7ab824f..472df75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,6 +15,7 @@
 .ruby-version
 .tags
 .tags1
+.tool-versions
 bbin/
 binstubs/*
 bundler_stubs/*/.yardoc
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 1c50ff7..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-sudo: false
-language: ruby
-rvm:
-  - 2.1
-  - 2.4
-  - 2.5
-  - 2.6
-  - jruby-9.1.9.0
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bea5b9a..d661896 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
+## [1.3.0] - 2022-04-07
+
+### Added
+- new properties of Ruby 3.2 / Unicode 14.0
+
+## [1.2.0] - 2021-12-31
+
+### Added
+- support for usage in Ractors
+
+## [1.1.0] - 2021-12-05
+
+### Added
+- added new properties from Ruby `3.1.0` to output of `::all`, `::all_for_current_ruby`
+- added options to run `::update` with custom ucd/emoji source paths
+
 ## [1.0.0] - 2019-06-16
 
 ### Changed
diff --git a/Gemfile b/Gemfile
index 60826cf..120239e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -4,3 +4,9 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
 
 # Specify your gem's dependencies in regexp_property_values.gemspec
 gemspec
+
+gem 'character_set', '~> 1.4.0'
+gem 'rake', '~> 13.0'
+gem 'rake-compiler', '~> 1.0'
+gem 'range_compressor', '~> 1.0'
+gem 'rspec', '~> 3.0'
diff --git a/README.md b/README.md
index 0d484d4..3129d8f 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
 # RegexpPropertyValues
 
 [![Gem Version](https://badge.fury.io/rb/regexp_property_values.svg)](http://badge.fury.io/rb/regexp_property_values)
-[![Build Status](https://travis-ci.org/jaynetics/regexp_property_values.svg?branch=master)](https://travis-ci.org/jaynetics/regexp_property_values)
+[![Build Status](https://github.com/jaynetics/regexp_property_values/workflows/tests/badge.svg)](https://github.com/jaynetics/regexp_property_values/actions)
 
 This small library lets you see which property values are supported by the regular expression engine of the Ruby version you are running and directly reads out their codepoint ranges from there.
 
@@ -34,6 +34,8 @@ PV['foobar'].supported_by_current_ruby? # => false
 PV['AHex'].matched_characters # => %w[0 1 2 3 4 5 6 7 8 9 A B C ...]
 PV['AHex'].matched_codepoints # => [48, 49, 50, ...]
 PV['AHex'].matched_ranges # => [48..57, 65..70, 97..102]
+
+PV['foobar'].matched_ranges # => RegexpPropertyValues::Error
 ```
 
 If [`character_set`](https://github.com/jaynetics/character_set) is installed, you can also do this:
@@ -49,5 +51,6 @@ PV['AHex'].character_set # => #<CharacterSet: {48, 49...} (size: 22)>
 PV.alias_hash # => { <Value name='M'> => <Value name='Mark'>, ... }
 
 # download a list of possible properties for the running Ruby version
+# (only used for .all and .alias_hash, not needed for prop lookup via .[])
 PV.update
 ```
diff --git a/Rakefile b/Rakefile
index 5cbabfa..88e96af 100644
--- a/Rakefile
+++ b/Rakefile
@@ -32,3 +32,8 @@ if RUBY_PLATFORM !~ /java/i
   # recompile before running specs
   task(:spec).enhance([:compile])
 end
+
+task :update do
+  require_relative 'lib/regexp_property_values'
+  RegexpPropertyValues.update
+end
diff --git a/debian/changelog b/debian/changelog
index 0c74397..9d8edc3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+ruby-regexp-property-values (1.3.0-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 21 May 2022 06:49:49 -0000
+
 ruby-regexp-property-values (1.0.0-2) unstable; urgency=medium
 
   * Reupload to unstable
diff --git a/debian/patches/remove-git-in-gemspec.patch b/debian/patches/remove-git-in-gemspec.patch
index 4ebb062..ed0c05b 100644
--- a/debian/patches/remove-git-in-gemspec.patch
+++ b/debian/patches/remove-git-in-gemspec.patch
@@ -1,6 +1,8 @@
---- a/regexp_property_values.gemspec
-+++ b/regexp_property_values.gemspec
-@@ -15,9 +15,7 @@
+Index: ruby-regexp-property-values/regexp_property_values.gemspec
+===================================================================
+--- ruby-regexp-property-values.orig/regexp_property_values.gemspec
++++ ruby-regexp-property-values/regexp_property_values.gemspec
+@@ -15,9 +15,7 @@ Gem::Specification.new do |s|
    s.homepage      = 'https://github.com/jaynetics/regexp_property_values'
    s.license       = 'MIT'
  
diff --git a/ext/regexp_property_values/regexp_property_values.c b/ext/regexp_property_values/regexp_property_values.c
index 92fc5a6..27af4c7 100644
--- a/ext/regexp_property_values/regexp_property_values.c
+++ b/ext/regexp_property_values/regexp_property_values.c
@@ -56,6 +56,10 @@ VALUE method_matched_ranges(VALUE self, VALUE arg)
 
 void Init_regexp_property_values()
 {
+#ifdef HAVE_RB_EXT_RACTOR_SAFE
+  rb_ext_ractor_safe(true);
+#endif
+
   VALUE module;
   module = rb_define_module("OnigRegexpPropertyHelper");
   rb_define_singleton_method(module, "matched_ranges", method_matched_ranges, 1);
diff --git a/lib/aliases b/lib/aliases
index 0136232..31f8ea0 100644
--- a/lib/aliases
+++ b/lib/aliases
@@ -30,10 +30,12 @@ Cari;Carian
 Cc;Control
 Cf;Format
 Cher;Cherokee
+Chrs;Chorasmian
 Cn;Unassigned
 Co;Private_Use
 Combining_Mark;Mark
 Copt;Coptic
+Cpmn;Cypro_Minoan
 Cprt;Cypriot
 Cs;Surrogate
 Cyrl;Cyrillic
@@ -41,9 +43,14 @@ DI;Default_Ignorable_Code_Point
 Dep;Deprecated
 Deva;Devanagari
 Dia;Diacritic
+Diak;Dives_Akuru
 Dogr;Dogra
 Dsrt;Deseret
 Dupl;Duployan
+EBase;Emoji_Modifier_Base
+EComp;Emoji_Component
+EMod;Emoji_Modifier
+EPres;Emoji_Presentation
 Egyp;Egyptian_Hieroglyphs
 Elba;Elbasan
 Elym;Elymaic
@@ -85,6 +92,7 @@ Kana;Katakana
 Khar;Kharoshthi
 Khmr;Khmer
 Khoj;Khojki
+Kits;Khitan_Small_Script
 Knda;Kannada
 Kthi;Kaithi
 L;Letter
@@ -147,6 +155,7 @@ Orkh;Old_Turkic
 Orya;Oriya
 Osge;Osage
 Osma;Osmanya
+Ougr;Old_Uyghur
 P;Punctuation
 PCM;Prepended_Concatenation_Mark
 Palm;Palmyrene
@@ -211,10 +220,12 @@ Tglg;Tagalog
 Thaa;Thaana
 Tibt;Tibetan
 Tirh;Tirhuta
+Tnsa;Tangsa
 UIdeo;Unified_Ideograph
 Ugar;Ugaritic
 VS;Variation_Selector
 Vaii;Vai
+Vith;Vithkuqi
 WSpace;White_Space
 Wara;Warang_Citi
 Wcho;Wancho
@@ -222,6 +233,7 @@ XIDC;XID_Continue
 XIDS;XID_Start
 Xpeo;Old_Persian
 Xsux;Cuneiform
+Yezi;Yezidi
 Yiii;Yi
 Z;Separator
 Zanb;Zanabazar_Square
diff --git a/lib/regexp_property_values.rb b/lib/regexp_property_values.rb
index abb2930..0d9a7f3 100644
--- a/lib/regexp_property_values.rb
+++ b/lib/regexp_property_values.rb
@@ -31,7 +31,7 @@ module RegexpPropertyValues
     end.to_h
   end
 
-  def self.update
-    Updater.call
+  def self.update(ucd_path: nil, emoji_path: nil)
+    Updater.call(ucd_path: ucd_path, emoji_path: emoji_path)
   end
 end
diff --git a/lib/regexp_property_values/updater.rb b/lib/regexp_property_values/updater.rb
index b9eddeb..bab77d1 100644
--- a/lib/regexp_property_values/updater.rb
+++ b/lib/regexp_property_values/updater.rb
@@ -5,7 +5,7 @@ module RegexpPropertyValues
     require 'fileutils'
     require 'set'
 
-    BASE_URL = 'http://www.unicode.org/Public/'
+    BASE_URL = 'https://www.unicode.org/Public/UCD/latest/ucd'
 
     UCD_FILES = %w[
       Blocks.txt
@@ -23,9 +23,9 @@ module RegexpPropertyValues
 
     TMP_DIR = File.join(__dir__, 'tmp_ucd')
 
-    def call
+    def call(ucd_path: nil, emoji_path: nil)
       prepare_tmp_dir
-      download_ucd_files
+      download_ucd_files(ucd_path: ucd_path, emoji_path: emoji_path)
       write_values
       write_aliases
       remove_tmp_dir
@@ -37,17 +37,16 @@ module RegexpPropertyValues
       FileUtils.mkdir(TMP_DIR)
     end
 
-    def download_ucd_files
-      unicode_version = RbConfig::CONFIG.fetch('UNICODE_VERSION')
-      emoji_version   = RbConfig::CONFIG.fetch('UNICODE_EMOJI_VERSION')
-      puts 'This will load ucd and emoji data for the CURRENT RUBY '\
-           "(#{unicode_version} / #{emoji_version}). Run this on the "\
-           'latest Ruby version you want to support. Continue? [y/n]'
+    def download_ucd_files(ucd_path: nil, emoji_path: nil)
+      puts 'This will try to load the latest UCD data. Continue? [y/n]'
       return puts 'download skipped.' unless $stdin.gets =~ /^y/i
 
+      ucd_path   ||= ENV['RPV_UCD_PATH']   || BASE_URL
+      emoji_path ||= ENV['RPV_EMOJI_PATH'] || "#{BASE_URL}/emoji/"
+
       Dir.chdir(TMP_DIR) do
-        UCD_FILES.each   { |f| `wget #{BASE_URL}/#{unicode_version}/ucd/#{f}` }
-        EMOJI_FILES.each { |f| `wget #{BASE_URL}/emoji/#{emoji_version}/#{f}` }
+        UCD_FILES.each   { |f| `wget #{ucd_path}/#{f}` }
+        EMOJI_FILES.each { |f| `wget #{emoji_path}/#{f}` }
       end
     end
 
diff --git a/lib/regexp_property_values/version.rb b/lib/regexp_property_values/version.rb
index 9feaa8f..638a9da 100644
--- a/lib/regexp_property_values/version.rb
+++ b/lib/regexp_property_values/version.rb
@@ -1,3 +1,3 @@
 module RegexpPropertyValues
-  VERSION = '1.0.0'
+  VERSION = '1.3.0'
 end
diff --git a/lib/values b/lib/values
index 7629149..9d182a5 100644
--- a/lib/values
+++ b/lib/values
@@ -6,6 +6,8 @@ Age=10.0
 Age=11.0
 Age=12.0
 Age=12.1
+Age=13.0
+Age=14.0
 Age=2.0
 Age=2.1
 Age=3.0
@@ -60,6 +62,7 @@ Changes_When_Lowercased
 Changes_When_Titlecased
 Changes_When_Uppercased
 Cherokee
+Chorasmian
 Close_Punctuation
 Cntrl
 Common
@@ -69,6 +72,7 @@ Coptic
 Cuneiform
 Currency_Symbol
 Cypriot
+Cypro_Minoan
 Cyrillic
 Dash
 Dash_Punctuation
@@ -79,6 +83,7 @@ Deseret
 Devanagari
 Diacritic
 Digit
+Dives_Akuru
 Dogra
 Duployan
 Egyptian_Hieroglyphs
@@ -132,6 +137,7 @@ In_Ancient_Greek_Numbers
 In_Ancient_Symbols
 In_Arabic
 In_Arabic_Extended_A
+In_Arabic_Extended_B
 In_Arabic_Mathematical_Alphabetic_Symbols
 In_Arabic_Presentation_Forms_A
 In_Arabic_Presentation_Forms_B
@@ -170,6 +176,7 @@ In_CJK_Unified_Ideographs_Extension_C
 In_CJK_Unified_Ideographs_Extension_D
 In_CJK_Unified_Ideographs_Extension_E
 In_CJK_Unified_Ideographs_Extension_F
+In_CJK_Unified_Ideographs_Extension_G
 In_Carian
 In_Caucasian_Albanian
 In_Chakma
@@ -177,6 +184,7 @@ In_Cham
 In_Cherokee
 In_Cherokee_Supplement
 In_Chess_Symbols
+In_Chorasmian
 In_Combining_Diacritical_Marks
 In_Combining_Diacritical_Marks_Extended
 In_Combining_Diacritical_Marks_Supplement
@@ -191,6 +199,7 @@ In_Cuneiform
 In_Cuneiform_Numbers_and_Punctuation
 In_Currency_Symbols
 In_Cypriot_Syllabary
+In_Cypro_Minoan
 In_Cyrillic
 In_Cyrillic_Extended_A
 In_Cyrillic_Extended_B
@@ -200,6 +209,7 @@ In_Deseret
 In_Devanagari
 In_Devanagari_Extended
 In_Dingbats
+In_Dives_Akuru
 In_Dogra
 In_Domino_Tiles
 In_Duployan
@@ -216,6 +226,7 @@ In_Enclosed_Ideographic_Supplement
 In_Ethiopic
 In_Ethiopic_Extended
 In_Ethiopic_Extended_A
+In_Ethiopic_Extended_B
 In_Ethiopic_Supplement
 In_General_Punctuation
 In_Geometric_Shapes
@@ -255,6 +266,7 @@ In_Inscriptional_Parthian
 In_Javanese
 In_Kaithi
 In_Kana_Extended_A
+In_Kana_Extended_B
 In_Kana_Supplement
 In_Kanbun
 In_Kangxi_Radicals
@@ -263,6 +275,7 @@ In_Katakana
 In_Katakana_Phonetic_Extensions
 In_Kayah_Li
 In_Kharoshthi
+In_Khitan_Small_Script
 In_Khmer
 In_Khmer_Symbols
 In_Khojki
@@ -275,6 +288,8 @@ In_Latin_Extended_B
 In_Latin_Extended_C
 In_Latin_Extended_D
 In_Latin_Extended_E
+In_Latin_Extended_F
+In_Latin_Extended_G
 In_Lepcha
 In_Letterlike_Symbols
 In_Limbu
@@ -282,6 +297,7 @@ In_Linear_A
 In_Linear_B_Ideograms
 In_Linear_B_Syllabary
 In_Lisu
+In_Lisu_Supplement
 In_Low_Surrogates
 In_Lycian
 In_Lydian
@@ -338,6 +354,7 @@ In_Old_Persian
 In_Old_Sogdian
 In_Old_South_Arabian
 In_Old_Turkic
+In_Old_Uyghur
 In_Optical_Character_Recognition
 In_Oriya
 In_Ornamental_Dingbats
@@ -387,6 +404,7 @@ In_Supplementary_Private_Use_Area_B
 In_Sutton_SignWriting
 In_Syloti_Nagri
 In_Symbols_and_Pictographs_Extended_A
+In_Symbols_for_Legacy_Computing
 In_Syriac
 In_Syriac_Supplement
 In_Tagalog
@@ -399,29 +417,36 @@ In_Tai_Xuan_Jing_Symbols
 In_Takri
 In_Tamil
 In_Tamil_Supplement
+In_Tangsa
 In_Tangut
 In_Tangut_Components
+In_Tangut_Supplement
 In_Telugu
 In_Thaana
 In_Thai
 In_Tibetan
 In_Tifinagh
 In_Tirhuta
+In_Toto
 In_Transport_and_Map_Symbols
 In_Ugaritic
 In_Unified_Canadian_Aboriginal_Syllabics
 In_Unified_Canadian_Aboriginal_Syllabics_Extended
+In_Unified_Canadian_Aboriginal_Syllabics_Extended_A
 In_Vai
 In_Variation_Selectors
 In_Variation_Selectors_Supplement
 In_Vedic_Extensions
 In_Vertical_Forms
+In_Vithkuqi
 In_Wancho
 In_Warang_Citi
+In_Yezidi
 In_Yi_Radicals
 In_Yi_Syllables
 In_Yijing_Hexagram_Symbols
 In_Zanabazar_Square
+In_Znamenny_Musical_Notation
 Inherited
 Initial_Punctuation
 Inscriptional_Pahlavi
@@ -433,6 +458,7 @@ Kannada
 Katakana
 Kayah_Li
 Kharoshthi
+Khitan_Small_Script
 Khmer
 Khojki
 Khudawadi
@@ -496,6 +522,7 @@ Old_Persian
 Old_Sogdian
 Old_South_Arabian
 Old_Turkic
+Old_Uyghur
 Open_Punctuation
 Oriya
 Osage
@@ -560,6 +587,7 @@ Tai_Tham
 Tai_Viet
 Takri
 Tamil
+Tangsa
 Tangut
 Telugu
 Terminal_Punctuation
@@ -569,6 +597,7 @@ Tibetan
 Tifinagh
 Tirhuta
 Titlecase_Letter
+Toto
 Ugaritic
 Unassigned
 Unified_Ideograph
@@ -578,6 +607,7 @@ Uppercase
 Uppercase_Letter
 Vai
 Variation_Selector
+Vithkuqi
 Wancho
 Warang_Citi
 White_Space
@@ -586,5 +616,6 @@ XDigit
 XID_Continue
 XID_Start
 XPosixPunct
+Yezidi
 Yi
 Zanabazar_Square
\ No newline at end of file
diff --git a/regexp_property_values.gemspec b/regexp_property_values.gemspec
index c5be157..fb5214e 100644
--- a/regexp_property_values.gemspec
+++ b/regexp_property_values.gemspec
@@ -23,10 +23,4 @@ Gem::Specification.new do |s|
   s.extensions = %w[ext/regexp_property_values/extconf.rb]
 
   s.required_ruby_version = '>= 2.0.0'
-
-  s.add_development_dependency 'character_set', '~> 1.4.0'
-  s.add_development_dependency 'rake', '~> 12.0'
-  s.add_development_dependency 'rake-compiler', '~> 1.0'
-  s.add_development_dependency 'range_compressor', '~> 1.0'
-  s.add_development_dependency 'rspec', '~> 3.0'
 end

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/debug/.build-id/bf/74d7eda3b313601467219b607eb7278b59923d.debug
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.0.0/regexp_property_values/regexp_property_values.so
-rw-r--r--  root/root   /usr/share/rubygems-integration/3.0.0/specifications/regexp_property_values-1.3.0.gemspec

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/debug/.build-id/1f/d639ed75979152d9b48cde1bbf75763ca35a7b.debug
-rw-r--r--  root/root   /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.1.0/regexp_property_values/regexp_property_values.so
-rw-r--r--  root/root   /usr/share/rubygems-integration/3.1.0/specifications/regexp_property_values-1.0.0.gemspec

Control files of package ruby-regexp-property-values: lines which differ (wdiff format)

  • Depends: ruby | ruby-interpreter, (>= 1:3.0~0), libc6 (>= 2.4), libruby3.1 (>= 3.1.0~preview1), libruby libruby3.0 (>= 1:3.1~0), libruby 3.0.0~preview2), ruby (<< 1:3.2~) 1:3.1~)
  • Ruby-Versions: ruby3.0

Control files of package ruby-regexp-property-values-dbgsym: lines which differ (wdiff format)

  • Build-Ids: 1fd639ed75979152d9b48cde1bbf75763ca35a7b bf74d7eda3b313601467219b607eb7278b59923d
  • Ruby-Versions: ruby3.0

More details

Full run details