Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexskr committed Aug 7, 2023
2 parents cd07b5c + 98bb4f7 commit 0cdb8f8
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 54 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ruby-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
jobs:
test:
strategy:
fail-fast: false
matrix:
backend: ['ruby', 'ruby-agraph'] # ruby runs tests with 4store backend and ruby-agraph runs with AllegroGraph backend
runs-on: ubuntu-latest
Expand Down
4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@ gem 'activesupport', '~> 4'
gem 'addressable', '~> 2.8'
gem 'bcrypt', '~> 3.0'
gem 'cube-ruby', require: 'cube'
gem 'faraday', '~> 1.9'
gem 'ffi'
gem 'libxml-ruby'
gem 'minitest'
gem 'multi_json', '~> 1.0'
gem 'oj', '~> 3.0'
gem 'omni_logger'
Expand All @@ -22,12 +20,12 @@ gem 'thin'
# Testing
group :test do
gem 'email_spec'
gem 'minitest', '~> 4'
gem 'minitest-reporters', '>= 0.5.0'
gem 'pry'
gem 'rack-test', '~> 0.6'
gem 'simplecov'
gem 'simplecov-cobertura' # for codecov.io
gem 'test-unit-minitest'
end

group :development do
Expand Down
50 changes: 13 additions & 37 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GIT
remote: https://github.com/ncbo/goo.git
revision: e8816b06244c26088ef0596ddc0623562a75a284
revision: 59fa167d6e8d2cb55bd0d574d029057f46cbc594
branch: master
specs:
goo (0.0.2)
Expand Down Expand Up @@ -32,7 +32,7 @@ GEM
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
addressable (2.8.4)
addressable (2.8.5)
public_suffix (>= 2.0.2, < 6.0)
ansi (1.5.0)
ast (2.4.2)
Expand All @@ -52,29 +52,10 @@ GEM
launchy (~> 2.1)
mail (~> 2.7)
eventmachine (1.2.7)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0)
faraday-multipart (~> 1.0)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.0)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
faraday-retry (~> 1.0)
faraday (2.7.10)
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-multipart (1.0.4)
multipart-post (~> 2)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
faraday-retry (1.0.3)
faraday-net_http (3.0.2)
ffi (1.15.5)
hashie (5.0.0)
htmlentities (4.3.4)
Expand All @@ -98,7 +79,7 @@ GEM
net-pop
net-smtp
method_source (1.0.0)
mime-types (3.4.1)
mime-types (3.5.0)
mime-types-data (~> 3.2015)
mime-types-data (3.2023.0218.1)
mini_mime (1.1.2)
Expand All @@ -109,7 +90,6 @@ GEM
minitest (>= 2.12, < 5.0)
powerbar
multi_json (1.15.0)
multipart-post (2.3.0)
net-http-persistent (2.9.4)
net-imap (0.3.7)
date
Expand All @@ -121,7 +101,7 @@ GEM
net-smtp (0.3.3)
net-protocol
netrc (0.11.0)
oj (3.15.0)
oj (3.15.1)
omni_logger (0.1.4)
logger
parallel (1.23.0)
Expand All @@ -137,7 +117,7 @@ GEM
method_source (~> 1.0)
public_suffix (5.0.3)
racc (1.7.1)
rack (2.2.7)
rack (2.2.8)
rack-test (0.8.3)
rack (>= 1.0, < 3)
rainbow (3.1.1)
Expand All @@ -146,7 +126,7 @@ GEM
addressable (>= 2.2)
redis (5.0.6)
redis-client (>= 0.9.0)
redis-client (0.14.1)
redis-client (0.15.0)
connection_pool
regexp_parser (2.8.1)
rest-client (2.1.0)
Expand All @@ -158,7 +138,7 @@ GEM
rsolr (2.5.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
rubocop (1.55.0)
rubocop (1.55.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -184,8 +164,6 @@ GEM
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
systemu (2.6.5)
test-unit-minitest (0.9.1)
minitest (~> 4.7)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
Expand All @@ -201,7 +179,7 @@ GEM
macaddr (~> 1.0)

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

Expand All @@ -211,11 +189,10 @@ DEPENDENCIES
bcrypt (~> 3.0)
cube-ruby
email_spec
faraday (~> 1.9)
ffi
goo!
libxml-ruby
minitest
minitest (~> 4)
minitest-reporters (>= 0.5.0)
multi_json (~> 1.0)
oj (~> 3.0)
Expand All @@ -232,8 +209,7 @@ DEPENDENCIES
simplecov
simplecov-cobertura
sparql-client!
test-unit-minitest
thin

BUNDLED WITH
2.3.15
2.4.17
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ services:
retries: 5

agraph-ut:
image: franzinc/agraph:v7.3.1
# image: franzinc/agraph:v7.3.1
image: ontoportal/agraph:v7.3.1-patch1 #in place untill agraph v7.4.0 is released
platform: linux/amd64
environment:
- AGRAPH_SUPER_USER=test
Expand Down
6 changes: 3 additions & 3 deletions lib/ontologies_linked_data/models/ontology.rb
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,11 @@ def self.analytics(year=nil, month=nil, acronyms=nil)
unless analytics.empty?
analytics.delete_if { |acronym, _| !acronyms.include? acronym } unless acronyms.nil?
analytics.values.each do |ont_analytics|
ont_analytics.delete_if { |key, _| key != year } unless year.nil?
ont_analytics.each { |_, val| val.delete_if { |key, __| key != month } } unless month.nil?
ont_analytics.delete_if { |key, _| key != year.to_s } unless year.nil?
ont_analytics.each { |_, val| val.delete_if { |key, __| key != month.to_s } } unless month.nil?
end
# sort results by the highest traffic values
analytics = Hash[analytics.sort_by {|_, v| v[year][month]}.reverse] if year && month
analytics = Hash[analytics.sort_by {|_, v| v[year.to_s][month.to_s]}.reverse] if year && month
end
analytics
end
Expand Down
4 changes: 2 additions & 2 deletions test/rack/test_request_authorization.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "test/unit"
require 'minitest/unit'
require "rack/test"
require "json"
require "logger"
Expand Down Expand Up @@ -87,4 +87,4 @@ def test_authorize
assert @userapikey.eql?(apikey)
end

end
end
4 changes: 2 additions & 2 deletions test/rack/test_request_formats.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "test/unit"
require 'minitest/unit'
require "rack/test"
require "multi_json"
require_relative "../../lib/ontologies_linked_data"
Expand Down Expand Up @@ -66,4 +66,4 @@ def req(accept = nil, params = {})
header "Accept", accept unless accept.nil?
get "/", params
end
end
end
4 changes: 2 additions & 2 deletions test/serializer/test_serializer_json.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "test/unit"
require 'minitest/unit'
require "multi_json"
require_relative "../../lib/ontologies_linked_data"
require_relative "../../config/config"
Expand Down Expand Up @@ -79,4 +79,4 @@ def test_sparql_http_object_serialization
assert reference["int"] == 1
assert reference["bool"] == false
end
end
end
4 changes: 2 additions & 2 deletions test/serializer/test_serializer_xml.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "test/unit"
require 'minitest/unit'
require "date"
require "multi_json"
require_relative "../../lib/ontologies_linked_data"
Expand Down Expand Up @@ -176,4 +176,4 @@ def test_nil_to_xml
assert_equal NIL_XML, xml.to_s.gsub(/\s+/, "")
end

end
end
4 changes: 2 additions & 2 deletions test/serializer/test_to_flex_hash.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "test/unit"
require 'minitest/unit'
require 'pry'
require_relative "../../lib/ontologies_linked_data"

Expand Down Expand Up @@ -134,4 +134,4 @@ def test_array_of_objs_to_array_of_hashes
reference = [{:name=>"Simon", :age=>21, :height=>6}, {:name=>"Paul A", :age=>35, :height=>8}, [{:name=>"Simon", :age=>21, :height=>6}, {:name=>"Paul A", :age=>35, :height=>8}]]
assert_equal hash, reference
end
end
end

0 comments on commit 0cdb8f8

Please sign in to comment.