Skip to content

Commit 79fdca4

Browse files
authored
Merge pull request #2025 from DMPRoadmap/merged
Merging development into master
2 parents e494cd9 + 1344908 commit 79fdca4

File tree

342 files changed

+17435
-14701
lines changed

Some content is hidden

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

342 files changed

+17435
-14701
lines changed

.eslintrc.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"jquery": true,
6+
"jasmine": true
7+
},
8+
"extends": "airbnb-base",
9+
"parserOptions": {
10+
"ecmaVersion": 2018,
11+
"sourceType": "module"
12+
},
13+
"globals": {
14+
"timeago": true,
15+
"fixture": true,
16+
"spyOnEvent": true
17+
},
18+
"rules": {
19+
"indent": [
20+
"error",
21+
2
22+
],
23+
"linebreak-style": [
24+
"error",
25+
"unix"
26+
],
27+
"quotes": [
28+
"error",
29+
"single"
30+
],
31+
"semi": [
32+
"error",
33+
"always"
34+
]
35+
}
36+
}

.gitignore

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
# Ignore rbenv files
32
.ruby-version
43

@@ -25,7 +24,6 @@ public/videos/*
2524

2625
# Ignore branded content
2726
app/views/branded/*
28-
app/assets
2927
config/locales/static_pages/*.yml
3028

3129

@@ -55,7 +53,7 @@ config/branding.yml
5553

5654
# Ignore some of the initializers
5755
config/initializers/recaptcha.rb
58-
config/initializers/devise.rb
56+
# config/initializers/devise.rb
5957
config/initializers/wicked_pdf.rb
6058
config/initializers/fingerprint.rb
6159

@@ -84,14 +82,26 @@ config/locale/*/app.edit.po
8482
config/locale/*/app.po.time_stamp
8583

8684
# Front-end related
87-
lib/assets/node_modules
88-
lib/assets/npm-debug.log
89-
lib/assets/.eslintcache
9085
!.keep
9186
.byebug_history
9287
lib/data_cleanup/rules/org/fix_blank_abbreviation.yml
9388
.rspec
94-
node_modules
89+
90+
yarn-error.log
91+
yarn-debug.log*
92+
93+
.yarn-integrity
9594
.env
96-
public/packs
95+
package-lock.json
96+
node_modules
97+
/public/packs
98+
/public/packs-test
99+
97100
spec/examples.txt
101+
.babelrc
102+
.postcssrc.yml
103+
/public/packs
104+
/public/packs-test
105+
/node_modules
106+
yarn-debug.log*
107+
.yarn-integrity

.travis.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ addons:
1818
chrome: stable
1919
apt:
2020
packages:
21-
- nodejs
2221
- wkhtmltopdf
2322

2423
# artifacts:
@@ -42,12 +41,25 @@ env:
4241
- DB_ADAPTER=postgresql
4342
- DB_ADAPTER=mysql2
4443

44+
before_install:
45+
- nvm install 10.10.0
46+
47+
install:
48+
- bundle install --with development,ci --path=${BUNDLE_PATH:-vendor/bundle}
49+
- yarn install --ignore-optional
50+
51+
# This is a temporary bug fix for Karma tests
52+
# See here: https://github.com/travis-ci/travis-ci/issues/9024
53+
before_script:
54+
- "sudo chown root /opt/google/chrome/chrome-sandbox"
55+
- "sudo chmod 4755 /opt/google/chrome/chrome-sandbox"
56+
4557
# Main test script
4658
script:
4759
- export WICKED_PDF_PATH=./vendor/bundle/ruby/2.4.0/bin/wkhtmltopdf
4860
# Copy over config files needed for setup, and create DB
4961
- bin/setup
50-
# Precompile the assets
62+
- bundle exec rake webpacker:compile
5163
- bundle exec rake assets:precompile
5264
# Default test stage: Run all specs, listing the 10 slowest.
5365
- bundle exec rspec spec --profile=10
@@ -70,6 +82,19 @@ jobs:
7082
name: "Bundle audit"
7183
script: bundle exec bundle-audit check --update
7284

85+
- stage: test
86+
name: "Running JS through linter checks"
87+
script: yarn run lint
88+
89+
- stage: test
90+
name: "Running JS through Karma tests"
91+
script: yarn run test
92+
7393
- stage: hygiene
7494
name: "Check seeds are valid"
75-
script: bin/setup && bundle exec rake db:seed
95+
script:
96+
bin/setup
97+
bundle exec rake db:drop
98+
bundle exec rake db:create
99+
bundle exec rake db:schema:load
100+
bundle exec rake db:seed

Gemfile

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,14 @@ ruby '>= 2.4.0'
55
# ------------------------------------------------
66
# RAILS
77
# Full-stack web application framework. (http://www.rubyonrails.org)
8+
# Full-stack web application framework. (http://rubyonrails.org)
89
gem 'rails', '~> 4.2.10'
910

11+
# Rake is a Make-like program implemented in Ruby (https://github.com/ruby/rake)
12+
gem "rake"
13+
1014
# Tools for creating, working with, and running Rails applications. (http://www.rubyonrails.org)
15+
# Tools for creating, working with, and running Rails applications. (http://rubyonrails.org)
1116
gem 'railties'
1217

1318
# GEMS ADDED TO HELP HANDLE RAILS MIGRATION FROM 3.x to 4.2
@@ -17,17 +22,23 @@ gem 'railties'
1722
# A set of Rails responders to dry up your application (http://github.com/plataformatec/responders)
1823
gem 'responders', '~> 2.0'
1924

25+
group :rollbar, optional: true do
26+
gem 'rollbar'
27+
end
28+
2029
# ------------------------------------------------
2130
# DATABASE/SERVER
2231

2332
group :mysql do
2433
# A simple, fast Mysql library for Ruby, binding to libmysql (http://github.com/brianmario/mysql2)
34+
# A simple, fast Mysql library for Ruby, binding to libmysql (https://github.com/brianmario/mysql2)
2535
gem 'mysql2', '~> 0.4.10'
2636
end
2737

2838
group :pgsql do
2939
# Pg is the Ruby interface to the {PostgreSQL
3040
# RDBMS}[http://www.postgresql.org/](https://bitbucket.org/ged/ruby-pg)
41+
# Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/] (https://bitbucket.org/ged/ruby-pg)
3142
gem 'pg', '~> 0.19.0'
3243
end
3344

@@ -72,6 +83,7 @@ gem 'ruby_dig' # for omniauth-orcid
7283

7384
# Gems for repository integration
7485
# OO authorization for Rails (https://github.com/elabs/pundit)
86+
# OO authorization for Rails (https://github.com/varvet/pundit)
7587
gem 'pundit'
7688

7789
# ------------------------------------------------
@@ -92,6 +104,36 @@ gem 'recaptcha'
92104
# Ideal gem for handling attachments in Rails, Sinatra and Rack applications. (http://github.com/markevans/dragonfly)
93105
gem 'dragonfly'
94106

107+
group :aws, optional: true do
108+
109+
gem 'dragonfly-s3_data_store'
110+
111+
end
112+
113+
114+
# bootstrap-sass is a Sass-powered version of Bootstrap 3, ready to drop right into your Sass powered applications. (https://github.com/twbs/bootstrap-sass)
115+
gem 'bootstrap-sass', '~> 3.3.7'
116+
117+
# This is required for Font-Awesome, but not used as the main sass compiler
118+
119+
# Sass adapter for the Rails asset pipeline. (https://github.com/rails/sass-rails)
120+
gem "sass-rails", require: false
121+
122+
# Integrate SassC-Ruby into Rails. (https://github.com/sass/sassc-rails)
123+
gem "sassc-rails"
124+
125+
# Font-Awesome SASS (https://github.com/FortAwesome/font-awesome-sass)
126+
gem 'font-awesome-sass', '~> 4.2.0'
127+
128+
# Use webpack to manage app-like JavaScript modules in Rails (https://github.com/rails/webpacker)
129+
gem 'webpacker', '~> 3.5'
130+
131+
# Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website. (https://github.com/ai/autoprefixer-rails)
132+
gem "autoprefixer-rails"
133+
134+
# Minimal embedded v8 for Ruby (https://github.com/discourse/mini_racer)
135+
gem 'mini_racer'
136+
95137
# ------------------------------------------------
96138
# EXPORTING
97139
# Provides binaries for WKHTMLTOPDF project in an easily accessible package.
@@ -122,6 +164,15 @@ gem 'gettext', require: false, group: :development
122164
# A pagination engine plugin for Rails 4+ and other modern frameworks (https://github.com/kaminari/kaminari)
123165
gem 'kaminari'
124166

167+
# Following best practices from http://12factor.net run a maintainable, clean, and scalable app on Rails (https://github.com/heroku/rails_12factor)
168+
gem "rails_12factor", group: [:production]
169+
170+
# Autoload dotenv in Rails. (https://github.com/bkeepers/dotenv)
171+
gem "dotenv-rails"
172+
173+
gem 'activerecord-session_store'
174+
175+
125176
# ------------------------------------------------
126177
# ENVIRONMENT SPECIFIC DEPENDENCIES
127178
group :development, :test do
@@ -132,10 +183,7 @@ group :development, :test do
132183
gem "rspec-rails"
133184

134185
# factory_bot_rails provides integration between factory_bot and rails 3 or newer (http://github.com/thoughtbot/factory_bot_rails)
135-
# rspec-collection_matchers-1.1.3 (https://github.com/rspec/rspec-collection_matchers)
136-
gem "rspec-collection_matchers"
137-
138-
# factory_bot_rails provides integration between factory_bot and rails 3 or newer (http://github.com/thoughtbot/factory_bot_rails)
186+
# factory_bot_rails provides integration between factory_bot and rails 3 or newer (https://github.com/thoughtbot/factory_bot_rails)
139187
gem "factory_bot_rails"
140188

141189
# Easily generate fake data (https://github.com/stympy/faker)
@@ -149,6 +197,7 @@ group :development, :test do
149197

150198
# Guard gem for RSpec (https://github.com/guard/guard-rspec)
151199
gem "guard-rspec"
200+
152201
end
153202

154203
group :test do
@@ -184,6 +233,9 @@ group :test do
184233

185234
# Easy installation and use of chromedriver. (https://github.com/flavorjones/chromedriver-helper)
186235
gem "chromedriver-helper", ">= 1.2.0"
236+
237+
gem "rspec-collection_matchers"
238+
187239
end
188240

189241
group :ci, :development do
@@ -207,6 +259,7 @@ group :development do
207259
gem "text", require: false
208260

209261
# Better error page for Rails and other Rack apps (https://github.com/charliesome/better_errors)
262+
# Better error page for Rails and other Rack apps (https://github.com/BetterErrors/better_errors)
210263
gem "better_errors"
211264

212265
# Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack. (http://github.com/banister/binding_of_caller)
@@ -233,6 +286,4 @@ group :development do
233286
# TomDoc for YARD (http://rubyworks.github.com/yard-tomdoc)
234287
gem "yard-tomdoc"
235288

236-
gem "dotenv-rails"
237-
238289
end

0 commit comments

Comments
 (0)