Skip to content

Commit

Permalink
Merge branch 'development' into feature/add-diff-parsing-endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Oct 19, 2024
2 parents 2c2d837 + 87b4add commit 874149d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ gem 'ncbo_cron', git: 'https://github.com/ontoportal-lirmm/ncbo_cron.git', branc
gem 'ncbo_ontology_recommender', git: 'https://github.com/ncbo/ncbo_ontology_recommender.git', branch: 'master'
gem 'goo', github: 'ontoportal-lirmm/goo', branch: 'development'
gem 'sparql-client', github: 'ontoportal-lirmm/sparql-client', branch: 'development'
gem 'ontologies_linked_data', git: 'https://github.com/ontoportal-lirmm/ontologies_linked_data.git', branch: 'feature/parse-diff-files'
gem 'ontologies_linked_data', git: 'https://github.com/ontoportal-lirmm/ontologies_linked_data.git', branch: 'development'

group :development do
# bcrypt_pbkdf and ed35519 is required for capistrano deployments when using ed25519 keys; see https://github.com/miloserdow/capistrano-deploy/issues/42
Expand Down
52 changes: 29 additions & 23 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ncbo/ncbo_ontology_recommender.git
revision: 013abea4af3b10910ec661dbb358a4b6cae198a4
revision: 9dbd4f179e42c52095129d353a5ac584e9bd47f3
branch: master
specs:
ncbo_ontology_recommender (0.0.1)
Expand All @@ -11,7 +11,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/goo.git
revision: a95245b8c964431505ca6315907440996c59a00d
revision: f9c6c38f86db1131278137829d837cf756a9d77a
branch: development
specs:
goo (0.0.2)
Expand Down Expand Up @@ -57,8 +57,8 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: d69ede0a0b3e3c5dee64fa75cb09cc6e16e0f4b5
branch: feature/parse-diff-files
revision: 0a456557bc0ae2a7d016000de9b57d3f9eca99a5
branch: development
specs:
ontologies_linked_data (0.0.1)
activesupport
Expand Down Expand Up @@ -141,7 +141,7 @@ GEM
docile (1.4.1)
domain_name (0.6.20240107)
ed25519 (1.3.0)
faraday (1.10.3)
faraday (1.10.4)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
Expand All @@ -165,14 +165,14 @@ GEM
faraday-rack (1.0.0)
faraday-retry (1.0.3)
ffi (1.16.3)
gapic-common (0.21.1)
gapic-common (0.22.0)
faraday (>= 1.9, < 3.a)
faraday-retry (>= 1.0, < 3.a)
google-protobuf (~> 3.18)
googleapis-common-protos (>= 1.4.0, < 2.a)
googleapis-common-protos-types (>= 1.11.0, < 2.a)
googleauth (~> 1.9)
grpc (~> 1.59)
google-protobuf (>= 3.25, < 5.a)
googleapis-common-protos (~> 1.6)
googleapis-common-protos-types (~> 1.15)
googleauth (~> 1.11)
grpc (~> 1.65)
get_process_mem (0.2.7)
ffi (~> 1.0)
google-analytics-data (0.6.1)
Expand All @@ -194,24 +194,28 @@ GEM
google-cloud-core (1.7.1)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (2.1.1)
google-cloud-env (2.2.1)
faraday (>= 1.0, < 3.a)
google-cloud-errors (1.4.0)
google-protobuf (3.25.3)
google-protobuf (3.25.3-x86_64-linux)
googleapis-common-protos (1.6.0)
google-protobuf (>= 3.18, < 5.a)
googleapis-common-protos-types (~> 1.7)
grpc (~> 1.41)
googleapis-common-protos-types (1.16.0)
google-protobuf (>= 3.18, < 5.a)
googleauth (1.11.0)
googleauth (1.11.1)
faraday (>= 1.0, < 3.a)
google-cloud-env (~> 2.1)
jwt (>= 1.4, < 3.0)
multi_json (~> 1.11)
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
grpc (1.65.2-x86_64-linux)
grpc (1.67.0)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
grpc (1.67.0-x86_64-linux)
google-protobuf (>= 3.25, < 5.0)
googleapis-common-protos-types (~> 1.0)
haml (5.2.2)
Expand All @@ -231,7 +235,7 @@ GEM
rdf (>= 2.2.8, < 4.0)
json-schema (2.8.1)
addressable (>= 2.4)
jwt (2.9.0)
jwt (2.9.3)
base64
kgio (2.11.4)
libxml-ruby (5.0.3)
Expand All @@ -245,9 +249,10 @@ GEM
net-pop
net-smtp
method_source (1.1.0)
mime-types (3.5.2)
mime-types (3.6.0)
logger
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0903)
mime-types-data (3.2024.1001)
mini_mime (1.1.5)
minitest (4.7.5)
minitest-stub_any_instance (1.0.3)
Expand All @@ -258,7 +263,7 @@ GEM
mutex_m (0.2.0)
net-http-persistent (4.0.4)
connection_pool (~> 2.2)
net-imap (0.4.16)
net-imap (0.4.17)
date
net-protocol
net-pop (0.1.2)
Expand All @@ -271,9 +276,9 @@ GEM
net-ssh (>= 5.0.0, < 8.0.0)
net-smtp (0.5.0)
net-protocol
net-ssh (7.2.3)
net-ssh (7.3.0)
netrc (0.11.0)
newrelic_rpm (9.13.0)
newrelic_rpm (9.14.0)
oj (3.16.1)
omni_logger (0.1.4)
logger
Expand All @@ -286,7 +291,7 @@ GEM
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (5.1.1)
public_suffix (6.0.1)
rack (1.6.13)
rack-accept (0.4.5)
rack (>= 0.4)
Expand Down Expand Up @@ -342,7 +347,7 @@ GEM
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
retriable (3.1.2)
rexml (3.3.7)
rexml (3.3.8)
rsolr (2.6.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
Expand Down Expand Up @@ -378,7 +383,7 @@ GEM
rack-test
sinatra (~> 1.4.0)
tilt (>= 1.3, < 3)
sshkit (1.23.1)
sshkit (1.23.2)
base64
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
Expand Down Expand Up @@ -406,6 +411,7 @@ GEM
hashdiff (>= 0.4.0, < 2.0.0)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
Expand Down
32 changes: 31 additions & 1 deletion test/controllers/test_categories_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,34 @@ def test_delete_category
get "/categories/#{acronym}"
assert last_response.status == 404
end
end

def test_parent_category
parent_category1 = LinkedData::Models::Category.new(
acronym: "PARENT1",
name: "Parent Category 1",
description: "Description for Parent Category 1."
)
parent_category1.save

parent_category2 = LinkedData::Models::Category.new(
acronym: "PARENT2",
name: "Parent Category 2",
description: "Description for Parent Category 2."
)
parent_category2.save

category_instance = LinkedData::Models::Category.new(
acronym: "CAT123",
name: "Sample Category",
description: "This is a sample category.",
parentCategory: [parent_category1, parent_category2]
)
category_instance.save

get '/categories/CAT123'
fetched_category = MultiJson.load(last_response.body)

assert_equal fetched_category["parentCategory"].first , parent_category1.id.to_s
assert_equal fetched_category["parentCategory"].last , parent_category2.id.to_s
end
end

0 comments on commit 874149d

Please sign in to comment.