From efc07091a6691fb19742650855a97adad94064e6 Mon Sep 17 00:00:00 2001 From: Syphax Bouazzouni <gs_bouazzouni@esi.dz> Date: Mon, 23 May 2022 18:44:06 +0200 Subject: [PATCH 1/4] add :ontologies to the serialize_default of the group model --- lib/ontologies_linked_data/models/group.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ontologies_linked_data/models/group.rb b/lib/ontologies_linked_data/models/group.rb index 73ee8fd8..913d9ee3 100644 --- a/lib/ontologies_linked_data/models/group.rb +++ b/lib/ontologies_linked_data/models/group.rb @@ -8,6 +8,7 @@ class Group < LinkedData::Models::Base attribute :created, enforce: [:date_time], :default => lambda { |record| DateTime.now } attribute :ontologies, inverse: { on: :ontology, attribute: :group } + serialize_default :acronym, :name, :description, :created, :ontologies cache_timeout 86400 end end From db5a888eb392ac6f1f6b1dfed497aafcd1b8179d Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk <alexskr@stanford.edu> Date: Wed, 22 May 2024 10:48:52 -0700 Subject: [PATCH 2/4] Revert "Feature: add :ontologies to the serialize_default of the group model" --- lib/ontologies_linked_data/models/group.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ontologies_linked_data/models/group.rb b/lib/ontologies_linked_data/models/group.rb index 913d9ee3..73ee8fd8 100644 --- a/lib/ontologies_linked_data/models/group.rb +++ b/lib/ontologies_linked_data/models/group.rb @@ -8,7 +8,6 @@ class Group < LinkedData::Models::Base attribute :created, enforce: [:date_time], :default => lambda { |record| DateTime.now } attribute :ontologies, inverse: { on: :ontology, attribute: :group } - serialize_default :acronym, :name, :description, :created, :ontologies cache_timeout 86400 end end From 70fc2c8b377b9deabc838ecd56d3bc75ec764cc2 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk <alexskr@stanford.edu> Date: Tue, 11 Jun 2024 22:40:46 -0700 Subject: [PATCH 3/4] Gemfile update --- Gemfile | 4 ++-- Gemfile.lock | 36 +++++++++++++++++++----------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Gemfile b/Gemfile index 23512929..b4bd6c44 100644 --- a/Gemfile +++ b/Gemfile @@ -34,5 +34,5 @@ group :development do gem 'rubocop', require: false end # NCBO gems (can be from a local dev path or from rubygems/git) -gem 'goo', github: 'ncbo/goo', branch: 'develop' -gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop' +gem 'goo', github: 'ncbo/goo', branch: 'master' +gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master' diff --git a/Gemfile.lock b/Gemfile.lock index 79d8e539..3b63c879 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ GIT remote: https://github.com/ncbo/goo.git - revision: 70007faf43d0d96292809f89f15a27a757ccaa25 - branch: develop + revision: 2cec53c2d84179171def81d7dc0a18e462e78fc2 + branch: master specs: goo (0.0.2) addressable (~> 2.8) @@ -16,8 +16,8 @@ GIT GIT remote: https://github.com/ncbo/sparql-client.git - revision: 1657f0dd69fd4b522d3549a6848670175f5e98cc - branch: develop + revision: e89c26aa96f184dbe9b52d51e04fb3d9ba998dbc + branch: master specs: sparql-client (1.0.1) json_pure (>= 1.4) @@ -40,9 +40,9 @@ GEM base64 (0.2.0) bcrypt (3.1.20) bigdecimal (3.1.8) - builder (3.2.4) + builder (3.3.0) coderay (1.1.3) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.3) connection_pool (2.4.1) cube-ruby (0.0.3) daemons (1.4.1) @@ -59,11 +59,13 @@ GEM faraday-net_http (>= 2.0, < 3.1) ruby2_keywords (>= 0.0.4) faraday-net_http (3.0.2) - ffi (1.16.3) + ffi (1.17.0-aarch64-linux-gnu) + ffi (1.17.0-x86_64-darwin) + ffi (1.17.0-x86_64-linux-gnu) hashie (5.0.0) htmlentities (4.3.4) http-accept (1.7.0) - http-cookie (1.0.5) + http-cookie (1.0.6) domain_name (~> 0.5) i18n (0.9.5) concurrent-ruby (~> 1.0) @@ -84,7 +86,7 @@ GEM method_source (1.1.0) mime-types (3.5.2) mime-types-data (~> 3.2015) - mime-types-data (3.2024.0507) + mime-types-data (3.2024.0604) mini_mime (1.1.5) minitest (4.7.5) minitest-reporters (0.14.24) @@ -94,7 +96,7 @@ GEM powerbar multi_json (1.15.0) net-http-persistent (2.9.4) - net-imap (0.4.11) + net-imap (0.4.12) date net-protocol net-pop (0.1.2) @@ -104,12 +106,12 @@ GEM net-smtp (0.5.0) net-protocol netrc (0.11.0) - oj (3.16.3) + oj (3.16.4) bigdecimal (>= 3.0) omni_logger (0.1.4) logger - parallel (1.24.0) - parser (3.3.1.0) + parallel (1.25.1) + parser (3.3.2.0) ast (~> 2.4.1) racc pony (1.13.1) @@ -130,7 +132,7 @@ GEM addressable (>= 2.2) redis (5.2.0) redis-client (>= 0.22.0) - redis-client (0.22.1) + redis-client (0.22.2) connection_pool regexp_parser (2.9.2) request_store (1.7.0) @@ -140,12 +142,12 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rexml (3.2.8) - strscan (>= 3.0.9) + rexml (3.3.0) + strscan rsolr (2.6.0) builder (>= 2.1.2) faraday (>= 0.9, < 3, != 2.0.0) - rubocop (1.63.5) + rubocop (1.64.1) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From f32bc171e487b7c87fee28b80d9a411a7d45aa79 Mon Sep 17 00:00:00 2001 From: Alex Skrenchuk <alexskr@stanford.edu> Date: Sun, 22 Sep 2024 10:59:47 -0700 Subject: [PATCH 4/4] disable debug logging (issue not fully resolved) File/Dir permission issue is still unresolved, so anyone working on troubleshooting will need to manually re-enable logging when needed. https://github.com/ncbo/bioportal-project/issues/323 --- lib/ontologies_linked_data/models/ontology_submission.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/ontologies_linked_data/models/ontology_submission.rb b/lib/ontologies_linked_data/models/ontology_submission.rb index 31a341a4..53b4b0a6 100644 --- a/lib/ontologies_linked_data/models/ontology_submission.rb +++ b/lib/ontologies_linked_data/models/ontology_submission.rb @@ -135,14 +135,15 @@ def self.copy_file_repository(acronym, submissionId, src, filename = nil) path_to_repo = File.join([LinkedData.settings.repository_folder, acronym.to_s, submissionId.to_s]) name = filename || File.basename(File.new(src).path) # THIS LOGGER IS JUST FOR DEBUG - remove after NCBO-795 is closed - logger = Logger.new(Dir.pwd + "/create_permissions.log") + # https://github.com/ncbo/bioportal-project/issues/323 + # logger = Logger.new(Dir.pwd + "/logs/create_permissions.log") if not Dir.exist? path_to_repo FileUtils.mkdir_p path_to_repo - logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795 + # logger.debug("Dir created #{path_to_repo} | #{"%o" % File.stat(path_to_repo).mode} | umask: #{File.umask}") # NCBO-795 end dst = File.join([path_to_repo, name]) FileUtils.copy(src, dst) - logger.debug("File created #{dst} | #{"%o" % File.stat(dst).mode} | umask: #{File.umask}") # NCBO-795 + # logger.debug("File created #{dst} | #{"%o" % File.stat(dst).mode} | umask: #{File.umask}") # NCBO-795 if not File.exist? dst raise Exception, "Unable to copy #{src} to #{dst}" end