Skip to content

Commit

Permalink
Merge branch 'master' into eol-dwca
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-nathan committed Jan 29, 2022
2 parents bd940e6 + 6e7d328 commit e7af552
Show file tree
Hide file tree
Showing 115 changed files with 1,853 additions and 1,503 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/ci_rails.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# GitHub Actions Continuous Integration of MO Rails Code
# Runs the tests and publishes the results to Coveralls
name: Continuous Integration

on:
push:
# branches: master
branches:
- "*" # Run on pushes on all branches
pull_request:
branches: master

jobs:
test:
runs-on: ubuntu-20.04 # focal, includes MySQL 5.8
steps:
# check-out repo under $GITHUB_WORKSPACE, so that workflow can access it.
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@v2

# https://github.com/actions/setup-ruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs bundle install, caches gems

- name: Install additional tools
run: sudo apt-get install exiftool

# MySQL is installed but does not run by default
# https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md#mysql
- name: Start mySQL
run: sudo systemctl start mysql.service

- name: Create and configure db
run: |
mysql -u root -proot < db/initialize.sql
cp db/vagrant/database.yml config
- name: Configure gmaps api key
run: |
cp config/gmaps_api_key.yml-template config/gmaps_api_key.yml
- name: Create test image directories
run: |
for dir in images test_images;
do
for subdir in thumb 320 640 960 1280 orig;
do
mkdir -p public/$dir/$subdir
done
done
- name: install exifautotran
run: |
sudo cp script/exifautotran /usr/local/bin/exifautotran
sudo chmod 755 /usr/local/bin/exifautotran
- name: Load fixtures
run: |
bundle exec rake db:schema:load
bundle exec rake db:fixtures:load
- name: Update translation files
run: bundle exec rake lang:update

# And finally we can run the test suite
- name: Run tests
run: bundle exec rails test

# https://github.com/marketplace/actions/coveralls-github-action
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov/lcov.info
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ production-logs
.bundle
rubocop.out
coverage

# Ignore master key for decrypting credentials and more.
/config/master.key
9 changes: 0 additions & 9 deletions .simplecov

This file was deleted.

23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

31 changes: 20 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

source("https://rubygems.org")

# security fix for CVE-2021-41817 regex denial of service vulnerability
gem("date", ">= 3.2.1")

gem("sprockets")

# To bundle edge Rails instead: gem "rails", github: "rails/rails"
Expand Down Expand Up @@ -102,17 +105,10 @@ gem("rubyzip")

########## Development, Testing, and Analysis ##################################

# Use byebug as debugging gem
gem("byebug", group: [:development, :test])

# Calling `console` creates irb session in the browser (instead of the terminal)
gem("web-console", group: :development)

# Automatically track code test coverage
# Use coveralls_reborn gem instead of coveralls gem
# With `coveralls` Travis CI runnning with Ubuntu focal gets an SSLError
# when Travis submits the coverage report to Coveralls
gem("coveralls_reborn", "~> 0.20.0", require: false)
# Use built-in Ruby coverage to generate html coverage file
gem("simplecov", require: false)
# generate lcov file to send to Coveralls by Github Actions
gem("simplecov-lcov", require: false)

# Brakeman static analysis security scanner
# See http://brakemanscanner.org/
Expand All @@ -132,6 +128,11 @@ gem("rubocop-rails")
# use mry to support safe updating of .rubocop.yml
gem("mry", require: false)

group :test, :development do
# Use byebug as debugging gem
gem "byebug"
end

group :test do
# Use capybara to simulate user-browser interaction
gem "capybara"
Expand All @@ -154,3 +155,11 @@ group :test do
# Allow selective disabling of internet
gem "webmock"
end

group :development do
# Calling `console` creates irb session in the browser (instead of terminal)
gem "web-console"

# Use Rails DB to browse database at http://localhost:3000/rails/db/
gem "rails_db", "~> 2.3.0"
end
67 changes: 45 additions & 22 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GEM
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
arel (9.0.0)
Expand Down Expand Up @@ -79,7 +79,7 @@ GEM
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
brakeman (4.10.0)
browser (4.1.0)
browser (5.3.1)
builder (3.2.4)
byebug (11.1.3)
capybara (3.32.2)
Expand All @@ -98,18 +98,14 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.8)
coveralls_reborn (0.20.0)
simplecov (>= 0.18.1, < 0.22.0)
term-ansicolor (~> 1.6)
thor (>= 0.20.3, < 2.0)
tins (~> 1.16)
crack (0.4.3)
safe_yaml (~> 1.0.0)
crass (1.0.6)
docile (1.3.4)
date (3.2.1)
docile (1.4.0)
erubi (1.10.0)
execjs (2.7.0)
ffi (1.12.2)
ffi (1.15.5)
globalid (0.4.2)
activesupport (>= 4.2.0)
hashdiff (1.0.1)
Expand All @@ -124,6 +120,18 @@ GEM
thor (>= 0.14, < 2.0)
jquery-slick-rails (1.9.0)
railties (>= 3.1)
kaminari (1.2.2)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.2.2)
kaminari-activerecord (= 1.2.2)
kaminari-core (= 1.2.2)
kaminari-actionview (1.2.2)
actionview
kaminari-core (= 1.2.2)
kaminari-activerecord (1.2.2)
activerecord
kaminari-core (= 1.2.2)
kaminari-core (1.2.2)
kgio (2.11.3)
libv8 (8.4.255.0)
libv8 (8.4.255.0-x86_64-linux)
Expand All @@ -138,7 +146,7 @@ GEM
nokogiri (~> 1)
rake
mini_mime (1.1.0)
mini_portile2 (2.5.1)
mini_portile2 (2.6.1)
mini_racer (0.3.1)
libv8 (~> 8.4.255)
minitest (5.14.4)
Expand All @@ -152,15 +160,15 @@ GEM
rubocop (>= 0.41.0)
mysql2 (0.5.3)
nio4r (2.5.7)
nokogiri (1.11.5)
mini_portile2 (~> 2.5.0)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
nokogiri (1.11.5-x86_64-linux)
nokogiri (1.12.5-x86_64-linux)
racc (~> 1.4)
parallel (1.19.2)
parser (2.7.1.4)
ast (~> 2.4.1)
public_suffix (4.0.5)
public_suffix (4.0.6)
racc (1.5.2)
rack (2.2.3)
rack-test (1.1.0)
Expand All @@ -187,6 +195,13 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
rails_db (2.3.1)
activerecord
kaminari
rails (>= 5.0.0)
ransack (>= 2.3.2)
simple_form (>= 5.0.1)
terminal-table
railties (5.2.6)
actionpack (= 5.2.6)
activesupport (= 5.2.6)
Expand All @@ -196,6 +211,10 @@ GEM
rainbow (3.0.0)
raindrops (0.19.1)
rake (13.0.3)
ransack (2.5.0)
activerecord (>= 5.2.4)
activesupport (>= 5.2.4)
i18n
regexp_parser (1.7.1)
rexml (3.2.5)
rtf (0.3.3)
Expand Down Expand Up @@ -229,27 +248,28 @@ GEM
tilt
simple_enum (2.3.2)
activesupport (>= 4.0.0)
simple_form (5.1.0)
actionpack (>= 5.2)
activemodel (>= 5.2)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.2)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.3)
sprockets (4.0.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sync (0.5.0)
term-ansicolor (1.7.1)
tins (~> 1.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.1.0)
thread_safe (0.3.6)
tilt (2.0.10)
tins (1.27.1)
sync
tzinfo (1.2.9)
thread_safe (~> 0.1)
uglifier (4.2.0)
Expand Down Expand Up @@ -288,8 +308,8 @@ DEPENDENCIES
byebug
capybara
coffee-rails
coveralls_reborn (~> 0.20.0)
cure_acts_as_versioned!
date (>= 3.2.1)
i18n
jbuilder
jquery-rails
Expand All @@ -304,13 +324,16 @@ DEPENDENCIES
mysql2
rails (~> 5.2.2)
rails-controller-testing
rails_db (~> 2.3.0)
rtf
rubocop (= 0.89)
rubocop-performance
rubocop-rails
rubyzip
sassc-rails
simple_enum
simplecov
simplecov-lcov
sprockets
uglifier
unicorn (= 5.4.1)
Expand All @@ -319,4 +342,4 @@ DEPENDENCIES
xmlrpc

BUNDLED WITH
2.2.17
2.2.29
Loading

0 comments on commit e7af552

Please sign in to comment.