diff --git a/.ruby-version b/.ruby-version
index 5859406..2bf1c1c 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.2.3
+2.3.1
diff --git a/.travis.yml b/.travis.yml
index 35f60ae..190c96f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
language: ruby
bundler_args: --without development production staging
rvm:
- - 2.2.3
+ - 2.3.1
addons:
postgresql: 9.4
# uncomment this line if your project needs to run something other than `rake`:
diff --git a/Gemfile b/Gemfile
index 9da96a4..c7665f5 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,31 +1,39 @@
source 'https://rubygems.org'
-gem 'rails', '4.2.5.2'
-gem 'apipie-rails' # Documentation
-gem 'devise', '>= 3.5.4'
-gem 'annotate'
-gem 'sass-rails'#, '~> 3.2.3'
-gem 'uglifier'#, '>= 1.0.3'
-gem 'susy', '~> 1.0.9'
-gem 'compass'#, '>= 0.12.2'
-gem 'compass-rails'#, '>= 1.0.3'
-gem 'will_paginate' #, '~> 3.0.6'
-gem 'api_pagination_headers'
-gem 'traco'
-gem 'httparty'
-gem 'select2-rails'
-gem 'groupdate'
-gem "chartkick"
+gem 'rails', '5.1.7'
+
+# Dependency resolution for Rails 5
+gem 'railties', '5.1.7'
+gem 'loofah', '~> 2.19.1'
+gem 'nokogiri', '~> 1.6.0'
+gem 'rails-dom-testing', '~> 2.0', '< 2.2.0'
+
+gem 'apipie-rails', '~> 0.6'
+gem 'devise', '>= 3.5.10'
+gem 'annotate', '3.1.0'
+gem 'sass-rails', '5.0.7'
+gem 'uglifier', '~> 2.7.2'
+gem 'susy', '~> 2.2.14'
+gem 'compass', '~> 1.0.3'
+gem 'compass-rails', '~> 4.0.0'
+gem 'will_paginate', '~> 3.0.7'
+gem 'api_pagination_headers', '>= 2.1.1'
+gem 'traco', '~> 5.3.3' # TODO: switch to mobility
+gem 'httparty', '~> 0.13.3'
+gem 'select2-rails', '~> 3.5.9.3'
+gem 'groupdate', '~> 4.0.0'
+gem 'chartkick', '~> 1.3.2'
+gem 'listen', '>= 3.0.5', '< 3.2'
group :test do
gem 'shoulda'
- gem 'capybara'
- gem 'factory_girl_rails'
- gem 'simplecov', require: false
- gem 'codeclimate-test-reporter', require: nil
- gem 'link_header'
- gem 'launchy'
- gem 'mocha'
+ gem 'capybara', '~> 2.8'
+ gem 'factory_girl_rails', '~> 4.5.0' # UPGRADE TODO: gem 'factory_bot_rails', '4.11.1'
+ gem 'simplecov', '~> 0.17.1', require: false
+ # gem 'codeclimate-test-reporter', require: nil # UPGRADE: removed
+ gem 'link_header', '~> 0.0.8'
+ gem 'launchy', '~> 2.4.3'
+ gem 'mocha', '~> 1.1.0'
end
group :staging, :production do
@@ -33,39 +41,49 @@ group :staging, :production do
end
# Use postgresql as the database for Active Record
-gem 'pg'
-gem 'schema_plus'
+gem 'pg', '~> 1.2'
+# gem 'schema_plus', '~> 2.1.0' # was 1.8.7
+gem 'schema_associations', '~> 1.2.7';
+gem 'schema_auto_foreign_keys', '~> 0.1.3';
+gem 'schema_validations', '~> 2.3.0';
# Use CoffeeScript for .js.coffee assets and views
-gem 'coffee-rails', '~> 4.0.0'
+gem 'coffee-rails', '~> 4'
+
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
-gem 'jquery-rails'
+gem 'jquery-rails', '~> 4.6.0'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
-gem 'turbolinks'
+gem 'turbolinks', '~> 2.5.3'
# Build JSON / XML API
-gem 'rabl'
+gem 'rabl', '~> 0.14.0'
# Also add either `oj` or `yajl-ruby` as the JSON parser
-gem 'oj'
+gem 'oj', '~> 2.12.1'
# bundle exec rake doc:rails generates the API under doc/api.
-gem 'sdoc', '~> 0.4.0', group: :doc
+gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
-gem 'spring', group: :development
+gem 'spring', '~> 1.6.3', group: :development
group :development do
gem 'capistrano', '~> 3.4.0'
- gem 'capistrano-rails'
- gem 'capistrano-bundler'
- gem 'capistrano-rvm'
+ gem 'capistrano-rails', '~> 1.6.3'
+ gem 'capistrano-bundler', '~> 2.1.1'
+ gem 'capistrano-rvm', '~> 0.1.2'
gem 'capistrano-maintenance', '~> 1.0', require: false
gem 'capistrano-passenger', '~> 0.1.1', require: false
gem 'rack-cors', :require => 'rack/cors'
+
+ # Support ed25519 SSH keys
+ gem 'rbnacl', '4.0.2'
+ gem 'rbnacl-libsodium', '1.0.16'
+ gem 'bcrypt_pbkdf', '1.1.0'
+ gem 'ed25519', '1.2.4'
end
group :development, :test do
- gem 'byebug'
+ gem 'byebug', '~> 4.0.2'
end
-gem 'appsignal'
+gem 'appsignal', '~> 3.3.11'
diff --git a/Gemfile.lock b/Gemfile.lock
index 5c1eb7d..7d3f504 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,92 +1,94 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.2.5.2)
- actionpack (= 4.2.5.2)
- actionview (= 4.2.5.2)
- activejob (= 4.2.5.2)
+ actioncable (5.1.7)
+ actionpack (= 5.1.7)
+ nio4r (~> 2.0)
+ websocket-driver (~> 0.6.1)
+ actionmailer (5.1.7)
+ actionpack (= 5.1.7)
+ actionview (= 5.1.7)
+ activejob (= 5.1.7)
mail (~> 2.5, >= 2.5.4)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- actionpack (4.2.5.2)
- actionview (= 4.2.5.2)
- activesupport (= 4.2.5.2)
- rack (~> 1.6)
- rack-test (~> 0.6.2)
- rails-dom-testing (~> 1.0, >= 1.0.5)
+ rails-dom-testing (~> 2.0)
+ actionpack (5.1.7)
+ actionview (= 5.1.7)
+ activesupport (= 5.1.7)
+ rack (~> 2.0)
+ rack-test (>= 0.6.3)
+ rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
- actionview (4.2.5.2)
- activesupport (= 4.2.5.2)
+ actionview (5.1.7)
+ activesupport (= 5.1.7)
builder (~> 3.1)
- erubis (~> 2.7.0)
- rails-dom-testing (~> 1.0, >= 1.0.5)
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
- activejob (4.2.5.2)
- activesupport (= 4.2.5.2)
- globalid (>= 0.3.0)
- activemodel (4.2.5.2)
- activesupport (= 4.2.5.2)
- builder (~> 3.1)
- activerecord (4.2.5.2)
- activemodel (= 4.2.5.2)
- activesupport (= 4.2.5.2)
- arel (~> 6.0)
- activesupport (4.2.5.2)
- i18n (~> 0.7)
- json (~> 1.7, >= 1.7.7)
+ erubi (~> 1.4)
+ rails-dom-testing (~> 2.0)
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
+ activejob (5.1.7)
+ activesupport (= 5.1.7)
+ globalid (>= 0.3.6)
+ activemodel (5.1.7)
+ activesupport (= 5.1.7)
+ activerecord (5.1.7)
+ activemodel (= 5.1.7)
+ activesupport (= 5.1.7)
+ arel (~> 8.0)
+ activesupport (5.1.7)
+ concurrent-ruby (~> 1.0, >= 1.0.2)
+ i18n (>= 0.7, < 2)
minitest (~> 5.1)
- thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
- addressable (2.3.7)
- annotate (2.6.8)
- activerecord (>= 3.2, <= 4.3)
- rake (~> 10.4)
- api_pagination_headers (2.0.1)
- rails (~> 4.1)
- apipie-rails (0.3.6)
- json
- appsignal (1.0.3)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
+ annotate (3.1.0)
+ activerecord (>= 3.2, < 7.0)
+ rake (>= 10.4, < 14.0)
+ api_pagination_headers (2.1.1)
+ rails (>= 4.2.0)
+ apipie-rails (0.6.0)
+ actionpack (>= 4.1)
+ activesupport (>= 4.1)
+ appsignal (3.3.11)
rack
- thread_safe
- arel (6.0.3)
- bcrypt (3.1.10)
- builder (3.2.2)
- byebug (4.0.2)
+ arel (8.0.0)
+ base64 (0.1.2)
+ bcrypt (3.1.20)
+ bcrypt_pbkdf (1.1.0)
+ builder (3.3.0)
+ byebug (4.0.5)
columnize (= 0.9.0)
- capistrano (3.4.0)
+ capistrano (3.4.1)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
- capistrano-bundler (1.1.4)
+ capistrano-bundler (2.1.1)
capistrano (~> 3.1)
- sshkit (~> 1.2)
- capistrano-maintenance (1.0.0)
+ capistrano-maintenance (1.2.1)
capistrano (>= 3.0)
capistrano-passenger (0.1.1)
capistrano (~> 3.0)
- capistrano-rails (1.1.3)
+ capistrano-rails (1.6.3)
capistrano (~> 3.1)
- capistrano-bundler (~> 1.1)
+ capistrano-bundler (>= 1.1, < 3)
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
- capybara (2.4.4)
- mime-types (>= 1.16)
+ capybara (2.18.0)
+ addressable
+ mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
- xpath (~> 2.0)
+ xpath (>= 2.0, < 4.0)
chartkick (1.3.2)
- chunky_png (1.3.4)
- codeclimate-test-reporter (0.4.7)
- simplecov (>= 0.7.1, < 1.0.0)
- coffee-rails (4.0.1)
+ chunky_png (1.4.0)
+ coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
- railties (>= 4.0.0, < 5.0)
- coffee-script (2.3.0)
+ railties (>= 4.0.0)
+ coffee-script (2.4.1)
coffee-script-source
execjs
- coffee-script-source (1.9.1)
- colorize (0.7.7)
+ coffee-script-source (1.12.2)
columnize (0.9.0)
compass (1.0.3)
chunky_png (~> 1.2)
@@ -100,212 +102,282 @@ GEM
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
- compass-rails (2.0.4)
+ compass-rails (4.0.0)
compass (~> 1.0.0)
- sass-rails (<= 5.0.1)
- sprockets (< 2.13)
- devise (3.5.6)
+ sass-rails (< 5.1)
+ sprockets (< 4.0)
+ concurrent-ruby (1.3.4)
+ crass (1.0.6)
+ devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
- railties (>= 3.2.6, < 5)
+ railties (>= 4.1.0)
responders
- thread_safe (~> 0.1)
warden (~> 1.2.3)
- docile (1.1.5)
- dotenv (2.0.0)
- dotenv-rails (2.0.0)
- dotenv (= 2.0.0)
- erubis (2.7.0)
- execjs (2.6.0)
+ docile (1.3.5)
+ dotenv (2.8.1)
+ dotenv-rails (2.8.1)
+ dotenv (= 2.8.1)
+ railties (>= 3.2)
+ ed25519 (1.2.4)
+ erubi (1.13.0)
+ execjs (2.9.0)
factory_girl (4.5.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.5.0)
factory_girl (~> 4.5.0)
railties (>= 3.0.0)
- ffi (1.9.8)
- globalid (0.3.6)
- activesupport (>= 4.1.0)
- groupdate (2.4.0)
- activesupport (>= 3)
- hike (1.2.3)
- httparty (0.13.3)
+ ffi (1.15.5)
+ globalid (0.4.2)
+ activesupport (>= 4.2.0)
+ groupdate (4.0.2)
+ activesupport (>= 4.2)
+ httparty (0.13.7)
json (~> 1.8)
multi_xml (>= 0.5.2)
- i18n (0.7.0)
- jquery-rails (3.1.4)
- railties (>= 3.0, < 5.0)
+ i18n (1.14.6)
+ concurrent-ruby (~> 1.0)
+ its-it (1.3.0)
+ jquery-rails (4.6.0)
+ rails-dom-testing (>= 1, < 3)
+ railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
- json (1.8.3)
+ json (1.8.6)
+ key_struct (0.4.2)
launchy (2.4.3)
addressable (~> 2.3)
link_header (0.0.8)
- loofah (2.0.3)
+ listen (3.1.5)
+ rb-fsevent (~> 0.9, >= 0.9.4)
+ rb-inotify (~> 0.9, >= 0.9.7)
+ ruby_dep (~> 1.2)
+ loofah (2.19.1)
+ crass (~> 1.0.2)
nokogiri (>= 1.5.9)
- mail (2.6.3)
- mime-types (>= 1.16, < 3)
+ mail (2.7.1)
+ mini_mime (>= 0.1.1)
metaclass (0.0.4)
- mime-types (2.99.1)
- mini_portile2 (2.0.0)
- minitest (5.8.4)
+ method_source (1.1.0)
+ mini_mime (1.1.2)
+ mini_portile2 (2.1.0)
+ minitest (5.15.0)
mocha (1.1.0)
metaclass (~> 0.0.1)
- multi_json (1.11.2)
- multi_xml (0.5.5)
- net-scp (1.2.1)
- net-ssh (>= 2.6.5)
- net-ssh (2.9.2)
- nokogiri (1.6.7.2)
- mini_portile2 (~> 2.0.0.rc2)
- oj (2.12.1)
+ modware (0.1.3)
+ key_struct (~> 0.4)
+ multi_json (1.15.0)
+ multi_xml (0.6.0)
+ net-scp (4.0.0)
+ net-ssh (>= 2.6.5, < 8.0.0)
+ net-sftp (4.0.0)
+ net-ssh (>= 5.0.0, < 8.0.0)
+ net-ssh (6.1.0)
+ nio4r (2.5.2)
+ nokogiri (1.6.8.1)
+ mini_portile2 (~> 2.1.0)
+ oj (2.12.14)
orm_adapter (0.5.0)
- pg (0.18.1)
- rabl (0.12.0)
+ ostruct (0.1.0)
+ pg (1.2.3)
+ public_suffix (4.0.7)
+ rabl (0.14.5)
activesupport (>= 2.3.14)
- rack (1.6.4)
- rack-cors (0.4.0)
- rack-test (0.6.3)
- rack (>= 1.0)
- rails (4.2.5.2)
- actionmailer (= 4.2.5.2)
- actionpack (= 4.2.5.2)
- actionview (= 4.2.5.2)
- activejob (= 4.2.5.2)
- activemodel (= 4.2.5.2)
- activerecord (= 4.2.5.2)
- activesupport (= 4.2.5.2)
- bundler (>= 1.3.0, < 2.0)
- railties (= 4.2.5.2)
- sprockets-rails
- rails-deprecated_sanitizer (1.0.3)
- activesupport (>= 4.2.0.alpha)
- rails-dom-testing (1.0.7)
- activesupport (>= 4.2.0.beta, < 5.0)
- nokogiri (~> 1.6.0)
- rails-deprecated_sanitizer (>= 1.0.1)
- rails-html-sanitizer (1.0.3)
- loofah (~> 2.0)
- railties (4.2.5.2)
- actionpack (= 4.2.5.2)
- activesupport (= 4.2.5.2)
+ rack (2.2.10)
+ rack-cors (2.0.2)
+ rack (>= 2.0.0)
+ rack-test (2.1.0)
+ rack (>= 1.3)
+ rails (5.1.7)
+ actioncable (= 5.1.7)
+ actionmailer (= 5.1.7)
+ actionpack (= 5.1.7)
+ actionview (= 5.1.7)
+ activejob (= 5.1.7)
+ activemodel (= 5.1.7)
+ activerecord (= 5.1.7)
+ activesupport (= 5.1.7)
+ bundler (>= 1.3.0)
+ railties (= 5.1.7)
+ sprockets-rails (>= 2.0.0)
+ rails-dom-testing (2.1.1)
+ activesupport (>= 5.0.0)
+ minitest
+ nokogiri (>= 1.6)
+ rails-html-sanitizer (1.5.0)
+ loofah (~> 2.19, >= 2.19.1)
+ railties (5.1.7)
+ actionpack (= 5.1.7)
+ activesupport (= 5.1.7)
+ method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
- rake (10.5.0)
- rb-fsevent (0.9.4)
- rb-inotify (0.9.5)
- ffi (>= 0.5.0)
- rdoc (4.2.0)
- json (~> 1.4)
- responders (2.1.1)
- railties (>= 4.2.0, < 5.1)
- sass (3.4.13)
- sass-rails (5.0.1)
- railties (>= 4.0.0, < 5.0)
+ rake (13.2.1)
+ rb-fsevent (0.11.2)
+ rb-inotify (0.10.1)
+ ffi (~> 1.0)
+ rbnacl (4.0.2)
+ ffi
+ rbnacl-libsodium (1.0.16)
+ rbnacl (>= 3.0.1)
+ rdoc (4.3.0)
+ responders (2.4.1)
+ actionpack (>= 4.2.0, < 6.0)
+ railties (>= 4.2.0, < 6.0)
+ ruby_dep (1.5.0)
+ sass (3.4.25)
+ sass-rails (5.0.7)
+ railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
- tilt (~> 1.1)
- schema_plus (1.8.7)
- activerecord (>= 3.2, < 4.3)
+ tilt (>= 1.1, < 3)
+ schema_associations (1.2.7)
+ schema_plus_foreign_keys (~> 0.1)
+ schema_auto_foreign_keys (0.1.3)
+ its-it (~> 1.2)
+ schema_plus_foreign_keys (~> 0.1)
+ schema_plus_indexes (~> 0.2)
+ schema_monkey (2.1.6)
+ activerecord (>= 4.2)
+ modware (~> 0.1.0)
+ schema_plus_columns (0.3.0)
+ activerecord (>= 4.2, < 5.3)
+ its-it (~> 1.2)
+ schema_plus_core
+ schema_plus_indexes (~> 0.2)
+ schema_plus_compatibility (0.4.0)
+ activerecord (>= 4.2, < 5.3)
+ schema_monkey (~> 2.1)
+ schema_plus_core (2.2.3)
+ activerecord (~> 5.0)
+ its-it (~> 1.2)
+ schema_monkey (~> 2.1)
+ schema_plus_foreign_keys (0.1.8)
+ activerecord (>= 4.2, < 5.3)
+ its-it (~> 1.2)
+ schema_plus_compatibility (~> 0.2)
+ schema_plus_core
+ valuable
+ schema_plus_indexes (0.3.1)
+ activerecord (>= 4.2, < 5.3)
+ its-it (~> 1.2)
+ schema_plus_core
+ schema_validations (2.3.0)
+ activerecord (~> 5.0)
+ schema_plus_columns
valuable
- sdoc (0.4.1)
+ sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
select2-rails (3.5.9.3)
thor (~> 0.14)
- shoulda (3.5.0)
- shoulda-context (~> 1.0, >= 1.0.1)
- shoulda-matchers (>= 1.4.1, < 3.0)
- shoulda-context (1.2.1)
- shoulda-matchers (2.8.0)
- activesupport (>= 3.0.0)
- simplecov (0.9.2)
- docile (~> 1.1.0)
- multi_json (~> 1.0)
- simplecov-html (~> 0.9.0)
- simplecov-html (0.9.0)
- spring (1.6.3)
- sprockets (2.12.4)
- hike (~> 1.2)
- multi_json (~> 1.0)
- rack (~> 1.0)
- tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.3.3)
- actionpack (>= 3.0)
- activesupport (>= 3.0)
- sprockets (>= 2.8, < 4.0)
- sshkit (1.7.1)
- colorize (>= 0.7.0)
+ shoulda (4.0.0)
+ shoulda-context (~> 2.0)
+ shoulda-matchers (~> 4.0)
+ shoulda-context (2.0.0)
+ shoulda-matchers (4.0.1)
+ activesupport (>= 4.2.0)
+ simplecov (0.17.1)
+ docile (~> 1.1)
+ json (>= 1.8, < 3)
+ simplecov-html (~> 0.10.0)
+ simplecov-html (0.10.2)
+ spring (1.6.4)
+ sprockets (3.7.5)
+ base64
+ concurrent-ruby (~> 1.0)
+ rack (> 1, < 3)
+ sprockets-rails (3.2.2)
+ actionpack (>= 4.0)
+ activesupport (>= 4.0)
+ sprockets (>= 3.0.0)
+ sshkit (1.23.2)
+ base64
net-scp (>= 1.1.2)
+ net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
- susy (1.0.9)
- compass (>= 0.12.2)
- sass (>= 3.2.0)
- thor (0.19.1)
- thread_safe (0.3.5)
- tilt (1.4.1)
- traco (3.1.6)
- activerecord (>= 3.0)
- turbolinks (2.5.3)
+ ostruct
+ susy (2.2.14)
+ sass (>= 3.3.0, < 3.5)
+ thor (0.20.3)
+ thread_safe (0.3.6)
+ tilt (2.4.0)
+ traco (5.3.3)
+ activerecord (>= 4.2)
+ turbolinks (2.5.4)
coffee-rails
- tzinfo (1.2.2)
+ tzinfo (1.2.11)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
- valuable (0.9.9)
- warden (1.2.6)
- rack (>= 1.0)
- will_paginate (3.0.7)
- xpath (2.0.0)
+ valuable (0.9.14)
+ warden (1.2.9)
+ rack (>= 2.0.9)
+ websocket-driver (0.6.5)
+ websocket-extensions (>= 0.1.0)
+ websocket-extensions (0.1.5)
+ will_paginate (3.0.12)
+ xpath (2.1.0)
nokogiri (~> 1.3)
PLATFORMS
- ruby
+ x86_64-linux
DEPENDENCIES
- annotate
- api_pagination_headers
- apipie-rails
- appsignal
- byebug
+ annotate (= 3.1.0)
+ api_pagination_headers (>= 2.1.1)
+ apipie-rails (~> 0.6)
+ appsignal (~> 3.3.11)
+ bcrypt_pbkdf (= 1.1.0)
+ byebug (~> 4.0.2)
capistrano (~> 3.4.0)
- capistrano-bundler
+ capistrano-bundler (~> 2.1.1)
capistrano-maintenance (~> 1.0)
capistrano-passenger (~> 0.1.1)
- capistrano-rails
- capistrano-rvm
- capybara
- chartkick
- codeclimate-test-reporter
- coffee-rails (~> 4.0.0)
- compass
- compass-rails
- devise (>= 3.5.4)
+ capistrano-rails (~> 1.6.3)
+ capistrano-rvm (~> 0.1.2)
+ capybara (~> 2.8)
+ chartkick (~> 1.3.2)
+ coffee-rails (~> 4)
+ compass (~> 1.0.3)
+ compass-rails (~> 4.0.0)
+ devise (>= 3.5.10)
dotenv-rails
- factory_girl_rails
- groupdate
- httparty
- jquery-rails
- launchy
- link_header
- mocha
- oj
- pg
- rabl
+ ed25519 (= 1.2.4)
+ factory_girl_rails (~> 4.5.0)
+ groupdate (~> 4.0.0)
+ httparty (~> 0.13.3)
+ jquery-rails (~> 4.6.0)
+ launchy (~> 2.4.3)
+ link_header (~> 0.0.8)
+ listen (>= 3.0.5, < 3.2)
+ loofah (~> 2.19.1)
+ mocha (~> 1.1.0)
+ nokogiri (~> 1.6.0)
+ oj (~> 2.12.1)
+ pg (~> 1.2)
+ rabl (~> 0.14.0)
rack-cors
- rails (= 4.2.5.2)
- sass-rails
- schema_plus
+ rails (= 5.1.7)
+ rails-dom-testing (~> 2.0, < 2.2.0)
+ railties (= 5.1.7)
+ rbnacl (= 4.0.2)
+ rbnacl-libsodium (= 1.0.16)
+ sass-rails (= 5.0.7)
+ schema_associations (~> 1.2.7)
+ schema_auto_foreign_keys (~> 0.1.3)
+ schema_validations (~> 2.3.0)
sdoc (~> 0.4.0)
- select2-rails
+ select2-rails (~> 3.5.9.3)
shoulda
- simplecov
- spring
- susy (~> 1.0.9)
- traco
- turbolinks
- uglifier
- will_paginate
+ simplecov (~> 0.17.1)
+ spring (~> 1.6.3)
+ susy (~> 2.2.14)
+ traco (~> 5.3.3)
+ turbolinks (~> 2.5.3)
+ uglifier (~> 2.7.2)
+ will_paginate (~> 3.0.7)
BUNDLED WITH
- 1.10.6
+ 2.3.27
diff --git a/README.md b/README.md
index d4cb947..6e887d1 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,25 @@
-species-api
-===========
+# Species+/CITES Checklist API
-Species+/CITES Checklist API
+### Getting started
-Ensure you already have Species+ installed and the database set up. Species API will use the Species+ database as the integration layer.
\ No newline at end of file
+Ensure you already have Species+ installed and the database set up and running
+on `localhost:5432`. Species API will use the Species+ database.
+
+### Running locally
+
+Install the relevant versions of `ruby` and `bundler`. You may find other system
+dependencies such as `libsodium-dev` and `libpq-dev` are required.
+
+```
+# Install gems
+bundle
+
+# Run the server on http://localhost:3011/
+bundle exec rails s -p 3011
+```
+
+### Running tests
+
+```
+bundle exec rake test
+```
diff --git a/Rakefile b/Rakefile
index ba6b733..e85f913 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,6 +1,6 @@
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
-require File.expand_path('../config/application', __FILE__)
+require_relative 'config/application'
Rails.application.load_tasks
diff --git a/app/assets/stylesheets/base.css.scss b/app/assets/stylesheets/base.css.scss
index 9a85b1e..3bc2af9 100644
--- a/app/assets/stylesheets/base.css.scss
+++ b/app/assets/stylesheets/base.css.scss
@@ -1,5 +1,5 @@
@import "compass";
-@import "susy";
+@import "susyone";
$font-grey: #2d3237;
$font-blue: #253848;
@@ -43,7 +43,7 @@ h4 {
font-weight: bold;
}
-
+
.page {
// page acts as a container for our grid.
@@ -56,12 +56,12 @@ h4 {
margin-bottom: -20px;
position: relative;
z-index: 666;
-
+
strong {
font-weight: 600;
color: #444;
}
-
+
p {
padding: 0 0 0.75em 0;
line-height: 1.45em;
@@ -89,7 +89,7 @@ h4 {
margin-top: 1em;
padding-bottom: 0.6em;
}
-
+
h4.point-header.first {
margin-top: 0;
}
@@ -102,14 +102,14 @@ h4 {
clear: both;
}
- .column-one {
+ .column-one {
@include span-columns(6, 12);
width: 47.5%;
-
+
}
-
- .column-two {
- @include span-columns(6 omega, 12);
+
+ .column-two {
+ @include span-columns(6 omega, 12);
img {
display: block;
margin-left: auto;
diff --git a/app/assets/stylesheets/species/all.scss b/app/assets/stylesheets/species/all.scss
index 8391b7d..5e6caed 100755
--- a/app/assets/stylesheets/species/all.scss
+++ b/app/assets/stylesheets/species/all.scss
@@ -267,3 +267,105 @@ body.inner #footer .holder{
left: 50%;
margin: 0 auto;
}
+
+
+.btn-fixed-vertical {
+ bottom: 50%;
+ cursor: pointer;
+ position: fixed;
+ right: -28px;
+ transform: rotate(90deg);
+ z-index: 10;
+}
+
+/* Also occurs in Species+ SAPI repo. Styles are not quite identical. */
+
+.btn-page-feedback {
+ text-decoration: none;
+ font-size: 13px;
+ font-weight: bold;
+ text-transform: uppercase;
+ color: #fff;
+ margin: 18px 0 0;
+ padding: 0 14px;
+ background: #376382;
+ line-height: 31px;
+ -webkit-border-radius: 20px;
+ border-radius: 20px;
+ border: 2px solid #fff
+}
+
+.btn-page-feedback:hover {
+ color: #fff;
+ background: #253848;
+ transition: all 0.5s ease;
+ text-decoration: none;
+}
+
+#feedback_modal {
+ position: fixed;
+ top: 0;
+ left: 0;
+ background: rgba(0,0,0,0.6);
+ z-index: 9999;
+ width: 100%;
+ height: 100%;
+ display: none;
+}
+
+#feedback_modal:target {
+ display: block;
+ opacity: 2;
+}
+
+#feedback_form {
+ height: fit-content;
+ width: 560px;
+ margin: auto;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 10;
+ display: block;
+ background-color: #A4C5DA;
+ .feedback-cancel {
+ float: right;
+ padding: 4px 8px;
+ margin: 10px 10px 0;
+ color: #376382;
+ text-decoration: none;
+ cursor: pointer;
+ }
+ .feedback-header {
+ padding: 32px 32px 16px;
+ h2 {
+ padding: 0;
+ margin: 0;
+ text-transform: none;
+ font-size: 24px;
+ font-weight: bold;
+ color: black;
+ }
+ }
+ .feedback-body {
+ padding: 16px 32px 32px;
+ color: black;
+ p {
+ padding-bottom: 8px;
+ }
+ }
+}
+
+.footer-feedback {
+ clear: both;
+ margin-left: auto;
+ width: fit-content;
+ min-width: 100px; /* to be same size as logo */
+ a {
+ color: #648aa2;
+ text-decoration: none;
+ cursor: pointer;
+ }
+}
diff --git a/app/controllers/api/base_controller.rb b/app/controllers/api/base_controller.rb
index 72d610c..a93882b 100644
--- a/app/controllers/api/base_controller.rb
+++ b/app/controllers/api/base_controller.rb
@@ -15,7 +15,7 @@ def authenticate
token = request.headers['X-Authentication-Token']
@user = User.where(authentication_token: token).first if token
if @user.nil? || @user.is_contributor?
- head status: :unauthorized
+ head :unauthorized
track_this_request
return false
end
diff --git a/app/controllers/api/v1/taxon_concepts_controller.rb b/app/controllers/api/v1/taxon_concepts_controller.rb
index ec64837..06e8ac7 100644
--- a/app/controllers/api/v1/taxon_concepts_controller.rb
+++ b/app/controllers/api/v1/taxon_concepts_controller.rb
@@ -1,6 +1,6 @@
class Api::V1::TaxonConceptsController < Api::V1::BaseController
after_action only: [:index] { set_pagination_headers(:taxon_concepts) }
- before_action :validate_params, only: [:index]
+ before_action :validate_params, :set_eu_listings_display, only: [:index]
resource_description do
formats ['JSON', 'XML']
@@ -25,6 +25,8 @@ class Api::V1::TaxonConceptsController < Api::V1::BaseController
[common_names] list of common names (with language given by ISO 639-1 code; only for accepted names) [name, language max 255 characters]
[cites_listing] value of current CITES listing (as per CITES Checklist). When taxon concept is removed from appendices this becomes +NC+. When taxon is split listed it becomes a concatenation of appendix symbols, e.g. +I/II/NC+ (only for accepted names) [max 255 characters]
[cites_listings] list of current CITES listings with annotations (there will be more than one element in this list in case of split listings; only for accepted names) [appendix max 255 characters; annotation, hash_annotation unlimited length]
+[eu_listing] value of current EU listing. When taxon concept is removed from annexes this becomes +NC+. When taxon is split listed it becomes a concatenation of annex symbols, e.g. +A/B/NC+ (only for accepted names) [max 255 characters]
+[eu_listings] list of current EU listings with annotations (there will be more than one element in this list in case of split listings; only for accepted names) [appendix max 255 characters; annotation, hash_annotation unlimited length]
[accepted_names] list of accepted names (only for synonyms, i.e. name_status == S) [full_name, author_year and rank follow the same length constraints as respective properties of the main taxon concept]
==== Note on deleted taxon concepts
@@ -63,6 +65,7 @@ class Api::V1::TaxonConceptsController < Api::V1::BaseController
param :with_descendants, String, desc: 'Broadens the above search by name to include higher taxa. Value must be true or false', required: false
param :taxonomy, String, desc: 'Filter taxon concepts by taxonomy, accepts either CITES or CMS as its value. Defaults to CITES if no value is specified', required: false
param :language, String, desc: 'Filter languages returned for common names. Value should be a single country code or a comma separated string of country codes (e.g. language=EN,PL,IT). Defaults to showing all available languages if no language parameter is specified', required: false
+ param :with_eu_listings, String, desc: 'Include EU listing data. Value must be true or false, defaults to false', required: false
example <<-EOS
{
@@ -125,6 +128,24 @@ class Api::V1::TaxonConceptsController < Api::V1::BaseController
"annotation":"Included in Appendix I, except the populations of Botswana, Namibia, South Africa and Zimbabwe, which are included in Appendix II.",
"hash_annotation":null
}
+ ],
+ "eu_listings":[
+ {
+ "id":"32796"
+ "annex":"A"
+ "annotation":"Except for the populations of Botswana, Namibia, South Africa and Zimbabwe, which are included in Annex B."
+ "hash_annotation":nil
+ "effective_at":"2022-01-19"
+ "party":nil
+ },
+ {
+ "id":"34129"
+ "annex":"B"
+ "annotation":"Only the populations of Botswana, Namibia, South Africa and Zimbabwe; all other populations are included in Annex A. [...]"
+ "hash_annotation":nil
+ "effective_at":"2022-01-19"
+ "party":nil
+ }
]
}
]
@@ -194,6 +215,24 @@ class Api::V1::TaxonConceptsController < Api::V1::BaseController
+ If there is anything you want to tell us about the website, + please contact the Species+ team at: +
+ +