From 0e917ccdb4c4539102588f8bc013612daf80c4e3 Mon Sep 17 00:00:00 2001 From: Benjamin ter Kuile Date: Thu, 27 Jan 2022 09:32:01 -0500 Subject: [PATCH] New versions --- Gemfile | 6 +- Gemfile.lock | 314 +++++++++++++++-------------- app/controllers/user_controller.rb | 5 + config/environments/development.rb | 2 +- faye/Dockerfile | 6 +- faye/Gemfile.lock | 53 ++--- faye/rebuild-docker.sh | 16 +- lib/qwaiter/broadcaster/faye.rb | 2 +- 8 files changed, 221 insertions(+), 183 deletions(-) diff --git a/Gemfile b/Gemfile index 70478a10..225602dd 100644 --- a/Gemfile +++ b/Gemfile @@ -2,7 +2,7 @@ source 'https://rubygems.org' -gem 'rails', '~> 6.1.3.1' +gem 'rails', '~> 6.1.0' gem 'rack-cors', require: 'rack/cors' # Bundle edge Rails instead: @@ -58,12 +58,12 @@ end # gem 'couchbase-structures', github: 'bterkuile/couchbase-structures' #gem 'couch_potato', '>= 1.7.1' #, github: 'bterkuile/couch_potato' -gem 'couch_potato', github: 'langalex/couch_potato' +gem 'couch_potato', github: 'langalex/couch_potato', branch: :main #gem 'simply_stored', path: '~/development/rails/components/simply_stored' #, github: 'bterkuile/simply_stored' gem 'simply_stored', github: 'bterkuile/simply_stored', branch: :master #gem 'orm_adapter', github: 'bterkuile/orm_adapter' gem 'devise' #, github: 'plataformatec/devise', branch: 'lm-rails-4-2' #, '3.1.0' #, '2.0.4' -gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored' +gem 'devise_simply_stored', github: 'bterkuile/devise_simply_stored', branch: :master gem 'devise-i18n' gem 'omniauth-facebook' gem 'omniauth-instagram' diff --git a/Gemfile.lock b/Gemfile.lock index c12f39f2..fc6911e2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -17,7 +17,8 @@ GIT GIT remote: https://github.com/bterkuile/devise_simply_stored.git - revision: b2f308d0e359ed18a5d09f26454c9569d9c69ca8 + revision: d40020669b22bbb14fa40dc4521b2f072eb96e84 + branch: master specs: devise_simply_stored (0.3.0) devise @@ -31,7 +32,7 @@ GIT GIT remote: https://github.com/bterkuile/simply_stored.git - revision: bf0d9f6b4645d0a24d5321b6db27bab6625c10ef + revision: e95c81fa4a2783d3c44d532a0bb2adcc6c43b089 branch: master specs: simply_stored (1.0.0) @@ -40,98 +41,100 @@ GIT GIT remote: https://github.com/langalex/couch_potato.git - revision: fbab728b1112442a5190b9074576f319bbc973b8 + revision: 32fc825679a7a4c20413837735068c0f58da3fa5 + branch: main specs: couch_potato (1.7.1) - activemodel (>= 4.0) + activemodel (>= 5.0, < 7.0) couchrest (~> 2.0.1) - json (~> 2.1) + json (~> 2.3) GEM remote: https://rubygems.org/ specs: ace-rails-ap (4.4) - actioncable (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + actioncable (6.1.4.4) + actionpack (= 6.1.4.4) + activesupport (= 6.1.4.4) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailbox (6.1.4.4) + actionpack (= 6.1.4.4) + activejob (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) mail (>= 2.7.1) - actionmailer (6.1.3.1) - actionpack (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionmailer (6.1.4.4) + actionpack (= 6.1.4.4) + actionview (= 6.1.4.4) + activejob (= 6.1.4.4) + activesupport (= 6.1.4.4) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.3.1) - actionview (= 6.1.3.1) - activesupport (= 6.1.3.1) + actionpack (6.1.4.4) + actionview (= 6.1.4.4) + activesupport (= 6.1.4.4) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.3.1) - actionpack (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + actiontext (6.1.4.4) + actionpack (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) nokogiri (>= 1.8.5) - actionview (6.1.3.1) - activesupport (= 6.1.3.1) + actionview (6.1.4.4) + activesupport (= 6.1.4.4) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - active_attr (0.15.3) - actionpack (>= 3.0.2, < 7.0) - activemodel (>= 3.0.2, < 7.0) - activesupport (>= 3.0.2, < 7.0) - active_decorator (1.3.4) + active_attr (0.15.4) + actionpack (>= 3.0.2, < 7.1) + activemodel (>= 3.0.2, < 7.1) + activesupport (>= 3.0.2, < 7.1) + active_decorator (1.4.0) activesupport - activejob (6.1.3.1) - activesupport (= 6.1.3.1) + activejob (6.1.4.4) + activesupport (= 6.1.4.4) globalid (>= 0.3.6) - activemodel (6.1.3.1) - activesupport (= 6.1.3.1) - activerecord (6.1.3.1) - activemodel (= 6.1.3.1) - activesupport (= 6.1.3.1) - activestorage (6.1.3.1) - actionpack (= 6.1.3.1) - activejob (= 6.1.3.1) - activerecord (= 6.1.3.1) - activesupport (= 6.1.3.1) + activemodel (6.1.4.4) + activesupport (= 6.1.4.4) + activerecord (6.1.4.4) + activemodel (= 6.1.4.4) + activesupport (= 6.1.4.4) + activestorage (6.1.4.4) + actionpack (= 6.1.4.4) + activejob (= 6.1.4.4) + activerecord (= 6.1.4.4) + activesupport (= 6.1.4.4) marcel (~> 1.0.0) - mini_mime (~> 1.0.2) - activesupport (6.1.3.1) + mini_mime (>= 1.1.0) + activesupport (6.1.4.4) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) zeitwerk (~> 2.3) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) bcrypt (3.1.16) bourbon (7.0.0) thor (~> 1.0) builder (3.2.4) - cancancan (3.2.1) - capybara (3.35.3) + cancancan (3.3.0) + capybara (3.36.0) addressable + matrix mini_mime (>= 0.1.3) nokogiri (~> 1.8) rack (>= 1.6.0) rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-screenshot (1.0.25) + capybara-screenshot (1.0.26) capybara (>= 1.0, < 4) launchy chunky_png (1.4.0) @@ -145,7 +148,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) cookiejar (0.3.3) couchrest (2.0.1) httpclient (~> 2.8) @@ -158,16 +161,16 @@ GEM cucumber-messages (~> 12.4, >= 12.4.0) cucumber-messages (12.4.0) protobuf-cucumber (~> 3.10, >= 3.10.8) - devise (4.7.3) + devise (4.8.1) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - devise-i18n (1.9.3) - devise (>= 4.7.1) - diff-lcs (1.4.4) - docile (1.3.5) + devise-i18n (1.10.1) + devise (>= 4.8.0) + diff-lcs (1.5.0) + docile (1.4.0) em-http-request (1.1.7) addressable (>= 2.3.4) cookiejar (!= 0.3.1) @@ -180,24 +183,38 @@ GEM activemodel erubi (1.10.0) eventmachine (1.2.7) - exception_notification (4.4.3) - actionmailer (>= 4.0, < 7) - activesupport (>= 4.0, < 7) - execjs (2.7.0) - factory_bot (6.1.0) + exception_notification (4.5.0) + actionmailer (>= 5.2, < 8) + activesupport (>= 5.2, < 8) + execjs (2.8.1) + factory_bot (6.2.0) activesupport (>= 5.0.0) - factory_bot_rails (6.1.0) - factory_bot (~> 6.1.0) + factory_bot_rails (6.2.0) + factory_bot (~> 6.2.0) railties (>= 5.0.0) - faraday (1.4.1) + faraday (1.9.3) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) faraday-net_http (~> 1.0) - faraday-net_http_persistent (~> 1.1) - multipart-post (>= 1.2, < 3) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.0) faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.0.3) + multipart-post (>= 1.2, < 3) faraday-net_http (1.0.1) - faraday-net_http_persistent (1.1.0) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) faye (1.4.0) cookiejar (>= 0.3.0) em-http-request (>= 1.1.6) @@ -206,12 +223,12 @@ GEM multi_json (>= 1.0.0) rack (>= 1.0.0) websocket-driver (>= 0.5.1) - faye-websocket (0.11.0) + faye-websocket (0.11.1) eventmachine (>= 0.12.0) websocket-driver (>= 0.5.1) - ffi (1.15.0) - font-awesome-rails (4.7.0.7) - railties (>= 3.2, < 7) + ffi (1.15.5) + font-awesome-rails (4.7.0.8) + railties (>= 3.2, < 8.0) foreman (0.87.2) foundation-rails (5.5.3.2) railties (>= 3.1.0) @@ -219,13 +236,13 @@ GEM fuubar (2.5.1) rspec-core (~> 3.0) ruby-progressbar (~> 1.4) - globalid (0.4.2) - activesupport (>= 4.2.0) + globalid (1.0.0) + activesupport (>= 5.0) hashdiff (1.0.1) - hashie (4.1.0) - http_parser.rb (0.6.0) + hashie (5.0.0) + http_parser.rb (0.8.0) httpclient (2.8.3) - i18n (1.8.10) + i18n (1.9.0) concurrent-ruby (~> 1.0) iso_country_codes (0.7.8) jquery-rails (4.4.0) @@ -234,51 +251,52 @@ GEM thor (>= 0.14, < 2.0) jquery-ui-rails (6.0.1) railties (>= 3.2.16) - js-routes (1.4.14) + js-routes (2.2.1) railties (>= 4) - json (2.5.1) - jwt (2.2.2) - kaminari (1.2.1) + json (2.6.1) + jwt (2.3.0) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) launchy (2.5.0) addressable (~> 2.7) letter_opener (1.7.0) launchy (~> 2.2) - loofah (2.9.1) + loofah (2.13.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (1.0.1) + marcel (1.0.2) + matrix (0.4.2) method_source (1.0.0) middleware (0.1.0) - mime-types (3.3.1) + mime-types (3.4.1) mime-types-data (~> 3.2015) - mime-types-data (3.2021.0225) + mime-types-data (3.2022.0105) mimemagic (0.3.10) nokogiri (~> 1) rake mini_magick (4.11.0) - mini_mime (1.0.3) - mini_portile2 (2.5.0) - minitest (5.14.4) + mini_mime (1.1.2) + mini_portile2 (2.7.1) + minitest (5.15.0) multi_json (1.15.0) multi_xml (0.6.0) multipart-post (2.1.1) naught (1.1.0) - nio4r (2.5.7) - nokogiri (1.11.3) - mini_portile2 (~> 2.5.0) + nio4r (2.5.8) + nokogiri (1.13.1) + mini_portile2 (~> 2.7.0) racc (~> 1.4) oauth2 (1.4.7) faraday (>= 0.8, < 2.0) @@ -289,12 +307,12 @@ GEM omniauth (1.9.1) hashie (>= 3.4.6) rack (>= 1.6.2, < 3) - omniauth-facebook (8.0.0) + omniauth-facebook (9.0.0) omniauth-oauth2 (~> 1.2) omniauth-instagram (1.3.0) omniauth (~> 1) omniauth-oauth2 (~> 1) - omniauth-oauth2 (1.7.1) + omniauth-oauth2 (1.7.2) oauth2 (~> 1.4) omniauth (>= 1.9, < 3) orm_adapter (0.5.0) @@ -318,63 +336,63 @@ GEM pry (0.14.1) coderay (~> 1.1) method_source (~> 1.0) - pry-doc (1.1.0) + pry-doc (1.3.0) pry (~> 0.11) yard (~> 0.9.11) pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - puma (5.2.2) + puma (5.6.1) nio4r (~> 2.0) - racc (1.5.2) + racc (1.6.0) rack (2.2.3) rack-cors (1.1.1) rack (>= 2.0.0) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.1.3.1) - actioncable (= 6.1.3.1) - actionmailbox (= 6.1.3.1) - actionmailer (= 6.1.3.1) - actionpack (= 6.1.3.1) - actiontext (= 6.1.3.1) - actionview (= 6.1.3.1) - activejob (= 6.1.3.1) - activemodel (= 6.1.3.1) - activerecord (= 6.1.3.1) - activestorage (= 6.1.3.1) - activesupport (= 6.1.3.1) + rails (6.1.4.4) + actioncable (= 6.1.4.4) + actionmailbox (= 6.1.4.4) + actionmailer (= 6.1.4.4) + actionpack (= 6.1.4.4) + actiontext (= 6.1.4.4) + actionview (= 6.1.4.4) + activejob (= 6.1.4.4) + activemodel (= 6.1.4.4) + activerecord (= 6.1.4.4) + activestorage (= 6.1.4.4) + activesupport (= 6.1.4.4) bundler (>= 1.15.0) - railties (= 6.1.3.1) + railties (= 6.1.4.4) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.3.1) - actionpack (= 6.1.3.1) - activesupport (= 6.1.3.1) + railties (6.1.4.4) + actionpack (= 6.1.4.4) + activesupport (= 6.1.4.4) method_source - rake (>= 0.8.7) + rake (>= 0.13) thor (~> 1.0) - rake (13.0.3) - regexp_parser (2.1.1) + rake (13.0.6) + regexp_parser (2.2.0) responders (3.0.1) actionpack (>= 5.0) railties (>= 5.0) rexml (3.2.5) - rqrcode (1.2.0) + rqrcode (2.1.0) chunky_png (~> 1.0) - rqrcode_core (~> 0.2) - rqrcode_core (0.2.0) + rqrcode_core (~> 1.0) + rqrcode_core (1.2.0) rspec (3.10.0) rspec-core (~> 3.10.0) rspec-expectations (~> 3.10.0) rspec-mocks (~> 3.10.0) rspec-core (3.10.1) rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rspec-expectations (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) rspec-its (1.3.0) @@ -383,7 +401,7 @@ GEM rspec-mocks (3.10.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.10.0) - rspec-rails (5.0.1) + rspec-rails (5.1.0) actionpack (>= 5.2) activesupport (>= 5.2) railties (>= 5.2) @@ -391,9 +409,9 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.10.2) + rspec-support (3.10.3) ruby-progressbar (1.11.0) - ruby2_keywords (0.0.4) + ruby2_keywords (0.0.5) sass (3.4.25) sass-rails (6.0.0) sassc-rails (~> 2.1, >= 2.1.1) @@ -410,23 +428,23 @@ GEM simplecov-html (~> 0.11) simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) - simplecov_json_formatter (0.1.2) + simplecov_json_formatter (0.1.3) slim (4.1.0) temple (>= 0.7.6, < 0.9) tilt (>= 2.0.6, < 2.1) - slim-rails (3.2.0) + slim-rails (3.3.0) actionpack (>= 3.1) railties (>= 3.1) slim (>= 3.0, < 5.0) - spring (2.1.1) + spring (4.0.0) spring-commands-rspec (1.0.4) spring (>= 0.9.1) sprockets (4.0.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.2) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sucker_punch (3.0.1) concurrent-ruby (~> 1.0) @@ -435,13 +453,13 @@ GEM climate_control (>= 0.0.3, < 1.0) test_squad (0.1.3) rails - thor (1.1.0) + thor (1.2.1) thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.4) - tinymce-rails (5.7.1) + tinymce-rails (5.10.2) railties (>= 3.1.1) - turnip (4.2.0) + turnip (4.3.0) cucumber-gherkin (~> 14.0) rspec (>= 3.0, < 4.0) tzinfo (2.0.4) @@ -450,17 +468,19 @@ GEM execjs (>= 0.3.0, < 3) warden (1.2.9) rack (>= 2.0.9) - webmock (3.12.2) - addressable (>= 2.3.6) + webmock (3.14.0) + addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) - websocket-driver (0.7.3) + webrick (1.7.0) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.26) - zeitwerk (2.4.2) + yard (0.9.27) + webrick (~> 1.7.0) + zeitwerk (2.5.3) PLATFORMS ruby @@ -504,7 +524,7 @@ DEPENDENCIES pry-rails puma rack-cors - rails (~> 6.1.3.1) + rails (~> 6.1.0) rqrcode rspec-its rspec-rails diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index c42f03a5..5f402dd1 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -13,6 +13,11 @@ class UserController < Users::ApplicationController end def obtain_token + #user = User.find_by_email('bterkuile@gmail.com') + #sign_in user + #render layout: 'user/obtain_token' + ##render json: json_response(ok: true, auth_token: user.authentication_token, user_id: user.id) + #return if current_user.blank? case params[:provider] when 'instagram' then redirect_to user_instagram_omniauth_authorize_path diff --git a/config/environments/development.rb b/config/environments/development.rb index f49676f4..d867492c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -56,7 +56,7 @@ Qwaiter::Application.configure do #config.assets.logger = Logger.new(STDOUT) # Expands the lines which load the assets - config.assets.debug = true + config.assets.debug = false # Adds additional error checking when serving assets at runtime. # Checks for improperly declared sprockets dependencies. diff --git a/faye/Dockerfile b/faye/Dockerfile index f342ea4e..c256bde7 100644 --- a/faye/Dockerfile +++ b/faye/Dockerfile @@ -33,9 +33,13 @@ COPY faye/Gemfile /usr/src/app/ RUN bundle install COPY ./faye /usr/src/app +RUN cp /usr/src/app/ssl/rootCA.pem /etc/ssl/certs/mozo-ssl-rootCA.pem +RUN cp /usr/src/app/ssl/fullchain.pem /etc/ssl/certs/mozo-ssl-fullchain.pem +RUN update-ca-certificates ENV FAYE_PORT=9296 EXPOSE $FAYE_PORT #CMD thin start -R config.ru -p $FAYE_PORT -CMD thin start -R config.ru -p $FAYE_PORT --ssl --ssl-key-file=ssl/privkey.pem --ssl-cert-file=ssl/fullchain.pem +CMD thin start -R config.ru -p $FAYE_PORT --ssl --ssl-disable-verify +#CMD thin start -R config.ru -p $FAYE_PORT --ssl --ssl-disable-verify --ssl-key-file=ssl/privkey.pem --ssl-cert-file=ssl/fullchain.pem diff --git a/faye/Gemfile.lock b/faye/Gemfile.lock index 23235c76..6ca679a5 100644 --- a/faye/Gemfile.lock +++ b/faye/Gemfile.lock @@ -1,46 +1,46 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.3.7) - coderay (1.1.0) - cookiejar (0.3.2) - daemons (1.1.9) - em-http-request (1.1.2) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) + coderay (1.1.3) + cookiejar (0.3.3) + daemons (1.3.1) + em-http-request (1.1.7) addressable (>= 2.3.4) - cookiejar + cookiejar (!= 0.3.1) em-socksify (>= 0.3) eventmachine (>= 1.0.3) http_parser.rb (>= 0.6.0) - em-socksify (0.3.0) + em-socksify (0.3.2) eventmachine (>= 1.0.0.beta.4) - eventmachine (1.0.7) - faye (1.1.0) + eventmachine (1.2.7) + faye (1.4.0) cookiejar (>= 0.3.0) - em-http-request (>= 0.3.0) + em-http-request (>= 1.1.6) eventmachine (>= 0.12.0) - faye-websocket (>= 0.9.1) + faye-websocket (>= 0.11.0) multi_json (>= 1.0.0) rack (>= 1.0.0) websocket-driver (>= 0.5.1) - faye-websocket (0.9.2) + faye-websocket (0.11.0) eventmachine (>= 0.12.0) websocket-driver (>= 0.5.1) http_parser.rb (0.6.0) - method_source (0.8.2) - multi_json (1.10.1) - pry (0.10.1) - coderay (~> 1.1.0) - method_source (~> 0.8.1) - slop (~> 3.4) - rack (1.6.0) - slop (3.6.0) - thin (1.6.3) + method_source (1.0.0) + multi_json (1.15.0) + pry (0.14.1) + coderay (~> 1.1) + method_source (~> 1.0) + public_suffix (4.0.6) + rack (2.2.3) + thin (1.8.0) daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0) - rack (~> 1.0) - websocket-driver (0.5.1) + eventmachine (~> 1.0, >= 1.0.4) + rack (>= 1, < 3) + websocket-driver (0.7.3) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.1) + websocket-extensions (0.1.5) PLATFORMS ruby @@ -49,3 +49,6 @@ DEPENDENCIES faye pry thin + +BUNDLED WITH + 2.1.4 diff --git a/faye/rebuild-docker.sh b/faye/rebuild-docker.sh index e64ed3fe..fda5c0bc 100755 --- a/faye/rebuild-docker.sh +++ b/faye/rebuild-docker.sh @@ -5,8 +5,11 @@ pwd_dirname=$(basename $(pwd)) script_dirname="faye" arch=$(uname) -#1certs_dir="/etc/letsencrypt/live/mozo.bar" -certs_dir="/Users/bj/Library/Application Support/mkcert" +if [ $arch == "Darwin" ]; then + certs_dir="/Users/bj/Library/Application Support/mkcert" +else + certs_dir="/etc/letsencrypt/live/mozo.bar" +fi #certs_dir="/home/benjamin/mozo/mozo-user/ssl" if [ "$pwd_dirname" == "$script_dirname" ]; then echo "PWD DIRNAME: "$pwd_dirname; @@ -17,17 +20,20 @@ fi if [ -d "$certs_dir" ]; then echo "Found certificates directory, copy it to local for inclusion in the docker build" rm -rf $script_dirname/ssl - mkdir $script_dirname/ssl # Note the -L option for copy is required, since the target are symbolic links and we want the real files #if [ -f "$certs_dir/localhost-key.pem" ]; then if [ $arch == "Darwin" ]; then echo "Using Darwin localhost certificate copy https://medium.com/@matayoshi.mariano/how-to-add-ssl-to-your-localhost-with-puma-37a66a649f29" + mkdir $script_dirname/ssl cp "$certs_dir/localhost-key.pem" $script_dirname/ssl/privkey.pem cp "$certs_dir/localhost.pem" $script_dirname/ssl/fullchain.pem + cp "$certs_dir/rootCA-key.pem" $script_dirname/ssl/rootCA-key.pem + cp "$certs_dir/rootCA.pem" $script_dirname/ssl/rootCA.pem + #cp -r "$certs_dir" "$script_dirname/ssl" else echo "Using letsencrypt folder copy" # copy full directory, assuming letsencrypt - cp -rL $certs_dir $script_dirname/ssl + cp -rL "$certs_dir" "$script_dirname/ssl" fi else echo "Certs dir not found at: $certs_dir" @@ -48,7 +54,7 @@ docker build -f faye/Dockerfile -t mozo_faye . # 5. Spin up the counter container from the generated image if [ $arch == "Darwin" ]; then echo "Running the created image using the Mac Darwin port exposing" - docker run -p 9296:9296 --restart unless-stopped --detach --name=mozo_faye mozo_faye + #docker run -p 9296:9296 --restart unless-stopped --detach --name=mozo_faye mozo_faye else echo "Running the created image using network=host" docker run --network=host --restart unless-stopped --detach --name=mozo_faye mozo_faye diff --git a/lib/qwaiter/broadcaster/faye.rb b/lib/qwaiter/broadcaster/faye.rb index 4d46a34d..659e6d06 100644 --- a/lib/qwaiter/broadcaster/faye.rb +++ b/lib/qwaiter/broadcaster/faye.rb @@ -5,7 +5,7 @@ module Qwaiter @uri ||= URI.parse(Qwaiter.event_host) Net::HTTP.post_form(@uri, message: message.merge(ext: {auth_token: '6be65f9b5e7d21b8ca8de4ccfad5ba24cf40d440b370af79'}).to_json) rescue => e - Rails.logger.error("[FAYE] #{e.message}") + Rails.logger.error("[FAYE][ERROR] #{e.message}") end end end