diff --git a/.ruby-version b/.ruby-version index 84d6c676..4f5e6973 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.4.10 +3.4.5 diff --git a/Dockerfile.production b/Dockerfile.production index f52ea3b3..8192c8f0 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -1,28 +1,20 @@ FROM registry.opensuse.org/opensuse/infrastructure/dale/containers/osem/base:latest -EXPOSE 5000 - ENV RAILS_ENV=production -ENV RAILS_SERVE_STATIC_FILES=true # Add our files COPY --chown=1000:1000 . /osem/ -# Install foreman -RUN gem install foreman +# Install bundler & foreman +RUN gem install bundler -v "$(grep -A 1 "BUNDLED WITH" /osem/Gemfile.lock | tail -n 1)"; \ + gem install foreman USER osem WORKDIR /osem/ -RUN rm -rf /osem/public/system/sponsors; mkdir -p /osem/public/system/sponsors; \ - rm -rf /osem/public/assets; mkdir -p /osem/public/assets; \ - rm -rf /osem/log; mkdir -p /osem/public/assets - # Install our bundle -RUN bundle config set --local without 'test development'; \ - bundle config set --local path 'vendor/bundle'; \ - bundle config build.nokogiri --use-system-libraries; \ - bundle install --jobs=4 --retry=3 +RUN bundle config set --local without 'test development' +RUN bundle install --jobs=3 --retry=3 # Generate assets RUN bundle exec rake assets:precompile diff --git a/Gemfile b/Gemfile index 9458f1be..35ba4235 100644 --- a/Gemfile +++ b/Gemfile @@ -183,8 +183,6 @@ gem 'sprockets-rails' # for multiple speakers select on proposal/event forms gem 'selectize-rails' -# Pin to solve https://github.com/mperham/connection_pool/issues/212 -gem "connection_pool", "< 3" # memcached binary connector gem 'dalli' @@ -195,7 +193,7 @@ gem 'icalendar' gem 'lograge' group :development do - # for static code analysis + # for static code analisys gem 'rubocop', require: false gem 'rubocop-rspec', require: false gem 'rubocop-rails', require: false diff --git a/Gemfile.lock b/Gemfile.lock index ffcc1a31..5039887b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,73 +2,71 @@ GEM remote: https://rubygems.org/ specs: Ascii85 (2.0.1) - actioncable (7.2.3) - actionpack (= 7.2.3) - activesupport (= 7.2.3) + actioncable (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) nio4r (~> 2.0) websocket-driver (>= 0.6.1) zeitwerk (~> 2.6) - actionmailbox (7.2.3) - actionpack (= 7.2.3) - activejob (= 7.2.3) - activerecord (= 7.2.3) - activestorage (= 7.2.3) - activesupport (= 7.2.3) + actionmailbox (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) mail (>= 2.8.0) - actionmailer (7.2.3) - actionpack (= 7.2.3) - actionview (= 7.2.3) - activejob (= 7.2.3) - activesupport (= 7.2.3) + actionmailer (7.2.2.1) + actionpack (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activesupport (= 7.2.2.1) mail (>= 2.8.0) rails-dom-testing (~> 2.2) - actionpack (7.2.3) - actionview (= 7.2.3) - activesupport (= 7.2.3) - cgi + actionpack (7.2.2.1) + actionview (= 7.2.2.1) + activesupport (= 7.2.2.1) nokogiri (>= 1.8.5) racc - rack (>= 2.2.4, < 3.3) + rack (>= 2.2.4, < 3.2) rack-session (>= 1.0.1) rack-test (>= 0.6.3) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) useragent (~> 0.16) - actiontext (7.2.3) - actionpack (= 7.2.3) - activerecord (= 7.2.3) - activestorage (= 7.2.3) - activesupport (= 7.2.3) + actiontext (7.2.2.1) + actionpack (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.6.0) nokogiri (>= 1.8.5) - actionview (7.2.3) - activesupport (= 7.2.3) + actionview (7.2.2.1) + activesupport (= 7.2.2.1) builder (~> 3.1) - cgi erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) - active_model_serializers (0.10.16) + active_model_serializers (0.10.15) actionpack (>= 4.1) activemodel (>= 4.1) case_transform (>= 0.2) jsonapi-renderer (>= 0.1.1.beta1, < 0.3) - activejob (7.2.3) - activesupport (= 7.2.3) + activejob (7.2.2.1) + activesupport (= 7.2.2.1) globalid (>= 0.3.6) - activemodel (7.2.3) - activesupport (= 7.2.3) - activerecord (7.2.3) - activemodel (= 7.2.3) - activesupport (= 7.2.3) + activemodel (7.2.2.1) + activesupport (= 7.2.2.1) + activerecord (7.2.2.1) + activemodel (= 7.2.2.1) + activesupport (= 7.2.2.1) timeout (>= 0.4.0) - activestorage (7.2.3) - actionpack (= 7.2.3) - activejob (= 7.2.3) - activerecord (= 7.2.3) - activesupport (= 7.2.3) + activestorage (7.2.2.1) + actionpack (= 7.2.2.1) + activejob (= 7.2.2.1) + activerecord (= 7.2.2.1) + activesupport (= 7.2.2.1) marcel (~> 1.0) - activesupport (7.2.3) + activesupport (7.2.2.1) base64 benchmark (>= 0.3) bigdecimal @@ -84,37 +82,32 @@ GEM activerecord (>= 3.0) activesupport (>= 3.0) awesome_nested_set (>= 2.0) - acts_as_list (1.2.6) - activerecord (>= 6.1) - activesupport (>= 6.1) - addressable (2.9.0) - public_suffix (>= 2.0.2, < 8.0) - afm (1.0.0) + acts_as_list (1.0.4) + activerecord (>= 4.2) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + afm (0.2.2) ajax-datatables-rails (1.3.1) zeitwerk - anonymous_loader (0.1.3) - version_gem (~> 1.1, >= 1.1.14) - archive-zip (0.13.1) - io-like (~> 0.4.0) + archive-zip (0.12.0) + io-like (~> 0.3.0) ast (2.4.3) - auth-sanitizer (0.2.3) - version_gem (~> 1.1, >= 1.1.14) autoprefixer-rails (10.3.1.0) execjs (~> 2) awesome_nested_set (3.8.0) activerecord (>= 4.0.0, < 8.1) base64 (0.3.0) - bcrypt (3.1.22) - benchmark (0.5.0) - bigdecimal (3.3.1) + bcrypt (3.1.20) + benchmark (0.4.1) + bigdecimal (3.2.2) bindex (0.8.1) bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) bootstrap-switch-rails (3.3.3) builder (3.3.0) - byebug (12.0.0) - cancancan (3.6.1) + byebug (11.1.3) + cancancan (3.3.0) capybara (3.40.0) addressable matrix @@ -124,7 +117,7 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - carrierwave (3.1.3) + carrierwave (3.1.2) activemodel (>= 6.0.0) activesupport (>= 6.0.0) addressable (~> 2.6) @@ -137,16 +130,15 @@ GEM fastimage case_transform (0.2) activesupport - caxlsx (4.3.0) + caxlsx (4.2.0) htmlentities (~> 4.3, >= 4.3.4) marcel (~> 1.0) nokogiri (~> 1.10, >= 1.10.4) - rubyzip (>= 2.4, < 4) + rubyzip (>= 1.3.0, < 3) caxlsx_rails (0.6.2) actionpack (>= 3.1) caxlsx (>= 3.0) - cgi (0.5.1) - chartkick (5.2.1) + chartkick (4.1.3) childprocess (5.1.0) logger (~> 1.5) chronic (0.10.2) @@ -158,13 +150,13 @@ GEM faraday-multipart (~> 1.0, >= 1.0.4) ostruct cocoon (1.2.15) - concurrent-ruby (1.3.7) - connection_pool (2.5.5) + concurrent-ruby (1.3.5) + connection_pool (2.5.3) countable-rails (0.0.1) railties (>= 3.1) crack (0.4.5) rexml - crass (1.0.7) + crass (1.0.6) csv (3.3.5) daemons (1.4.0) dalli (2.7.11) @@ -175,40 +167,39 @@ GEM activerecord (>= 5.a) database_cleaner-core (~> 2.0) database_cleaner-core (2.0.1) - date (3.5.1) - delayed_job (4.2.0) + date (3.4.1) + delayed_job (4.1.13) activesupport (>= 3.0, < 9.0) - benchmark - logger delayed_job_active_record (4.1.11) activerecord (>= 3.0, < 9.0) delayed_job (>= 3.0, < 5) - devise (5.0.4) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) - railties (>= 7.0) + railties (>= 4.1.0) responders warden (~> 1.2.3) devise_ichain_authenticatable (0.3.2) devise (>= 2.2) diff-lcs (1.6.2) docile (1.4.1) - dotenv (3.2.0) - dotenv-rails (3.2.0) - dotenv (= 3.2.0) + dotenv (3.1.8) + dotenv-rails (3.1.8) + dotenv (= 3.1.8) railties (>= 6.1) drb (2.2.3) - erb (6.0.6) + erb (5.0.2) erubi (1.13.1) + erubis (2.7.0) execjs (2.8.1) - factory_bot (6.5.6) + factory_bot (6.5.4) activesupport (>= 6.1.0) - factory_bot_rails (6.5.1) + factory_bot_rails (6.5.0) factory_bot (~> 6.5) railties (>= 6.1.0) faker (3.5.2) i18n (>= 1.8.11, < 2) - faraday (2.14.3) + faraday (2.13.4) faraday-net_http (>= 2.0, < 3.5) json logger @@ -216,42 +207,46 @@ GEM faraday (>= 1, < 3) faraday-multipart (1.1.1) multipart-post (~> 2.0) - faraday-net_http (3.4.4) - net-http (~> 0.5) - fastimage (2.4.1) + faraday-net_http (3.4.1) + net-http (>= 0.5.0) + fastimage (2.4.0) feature (1.4.0) - ffi (1.17.4) + ffi (1.17.2) font-awesome-sass (6.7.2) sassc (~> 2.0) geckodriver-helper (0.24.0) archive-zip (~> 0.7) - globalid (1.3.0) + globalid (1.2.1) activesupport (>= 6.1) gravtastic (3.2.6) - haml (6.3.0) - temple (>= 0.8.2) - thor + haml (5.2.2) + temple (>= 0.8.0) tilt - haml-rails (2.1.0) + haml-rails (2.0.1) actionpack (>= 5.1) activesupport (>= 5.1) - haml (>= 4.0.6) + haml (>= 4.0.6, < 6.0) + html2haml (>= 1.0.1) railties (>= 5.1) - haml_lint (0.66.0) - haml (>= 5.0) + haml_lint (0.37.1) + haml (>= 4.0, < 5.3) parallel (~> 1.10) rainbow - rubocop (>= 1.0) + rubocop (>= 0.50.0) sysexits (~> 1.1) - hashdiff (1.2.1) + hashdiff (1.0.1) hashery (2.1.2) - hashie (5.1.0) - logger - htmlentities (4.4.2) - i18n (1.14.8) + hashie (5.0.0) + html2haml (2.2.0) + erubis (~> 2.7.0) + haml (>= 4.0, < 6) + nokogiri (>= 1.6.0) + ruby_parser (~> 3.5) + htmlentities (4.3.4) + i18n (1.14.7) concurrent-ruby (~> 1.0) i18n_data (0.13.0) - icalendar (2.12.4) + icalendar (2.11.2) base64 ice_cube (~> 0.16) logger @@ -260,11 +255,10 @@ GEM image_processing (1.14.0) mini_magick (>= 4.9.5, < 6) ruby-vips (>= 2.0.17, < 3) - io-console (0.8.2) - io-like (0.4.0) - irb (1.18.0) + io-console (0.8.1) + io-like (0.3.1) + irb (1.15.2) pp (>= 0.6.0) - prism (>= 1.3.0) rdoc (>= 4.0.0) reline (>= 0.4.2) iso-639 (0.3.8) @@ -274,20 +268,19 @@ GEM jquery-rails railties (>= 3.1) sass-rails - jquery-rails (4.6.1) + jquery-rails (4.4.0) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) - json (2.21.2) - json-schema (6.0.0) - addressable (~> 2.8) - bigdecimal (~> 3.1) + json (2.13.2) + json-schema (2.8.1) + addressable (>= 2.4) jsonapi-renderer (0.2.2) - jwt (3.2.0) + jwt (3.1.2) base64 - language_server-protocol (3.17.0.6) + language_server-protocol (3.17.0.5) launchy (3.1.1) addressable (~> 2.8) childprocess (~> 5.0) @@ -309,26 +302,24 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.25.2) + loofah (2.24.1) crass (~> 1.0.2) nokogiri (>= 1.12.0) - mail (2.9.1) - logger + mail (2.8.1) mini_mime (>= 0.1.1) net-imap net-pop net-smtp marcel (1.0.4) - matrix (0.4.3) - mina (1.2.5) + matrix (0.4.2) + mina (1.2.4) + open4 (~> 1.3.4) rake - mini_magick (5.3.2) + mini_magick (5.3.0) logger mini_mime (1.1.5) mini_portile2 (2.8.9) - minitest (6.0.6) - drb (~> 2.0) - prism (~> 1.5) + minitest (5.25.5) monetize (1.9.4) money (~> 6.12) money (6.13.8) @@ -339,12 +330,12 @@ GEM money (~> 6.13.2) railties (>= 3.0) multi_json (1.17.0) - multi_xml (0.9.1) - bigdecimal (>= 3.1, < 5) + multi_xml (0.7.2) + bigdecimal (~> 3.1) multipart-post (2.4.1) - net-http (0.9.1) - uri (>= 0.11.1) - net-imap (0.6.6) + net-http (0.6.0) + uri + net-imap (0.5.9) date net-protocol net-pop (0.1.2) @@ -353,25 +344,22 @@ GEM timeout net-smtp (0.5.1) net-protocol - next_rails (1.4.8) + next_rails (1.4.6) rainbow (>= 3) - nio4r (2.7.5) - nokogiri (1.19.4) + nio4r (2.7.4) + nokogiri (1.18.9) mini_portile2 (~> 2.8.2) racc (~> 1.4) - oauth2 (2.0.25) - anonymous_loader (~> 0.1, >= 0.1.3) - auth-sanitizer (~> 0.2, >= 0.2.3) + oauth2 (2.0.12) faraday (>= 0.17.3, < 4.0) jwt (>= 1.0, < 4.0) logger (~> 1.2) multi_xml (~> 0.5) rack (>= 1.2, < 4) - snaky_hash (~> 2.0, >= 2.0.7) - version_gem (~> 1.1, >= 1.1.14) - omniauth (2.1.4) + snaky_hash (~> 2.0, >= 2.0.3) + version_gem (>= 1.1.8, < 3) + omniauth (2.1.3) hashie (>= 3.4.6) - logger rack (>= 2.2.3) rack-protection omniauth-facebook (8.0.0) @@ -379,13 +367,13 @@ GEM omniauth-github (2.0.1) omniauth (~> 2.0) omniauth-oauth2 (~> 1.8) - omniauth-google-oauth2 (1.2.2) + omniauth-google-oauth2 (1.2.1) jwt (>= 2.9.2) oauth2 (~> 2.0) omniauth (~> 2.0) omniauth-oauth2 (~> 1.8) - omniauth-oauth2 (1.9.0) - oauth2 (>= 2.0.2, < 3) + omniauth-oauth2 (1.8.0) + oauth2 (>= 1.4, < 3) omniauth (~> 2.0) omniauth-openid (2.0.2) omniauth (>= 1.1) @@ -395,26 +383,27 @@ GEM omniauth-rails_csrf_protection (1.0.0) actionpack (>= 4.2) omniauth (~> 2.0) + open4 (1.3.4) orm_adapter (0.5.0) ostruct (0.6.3) paper_trail (16.0.0) activerecord (>= 6.1) request_store (~> 1.4) parallel (1.27.0) - parser (3.3.12.0) + parser (3.3.9.0) ast (~> 2.4.1) racc pdf-core (0.10.0) pdf-inspector (1.3.0) pdf-reader (>= 1.0, < 3.0.a) - pdf-reader (2.15.1) + pdf-reader (2.14.1) Ascii85 (>= 1.0, < 3.0, != 2.0.0) - afm (>= 0.2.1, < 2) + afm (~> 0.2.1) hashery (~> 2.0) ruby-rc4 ttfunk - pg (1.6.3) - pp (0.6.3) + pg (1.6.1) + pp (0.6.2) prettyprint prawn (2.5.0) matrix (~> 0.4) @@ -431,43 +420,43 @@ GEM prawn-table (0.2.2) prawn (>= 1.3.0, < 3.0.0) prettyprint (0.2.0) - prism (1.9.0) - psych (5.3.1) + prism (1.4.0) + psych (5.2.6) date stringio - public_suffix (7.0.5) - puma (8.0.2) + public_suffix (6.0.2) + puma (6.6.1) nio4r (~> 2.0) racc (1.8.1) - rack (3.2.6) + rack (3.1.16) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-protection (4.2.1) + rack-protection (4.1.1) base64 (>= 0.1.0) logger (>= 1.6.0) rack (>= 3.0.0, < 4) - rack-session (2.1.2) + rack-session (2.1.1) base64 (>= 0.1.0) rack (>= 3.0.0) rack-test (2.2.0) rack (>= 1.3) - rackup (2.3.1) + rackup (2.2.1) rack (>= 3) - rails (7.2.3) - actioncable (= 7.2.3) - actionmailbox (= 7.2.3) - actionmailer (= 7.2.3) - actionpack (= 7.2.3) - actiontext (= 7.2.3) - actionview (= 7.2.3) - activejob (= 7.2.3) - activemodel (= 7.2.3) - activerecord (= 7.2.3) - activestorage (= 7.2.3) - activesupport (= 7.2.3) + rails (7.2.2.1) + actioncable (= 7.2.2.1) + actionmailbox (= 7.2.2.1) + actionmailer (= 7.2.2.1) + actionpack (= 7.2.2.1) + actiontext (= 7.2.2.1) + actionview (= 7.2.2.1) + activejob (= 7.2.2.1) + activemodel (= 7.2.2.1) + activerecord (= 7.2.2.1) + activestorage (= 7.2.2.1) + activesupport (= 7.2.2.1) bundler (>= 1.15.0) - railties (= 7.2.3) + railties (= 7.2.2.1) rails-controller-testing (1.0.5) actionpack (>= 5.0.1.rc1) actionview (>= 5.0.1.rc1) @@ -476,65 +465,63 @@ GEM activesupport (>= 5.0.0) minitest nokogiri (>= 1.6) - rails-html-sanitizer (1.7.1) - loofah (~> 2.25, >= 2.25.2) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rails-i18n (7.0.1) i18n (>= 0.7, < 2) railties (>= 6.0.0, < 8) - railties (7.2.3) - actionpack (= 7.2.3) - activesupport (= 7.2.3) - cgi + railties (7.2.2.1) + actionpack (= 7.2.2.1) + activesupport (= 7.2.2.1) irb (~> 1.13) rackup (>= 1.0.0) rake (>= 12.2) thor (~> 1.0, >= 1.2.2) - tsort (>= 0.2) zeitwerk (~> 2.6) rainbow (3.1.1) - rake (13.4.2) - rdoc (7.2.0) + rake (13.3.0) + rdoc (6.14.2) erb psych (>= 4.0.0) - tsort - recaptcha (5.21.2) + recaptcha (5.8.1) + json redcarpet (3.6.1) - regexp_parser (2.11.3) - reline (0.6.3) + regexp_parser (2.11.1) + reline (0.6.2) io-console (~> 0.5) request_store (1.7.0) rack (>= 1.4) - responders (3.2.0) - actionpack (>= 7.0) - railties (>= 7.0) - rexml (3.4.4) + responders (3.1.1) + actionpack (>= 5.2) + railties (>= 5.2) + rexml (3.4.1) rolify (6.0.0) - rqrcode (3.1.0) + rqrcode (2.0.0) chunky_png (~> 1.0) - rqrcode_core (~> 2.0) - rqrcode_core (2.0.0) - rspec-activemodel-mocks (1.3.0) + rqrcode_core (~> 1.0) + rqrcode_core (1.1.0) + rspec-activemodel-mocks (1.1.0) activemodel (>= 3.0) activesupport (>= 3.0) rspec-mocks (>= 2.99, < 4.0) - rspec-core (3.13.6) + rspec-core (3.13.5) rspec-support (~> 3.13.0) rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.8) + rspec-mocks (3.13.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-rails (8.0.4) + rspec-rails (8.0.2) actionpack (>= 7.2) activesupport (>= 7.2) railties (>= 7.2) - rspec-core (>= 3.13.0, < 5.0.0) - rspec-expectations (>= 3.13.0, < 5.0.0) - rspec-mocks (>= 3.13.0, < 5.0.0) - rspec-support (>= 3.13.0, < 5.0.0) - rspec-support (3.13.7) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.4) rubocop (1.79.2) json (~> 2.3) language_server-protocol (~> 3.17.0.2) @@ -559,7 +546,7 @@ GEM lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) rubocop-ast (>= 1.38.0, < 2.0) - rubocop-rails (2.33.3) + rubocop-rails (2.33.1) activesupport (>= 4.2.0) lint_roller (~> 1.1) rack (>= 1.1) @@ -576,9 +563,11 @@ GEM ruby-openid (2.9.2) ruby-progressbar (1.13.0) ruby-rc4 (0.1.5) - ruby-vips (2.3.0) + ruby-vips (2.2.4) ffi (~> 1.12) logger + ruby_parser (3.17.0) + sexp_processor (~> 4.15, >= 4.15.1) rubyzip (2.4.1) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -602,20 +591,21 @@ GEM sentry-ruby (5.26.0) bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) + sexp_processor (4.15.3) shoulda-matchers (6.5.0) activesupport (>= 5.2.0) simplecov (0.22.0) docile (~> 1.1) simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) - simplecov-cobertura (3.1.0) + simplecov-cobertura (3.0.0) rexml simplecov (~> 0.19) simplecov-html (0.13.2) simplecov_json_formatter (0.1.4) - snaky_hash (2.0.7) + snaky_hash (2.0.3) hashie (>= 0.1.0, < 6) - version_gem (~> 1.1, >= 1.1.14) + version_gem (>= 1.1.8, < 3) sprockets (4.2.2) concurrent-ruby (~> 1.0) logger @@ -624,8 +614,8 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - ssrf_filter (1.5.0) - stringio (3.2.0) + ssrf_filter (1.3.0) + stringio (3.1.7) stripe (5.43.0) stripe-ruby-mock (3.1.0.rc3) dante (>= 0.2.0) @@ -633,12 +623,11 @@ GEM stripe (> 5, < 6) sysexits (1.2.0) temple (0.10.4) - thor (1.5.0) - tilt (2.6.1) + thor (1.4.0) + tilt (2.0.10) timecop (0.9.4) - timeout (0.6.1) + timeout (0.4.3) transitions (1.2.1) - tsort (0.2.0) ttfunk (1.8.0) bigdecimal (~> 3.1) turbolinks (5.2.1) @@ -648,14 +637,14 @@ GEM concurrent-ruby (~> 1.0) uglifier (4.2.0) execjs (>= 0.3.0, < 3) - unicode-display_width (3.2.0) - unicode-emoji (~> 4.1) - unicode-emoji (4.2.0) + unicode-display_width (3.1.4) + unicode-emoji (~> 4.0, >= 4.0.4) + unicode-emoji (4.0.4) unobtrusive_flash (3.3.1) railties - uri (1.1.1) + uri (1.0.3) useragent (0.16.11) - version_gem (1.1.14) + version_gem (1.1.8) warden (1.2.9) rack (>= 2.0.9) web-console (4.1.0) @@ -672,7 +661,7 @@ GEM crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) websocket (1.2.11) - websocket-driver (0.8.2) + websocket-driver (0.8.0) base64 websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -680,7 +669,7 @@ GEM chronic (>= 0.6.3) xpath (3.2.0) nokogiri (~> 1.8) - zeitwerk (2.7.5) + zeitwerk (2.7.3) PLATFORMS ruby @@ -704,7 +693,6 @@ DEPENDENCIES climate_control cloudinary cocoon - connection_pool (< 3) countable-rails daemons dalli @@ -787,7 +775,7 @@ DEPENDENCIES whenever RUBY VERSION - ruby 3.4.10 + ruby 3.4.5 BUNDLED WITH 2.6.9 diff --git a/Gemfile.next b/Gemfile.next deleted file mode 100644 index 6ab79009..00000000 --- a/Gemfile.next +++ /dev/null @@ -1 +0,0 @@ -Gemfile \ No newline at end of file diff --git a/Gemfile.next b/Gemfile.next new file mode 120000 index 00000000..6ab79009 --- /dev/null +++ b/Gemfile.next @@ -0,0 +1 @@ +Gemfile \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md index ef118842..629f756a 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -26,22 +26,21 @@ You can find the latest OSEM releases on our [release page](https://github.com/o ## Deploy to the cloud -The easiest way to deploy OSEM is to use one of the many platform as a service (PaaS) providers that support Ruby on Rails. -There are too many to list, here are a few we have seen OSEM deployed to: +The easiest way to deploy OSEM is to use one of the many platform as a service providers that support ruby on rails. We have prepared OSEM to be used with [heroku](https://heroku.com). So if you have an account there, you can deploy OSEM by pressing this button: -- https://heroku.com -- https://render.com -- https://fly.io + + Deploy + ## Deploy to your own server We recommend to run OSEM in production with [mod\_passenger](https://www.phusionpassenger.com/download/#open_source) and the [apache web-server](https://www.apache.org/). There are tons of guides on how to deploy rails apps on various -base operating systems, [check DuckDuckGo](https://duckduckgo.com/?t=h_&q=ruby+on+rails+apache+passenger). Of course there are also other options for the application server and reverse proxy, pick your poison. +base operating systems. [Check Google](https://encrypted.google.com/search?hl=en&q=ruby%20on%20rails%20apache%20passenger). Of course there are also other options for the application server and reverse proxy, pick your poison. ## Deploy via docker/docker-compose -There is a rudimentary docker-compose configuration for production usage (`docker-compose.yml.production-example`). It brings OSEM up on port 80. It uses persistent storage volumes for all the data your users might create. You can start it with +There is a rudimentary docker-compose configuration for production usage (`docker-compose.yml.production-example`). It brings [OSEM up](http://0.0.0.0:8080) on port 8080. It uses persistent storage volumes for all the data users might create. You can start it with 1. Configure OSEM (at least `SECRET_KEY_BASE`) ``` @@ -54,13 +53,12 @@ There is a rudimentary docker-compose configuration for production usage (`docke ``` 1. Setup the database (only once) ``` - docker-compose -f docker-compose.yml.production-example run --rm osem bundle exec rake db:setup + docker-compose -f docker-compose.yml.production-example run --rm production_web bundle exec rake db:bootstrap ``` 1. Start the services ``` docker-compose -f docker-compose.yml.production-example up ``` -1. Visit http://0.0.0.0 ## Configuration OSEM is configured through environment variables and falls back to sensible defaults. See the [dotenv.example](https://github.com/openSUSE/osem/blob/master/dotenv.example) for all possible configuration options. However here is a list of things you most likely want to configure because otherwise things will not work as expected. diff --git a/README.md b/README.md index edf460d6..69b58e21 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,6 @@ An event management tool tailored to Free and Open Source Software conferences. -## Trial - -Check out our demo at https://osem.copyleft.dev - ## Installation Please refer to our [installation guide](INSTALL.md). @@ -19,7 +15,4 @@ Please refer to our [installation guide](INSTALL.md). Please refer to our [contributing guide](CONTRIBUTING.md). ## Contact -GitHub issues are the primary way for communicating about specific proposed changes to this project. If you have other questions feel free chat us up in the #osem channel on [libera.chat IRC](https://libera.chat). - -https://web.libera.chat/#osem - +GitHub issues are the primary way for communicating about specific proposed changes to this project. If you have other questions feel free to subscribe to the [opensuse-web@opensuse.org](http://lists.opensuse.org/opensuse-web/) mailinglist, all OSEM contributors are on that list! Additionally you can use #osem channel on [libera.chat IRC](https://libera.chat). diff --git a/app.json b/app.json new file mode 100644 index 00000000..b1af6d6b --- /dev/null +++ b/app.json @@ -0,0 +1,37 @@ +{ + "name": "osem", + "description": "Open Source Event Manager", + "repository": "https://github.com/openSUSE/osem", + "env": { + "CLOUDINARY_URL": { + "description": "Create a https://cloudinary.com account and set the cloud url here. It starts with cloudinary://", + "required": false + }, + "SECRET_KEY_BASE": { + "description": "A key to verify sessions. At least 40 characters. For instance: https://www.randomlists.com/string?base=16&length=64&qty=1", + "generator": "secret" + }, + "NOKOGIRI_USE_SYSTEM_LIBRARIES": "1", + "RAILS_ENV": "production", + "RACK_ENV": "production" + }, + "scripts": { + "postdeploy": "bundle exec rake db:schema:load db:seed" + }, + "formation": { + "web": { + "quantity": 1 + }, + "worker": { + "quantity": 1 + } + }, + "addons": [ + { + "plan": "heroku-postgresql" + }, + { + "plan": "sendgrid" + } + ] +} diff --git a/app/controllers/admin/booths_controller.rb b/app/controllers/admin/booths_controller.rb index 0d235b98..0a899921 100644 --- a/app/controllers/admin/booths_controller.rb +++ b/app/controllers/admin/booths_controller.rb @@ -130,7 +130,8 @@ module Admin end def booth_params - params.require(:booth).permit(:title, :description, :reasoning, :picture, :website_url, :submitter_relationship, responsible_ids: []) + params.require(:booth).permit(:title, :description, :reasoning, :state, :picture, :conference_id, + :created_at, :updated_at, :submitter_relationship, :website_url, responsible_ids: []) end end end diff --git a/app/controllers/admin/difficulty_levels_controller.rb b/app/controllers/admin/difficulty_levels_controller.rb index 0453542c..e5717f7e 100644 --- a/app/controllers/admin/difficulty_levels_controller.rb +++ b/app/controllers/admin/difficulty_levels_controller.rb @@ -51,7 +51,7 @@ module Admin private def difficulty_level_params - params.require(:difficulty_level).permit(:title, :description, :color) + params.require(:difficulty_level).permit(:title, :description, :color, :conference_id) end end end diff --git a/app/controllers/admin/event_types_controller.rb b/app/controllers/admin/event_types_controller.rb index 81f3f1f8..a171b427 100644 --- a/app/controllers/admin/event_types_controller.rb +++ b/app/controllers/admin/event_types_controller.rb @@ -49,7 +49,7 @@ module Admin private def event_type_params - params.require(:event_type).permit(:title, :length, :minimum_abstract_length, :maximum_abstract_length, :color, :description) + params.require(:event_type).permit(:title, :length, :minimum_abstract_length, :maximum_abstract_length, :color, :conference_id, :description) end end end diff --git a/app/controllers/admin/events_controller.rb b/app/controllers/admin/events_controller.rb index 6f3227ef..27b19112 100644 --- a/app/controllers/admin/events_controller.rb +++ b/app/controllers/admin/events_controller.rb @@ -178,7 +178,7 @@ module Admin end def comment_params - params.require(:comment).permit(:body) + params.require(:comment).permit(:commentable, :body, :user_id) end def update_state(transition, notice, mail = false, subject = false, send_mail = false) diff --git a/app/controllers/admin/lodgings_controller.rb b/app/controllers/admin/lodgings_controller.rb index 56fc55d4..639e0544 100644 --- a/app/controllers/admin/lodgings_controller.rb +++ b/app/controllers/admin/lodgings_controller.rb @@ -49,7 +49,7 @@ module Admin private def lodging_params - params.require(:lodging).permit(:name, :description, :picture, :picture_cache, :website_link) + params.require(:lodging).permit(:name, :description, :picture, :picture_cache, :website_link, :conference_id) end end end diff --git a/app/controllers/admin/programs_controller.rb b/app/controllers/admin/programs_controller.rb index d94b65f9..d47d4d1d 100644 --- a/app/controllers/admin/programs_controller.rb +++ b/app/controllers/admin/programs_controller.rb @@ -11,7 +11,7 @@ module Admin def update authorize! :update, @conference.program - + @program = @conference.program params['program']['languages'] = params['program']['languages'].join(',') if params['program']['languages'].present? @program.assign_attributes(program_params) send_mail_on_schedule_public = @program.notify_on_schedule_public? diff --git a/app/controllers/admin/questions_controller.rb b/app/controllers/admin/questions_controller.rb index 6ebf67f5..b6451c92 100644 --- a/app/controllers/admin/questions_controller.rb +++ b/app/controllers/admin/questions_controller.rb @@ -97,7 +97,7 @@ module Admin private def question_params - params.require(:question).permit(:title, :global, :answer_ids, :question_type_id, answers_attributes: [:id, :title]) + params.require(:question).permit(:title, :global, :answer_ids, :question_type_id, :conference_id, answers_attributes: [:id, :title]) end def conference_params diff --git a/app/controllers/admin/registrations_controller.rb b/app/controllers/admin/registrations_controller.rb index b36ab05c..88027bbd 100644 --- a/app/controllers/admin/registrations_controller.rb +++ b/app/controllers/admin/registrations_controller.rb @@ -82,7 +82,8 @@ module Admin def registration_params params.require(:registration).permit( - :attended, :volunteer, :other_special_needs, :accepted_code_of_conduct, + :user_id, :conference_id, :attended, + :volunteer, :other_special_needs, :accepted_code_of_conduct, vchoice_ids: [], qanswer_ids: [], qanswers_attributes: [], event_ids: [] ) end diff --git a/app/controllers/admin/resources_controller.rb b/app/controllers/admin/resources_controller.rb index 07ecb869..a6e51e99 100644 --- a/app/controllers/admin/resources_controller.rb +++ b/app/controllers/admin/resources_controller.rb @@ -48,7 +48,7 @@ module Admin private def resource_params - params.require(:resource).permit(:name, :description, :quantity, :used) + params.require(:resource).permit(:name, :description, :quantity, :used, :conference_id) end end end diff --git a/app/controllers/admin/roles_controller.rb b/app/controllers/admin/roles_controller.rb index ecce2287..d69e1ab1 100644 --- a/app/controllers/admin/roles_controller.rb +++ b/app/controllers/admin/roles_controller.rb @@ -94,7 +94,7 @@ module Admin elsif user.add_role @role.name, role_resource flash[:notice] = "Successfully added role #{@role.name} to user #{user.email}" else - flash[:error] = "Could not add role #{@role.name} to #{user.email}" + flash[:error] = "Coud not add role #{@role.name} to #{user.email}" end respond_to do |format| diff --git a/app/controllers/admin/sponsors_controller.rb b/app/controllers/admin/sponsors_controller.rb index 2e434f50..bc61d834 100644 --- a/app/controllers/admin/sponsors_controller.rb +++ b/app/controllers/admin/sponsors_controller.rb @@ -52,14 +52,14 @@ module Admin private def sponsor_params - params.require(:sponsor).permit(:name, :description, :website_url, :picture, :picture_cache, :sponsorship_level_id) + params.require(:sponsor).permit(:name, :description, :website_url, :picture, :picture_cache, :sponsorship_level_id, :conference_id) end def sponsorship_level_required return unless @conference.sponsorship_levels.empty? redirect_to admin_conference_sponsorship_levels_path(conference_id: @conference.short_title), - alert: 'You need to create at least one sponsorship level to add a sponsor' + alert: 'You need to create atleast one sponsorship level to add a sponsor' end end end diff --git a/app/controllers/admin/sponsorship_levels_controller.rb b/app/controllers/admin/sponsorship_levels_controller.rb index b21cff87..443aa8b9 100644 --- a/app/controllers/admin/sponsorship_levels_controller.rb +++ b/app/controllers/admin/sponsorship_levels_controller.rb @@ -61,7 +61,7 @@ module Admin private def sponsorship_level_params - params.require(:sponsorship_level).permit(:title) + params.require(:sponsorship_level).permit(:title, :conference_id) end end end diff --git a/app/controllers/admin/tickets_controller.rb b/app/controllers/admin/tickets_controller.rb index 388020a8..e0e5b186 100644 --- a/app/controllers/admin/tickets_controller.rb +++ b/app/controllers/admin/tickets_controller.rb @@ -52,7 +52,7 @@ module Admin private def ticket_params - params.require(:ticket).permit(:title, :url, :description, :price_cents, :price_currency, :price, :registration_ticket) + params.require(:ticket).permit(:conference, :title, :url, :description, :conference_id, :price_cents, :price_currency, :price, :registration_ticket) end end end diff --git a/app/controllers/admin/venues_controller.rb b/app/controllers/admin/venues_controller.rb index 7383fcef..17ba4c99 100644 --- a/app/controllers/admin/venues_controller.rb +++ b/app/controllers/admin/venues_controller.rb @@ -46,7 +46,7 @@ module Admin private def venue_params - params.require(:venue).permit(:name, :street, :postalcode, :city, :country, :longitude, :latitude, :description, :website, :picture, :picture_cache, :lodgings_attributes) + params.require(:venue).permit(:name, :street, :postalcode, :city, :country, :longitude, :latitude, :description, :website, :picture, :picture_cache, :lodgings_attributes, :conference_id) end end end diff --git a/app/controllers/admin/versions_controller.rb b/app/controllers/admin/versions_controller.rb index d5b5defd..751ac746 100644 --- a/app/controllers/admin/versions_controller.rb +++ b/app/controllers/admin/versions_controller.rb @@ -45,7 +45,7 @@ module Admin end elsif @version.event == 'create' && @version.item - # if @version represents a create event and is not currently deleted + # if @version represets a create event and is not currently deleted @version.item.destroy flash[:notice] = 'The selected change was successfully reverted' diff --git a/app/controllers/booths_controller.rb b/app/controllers/booths_controller.rb index c3a34d63..f8057637 100644 --- a/app/controllers/booths_controller.rb +++ b/app/controllers/booths_controller.rb @@ -94,6 +94,7 @@ class BoothsController < ApplicationController private def booth_params - params.require(:booth).permit(:title, :description, :reasoning, :picture, :website_url, :submitter_relationship, responsible_ids: []) + params.require(:booth).permit(:title, :description, :reasoning, :state, :picture, :conference_id, + :created_at, :updated_at, :submitter_relationship, :website_url, responsible_ids: []) end end diff --git a/app/controllers/conference_registrations_controller.rb b/app/controllers/conference_registrations_controller.rb index 764438b2..70cfc736 100644 --- a/app/controllers/conference_registrations_controller.rb +++ b/app/controllers/conference_registrations_controller.rb @@ -110,6 +110,7 @@ class ConferenceRegistrationsController < ApplicationController def registration_params params.require(:registration) .permit( + :conference_id, :volunteer, :accepted_code_of_conduct, vchoice_ids: [], qanswer_ids: [], qanswers_attributes: [], diff --git a/app/controllers/schedules_controller.rb b/app/controllers/schedules_controller.rb index fd03abc6..5f68c27c 100644 --- a/app/controllers/schedules_controller.rb +++ b/app/controllers/schedules_controller.rb @@ -39,7 +39,7 @@ class SchedulesController < ApplicationController @current_day = @conference.current_conference_day @day = @current_day.present? ? @current_day : @dates.first if @current_day - # the schedule takes you to the current time if it is between the start and the end time. + # the schedule takes you to the current time if it is beetween the start and the end time. @hour_column = @conference.hours_from_start_time(@conf_start, @conference.end_hour) end # Ids of the @event_schedules of confrmed self_organized tracks along with the selected_schedule_id diff --git a/app/controllers/ticket_purchases_controller.rb b/app/controllers/ticket_purchases_controller.rb index b5e957cf..632a7289 100644 --- a/app/controllers/ticket_purchases_controller.rb +++ b/app/controllers/ticket_purchases_controller.rb @@ -31,4 +31,10 @@ class TicketPurchasesController < ApplicationController def index @unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid end + + private + + def ticket_purchase_params + params.require(:ticket_purchase).permit(:ticket_id, :user_id, :conference_id, :quantity) + end end diff --git a/app/helpers/conference_helper.rb b/app/helpers/conference_helper.rb index 2ebeba84..f685ed89 100644 --- a/app/helpers/conference_helper.rb +++ b/app/helpers/conference_helper.rb @@ -45,7 +45,7 @@ module ConferenceHelper location += "#{v.country_name}, " if v.country_name e.location = location end - e.categories = conference.title, "Audience: #{proposal.difficulty_level.title}", "Track: #{proposal.track.name}" + e.categories = conference.title, "Difficulty: #{proposal.difficulty_level.title}", "Track: #{proposal.track.name}" end end calendar diff --git a/app/helpers/date_time_helper.rb b/app/helpers/date_time_helper.rb index 71681b2f..420b086a 100644 --- a/app/helpers/date_time_helper.rb +++ b/app/helpers/date_time_helper.rb @@ -17,7 +17,7 @@ module DateTimeHelper ## # Gets a datetime object # ====Returns - # * +String+ -> formatted datetime object + # * +String+ -> formated datetime object def format_datetime(obj) return unless obj diff --git a/app/models/ability.rb b/app/models/ability.rb index 26ce7bf5..913c97ff 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -21,7 +21,6 @@ class Ability can [:show], Conference do |conference| conference.splashpage&.public == true end - can :code_of_conduct, Conference # Can view the schedule can [:schedule, :events], Conference do |conference| conference.program.cfp && conference.program.schedule_public @@ -152,8 +151,6 @@ class Ability can :manage, Registration, conference_id: conf_ids_for_organizer # To access conference/proposals can :manage, Event, program: { conference_id: conf_ids_for_organizer } - can :manage, Commercial, commercialable_type: 'Event', - commercialable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id) # To access comment link in menu bar can :index, Comment, commentable_type: 'Event', commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_organizer).pluck(:id)).pluck(:id) @@ -165,8 +162,6 @@ class Ability commentable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id) # To access conference/proposals can :manage, Event, program: { conference_id: conf_ids_for_cfp } - can :manage, Commercial, commercialable_type: 'Event', - commercialable_id: Event.where(program_id: Program.where(conference_id: conf_ids_for_cfp).pluck(:id)).pluck(:id) end if conf_ids_for_info_desk diff --git a/app/models/conference.rb b/app/models/conference.rb index f8f8361a..6efd70b0 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -422,7 +422,7 @@ class Conference < ApplicationRecord ## # Returns a hash with affiliation => - # {value: count of registration whose user has that affiliation, color: color} + # {value: count of registration whose user has that affilation, color: color} # In case that the affiliation is blank, it groups them in None and # if the number of persons that have an affiliation are less than the 2% of # the total number of registered people, they are grouped in others. @@ -696,7 +696,7 @@ class Conference < ApplicationRecord end # Returns the number of hours since the conference start hour (9) to the - # current hour, in case that the current hour is between the start and the + # current hour, in case that the current hour is beetween the start and the # end hour (20). Otherwise, returns 0 def hours_from_start_time(start_hour, end_hour) current_time = Time.find_zone(timezone).now @@ -744,7 +744,7 @@ class Conference < ApplicationRecord '#' + next_color_component(:r, i) + next_color_component(:g, i) + next_color_component(:b, i) end - # Auxiliary function which is used in next_color and returns each component of + # Auxiliar function which is used in next_color and returns each component of # the color. We make use of big prime numbers to avoid repetition and to make # consecutive colors clearly different. def next_color_component(component, i) @@ -787,7 +787,7 @@ class Conference < ApplicationRecord ## # Checks if start hour of the conference is greater or equal than the end hour - # and that both hours are between 0 and 24 + # and that both hours are beetween 0 and 24 # # Reports an error when such a condition is found def valid_times_range? @@ -922,7 +922,7 @@ class Conference < ApplicationRecord # # ====Returns # * +True+ -> One difficulty level or more - # * +False+ -> No difficulty level + # * +False+ -> No diffculty level def difficulty_levels_set? program.difficulty_levels.any? end @@ -932,7 +932,7 @@ class Conference < ApplicationRecord # # ====Returns # * +True+ -> One difficulty level or more - # * +False+ -> No difficulty level + # * +False+ -> No diffculty level def event_types_set? program.event_types.any? end diff --git a/app/models/event.rb b/app/models/event.rb index c8872429..82f8204b 100644 --- a/app/models/event.rb +++ b/app/models/event.rb @@ -94,7 +94,7 @@ class Event < ApplicationRecord }.freeze ## - # Checks if the event has a start_time and a room for the selected schedule if there is any + # Checkes if the event has a start_time and a room for the selected schedule if there is any # ====Returns # * +true+ or +false+ def scheduled? diff --git a/app/models/program.rb b/app/models/program.rb index d90f5961..f367d1b2 100644 --- a/app/models/program.rb +++ b/app/models/program.rb @@ -133,7 +133,7 @@ class Program < ApplicationRecord end ## - # Checks if the program has rating enabled + # Checcks if the program has rating enabled # # ====Returns # * +false+ -> If rating is not enabled diff --git a/app/models/ticket.rb b/app/models/ticket.rb index fc80f56b..abc014cd 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -13,7 +13,7 @@ class Ticket < ApplicationRecord scope :for_registration, -> { where(registration_ticket: true) } # This validation is for the sake of simplicity. - # If we would allow different currencies per conference we also have to handle conversions between currencies! + # If we would allow different currencies per conference we also have to handle convertions between currencies! validate :tickets_of_conference_have_same_currency validates :price_cents, :price_currency, :title, presence: true diff --git a/app/models/user.rb b/app/models/user.rb index aca92cf9..4cbac281 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -111,7 +111,7 @@ class User < ApplicationRecord }.freeze ## - # Checks if the user attended the event + # Checkes if the user attended the event # This is used for events that require registration # The user must have registered to attend the event # Gets an event diff --git a/app/views/admin/difficulty_levels/edit.html.haml b/app/views/admin/difficulty_levels/edit.html.haml index 5986918b..baec7d47 100644 --- a/app/views/admin/difficulty_levels/edit.html.haml +++ b/app/views/admin/difficulty_levels/edit.html.haml @@ -2,7 +2,7 @@ .col-md-12 .page-header %h1 - Edit Audience + Edit Difficulty Level = @difficulty_level.title .row .col-md-8 diff --git a/app/views/admin/difficulty_levels/index.html.haml b/app/views/admin/difficulty_levels/index.html.haml index 0ab6f53d..282fdfae 100644 --- a/app/views/admin/difficulty_levels/index.html.haml +++ b/app/views/admin/difficulty_levels/index.html.haml @@ -1,7 +1,7 @@ .row .col-md-12 .page-header - %h1 Audiences + %h1 Difficulty Levels %p.text-muted Classify your conference.program.events by difficulty .row @@ -32,4 +32,4 @@ data: { confirm: "Do you really want to delete #{difficulty_level.title}? Attention: This difficulty level will be removed from all Events that have it set" } .row .col-md-12.text-right - = link_to 'Add Audience', new_admin_conference_program_difficulty_level_path(@conference.short_title), class: 'btn btn-primary' + = link_to 'Add Difficulty Level', new_admin_conference_program_difficulty_level_path(@conference.short_title), class: 'btn btn-primary' diff --git a/app/views/admin/difficulty_levels/new.html.haml b/app/views/admin/difficulty_levels/new.html.haml index 55bacb47..6d8fc4de 100644 --- a/app/views/admin/difficulty_levels/new.html.haml +++ b/app/views/admin/difficulty_levels/new.html.haml @@ -2,7 +2,7 @@ .col-md-12 .page-header %h1 - Create Audience + Create Difficulty Level .row .col-md-8 = render partial: 'form' diff --git a/app/views/admin/events/index.html.haml b/app/views/admin/events/index.html.haml index f3efb5b8..bb6db751 100644 --- a/app/views/admin/events/index.html.haml +++ b/app/views/admin/events/index.html.haml @@ -82,7 +82,7 @@ %th %b Track %th - %b Audience + %b Difficulty %th %b State %th diff --git a/app/views/admin/events/show.html.haml b/app/views/admin/events/show.html.haml index 2166fc38..d19d056a 100644 --- a/app/views/admin/events/show.html.haml +++ b/app/views/admin/events/show.html.haml @@ -92,7 +92,7 @@ %td{ 'class' => class_for_todo(progress_status['track']) } %span{ 'class' => [icon_for_todo(progress_status['track']), 'fa-lg'] } %tr - %td= link_to 'Add an Audience level', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event) + %td= link_to 'Add a difficulty level', edit_admin_conference_program_event_path(@event.program.conference.short_title, @event) %td{ 'class' => class_for_todo(progress_status['difficulty_level']) } %span{ 'class' => [icon_for_todo(progress_status['difficulty_level']), 'fa-lg'] } #proposal-commercials.tab-pane diff --git a/app/views/admin/programs/show.html.haml b/app/views/admin/programs/show.html.haml index af8d6c1d..db1e91ff 100644 --- a/app/views/admin/programs/show.html.haml +++ b/app/views/admin/programs/show.html.haml @@ -28,7 +28,7 @@ %dd = tracks(@conference) %dt - Audiences: + Difficulty Levels: %dd = difficulty_levels(@conference) %dt diff --git a/app/views/admin/registration_periods/_form.html.haml b/app/views/admin/registration_periods/_form.html.haml index ec274139..2bf25a57 100644 --- a/app/views/admin/registration_periods/_form.html.haml +++ b/app/views/admin/registration_periods/_form.html.haml @@ -1,5 +1,5 @@ %p - Setup the time frame in which people can register to your conference + Setup the time frame in which people can registrer to your conference = form_for(@registration_period, url: admin_conference_registration_period_path(@conference.short_title)) do |f| .form-group = f.label :start_date diff --git a/app/views/admin/registrations/index.xlsx.axlsx b/app/views/admin/registrations/index.xlsx.axlsx index 596d9fd2..a95c163e 100644 --- a/app/views/admin/registrations/index.xlsx.axlsx +++ b/app/views/admin/registrations/index.xlsx.axlsx @@ -3,7 +3,7 @@ wb = xlsx_package.workbook wb.add_worksheet(name: 'registrations') do |sheet| bold_style = wb.styles.add_style(b: true) - row = ['Attended', 'Name', 'Nickname', 'Affilιation', 'Email', 'Ticket Token'] + row = ['Attended', 'Name', 'Nickname', 'Affilιation', 'Email'] @conference.questions.each do |question| row << question.title @@ -18,7 +18,6 @@ wb.add_worksheet(name: 'registrations') do |sheet| row << registration.nickname row << registration.affiliation row << registration.email - row << registration.user.physical_tickets.by_conference(@conference).first&.token @conference.questions.each do |question| qa = registration.qanswers.find_by(question: question) answer = ( qa ? qa.answer.title : '' ) diff --git a/app/views/admin/schedules/show.html.haml b/app/views/admin/schedules/show.html.haml index ee4ed7b5..df864b88 100644 --- a/app/views/admin/schedules/show.html.haml +++ b/app/views/admin/schedules/show.html.haml @@ -17,7 +17,7 @@ url = update_selected_schedule_admin_conference_program_track_path(@conference.short_title, @schedule.track) + '?[track][selected_schedule_id]=' else value = @schedule.id == @selected_schedule.try(:id) - url = admin_conference_program_path(@conference.short_title) + '?program[selected_schedule_id]=' + url = admin_conference_program_path(@conference.short_title) + '?[program][selected_schedule_id]=' end = check_box_tag @conference.short_title, @schedule.id, value, url: url, class: 'switch-checkbox-schedule' diff --git a/app/views/admin/tracks/edit.html.haml b/app/views/admin/tracks/edit.html.haml index 5d9fab32..8d29ea44 100644 --- a/app/views/admin/tracks/edit.html.haml +++ b/app/views/admin/tracks/edit.html.haml @@ -2,7 +2,7 @@ .col-md-12 .page-header %h1 - Edit Track + Edit Tack = @track.name .row .col-md-12 diff --git a/app/views/admin/venues/_form.html.haml b/app/views/admin/venues/_form.html.haml index 39f14aa0..960b01e4 100644 --- a/app/views/admin/venues/_form.html.haml +++ b/app/views/admin/venues/_form.html.haml @@ -33,7 +33,7 @@ = f.file_field :picture = f.hidden_field :picture_cache %span.help-block - This will be displayed on the venue area of the splash page. + This will be displayed on the venue are of the splash page. .form-group = f.label :street %abbr{title: 'This field is required'} * diff --git a/app/views/booths/_form.html.haml b/app/views/booths/_form.html.haml index 9e10d740..7796149d 100644 --- a/app/views/booths/_form.html.haml +++ b/app/views/booths/_form.html.haml @@ -18,7 +18,7 @@ %abbr{title: 'This field is required'} * = f.text_field :submitter_relationship, rows: 5, required: true, class: 'form-control' %span.help-block - e.g. employee, community manager, etc + e.g. employee, comunity manager, etc .form-group = f.label :website_url, 'Website URL' %abbr{title: 'This field is required'} * diff --git a/app/views/layouts/_admin_sidebar.html.haml b/app/views/layouts/_admin_sidebar.html.haml index b7fa4791..f4c20006 100644 --- a/app/views/layouts/_admin_sidebar.html.haml +++ b/app/views/layouts/_admin_sidebar.html.haml @@ -80,7 +80,7 @@ = link_to 'Event Types', admin_conference_program_event_types_path(@conference.short_title) - if can? :update, @conference.program.difficulty_levels.build, conference_id: @conference.id %li{class: active_nav_li(admin_conference_program_difficulty_levels_path(@conference.short_title))} - = link_to 'Audience', admin_conference_program_difficulty_levels_path(@conference.short_title) + = link_to 'Difficulty Levels', admin_conference_program_difficulty_levels_path(@conference.short_title) - if can? :update, @conference.program.schedules.build %li{class: active_nav_li(admin_conference_schedules_path(@conference.short_title))} = link_to 'Schedules', admin_conference_schedules_path(@conference.short_title) diff --git a/app/views/proposals/_form.html.haml b/app/views/proposals/_form.html.haml index 8082dee8..71feac07 100644 --- a/app/views/proposals/_form.html.haml +++ b/app/views/proposals/_form.html.haml @@ -37,7 +37,7 @@ = f.select :language, @program.languages_list, { include_blank: false}, { class: 'select-help-toggle form-control' } - if display_details - if @conference.program.difficulty_levels.any? - = f.label :difficulty_level, 'Audience' + = f.label :difficulty_level = f.select :difficulty_level_id, @conference.program.difficulty_levels.map{|level| [level.title, level.id ] }, {include_blank: false}, { class: 'select-help-toggle form-control' } = render 'shared/select_help_text', f: f, for: :difficulty_level_id, options: @conference.program.difficulty_levels do |difficulty_level| = difficulty_level.description diff --git a/app/views/proposals/_tooltip.html.haml b/app/views/proposals/_tooltip.html.haml index d5139ea1..13f3155c 100644 --- a/app/views/proposals/_tooltip.html.haml +++ b/app/views/proposals/_tooltip.html.haml @@ -27,4 +27,4 @@ = link_to 'Add a track', edit_conference_program_proposal_path(event.program.conference.short_title, event) %li{'class'=>class_for_todo(progress_status['difficulty_level'])} %span{'class'=>icon_for_todo(progress_status['difficulty_level'])} - = link_to 'Add an Audience', edit_conference_program_proposal_path(event.program.conference.short_title, event) + = link_to 'Add a difficulty level', edit_conference_program_proposal_path(event.program.conference.short_title, event) diff --git a/app/views/proposals/show.html.haml b/app/views/proposals/show.html.haml index 2944adb1..fa2e2f10 100644 --- a/app/views/proposals/show.html.haml +++ b/app/views/proposals/show.html.haml @@ -73,7 +73,7 @@ %dl#proposal-info .col-md-12 %dt Date: - %dd= @event_schedule.start_time.strftime("%Y %B %e - %-I:%M %p") if @event_schedule + %dd= @event_schedule.start_time.strftime("%Y %B %e - %H:%M") if @event_schedule .col-md-12 %dt Duration: %dd= show_time(@event.event_type.length) @@ -95,7 +95,7 @@ %span.label{style: "background-color: #{@event.track.color}; color: #{ contrast_color(@event.track.color) }"} = @event.track.name .col-md-12 - %dt Audience: + %dt Difficulty: %dd - if @event.difficulty_level %span.label{style: "background-color: #{@event.difficulty_level.color}; color: #{ contrast_color(@event.difficulty_level.color) };"} @@ -118,7 +118,7 @@ %dl %dt Start Time: %dd - = event.program.selected_event_schedules.find { |es| es.event == event }.start_time.strftime("%Y %B %e %-I:%M %p") + = event.program.selected_event_schedules.find { |es| es.event == event }.start_time.strftime("%Y %B %e %H:%M") %br %dt Room: %dd diff --git a/app/views/schedules/_carousel.html.haml b/app/views/schedules/_carousel.html.haml index 0df40a41..785a0681 100644 --- a/app/views/schedules/_carousel.html.haml +++ b/app/views/schedules/_carousel.html.haml @@ -17,7 +17,9 @@ - interval_count.times do %th.date %span - = (td_start_time).strftime("%-I:%M %p") + = (td_start_time).strftime("%H:") + %span + = (td_start_time).strftime("%M") - td_start_time += @step_minutes - start_room_time = start_time - @rooms.each do |room| diff --git a/app/views/schedules/_event.html.haml b/app/views/schedules/_event.html.haml index 41f9548a..25f4e1a0 100644 --- a/app/views/schedules/_event.html.haml +++ b/app/views/schedules/_event.html.haml @@ -24,9 +24,9 @@ %span.track %span.fa-solid.fa-clock %span.label{ style: "background-color: grey" } - = event_schedule.start_time.strftime('%-I:%M %p') + = event_schedule.start_time.strftime('%H:%M') \- - = event_schedule.end_time.strftime('%-I:%M %p') + = event_schedule.end_time.strftime('%H:%M') %span.track %span.fa-solid.fa-location-dot %span.label{ style: "background-color: grey" } diff --git a/app/views/schedules/_schedule.html.haml b/app/views/schedules/_schedule.html.haml index 4ec0acd1..3b4c3dac 100644 --- a/app/views/schedules/_schedule.html.haml +++ b/app/views/schedules/_schedule.html.haml @@ -42,7 +42,7 @@ } }); - // hide the right and left controls when necessary after moving the carousel + // hide the right and left controls when neccesary after moving the carousel $('.carousel').on('slid.bs.carousel', '', function(){ $(this).children('.left.carousel-control').show(); diff --git a/app/views/schedules/events.html.haml b/app/views/schedules/events.html.haml index 7b16a99f..b6e87e31 100644 --- a/app/views/schedules/events.html.haml +++ b/app/views/schedules/events.html.haml @@ -21,6 +21,7 @@ / scheduled events - date = nil + - time = nil - @events_schedules.each do |event_schedule| - unless event_schedule.start_time.strftime('%Y-%m-%d').eql?(date) .col-xs-12.col-md-12 @@ -29,11 +30,15 @@ = date = event_schedule.start_time.strftime('%Y-%m-%d') %a{ title: "Go up", class: "pull-right", href: "#program" } %i{ class: "fa-solid fa-angles-up fa-lg", 'aria-hidden' => true } - .col-xs-12.col-md-1 - .start-time - = event_schedule.start_time.strftime('%-I:%M %p') - .col-xs-12.col-md-11 - .new-time-event + - unless event_schedule.start_time.strftime('%H:%M').eql?(time) + .col-xs-12.col-md-1 + .start-time + = time = event_schedule.start_time.strftime('%H:%M') + .col-xs-12.col-md-11 + .new-time-event + = render partial: 'event', locals: { event: event_schedule.event, event_schedule: event_schedule } + - else + .col-xs-12.col-md-11.col-md-offset-1 = render partial: 'event', locals: { event: event_schedule.event, event_schedule: event_schedule } / confirmed events that are not scheduled diff --git a/app/views/schedules/show.html.haml b/app/views/schedules/show.html.haml index 7716b63c..8000b1ad 100644 --- a/app/views/schedules/show.html.haml +++ b/app/views/schedules/show.html.haml @@ -43,7 +43,7 @@ }); }); - // hide the right and left controls when necessary after moving the carousel + // hide the right and left controls when neccesary after moving the carousel $('.carousel').on('slid.bs.carousel', '', function(){ $(this).children('.left.carousel-control').show(); diff --git a/app/views/shared/_object_changes.html.haml b/app/views/shared/_object_changes.html.haml index 3069149f..47a3e701 100644 --- a/app/views/shared/_object_changes.html.haml +++ b/app/views/shared/_object_changes.html.haml @@ -12,7 +12,7 @@ %th Updated Attribute %th{ class: "#{'hidden' if version.event == 'create'}" } - Previous Value + Prevous Value %th{ class: "#{'hidden' if version.event == 'destroy'}" } New Value diff --git a/bin/bundle b/bin/bundle old mode 100644 new mode 100755 diff --git a/bin/bundle_report b/bin/bundle_report old mode 100644 new mode 100755 diff --git a/bin/delayed_job b/bin/delayed_job old mode 100644 new mode 100755 diff --git a/bin/deprecations b/bin/deprecations old mode 100644 new mode 100755 diff --git a/bin/gem-next-diff b/bin/gem-next-diff old mode 100644 new mode 100755 diff --git a/bin/next b/bin/next old mode 100644 new mode 100755 diff --git a/bin/rails b/bin/rails old mode 100644 new mode 100755 diff --git a/bin/rake b/bin/rake old mode 100644 new mode 100755 diff --git a/bin/rspec b/bin/rspec old mode 100644 new mode 100755 diff --git a/docker-compose.yml.production-example b/docker-compose.yml.production-example index f3594778..91cd051c 100644 --- a/docker-compose.yml.production-example +++ b/docker-compose.yml.production-example @@ -1,25 +1,24 @@ services: - postgres: - image: postgres:16-alpine + production_database: + image: postgres:12-alpine environment: PGDATA: /var/lib/postgresql/data/pgdata - POSTGRES_USER: osem POSTGRES_PASSWORD: mysecretpassword volumes: - osem_production_database:/var/lib/postgresql/data/pgdata - osem: + production_web: build: context: . dockerfile: Dockerfile.production depends_on: - - postgres + - production_database ports: - - 80:5000 + - 8080:3000 env_file: .env.production # see dotenv.example file environment: - OSEM_DB_HOST: postgres - OSEM_DB_USER: osem - OSEM_DB_PASSWORD: mysecretpassword + OSEM_DB_HOST: production_database + RAILS_SERVE_STATIC_FILES: 'true' + command: foreman start -p 3000 volumes: - osem_production_web_data:/osem/public/system - osem_production_web_assets:/osem/public/assets diff --git a/dotenv.example b/dotenv.example index c402f156..6d31d9c6 100644 --- a/dotenv.example +++ b/dotenv.example @@ -12,7 +12,7 @@ # The name of the host the database runs on # OSEM_DB_HOST=database -# The port the database runs on +# The port the databse runs on # OSEM_DB_PORT=3306 # The user to access the database with diff --git a/lib/tasks/data_demo.rake b/lib/tasks/data_demo.rake index b722c211..0e5450b4 100644 --- a/lib/tasks/data_demo.rake +++ b/lib/tasks/data_demo.rake @@ -6,7 +6,7 @@ namespace :data do task demo: :environment do include FactoryBot::Syntax::Methods - conference = create(:full_conference, title: 'Open Source Event Manager Demo', short_title: 'osemdemo' ,description: "This is an [Open Source Event Manager](http://osem.io/) demo instance. You can log in as **admin** with the password **password123** or you [sign up](/accounts/sign_up) as a user. We hope you enjoy checking out all the functionality, if you have questions do not hesitate to contact us on [IRC](https://web.libera.chat/#osem) or file an issue on [GitHub](https://github.com/openSUSE/osem).\r\n\r\n## Data will be destroyed every thirty minutes! (next reset: #{29.minutes.after})") + conference = create(:full_conference, title: 'Open Source Event Manager Demo', short_title: 'osemdemo' ,description: "This is a [Open Source Event Manager](http://osem.io/) demo instance. You can log in as **admin** with the password **password123** or just you just [sign up](/accounts/sign_up) with your own user. We hope you enjoy checking out all the functionality, if you have questions don't hesitate to [contact us](http://osem.io/#contact)!\r\n\r\n## Data will be destroyed every thirty minutes or whenever someone updates the [OSEM source code on github](https://github.com/openSUSE/osem/commits/master).") conference.contact.update(email: 'osemdemo@osem.io', sponsor_email: 'osemdemo@osem.io') create(:admin, email: 'admin@osem.io', username: 'admin', password: 'password123', password_confirmation: 'password123') end diff --git a/lib/tasks/demo_data_for_development.rake b/lib/tasks/demo_data_for_development.rake index 5b0ddc09..7a40d19f 100644 --- a/lib/tasks/demo_data_for_development.rake +++ b/lib/tasks/demo_data_for_development.rake @@ -7,7 +7,7 @@ namespace :data do task surveys: :environment do conference = create(:full_conference, start_date: Date.current, end_date: Date.current + 1.day) survey_after_conference_active = create(:survey, surveyable: conference, target: :after_conference, title: 'Survey about the conference', start_date: conference.start_date - 1.day, end_date: conference.end_date + 5.days, description: 'Survey about the conference. You can already see it.') - # survey_after_conference_inactive = create(:survey, surveyable: conference, target: :after_conference, title: 'Survey about the conference', start_date: conference.start_date + 1.day, end_date: conference.end_date + 5.days, description: 'Survey about the conference. Not available yet!') + # survey_after_conference_inactive = create(:survey, surveyable: conference, target: :after_conference, title: 'Survey about the conference', start_date: conference.start_date + 1.day, end_date: conference.end_date + 5.days, description: 'Survey abou the conference. Not available yet!') # survey_on_registration = create(:survey, surveyable: conference, target: :during_registration, title: 'Survey during registation', start_date: conference.registration_period.start_date, end_date: conference.registration_period.end_date, description: 'Survey during registration.') create(:boolean_non_mandatory, survey: survey_after_conference_active) diff --git a/lib/tasks/user.rake b/lib/tasks/user.rake index ae262687..fb4688ac 100644 --- a/lib/tasks/user.rake +++ b/lib/tasks/user.rake @@ -16,7 +16,7 @@ namespace :user do end end - desc "Set email_public attribute true for all users" + desc "Set email_public attrubute true for all users" task :set_email_public => :environment do User.update_all email_public: true end diff --git a/railway.json b/railway.json new file mode 100644 index 00000000..f5fa5619 --- /dev/null +++ b/railway.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://railway.app/railway.schema.json", + "build": { + "builder": "nixpacks" + }, + "deploy": { + "startCommand": "foreman start -p 3000", + "restartPolicyType": "ON_FAILURE", + "restartPolicyMaxRetries": 2 + } +} diff --git a/spec/ability/ability_spec.rb b/spec/ability/ability_spec.rb index 6abf860f..0f3438ac 100644 --- a/spec/ability/ability_spec.rb +++ b/spec/ability/ability_spec.rb @@ -264,31 +264,5 @@ describe 'User' do it{ should_not be_able_to(:edit, other_self_organized_track) } it{ should_not be_able_to(:update, other_self_organized_track) } end - - context 'when user is organizer of conference' do - let(:conference) { create(:conference) } - let(:user) { create(:organizer, resource: conference) } - let(:event_in_conference) { create(:event, program: conference.program) } - let(:event_in_other_conference) { create(:event) } - let(:commercial_in_conference) { create(:commercial, commercialable: event_in_conference) } - let(:commercial_in_other_conference) { create(:commercial, commercialable: event_in_other_conference) } - - it{ should be_able_to(:create, event_in_conference.commercials.new) } - it{ should be_able_to(:manage, commercial_in_conference) } - it{ should_not be_able_to(:manage, commercial_in_other_conference) } - end - - context 'when user is on cfp team of conference' do - let(:conference) { create(:conference) } - let(:user) { create(:cfp_user, resource: conference) } - let(:event_in_conference) { create(:event, program: conference.program) } - let(:event_in_other_conference) { create(:event) } - let(:commercial_in_conference) { create(:commercial, commercialable: event_in_conference) } - let(:commercial_in_other_conference) { create(:commercial, commercialable: event_in_other_conference) } - - it{ should be_able_to(:create, event_in_conference.commercials.new) } - it{ should be_able_to(:manage, commercial_in_conference) } - it{ should_not be_able_to(:manage, commercial_in_other_conference) } - end end end diff --git a/spec/factories/comments.rb b/spec/factories/comments.rb index 6b424d26..d30dca9b 100644 --- a/spec/factories/comments.rb +++ b/spec/factories/comments.rb @@ -4,7 +4,7 @@ FactoryBot.define do factory :comment do - body { 'Most interesting comment ever, created by a girl.' } + body { 'Most interresting comment ever, created by a girl.' } user association :commentable, factory: :event end diff --git a/spec/models/conference_spec.rb b/spec/models/conference_spec.rb old mode 100644 new mode 100755