Skip to content

Commit 1b8135f

Browse files
authored
Merge pull request #1 from seek4science/master
Merge 1.11 changes to local fork
2 parents 3ed3f72 + 7a6b952 commit 1b8135f

File tree

413 files changed

+20646
-3800
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

413 files changed

+20646
-3800
lines changed

.github/workflows/tests.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ jobs:
2828
ports:
2929
- 33306:3306
3030
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
31+
virtuoso:
32+
image: tenforce/virtuoso
33+
env:
34+
DBA_PASSWORD: tester
35+
SPARQL_UPDATE: true
36+
DEFAULT_GRAPH: http://www.example.com/my-graph
37+
ports:
38+
- 8890:8890
39+
- 1111:1111
3140
strategy:
3241
fail-fast: false
3342
matrix:
@@ -38,9 +47,11 @@ jobs:
3847
- rails test test/functional
3948
- rails test test/integration
4049
- rspec spec
41-
- rake teaspoon
50+
# - rake teaspoon
4251
- rake assets:precompile
4352
- rake db:setup
53+
- rake db:migrate
54+
- rake seek:upgrade
4455
include:
4556
- database: postgres
4657
suite: rails test test/unit
@@ -85,7 +96,18 @@ jobs:
8596
- name: Set MySQL char set and collation
8697
if: matrix.database == 'mysql'
8798
run: echo -e "ALTER DATABASE seek_test CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;\n" | bundle exec rails dbconsole -p
99+
- name: Checkout previous schema
100+
if: github.event_name == 'push' && matrix.suite == 'rake db:migrate' && github.event.before != '0000000000000000000000000000000000000000'
101+
run: |
102+
git fetch origin ${{ github.event.before }}
103+
git checkout ${{ github.event.before }} -- db/schema.rb
88104
- name: Load test database schema
89105
run: bundle exec rake db:schema:load
106+
- name: Seed database
107+
if: matrix.suite == 'rake seek:upgrade'
108+
run: bundle exec rake db:seed
109+
- name: Virtuoso config
110+
if: matrix.suite == 'rails test test/integration'
111+
run: cp test/config/virtuoso_test_settings.yml config/virtuoso_settings.yml
90112
- name: Run tests
91113
run: bundle exec ${{ matrix.suite }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ coverage/
8282
Test\ Results*.html
8383

8484
docker-compose.override.yml
85+
86+
.vscode/

.rubocop.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
AllCops:
2+
SuggestExtensions: false
23
Exclude:
34
- test/unit/assay_test.rb
45

5-
Metrics/LineLength:
6+
Layout/LineLength:
67
Max: 120
78

89
# Don't enforce frozen string literals
910
Style/FrozenStringLiteralComment:
10-
Enabled: false
11+
Enabled: false

.travis.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ addons:
1313
- python3-pip
1414
- python3-setuptools
1515

16-
services:
17-
- docker
16+
services:
1817
- mysql
1918
- postgresql
2019
- xvfb
@@ -28,14 +27,12 @@ env:
2827
- SUITE="rails test test/functional" DB_TYPE=mysql
2928
- SUITE="rails test test/integration" DB_TYPE=mysql
3029
- SUITE="rspec spec" DB_TYPE=mysql
31-
- SUITE="rake teaspoon" RAILS_ENV=test DB_TYPE=mysql
30+
# - SUITE="rake teaspoon" RAILS_ENV=test DB_TYPE=mysql
3231
- SUITE="rake assets:precompile RAILS_ENV=production" DB_TYPE=mysql
3332
- SUITE="rake db:setup RAILS_ENV=production" DB_TYPE=mysql
3433

3534
before_install:
3635
- pip3 install -r requirements.txt
37-
# starts up a virtuoso docker repository and sets up the config to use it, for the rdf repository related integration tests
38-
- sh -c "if [ '$SUITE' = 'rails test test/integration' ]; then sh -e script/virtuoso-docker-for-travis.sh; fi"
3936

4037
before_script:
4138
- sh -c "if [ '$DB_TYPE' = 'pgsql' ]; then psql -c 'create database travis_ci_test; create database travis_ci_dev; create database travis_ci_prod;' -U postgres; fi"

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,17 @@ RUN bundle exec rake assets:precompile && \
6060
#root access needed for next couple of steps
6161
USER root
6262

63+
# Install supercronic - a cron alternative
64+
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.12/supercronic-linux-amd64 \
65+
SUPERCRONIC=supercronic-linux-amd64 \
66+
SUPERCRONIC_SHA1SUM=048b95b48b708983effb2e5c935a1ef8483d9e3e
67+
68+
RUN curl -fsSLO "$SUPERCRONIC_URL" \
69+
&& echo "${SUPERCRONIC_SHA1SUM} ${SUPERCRONIC}" | sha1sum -c - \
70+
&& chmod +x "$SUPERCRONIC" \
71+
&& mv "$SUPERCRONIC" "/usr/local/bin/${SUPERCRONIC}" \
72+
&& ln -s "/usr/local/bin/${SUPERCRONIC}" /usr/local/bin/supercronic
73+
6374
# NGINX config
6475
COPY docker/nginx.conf /etc/nginx/nginx.conf
6576

Gemfile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ gem 'will_paginate', '~> 3.1'
5454
gem 'yaml_db'
5555
gem 'rails_autolink'
5656
gem 'rfc-822'
57-
gem 'nokogiri', '>= 1.10.4'
58-
gem 'rdf-virtuoso', git: 'https://github.com/ruby-rdf/rdf-virtuoso', branch: 'develop'
57+
gem 'nokogiri', '~> 1.11.2'
58+
gem 'rdf-virtuoso', '>= 0.2.0'
5959
gem 'terrapin'
6060
gem 'lograge'
6161
gem 'psych'
@@ -77,21 +77,21 @@ gem 'jquery-ui-rails'
7777
gem 'recaptcha', '~> 4.1.0'
7878
gem 'metainspector'
7979
gem 'mechanize'
80-
gem 'mimemagic','0.3.2'
80+
gem 'mimemagic','~> 0.3.7'
8181
gem 'auto_strip_attributes'
8282
gem 'coffee-rails', '~> 4.2'
8383
gem 'bootstrap-sass', '>=3.4.1'
8484
gem 'sass-rails', '~> 5.0'
8585
gem 'sprockets-rails'
8686

87-
gem 'ro-bundle', '~> 0.2.4'
87+
gem 'ro-bundle', '~> 0.2.5'
8888
gem 'handlebars_assets'
8989
gem 'zenodo-client', git: 'https://github.com/seek4science/zenodo-client.git'
9090

9191
gem 'unicorn-rails'
9292
gem 'seedbank'
9393

94-
gem 'rspec-rails'
94+
gem 'rspec-rails','~> 3.6'
9595

9696
gem 'citeproc-ruby', '~> 1.1.4'
9797
gem 'citeproc', '~> 1.0.4'
@@ -134,13 +134,12 @@ gem 'request_store'
134134
# javascript assets from https://rails-assets.org
135135
gem 'bundler', '>= 1.8.4'
136136

137-
gem 'ro-crate-ruby', git: 'https://github.com/fbacall/ro-crate-ruby.git'
137+
gem 'ro-crate-ruby', git: 'https://github.com/ResearchObject/ro-crate-ruby.git', ref: '70804d34264481e70d0fe83ecc6ad76eda164e74'
138138

139139
gem 'git'
140-
141140
gem 'redcarpet'
142-
143141
gem 'i18n-js'
142+
gem 'whenever', '~> 1.0.0', require: false
144143

145144
source 'https://rails-assets.org' do
146145
gem 'rails-assets-bootstrap-multiselect', '~> 0.9.13'
@@ -174,13 +173,14 @@ group :test do
174173
gem 'ruby-prof'
175174
gem 'test-prof'
176175
gem 'rails-perftest'
177-
gem 'minitest', '5.10.3'
176+
gem 'minitest', '~> 5.14'
178177
gem 'minitest-reporters'
179178
gem 'sunspot_matchers'
180179
gem 'database_cleaner', '~> 1.7.0'
181180
gem 'vcr', '~> 2.9'
182181
gem 'rails-controller-testing'
183182
gem 'simplecov'
183+
gem 'whenever-test'
184184
end
185185

186186
group :test, :development do

0 commit comments

Comments
 (0)