Skip to content

Commit

Permalink
Merge pull request #5 from ncbo/master
Browse files Browse the repository at this point in the history
Sync: ncbo v5.33.0 release
  • Loading branch information
alexskr authored Oct 8, 2024
2 parents f01386f + f943ac3 commit 941eee3
Show file tree
Hide file tree
Showing 27 changed files with 1,553 additions and 975 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
ruby-version: ['2.7', '3.0']
ruby-version: ['3.0', '3.1']
triplestore: ['fs', 'ag']

steps:
Expand Down
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.6
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ gem "activesupport"
gem "cube-ruby", require: "cube"
gem "rake"
gem "uuid"
gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'master'


group :test do
gem "minitest", '< 5.0'
Expand All @@ -21,4 +23,3 @@ group :profiling do
gem "thin"
end

gem 'sparql-client', github: 'ncbo/sparql-client', branch: 'develop'
69 changes: 40 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GIT
remote: https://github.com/ncbo/sparql-client.git
revision: 55e7dbf858eb571c767bc67868f9af61663859cb
branch: develop
revision: e89c26aa96f184dbe9b52d51e04fb3d9ba998dbc
branch: master
specs:
sparql-client (1.0.1)
json_pure (>= 1.4)
Expand All @@ -16,6 +16,7 @@ PATH
pry
rdf (= 1.0.8)
redis
request_store
rest-client
rsolr
sparql-client
Expand All @@ -30,67 +31,74 @@ GEM
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
builder (3.2.4)
builder (3.3.0)
coderay (1.1.3)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
cube-ruby (0.0.3)
daemons (1.4.1)
docile (1.4.0)
docile (1.4.1)
domain_name (0.6.20240107)
eventmachine (1.2.7)
faraday (2.8.1)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
faraday (2.12.0)
faraday-net_http (>= 2.0, < 3.4)
json
logger
faraday-net_http (3.3.0)
net-http
http-accept (1.7.0)
http-cookie (1.0.5)
http-cookie (1.0.7)
domain_name (~> 0.5)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
json_pure (2.7.1)
json (2.7.2)
json_pure (2.7.2)
logger (1.6.1)
macaddr (1.7.2)
systemu (~> 2.6.5)
method_source (1.0.0)
method_source (1.1.0)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0305)
mime-types-data (3.2024.0903)
minitest (4.7.5)
multi_json (1.15.0)
mustermann (3.0.0)
mustermann (3.0.3)
ruby2_keywords (~> 0.0.1)
net-http (0.4.1)
uri
net-http-persistent (2.9.4)
netrc (0.11.0)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.0.4)
rack (2.2.8.1)
public_suffix (6.0.1)
rack (2.2.9)
rack-accept (0.4.5)
rack (>= 0.4)
rack-post-body-to-params (0.1.8)
activesupport (>= 2.3)
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
rake (13.1.0)
rake (13.2.1)
rdf (1.0.8)
addressable (>= 2.2)
redis (5.1.0)
redis-client (>= 0.17.0)
redis-client (0.21.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
request_store (1.7.0)
rack (>= 1.4)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.6)
rsolr (2.5.0)
rexml (3.3.7)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
ruby2_keywords (0.0.5)
Expand All @@ -101,7 +109,7 @@ GEM
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
sinatra (3.2.0)
mustermann (~> 3.0)
Expand All @@ -114,13 +122,16 @@ GEM
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thread_safe (0.3.6)
tilt (2.3.0)
tilt (2.4.0)
tzinfo (0.3.62)
uri (0.13.1)
uuid (2.3.9)
macaddr (~> 1.0)

PLATFORMS
ruby
arm64-darwin-22
x86_64-darwin-21
x86_64-darwin-23
x86_64-linux

DEPENDENCIES
Expand All @@ -140,4 +151,4 @@ DEPENDENCIES
uuid

BUNDLED WITH
2.4.22
2.5.20
10 changes: 5 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
retries: 5

agraph-ut:
image: franzinc/agraph:v8.1.0
image: franzinc/agraph:v8.2.1
platform: linux/amd64
environment:
- AGRAPH_SUPER_USER=test
Expand All @@ -39,11 +39,11 @@ services:
; agtool users grant anonymous root:ontoportal_test:rw
; tail -f /agraph/data/agraph.log"
healthcheck:
test: ["CMD-SHELL", "curl -m 1 -sf http://127.0.0.1:10035/repositories/ontoportal_test/status | grep -iqE '(^running|^lingering)' || exit 1"]
start_period: 60s
test: ["CMD-SHELL", "agtool storage-report ontoportal_test || exit 1"]
start_period: 30s
interval: 10s
timeout: 5s
retries: 5
timeout: 10s
retries: 10
profiles:
- ag

Expand Down
4 changes: 3 additions & 1 deletion goo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ Gem::Specification.new do |s|
s.email = "[email protected]"
s.files = Dir["lib/**/*.rb"]
s.homepage = "http://github.com/ncbo/goo"
s.add_dependency("addressable", "~> 2.8")

s.add_dependency("addressable", "~> 2.8")
s.add_dependency("pry")
s.add_dependency("rdf", "= 1.0.8")
s.add_dependency("redis")
s.add_dependency("rest-client")
s.add_dependency("rsolr")
s.add_dependency("sparql-client")
s.add_dependency("uuid")
s.add_dependency("request_store")
end
28 changes: 27 additions & 1 deletion lib/goo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ module Goo

@@resource_options = Set.new([:persistent]).freeze

# Define the languages from which the properties values will be taken
# It choose the first language that match otherwise return all the values
@@main_languages = %w[en]
@@requested_language = nil

@@configure_flag = false
@@sparql_backends = {}
@@model_by_name = {}
Expand All @@ -47,6 +52,27 @@ module Goo

@@slice_loading_size = 500


def self.main_languages
@@main_languages
end
def self.main_languages=(lang)
@@main_languages = lang
end

def self.requested_language
@@requested_language
end

def self.requested_language=(lang)
@@requested_language = lang
end

def self.language_includes(lang)
lang_str = lang.to_s
main_languages.index { |l| lang_str.downcase.eql?(l) || lang_str.upcase.eql?(l)}
end

def self.add_namespace(shortcut, namespace,default=false)
if !(namespace.instance_of? RDF::Vocabulary)
raise ArgumentError, "Namespace must be a RDF::Vocabulary object"
Expand Down Expand Up @@ -84,7 +110,7 @@ def self.add_sparql_backend(name, *opts)
@@sparql_backends[name][:backend_name] = opts[:backend_name]
@@sparql_backends.freeze
end

def self.use_cache=(value)
@@use_cache = value
set_sparql_cache
Expand Down
Loading

0 comments on commit 941eee3

Please sign in to comment.