Skip to content

Commit

Permalink
Gemfile.lock update
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorf committed Jan 25, 2023
2 parents 21eaa18 + 9a5d60d commit f61c7f9
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 15 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ruby-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ jobs:

runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version: ['2.7']
ruby-version: ['2.7', '3.0']

steps:
- uses: actions/checkout@v3
- name: Install Depenencies
- name: Install Dependencies
run: sudo apt-get -y install raptor2-utils
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Start backend services via docker-compose
run: docker compose up -d
- name: Run tests
run: bundle exec rake test

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3

10 changes: 7 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ gemspec
gem "activesupport"
gem "cube-ruby", require: "cube"
gem "faraday", '~> 1.9'
gem "minitest", '< 5.0'
gem "pry"
gem "rake"
gem "simplecov", require: false, group: :test
gem "uuid"

group :test do
gem "minitest", '< 5.0'
gem "pry"
gem 'simplecov'
gem 'simplecov-cobertura' # for submitting code coverage results to codecov.io
end

group :profiling do
gem "rack-accept"
gem "rack-post-body-to-params"
Expand Down
6 changes: 6 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ GEM
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
rexml (3.2.5)
rsolr (2.5.0)
builder (>= 2.1.2)
faraday (>= 0.9, < 3, != 2.0.0)
Expand All @@ -115,6 +116,9 @@ GEM
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sinatra (3.0.5)
Expand All @@ -139,6 +143,7 @@ GEM
PLATFORMS
ruby
x86_64-darwin-16
x86_64-linux

DEPENDENCIES
activesupport
Expand All @@ -151,6 +156,7 @@ DEPENDENCIES
rack-post-body-to-params
rake
simplecov
simplecov-cobertura
sinatra
sparql-client!
thin
Expand Down
2 changes: 0 additions & 2 deletions lib/goo/validators/enforce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ def self.enforce(inst,attr,value)
errors_by_opt = {}
enforce_opts.each do |opt|
case opt
when :class
nil
when :unique
unless value.nil?
dup = Goo::SPARQL::Queries.duplicate_attribute_value?(inst,attr)
Expand Down
13 changes: 10 additions & 3 deletions test/test_case.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Start simplecov if this is a coverage task
if ENV["COVERAGE"].eql?("true")
require 'simplecov'
# Start simplecov if this is a coverage task or if it is run in the CI pipeline
if ENV["COVERAGE"] == "true" || ENV["CI"] == "true"
require "simplecov"
require "simplecov-cobertura"
# https://github.com/codecov/ruby-standard-2
# Generate HTML and Cobertura reports which can be consumed by codecov uploader
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::HTMLFormatter,
SimpleCov::Formatter::CoberturaFormatter
])
SimpleCov.start do
add_filter "/test/"
add_filter "app.rb"
Expand Down
23 changes: 23 additions & 0 deletions test/test_model_complex.rb
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ def test_multiple_collection()

def test_collection()

# This call is not usually necessary as it is usually covered by
# the model declaration above. See the explanation in
# https://github.com/ncbo/goo/commit/0e09816b121750b3bb875a5c24cb79865287fcf4#commitcomment-90304626
Goo.add_model(:class, Term)

submission = Submission.new(name: "submission1")
unless submission.exist?
submission.save
Expand Down Expand Up @@ -311,13 +316,19 @@ def test_two_resources_same_id

def test_parents_inverse_children

# This call is not usually necessary as it is usually covered by
# the model declaration above. See the explanation in
# https://github.com/ncbo/goo/commit/0e09816b121750b3bb875a5c24cb79865287fcf4#commitcomment-90304626
Goo.add_model(:class, Term)

submission = Submission.new(name: "submission1")
unless submission.exist?
submission.save
else
submission = Submission.find("submission1").first
end


terms = Term.in(submission)
terms.each do |t|
t.delete
Expand Down Expand Up @@ -651,6 +662,11 @@ def test_empty_pages
assert_equal 0, GooTest.count_pattern("GRAPH #{submission.id.to_ntriples} { #{t.id.to_ntriples} ?p ?o . }")
end

# This call is not usually necessary as it is usually covered by
# the model declaration above. See the explanation in
# https://github.com/ncbo/goo/commit/0e09816b121750b3bb875a5c24cb79865287fcf4#commitcomment-90304626
Goo.add_model(:class, Term)

terms = []
10.times do |i|
term = Term.new
Expand All @@ -677,6 +693,12 @@ def test_empty_pages
end

def test_readonly_pages_with_include

# This call is not usually necessary as it is usually covered by
# the model declaration above. See the explanation in
# https://github.com/ncbo/goo/commit/0e09816b121750b3bb875a5c24cb79865287fcf4#commitcomment-90304626
Goo.add_model(:class, Term)

submission = Submission.new(name: "submission1")
unless submission.exist?
submission.save
Expand All @@ -689,6 +711,7 @@ def test_readonly_pages_with_include
assert_equal(0,
GooTest.count_pattern("GRAPH #{submission.id.to_ntriples} { #{t.id.to_ntriples} ?p ?o . }"))
end

terms = []
10.times do |i|
term = Term.new
Expand Down

0 comments on commit f61c7f9

Please sign in to comment.