From 95e77989e4e8ea2fde86cf4f048f7d6cd7a6829f Mon Sep 17 00:00:00 2001 From: Syphax bouazzouni Date: Wed, 7 Feb 2024 02:02:22 +0100 Subject: [PATCH] update Goo and add test to catch the case of single value props choosing no lang first (#128) --- Gemfile.lock | 34 ++++++++++++++------------ test/models/test_class_request_lang.rb | 4 +++ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8e9f860d..4f700094 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: https://github.com/ontoportal-lirmm/goo.git - revision: 03da25b671d2ffa515b5dce51c6bd35980ae60c7 + revision: 8ddd2d719617ad082c6964a9efdac153cdd2b48e branch: master specs: goo (0.0.2) @@ -37,17 +37,19 @@ GEM ansi (1.5.0) ast (2.4.2) bcrypt (3.1.20) + bigdecimal (3.1.6) builder (3.2.4) coderay (1.1.3) - concurrent-ruby (1.2.2) + concurrent-ruby (1.2.3) connection_pool (2.4.1) - crack (0.4.5) + crack (0.4.6) + bigdecimal rexml cube-ruby (0.0.3) daemons (1.4.1) date (3.3.4) docile (1.4.0) - domain_name (0.6.20231109) + domain_name (0.6.20240107) email_spec (2.2.2) htmlentities (~> 4.3.3) launchy (~> 2.1) @@ -77,7 +79,7 @@ GEM faraday-rack (1.0.0) faraday-retry (1.0.3) ffi (1.16.3) - hashdiff (1.0.1) + hashdiff (1.1.0) hashie (5.0.0) htmlentities (4.3.4) http-accept (1.7.0) @@ -101,9 +103,9 @@ GEM net-pop net-smtp method_source (1.0.0) - mime-types (3.5.1) + mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2023.1205) + mime-types-data (3.2024.0206) mini_mime (1.1.5) minitest (4.7.5) minitest-reporters (0.14.24) @@ -114,21 +116,21 @@ GEM multi_json (1.15.0) multipart-post (2.3.0) net-http-persistent (2.9.4) - net-imap (0.4.8) + net-imap (0.4.10) date net-protocol net-pop (0.1.2) net-protocol net-protocol (0.2.2) timeout - net-smtp (0.4.0) + net-smtp (0.4.0.1) net-protocol netrc (0.11.0) oj (2.18.5) omni_logger (0.1.4) logger - parallel (1.23.0) - parser (3.2.2.4) + parallel (1.24.0) + parser (3.3.0.5) ast (~> 2.4.1) racc pony (1.13.1) @@ -149,9 +151,9 @@ GEM addressable (>= 2.2) redis (5.0.8) redis-client (>= 0.17.0) - redis-client (0.19.0) + redis-client (0.19.1) connection_pool - regexp_parser (2.8.3) + regexp_parser (2.9.0) request_store (1.5.1) rack (>= 1.4) rest-client (2.1.0) @@ -162,11 +164,11 @@ GEM rexml (3.2.6) rsolr (1.1.2) builder (>= 2.1.2) - rubocop (1.59.0) + rubocop (1.60.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) @@ -200,7 +202,7 @@ GEM unicode-display_width (2.5.0) uuid (2.3.9) macaddr (~> 1.0) - webmock (3.19.1) + webmock (3.20.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/test/models/test_class_request_lang.rb b/test/models/test_class_request_lang.rb index a07eeffd..d4713a89 100644 --- a/test/models/test_class_request_lang.rb +++ b/test/models/test_class_request_lang.rb @@ -47,6 +47,10 @@ def test_requested_language_found assert_equal ['industrial development'], properties.select { |x| x.to_s['altLabel'] }.values.first.map(&:to_s) assert_equal ['industrialization'], properties.select { |x| x.to_s['prefLabel'] }.values.first.map(&:to_s) + cls = get_class_by_lang('http://opendata.inrae.fr/thesaurusINRAE/c_13078', + requested_lang: :FR) + assert_equal 'carbone renouvelable', cls.prefLabel + end def test_requested_language_not_found