Merge pull request #709 from ZmagoD/zd_SCI_1388

Upgrate to Rails 5.1
This commit is contained in:
Zmago Devetak 2017-06-27 15:57:14 +02:00 committed by GitHub
commit f7cef48f9f
93 changed files with 568 additions and 309 deletions

View file

@ -1,4 +1,4 @@
FROM ruby:2.3.3
FROM ruby:2.4.1
MAINTAINER BioSistemika <info@biosistemika.com>
# additional dependecies

View file

@ -1,4 +1,4 @@
FROM ruby:2.3.3
FROM ruby:2.4.1
MAINTAINER BioSistemika <info@biosistemika.com>
# additional dependecies

26
Gemfile
View file

@ -1,23 +1,23 @@
source 'http://rubygems.org'
ruby '2.3.3'
ruby '2.4.1'
gem 'rails', '4.2.5'
gem 'rails', '5.1.1'
gem 'figaro'
gem 'pg'
gem 'devise', '3.5.6'
gem 'devise', '~> 4.3.0'
gem 'devise_invitable'
gem 'simple_token_authentication', '~> 1.0' # Token authentication for Devise
gem 'simple_token_authentication', '~> 1.15.1' # Token authentication for Devise
gem 'bootstrap-sass', '~> 3.3.5'
gem 'sass-rails', '~> 5.0'
gem 'sass-rails', '~> 5.0.6'
gem 'bootstrap_form'
gem 'yomu'
gem 'font-awesome-rails', '~> 4.6'
gem 'font-awesome-rails', '~> 4.7.0.2'
gem 'recaptcha', require: 'recaptcha/rails'
gem 'sanitize', '~> 4.4'
# JS datetime library, requirement of datetime picker
gem 'momentjs-rails', '>= 2.9.0'
gem 'momentjs-rails', '~> 2.17.1'
# JS datetime picker
gem 'bootstrap3-datetimepicker-rails', '~> 4.15.35'
# Select elements for Bootstrap
@ -27,7 +27,8 @@ gem 'uglifier', '>= 1.3.0'
gem 'jquery-turbolinks'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'jquery-scrollto-rails'
gem 'jquery-scrollto-rails',
git: 'https://github.com/biosistemika/jquery-scrollto-rails'
gem 'hammerjs-rails'
gem 'introjs-rails' # Create quick tutorials
gem 'js_cookie_rails' # Simple JS API for cookies
@ -60,18 +61,19 @@ gem 'rails_autolink', '~> 1.1', '>= 1.1.6'
gem 'delayed_paperclip'
gem 'rubyzip'
gem 'paperclip', '~> 4.3' # File attachment, image attachment library
gem 'aws-sdk', '~> 2.2.8'
gem 'aws-sdk-v1'
gem 'paperclip', '~> 5.1' # File attachment, image attachment library
gem 'aws-sdk', '~> 2'
gem 'delayed_job_active_record'
gem 'devise-async'
gem 'ruby-graphviz', '~> 1.2' # Graphviz for rails
gem 'tinymce-rails', '~> 4.5.7' # Rich text editor
gem 'tinymce-rails', '~> 4.6.4' # Rich text editor
gem 'base62' # Used for smart annotations
gem 'newrelic_rpm'
group :development, :test do
gem 'listen', '~> 3.0'
gem 'byebug'
gem 'better_errors'
gem 'binding_of_caller'

View file

@ -1,3 +1,10 @@
GIT
remote: https://github.com/biosistemika/jquery-scrollto-rails
revision: d1d40d5334e0bccfc64208ba81b9a7792f6cb591
specs:
jquery-scrollto-rails (1.4.3)
railties (> 3.1, < 6.0)
GIT
remote: https://github.com/einzige/sneaky-save
revision: e7c77674abe74d598dfd58db7c680dd85936f207
@ -8,65 +15,62 @@ GIT
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.2.5)
actionpack (= 4.2.5)
actionview (= 4.2.5)
activejob (= 4.2.5)
actioncable (5.1.1)
actionpack (= 5.1.1)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.1.1)
actionpack (= 5.1.1)
actionview (= 5.1.1)
activejob (= 5.1.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.5)
actionview (= 4.2.5)
activesupport (= 4.2.5)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-dom-testing (~> 2.0)
actionpack (5.1.1)
actionview (= 5.1.1)
activesupport (= 5.1.1)
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)
activesupport (= 4.2.5)
actionview (5.1.1)
activesupport (= 5.1.1)
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)
activesupport (= 4.2.5)
globalid (>= 0.3.0)
activemodel (4.2.5)
activesupport (= 4.2.5)
builder (~> 3.1)
activerecord (4.2.5)
activemodel (= 4.2.5)
activesupport (= 4.2.5)
arel (~> 6.0)
activesupport (4.2.5)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.1)
activesupport (= 5.1.1)
globalid (>= 0.3.6)
activemodel (5.1.1)
activesupport (= 5.1.1)
activerecord (5.1.1)
activemodel (= 5.1.1)
activesupport (= 5.1.1)
arel (~> 8.0)
activesupport (5.1.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
ajax-datatables-rails (0.3.1)
railties (>= 3.1)
algorithms (0.6.1)
ansi (1.5.0)
arel (6.0.3)
arel (8.0.0)
aspector (0.14.0)
ast (2.3.0)
auto_strip_attributes (2.1.0)
activerecord (>= 3.0)
autoprefixer-rails (6.1.2)
autoprefixer-rails (7.1.1.2)
execjs
json
autosize-rails (1.18.17)
rails (>= 3.1)
awesome_print (1.7.0)
aws-sdk (2.2.8)
aws-sdk-resources (= 2.2.8)
aws-sdk-core (2.2.8)
awesome_print (1.8.0)
aws-sdk (2.2.37)
aws-sdk-resources (= 2.2.37)
aws-sdk-core (2.2.37)
jmespath (~> 1.0)
aws-sdk-resources (2.2.8)
aws-sdk-core (= 2.2.8)
aws-sdk-v1 (1.66.0)
json (~> 1.4)
nokogiri (>= 1.4.4)
aws-sdk-resources (2.2.37)
aws-sdk-core (= 2.2.37)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
@ -79,157 +83,167 @@ GEM
rack (>= 0.9.0)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.6)
bootstrap-sass (3.3.7)
autoprefixer-rails (>= 5.2.1)
sass (>= 3.3.4)
bootstrap-select-rails (1.6.3)
bootstrap-select-rails (1.12.1)
bootstrap3-datetimepicker-rails (4.15.35)
momentjs-rails (>= 2.8.1)
bootstrap_form (2.3.0)
builder (3.2.2)
byebug (8.2.1)
climate_control (0.0.3)
activesupport (>= 3.0)
bootstrap_form (2.7.0)
builder (3.2.3)
byebug (9.0.6)
climate_control (0.2.0)
cocaine (0.5.8)
climate_control (>= 0.0.3, < 1.0)
coderay (1.1.1)
coffee-rails (4.1.0)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorize (0.8.1)
coffee-script-source (1.12.2)
commit_param_routing (0.0.1)
concurrent-ruby (1.0.0)
concurrent-ruby (1.0.5)
crass (1.0.2)
debug_inspector (0.0.2)
deface (1.0.2)
colorize (>= 0.5.8)
nokogiri (~> 1.6.0)
debug_inspector (0.0.3)
deface (1.2.0)
nokogiri (~> 1.6)
polyglot
rails (>= 3.1)
delayed_job (4.1.1)
activesupport (>= 3.0, < 5.0)
delayed_job_active_record (4.1.0)
activerecord (>= 3.0, < 5)
rails (>= 4.1)
rainbow (>= 2.1.0)
delayed_job (4.1.3)
activesupport (>= 3.0, < 5.2)
delayed_job_active_record (4.1.2)
activerecord (>= 3.0, < 5.2)
delayed_job (>= 3.0, < 5)
delayed_paperclip (3.0.1)
activejob (>= 4.2)
paperclip (>= 3.3)
devise (3.5.6)
devise (4.3.0)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 3.2.6, < 5)
railties (>= 4.1.0, < 5.2)
responders
thread_safe (~> 0.1)
warden (~> 1.2.3)
devise-async (0.10.1)
devise (~> 3.2)
devise_invitable (1.5.5)
actionmailer (>= 3.2.6, < 5)
devise (>= 3.2.0)
devise-async (0.7.0)
devise (>= 2.2)
devise_invitable (1.7.2)
actionmailer (>= 4.1.0)
devise (>= 4.0.0)
erubi (1.6.0)
erubis (2.7.0)
execjs (2.6.0)
faker (1.6.1)
execjs (2.7.0)
faker (1.7.3)
i18n (~> 0.5)
ffi (1.9.18)
figaro (1.1.1)
thor (~> 0.14)
font-awesome-rails (4.6.3.1)
railties (>= 3.2, < 5.1)
globalid (0.3.6)
activesupport (>= 4.1.0)
font-awesome-rails (4.7.0.2)
railties (>= 3.2, < 5.2)
globalid (0.4.0)
activesupport (>= 4.2.0)
hammerjs-rails (2.0.4)
i18n (0.7.0)
i18n-js (3.0.0.rc11)
i18n (~> 0.6)
i18n (0.8.4)
i18n-js (3.0.0)
i18n (~> 0.6, >= 0.6.6)
introjs-rails (1.0.0)
sass-rails (>= 3.2)
thor (~> 0.14)
jmespath (1.1.3)
jquery-rails (4.0.5)
rails-dom-testing (~> 1.0)
jmespath (1.3.1)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
jquery-scrollto-rails (1.4.3)
railties (> 3.1, < 5.0)
jquery-turbolinks (2.1.0)
railties (>= 3.1.0)
turbolinks
jquery-ui-rails (5.0.5)
jquery-ui-rails (6.0.1)
railties (>= 3.2.16)
js_cookie_rails (1.0.1)
js_cookie_rails (2.1.4)
railties (>= 3.1)
json (1.8.3)
kaminari (0.16.3)
actionpack (>= 3.0.0)
activesupport (>= 3.0.0)
json (1.8.6)
kaminari (1.0.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.0.1)
kaminari-activerecord (= 1.0.1)
kaminari-core (= 1.0.1)
kaminari-actionview (1.0.1)
actionview
kaminari-core (= 1.0.1)
kaminari-activerecord (1.0.1)
activerecord
kaminari-core (= 1.0.1)
kaminari-core (1.0.1)
lazy_priority_queue (0.1.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
little-plugger (1.1.4)
logging (2.0.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mail (2.6.6)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (1.25.1)
mimemagic (0.3.0)
mini_portile2 (2.1.0)
minitest (5.9.0)
minitest-reporters (1.1.10)
mimemagic (0.3.2)
mini_portile2 (2.2.0)
minitest (5.10.2)
minitest-reporters (1.1.14)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
momentjs-rails (2.10.6)
momentjs-rails (2.17.1)
railties (>= 3.1)
multi_json (1.11.2)
nested_form_fields (0.7.4)
multi_json (1.12.1)
nested_form_fields (0.8)
coffee-rails (>= 3.2.1)
jquery-rails
rails (>= 3.2.0)
newrelic_rpm (4.0.0.332)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
nokogumbo (1.4.10)
newrelic_rpm (4.2.0.334)
nio4r (2.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
nokogumbo (1.4.13)
nokogiri
oj (2.17.4)
oj (2.18.5)
orm_adapter (0.5.0)
paperclip (4.3.2)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
paperclip (5.1.0)
activemodel (>= 4.2.0)
activesupport (>= 4.2.0)
cocaine (~> 0.5.5)
mime-types
mimemagic (= 0.3.0)
mimemagic (~> 0.3.0)
parallel (1.11.2)
parser (2.4.0.0)
ast (~> 2.2)
pg (0.18.4)
pkg-config (1.1.7)
pg (0.21.0)
polyglot (0.3.5)
powerpack (0.1.1)
puma (2.15.3)
rack (1.6.4)
puma (3.9.1)
rack (2.0.3)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.5)
actionmailer (= 4.2.5)
actionpack (= 4.2.5)
actionview (= 4.2.5)
activejob (= 4.2.5)
activemodel (= 4.2.5)
activerecord (= 4.2.5)
activesupport (= 4.2.5)
rails (5.1.1)
actioncable (= 5.1.1)
actionmailer (= 5.1.1)
actionpack (= 5.1.1)
actionview (= 5.1.1)
activejob (= 5.1.1)
activemodel (= 5.1.1)
activerecord (= 5.1.1)
activesupport (= 5.1.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.5)
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)
railties (= 5.1.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails_12factor (0.0.3)
@ -237,101 +251,111 @@ GEM
rails_stdout_logging
rails_autolink (1.1.6)
rails (> 3.1)
rails_serve_static_assets (0.0.4)
rails_stdout_logging (0.0.4)
railties (4.2.5)
actionpack (= 4.2.5)
activesupport (= 4.2.5)
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (5.1.1)
actionpack (= 5.1.1)
activesupport (= 5.1.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.2.2)
rake
rake (12.0.0)
rdoc (4.2.0)
recaptcha (4.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rdoc (4.3.0)
recaptcha (4.3.1)
json
remotipart (1.2.1)
responders (2.2.0)
railties (>= 4.2.0, < 5.1)
rgl (0.5.1)
algorithms (~> 0.6.1)
remotipart (1.3.1)
responders (2.4.0)
actionpack (>= 4.2.0, < 5.3)
railties (>= 4.2.0, < 5.3)
rgl (0.5.3)
lazy_priority_queue (~> 0.1.0)
stream (~> 0.5.0)
rkelly-remix (0.0.7)
roo (2.1.1)
nokogiri (~> 1)
rubyzip (~> 1.1, < 2.0.0)
rubocop (0.48.1)
rubocop (0.49.1)
parallel (~> 1.10)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-graphviz (1.2.2)
ruby-graphviz (1.2.3)
ruby-progressbar (1.8.1)
rubyzip (1.1.7)
sanitize (4.4.0)
ruby_dep (1.5.0)
rubyzip (1.2.1)
sanitize (4.5.0)
crass (~> 1.0.2)
nokogiri (>= 1.4.4)
nokogumbo (~> 1.4.1)
sass (3.4.23)
sass-rails (5.0.4)
railties (>= 4.0.0, < 5.0)
sass (3.4.24)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
scss_lint (0.53.0)
scss_lint (0.54.0)
rake (>= 0.9, < 13)
sass (~> 3.4.20)
sdoc (0.4.1)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
shoulda-context (1.2.1)
shoulda-context (1.2.2)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
silencer (1.0.1)
simple_token_authentication (1.14.0)
simple_token_authentication (1.15.1)
actionmailer (>= 3.2.6, < 6)
actionpack (>= 3.2.6, < 6)
devise (>= 3.2, < 6)
skylight (0.10.0)
skylight (1.3.1)
activesupport (>= 3.0.0)
sourcemap (0.1.1)
spinjs-rails (1.4)
rails (>= 3.1)
sprockets (3.5.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
starscope (1.5.3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
starscope (1.5.5)
babel-transpiler (~> 0.7)
oj (~> 2.9)
parser (>= 2.2.2)
parser (~> 2.3)
rkelly-remix (~> 0.0.7)
ruby-progressbar (~> 1.5)
ruby-progressbar (~> 1.8)
sourcemap (~> 0.1)
stream (0.5)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.1)
tinymce-rails (4.5.7)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.7)
tinymce-rails (4.6.4)
railties (>= 3.1.1)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
turbolinks (5.0.1)
turbolinks-source (~> 5)
turbolinks-source (5.0.3)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uglifier (2.7.2)
execjs (>= 0.3.0)
json (>= 1.8.0)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
underscore-rails (1.8.3)
unicode-display_width (1.2.1)
warden (1.2.6)
unicode-display_width (1.3.0)
warden (1.2.7)
rack (>= 1.0)
wicked_pdf (1.0.3)
wkhtmltopdf-heroku (2.12.3.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
wicked_pdf (1.1.0)
wkhtmltopdf-heroku (2.12.4.0)
yomu (0.2.4)
json (~> 1.8)
mime-types (~> 1.23)
@ -345,8 +369,7 @@ DEPENDENCIES
auto_strip_attributes (~> 2.1)
autosize-rails
awesome_print
aws-sdk (~> 2.2.8)
aws-sdk-v1
aws-sdk (~> 2)
base62
bcrypt (~> 3.1.10)
better_errors
@ -360,31 +383,32 @@ DEPENDENCIES
deface (~> 1.0)
delayed_job_active_record
delayed_paperclip
devise (= 3.5.6)
devise (~> 4.3.0)
devise-async
devise_invitable
faker
figaro
font-awesome-rails (~> 4.6)
font-awesome-rails (~> 4.7.0.2)
hammerjs-rails
i18n-js (>= 3.0.0.rc11)
introjs-rails
jquery-rails
jquery-scrollto-rails
jquery-scrollto-rails!
jquery-turbolinks
jquery-ui-rails
js_cookie_rails
kaminari
listen (~> 3.0)
logging (~> 2.0.0)
minitest-reporters (~> 1.1)
momentjs-rails (>= 2.9.0)
momentjs-rails (~> 2.17.1)
nested_form_fields
newrelic_rpm
nokogiri
paperclip (~> 4.3)
paperclip (~> 5.1)
pg
puma
rails (= 4.2.5)
rails (= 5.1.1)
rails_12factor
rails_autolink (~> 1.1, >= 1.1.6)
recaptcha
@ -395,18 +419,18 @@ DEPENDENCIES
ruby-graphviz (~> 1.2)
rubyzip
sanitize (~> 4.4)
sass-rails (~> 5.0)
sass-rails (~> 5.0.6)
scss_lint
sdoc (~> 0.4.0)
shoulda-context
shoulda-matchers (>= 3.0.1)
silencer
simple_token_authentication (~> 1.0)
simple_token_authentication (~> 1.15.1)
skylight
sneaky-save!
spinjs-rails
starscope
tinymce-rails (~> 4.5.7)
tinymce-rails (~> 4.6.4)
turbolinks
tzinfo-data
uglifier (>= 1.3.0)
@ -416,7 +440,7 @@ DEPENDENCIES
yomu
RUBY VERSION
ruby 2.3.3p222
ruby 2.4.1p111
BUNDLED WITH
1.14.6
1.15.1

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -8,9 +8,9 @@
//= require jquery.scrollTo
//= require jquery.autosize
//= require jquery-ui/widget
//= require jquery-ui/mouse
//= require jquery-ui/draggable
//= require jquery-ui/droppable
//= require jquery-ui/widgets/mouse
//= require jquery-ui/widgets/draggable
//= require jquery-ui/widgets/droppable
//= require jquery.ui.touch-punch.min
//= require jquery.caret.min
//= require jquery.atwho.min

View file

@ -1,4 +1,4 @@
//= require jquery-ui/sortable
//= require jquery-ui/widgets/sortable
// Extend datatables API with searchable options
// (http://stackoverflow.com/questions/39912395/datatables-dynamically-set-columns-searchable)

View file

@ -1,4 +1,4 @@
//= require jquery-ui/sortable
//= require jquery-ui/widgets/sortable
// Extend datatables API with searchable options
// (http://stackoverflow.com/questions/39912395/datatables-dynamically-set-columns-searchable)

View file

@ -5,7 +5,7 @@ class ApplicationController < ActionController::Base
acts_as_token_authentication_handler_for User
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
protect_from_forgery with: :exception, prepend: true
before_action :authenticate_user!
helper_method :current_team
before_action :generate_intro_tutorial, if: :is_current_page_root?

View file

@ -1,4 +1,4 @@
class Activity < ActiveRecord::Base
class Activity < ApplicationRecord
include InputSanitizeHelper
after_create :generate_notification

View file

@ -0,0 +1,3 @@
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end

View file

@ -1,4 +1,4 @@
class Asset < ActiveRecord::Base
class Asset < ApplicationRecord
include SearchableModel
include DatabaseHelper
include Encryptor

View file

@ -1,4 +1,4 @@
class AssetTextDatum < ActiveRecord::Base
class AssetTextDatum < ApplicationRecord
include SearchableModel
validates :data, presence: true

View file

@ -1,4 +1,4 @@
class Checklist < ActiveRecord::Base
class Checklist < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, nullify: false

View file

@ -1,4 +1,4 @@
class ChecklistItem < ActiveRecord::Base
class ChecklistItem < ApplicationRecord
auto_strip_attributes :text, nullify: false
validates :text,
presence: true,

View file

@ -1,4 +1,4 @@
class Comment < ActiveRecord::Base
class Comment < ApplicationRecord
include SearchableModel
auto_strip_attributes :message, nullify: false

View file

@ -1,4 +1,4 @@
class Connection < ActiveRecord::Base
class Connection < ApplicationRecord
belongs_to :to, :class_name => 'MyModule', :foreign_key => 'input_id', inverse_of: :inputs
belongs_to :from, :class_name => 'MyModule', :foreign_key => 'output_id', inverse_of: :outputs
end

View file

@ -1,4 +1,4 @@
class CustomField < ActiveRecord::Base
class CustomField < ApplicationRecord
auto_strip_attributes :name, nullify: false
validates :name,
presence: true,

View file

@ -1,4 +1,4 @@
class Experiment < ActiveRecord::Base
class Experiment < ApplicationRecord
include ArchivableModel
include SearchableModel

View file

@ -1,4 +1,4 @@
class MyModule < ActiveRecord::Base
class MyModule < ApplicationRecord
include ArchivableModel, SearchableModel
enum state: Extends::TASKS_STATES

View file

@ -1,4 +1,4 @@
class MyModuleGroup < ActiveRecord::Base
class MyModuleGroup < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, nullify: false

View file

@ -1,4 +1,4 @@
class MyModuleRepositoryRow < ActiveRecord::Base
class MyModuleRepositoryRow < ApplicationRecord
belongs_to :assigned_by, foreign_key: 'assigned_by_id', class_name: 'User'
belongs_to :repository_row
belongs_to :my_module

View file

@ -1,4 +1,4 @@
class MyModuleTag < ActiveRecord::Base
class MyModuleTag < ApplicationRecord
validates :my_module, :tag, presence: true
validates :tag_id, uniqueness: { scope: :my_module_id }

View file

@ -1,4 +1,4 @@
class Notification < ActiveRecord::Base
class Notification < ApplicationRecord
has_many :user_notifications, inverse_of: :notification, dependent: :destroy
has_many :users, through: :user_notifications
belongs_to :generator_user, class_name: 'User'

View file

@ -1,4 +1,4 @@
class Project < ActiveRecord::Base
class Project < ApplicationRecord
include ArchivableModel, SearchableModel
enum visibility: { hidden: 0, visible: 1 }

View file

@ -1,4 +1,4 @@
class Protocol < ActiveRecord::Base
class Protocol < ApplicationRecord
include SearchableModel
include RenamingUtil

View file

@ -1,4 +1,4 @@
class ProtocolKeyword < ActiveRecord::Base
class ProtocolKeyword < ApplicationRecord
auto_strip_attributes :name, nullify: false
validates :name,
length: { minimum: Constants::NAME_MIN_LENGTH,

View file

@ -1,4 +1,4 @@
class ProtocolProtocolKeyword < ActiveRecord::Base
class ProtocolProtocolKeyword < ApplicationRecord
after_create :increment_protocols_count
after_destroy :decrement_protocols_count
@ -20,4 +20,4 @@ class ProtocolProtocolKeyword < ActiveRecord::Base
self.protocol_keyword.destroy
end
end
end
end

View file

@ -1,4 +1,4 @@
class Report < ActiveRecord::Base
class Report < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, :description, nullify: false

View file

@ -1,4 +1,4 @@
class ReportElement < ActiveRecord::Base
class ReportElement < ApplicationRecord
enum type_of: Extends::REPORT_ELEMENT_TYPES
# This is only used by certain elements

View file

@ -1,4 +1,4 @@
class Repository < ActiveRecord::Base
class Repository < ApplicationRecord
belongs_to :team
belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User'
has_many :repository_columns

View file

@ -1,4 +1,4 @@
class RepositoryCell < ActiveRecord::Base
class RepositoryCell < ApplicationRecord
belongs_to :repository_row
belongs_to :repository_column
belongs_to :value, polymorphic: true, dependent: :destroy

View file

@ -1,4 +1,4 @@
class RepositoryColumn < ActiveRecord::Base
class RepositoryColumn < ApplicationRecord
belongs_to :repository
belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User'
has_many :repository_cells, dependent: :destroy

View file

@ -1,4 +1,4 @@
class RepositoryDateValue < ActiveRecord::Base
class RepositoryDateValue < ApplicationRecord
belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User'
belongs_to :last_modified_by, foreign_key: :last_modified_by_id,
class_name: 'User'

View file

@ -1,4 +1,4 @@
class RepositoryRow < ActiveRecord::Base
class RepositoryRow < ApplicationRecord
belongs_to :repository
belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User'
belongs_to :last_modified_by, foreign_key: :last_modified_by_id,

View file

@ -1,4 +1,4 @@
class RepositoryTableState < ActiveRecord::Base
class RepositoryTableState < ApplicationRecord
belongs_to :user, inverse_of: :repository_table_states
belongs_to :repository, inverse_of: :repository_table_states

View file

@ -1,4 +1,4 @@
class RepositoryTextValue < ActiveRecord::Base
class RepositoryTextValue < ApplicationRecord
belongs_to :created_by, foreign_key: :created_by_id, class_name: 'User'
belongs_to :last_modified_by, foreign_key: :last_modified_by_id,
class_name: 'User'

View file

@ -1,4 +1,4 @@
class Result < ActiveRecord::Base
class Result < ApplicationRecord
include ArchivableModel, SearchableModel
auto_strip_attributes :name, nullify: false

View file

@ -1,4 +1,4 @@
class ResultAsset < ActiveRecord::Base
class ResultAsset < ApplicationRecord
validates :result, :asset, presence: true
belongs_to :result, inverse_of: :result_asset

View file

@ -1,4 +1,4 @@
class ResultTable < ActiveRecord::Base
class ResultTable < ApplicationRecord
validates :result, :table, presence: true
belongs_to :result, inverse_of: :result_table

View file

@ -1,4 +1,4 @@
class ResultText < ActiveRecord::Base
class ResultText < ApplicationRecord
auto_strip_attributes :text, nullify: false
validates :text,
presence: true,

View file

@ -1,4 +1,4 @@
class Sample < ActiveRecord::Base
class Sample < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, nullify: false

View file

@ -1,4 +1,4 @@
class SampleCustomField < ActiveRecord::Base
class SampleCustomField < ApplicationRecord
include SearchableModel
auto_strip_attributes :value, nullify: false

View file

@ -1,4 +1,4 @@
class SampleGroup < ActiveRecord::Base
class SampleGroup < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, :color, nullify: false

View file

@ -1,4 +1,4 @@
class SampleMyModule < ActiveRecord::Base
class SampleMyModule < ApplicationRecord
after_create :increment_nr_of_module_samples
after_destroy :decrement_nr_of_module_samples

View file

@ -1,4 +1,4 @@
class SampleType < ActiveRecord::Base
class SampleType < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, nullify: false

View file

@ -1,4 +1,4 @@
class SamplesTable < ActiveRecord::Base
class SamplesTable < ApplicationRecord
validates :user, :team, presence: true
belongs_to :user, inverse_of: :samples_tables

View file

@ -1,4 +1,4 @@
class Settings < ActiveRecord::Base
class Settings < ApplicationRecord
def self.instance
@instance ||= first
@instance ||= new

View file

@ -1,4 +1,4 @@
class Step < ActiveRecord::Base
class Step < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, :description, nullify: false

View file

@ -1,4 +1,4 @@
class StepAsset < ActiveRecord::Base
class StepAsset < ApplicationRecord
validates :step, :asset, presence: true
belongs_to :step, inverse_of: :step_assets

View file

@ -1,4 +1,4 @@
class StepTable < ActiveRecord::Base
class StepTable < ApplicationRecord
validates :step, :table, presence: true
belongs_to :step, inverse_of: :step_tables

View file

@ -1,4 +1,4 @@
class Table < ActiveRecord::Base
class Table < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, nullify: false

View file

@ -1,4 +1,4 @@
class Tag < ActiveRecord::Base
class Tag < ApplicationRecord
include SearchableModel
auto_strip_attributes :name, :color, nullify: false

View file

@ -1,4 +1,4 @@
class Team < ActiveRecord::Base
class Team < ApplicationRecord
include SearchableModel
# Not really MVC-compliant, but we just use it for logger

View file

@ -1,4 +1,4 @@
class TempFile < ActiveRecord::Base
class TempFile < ApplicationRecord
validates :session_id, presence: true
has_attached_file :file

View file

@ -1,4 +1,4 @@
class TinyMceAsset < ActiveRecord::Base
class TinyMceAsset < ApplicationRecord
attr_accessor :reference
before_create :set_reference
after_create :update_estimated_size

View file

@ -1,8 +1,8 @@
class Token < ActiveRecord::Base
class Token < ApplicationRecord
validates :token, presence: true
validates :ttl, presence: true
belongs_to :user, foreign_key: 'user_id', class_name: 'User', inverse_of: :tokens
end
end

View file

@ -1,4 +1,4 @@
class User < ActiveRecord::Base
class User < ApplicationRecord
include SearchableModel
acts_as_token_authenticatable

View file

@ -1,4 +1,4 @@
class UserMyModule < ActiveRecord::Base
class UserMyModule < ApplicationRecord
validates :user, :my_module, presence: true
belongs_to :user, inverse_of: :user_my_modules

View file

@ -1,4 +1,4 @@
class UserNotification < ActiveRecord::Base
class UserNotification < ApplicationRecord
include NotificationsHelper
belongs_to :user

View file

@ -1,4 +1,4 @@
class UserProject < ActiveRecord::Base
class UserProject < ApplicationRecord
enum role: { owner: 0, normal_user: 1, technician: 2, viewer: 3 }
validates :role, presence: true

View file

@ -1,4 +1,4 @@
class UserTeam < ActiveRecord::Base
class UserTeam < ApplicationRecord
enum role: { guest: 0, normal_user: 1, admin: 2 }
validates :role, presence: true

View file

@ -1,4 +1,4 @@
class WopiAction < ActiveRecord::Base
class WopiAction < ApplicationRecord
belongs_to :wopi_app, foreign_key: 'wopi_app_id', class_name: 'WopiApp'
validates :action, :extension, :urlsrc, :wopi_app, presence: true

View file

@ -1,4 +1,4 @@
class WopiApp < ActiveRecord::Base
class WopiApp < ApplicationRecord
belongs_to :wopi_discovery,
foreign_key: 'wopi_discovery_id',
class_name: 'WopiDiscovery'

View file

@ -1,4 +1,4 @@
class WopiDiscovery < ActiveRecord::Base
class WopiDiscovery < ApplicationRecord
require 'base64'
has_many :wopi_apps,

View file

@ -15,7 +15,7 @@ require 'fileutils'
# end
# end
class ZipExport < ActiveRecord::Base
class ZipExport < ApplicationRecord
belongs_to :user
has_attached_file :zip_file
validates_attachment :zip_file,

2
bin/bundle Normal file → Executable file
View file

@ -1,3 +1,3 @@
#!/usr/bin/env ruby.exe
#!/usr/bin/env ruby
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')

0
bin/delayed_job Normal file → Executable file
View file

4
bin/rails Normal file → Executable file
View file

@ -1,4 +1,4 @@
#!/usr/bin/env ruby.exe
APP_PATH = File.expand_path('../../config/application', __FILE__)
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'

2
bin/rake Normal file → Executable file
View file

@ -1,4 +1,4 @@
#!/usr/bin/env ruby.exe
#!/usr/bin/env ruby
require_relative '../config/boot'
require 'rake'
Rake.application.run

35
bin/setup Normal file → Executable file
View file

@ -1,29 +1,38 @@
#!/usr/bin/env ruby.exe
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
Dir.chdir APP_ROOT do
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:
# Add necessary setup steps to this file.
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
# Install JavaScript dependencies if using Yarn
# system('bin/yarn')
puts "== Installing dependencies =="
system "gem install bundler --conservative"
system "bundle check || bundle install"
# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
# end
puts "\n== Preparing database =="
system "bin/rake db:setup"
system! 'bin/rails db:setup'
puts "\n== Removing old logs and tempfiles =="
system "rm -f log/*"
system "rm -rf tmp/cache"
system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
system "touch tmp/restart.txt"
system! 'bin/rails restart'
end

29
bin/update Executable file
View file

@ -0,0 +1,29 @@
#!/usr/bin/env ruby
require 'pathname'
require 'fileutils'
include FileUtils
# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
chdir APP_ROOT do
# This script is a way to update your development environment automatically.
# Add necessary update steps to this file.
puts '== Installing dependencies =='
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')
puts "\n== Updating database =="
system! 'bin/rails db:migrate'
puts "\n== Removing old logs and tempfiles =="
system! 'bin/rails log:clear tmp:clear'
puts "\n== Restarting application server =="
system! 'bin/rails restart'
end

11
bin/yarn Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env ruby
VENDOR_PATH = File.expand_path('..', __dir__)
Dir.chdir(VENDOR_PATH) do
begin
exec "yarnpkg #{ARGV.join(" ")}"
rescue Errno::ENOENT
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
end
end

View file

@ -1,4 +1,4 @@
require File.expand_path('../boot', __FILE__)
require_relative 'boot'
require 'rails/all'
@ -8,24 +8,19 @@ Bundler.require(*Rails.groups)
module Scinote
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.1
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
config.encoding = 'utf-8'
config.active_job.queue_adapter = :delayed_job
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
# config.active_record.raise_in_transactional_callbacks = true
# Logging
config.log_formatter = proc do |severity, datetime, progname, msg|

View file

@ -1,3 +1,3 @@
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
require 'bundler/setup' # Set up gems listed in the Gemfile.

10
config/cable.yml Normal file
View file

@ -0,0 +1,10 @@
development:
adapter: async
test:
adapter: async
production:
adapter: redis
url: redis://localhost:6379/1
channel_prefix: scinote_production

View file

@ -1,5 +1,5 @@
# Load the Rails application.
require File.expand_path('../application', __FILE__)
require_relative 'application'
# Set the encoding
Encoding.default_external = Encoding::UTF_8

View file

@ -26,6 +26,8 @@ Rails.application.configure do
reply_to: Rails.application.secrets.mailer_reply_to
}
config.action_mailer.raise_delivery_errors = true
config.action_mailer.perform_caching = false
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
@ -86,4 +88,25 @@ Rails.application.configure do
# Enable user registrations
config.x.enable_user_registration =
ENV['ENABLE_USER_REGISTRATION'] == 'false' ? false : true
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
# Suppress logger output for asset requests.
config.assets.quiet = true
# Enable/disable caching. By default caching is disabled.
if Rails.root.join('tmp/caching-dev.txt').exist?
config.action_controller.perform_caching = true
config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
}
else
config.action_controller.perform_caching = false
config.cache_store = :null_store
end
end

View file

@ -46,10 +46,6 @@ Rails.application.configure do
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
@ -119,4 +115,45 @@ Rails.application.configure do
# Enable user registrations
config.x.enable_user_registration =
ENV['ENABLE_USER_REGISTRATION'] == 'false' ? false : true
# Use a different logger for distributed setups.
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV['RAILS_LOG_TO_STDOUT'].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "scinote_#{Rails.env}"
config.action_mailer.perform_caching = false
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Attempt to read encrypted secrets from `config/secrets.yml.enc`.
# Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or
# `config/secrets.yml.key`.
config.read_encrypted_secrets = true
end

View file

@ -1,6 +1,12 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
}
# Enable this to be able to output stuff to STDOUT during tests
# via Rails::logger.info "..."
config.logger = Logger.new(STDOUT)

View file

@ -0,0 +1,6 @@
# Be sure to restart your server when you modify this file.
# ApplicationController.renderer.defaults.merge!(
# http_host: 'example.org',
# https: false
# )

View file

@ -3,12 +3,16 @@
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.0'
# Add additional assets to the asset load path
# Add additional assets to the asset load path.
# Rails.application.config.assets.paths << Emoji.images_path
# Add Yarn node_modules folder to the asset load path.
Rails.application.config.assets.paths << Rails.root.join('node_modules')
# Precompile additional assets.
# application.js application.css, and all non-JS/CSS
# in app/assets folder are already added.
# application.js, application.css, and all non-JS/CSS in the app/assets
# folder are already added.
# Rails.application.config.assets.precompile += %w( admin.js admin.css )
Rails.application.config.assets.precompile += %w(underscore.js)
Rails.application.config.assets.precompile += %w(jsPlumb-2.0.4-min.js)
Rails.application.config.assets.precompile += %w(jsnetworkx.js)

View file

@ -1,3 +1,5 @@
# Be sure to restart your server when you modify this file.
# Specify a serializer for the signed and encrypted cookie jars.
# Valid options are :json, :marshal, and :hybrid.
Rails.application.config.action_dispatch.cookies_serializer = :json

View file

@ -1,4 +1,4 @@
Devise::Async.enabled = true
Devise::Async.backend = :delayed_job
Devise::Async.queue = :devise_email
Devise::Async.priority = 10
# Devise::Async.priority = 10

View file

@ -0,0 +1,14 @@
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.1 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Guide for Upgrading Ruby on Rails for more info on each option.
# Make `form_with` generate non-remote forms.
Rails.application.config.action_view.form_with_generates_remote_forms = false
# Unknown asset fallback will return the path passed in when the given
# asset is not present in the asset pipeline.
# Rails.application.config.assets.unknown_asset_fallback = false

View file

@ -5,10 +5,10 @@
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport.on_load(:action_controller) do
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
wrap_parameters format: [:json]
end
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# self.include_root_in_json = true
# self.include_root_in_json = true
# end

View file

@ -910,8 +910,8 @@ en:
column_create: "Create"
columns_delete: "Delete"
columns_visibility: "Visible columns"
view_all_records: "View all records"
view_assigned_records: "View assigned records"
view_all_records: "View all items"
view_assigned_records: "View assigned items"
modal_delete_record:
title: "Delete record"
notice: "Are you sure you want to delete the selected records?"

View file

@ -13,3 +13,60 @@ on_worker_boot do
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
ActiveRecord::Base.establish_connection
end
# Puma can serve each request in a thread from an internal thread pool.
# The `threads` method setting takes two numbers: a minimum and maximum.
# Any libraries that use thread pools should be configured to match
# the maximum value specified for Puma. Default is set to 5 threads for minimum
# and maximum; this matches the default thread size of Active Record.
#
# threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
# threads threads_count, threads_count
#
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
#
# port ENV.fetch("PORT") { 3000 }
#
# Specifies the `environment` that Puma will run in.
#
# environment ENV.fetch("RAILS_ENV") { "development" }
# Specifies the number of `workers` to boot in clustered mode.
# Workers are forked webserver processes. If using threads and workers together
# the concurrency of the application would be max `threads` * `workers`.
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory. If you use this option
# you need to make sure to reconnect any threads in the `on_worker_boot`
# block.
#
# preload_app!
# If you are preloading your application and using Active Record, it's
# recommended that you close any connections to the database before workers
# are forked to prevent connection leakage.
#
# before_fork do
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
# end
# The code in the `on_worker_boot` will be called if you are using
# clustered mode by specifying a number of `workers`. After each worker
# process is booted, this block will be run. If you are using the `preload_app!`
# option, you will want to use this block to reconnect to any threads
# or connections that may have been created at application boot, as Ruby
# cannot share connections between processes.
#
# on_worker_boot do
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
# end
#
# Allow puma to be restarted by `rails restart` command.
# plugin :tmp_restart

View file

@ -1,5 +1,23 @@
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# You can use `rails secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
# Shared secrets are available across all environments.
# shared:
# api_key: a1B2c3D4e5F6
# Environmental secrets are only available for that specific environment.
# Be sure to restart your server when you modify this file.
common: &common
# ======================================================================
@ -39,10 +57,13 @@ common: &common
# ======================================================================
development:
secret_key_base: <%= ENV["DEVELOPMENT_KEY_BASE"] %>
<<: *common
test:
secret_key_base: <%= ENV["TEST_KEY_BASE"] %>
<<: *common
production:
<<: *common
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
<<: *common

6
config/spring.rb Normal file
View file

@ -0,0 +1,6 @@
%w(
.ruby-version
.rbenv-vars
tmp/restart.txt
tmp/caching-dev.txt
).each { |path| Spring.watch(path) }