Skip to content

Commit

Permalink
fix properties tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Aug 1, 2024
1 parent 30c3025 commit 3b60e18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ GIT

GIT
remote: https://github.com/ontoportal-lirmm/ontologies_linked_data.git
revision: ca79d5a84a3b6e961118b7e1062f082e7f7b99fc
revision: 05c1bfc62f7647cc59d60b170d85975ba886d0b9
branch: development
specs:
ontologies_linked_data (0.0.1)
Expand Down
12 changes: 6 additions & 6 deletions controllers/properties_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PropertiesController < ApplicationController
get '/:property' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
reply 200, p
end
Expand All @@ -51,7 +51,7 @@ class PropertiesController < ApplicationController
get '/:property/tree' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
root_tree = p.tree

Expand Down Expand Up @@ -79,7 +79,7 @@ class PropertiesController < ApplicationController
get '/:property/ancestors' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
ancestors = p.ancestors
p.class.in(submission).models(ancestors).include(:label, :definition).all
Expand All @@ -91,7 +91,7 @@ class PropertiesController < ApplicationController
get '/:property/descendants' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
descendants = p.descendants
p.class.in(submission).models(descendants).include(:label, :definition).all
Expand All @@ -103,7 +103,7 @@ class PropertiesController < ApplicationController
get '/:property/parents' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?

p.bring(:parents)
Expand All @@ -120,7 +120,7 @@ class PropertiesController < ApplicationController
get '/:property/children' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?

p.bring(:children)
Expand Down

0 comments on commit 3b60e18

Please sign in to comment.