From 51f977fc8fd1aab53d7dff6569648fcda32af5f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 9 Jan 2019 07:18:00 +0000 Subject: [PATCH 1/7] Bump sidekiq from 5.2.3 to 5.2.5 Bumps [sidekiq](https://github.com/mperham/sidekiq) from 5.2.3 to 5.2.5. - [Release notes](https://github.com/mperham/sidekiq/releases) - [Changelog](https://github.com/mperham/sidekiq/blob/master/Changes.md) - [Commits](https://github.com/mperham/sidekiq/compare/v5.2.3...v5.2.5) Signed-off-by: dependabot[bot] --- Gemfile.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 52f222fc7..66fc03724 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -449,8 +449,9 @@ GEM childprocess (~> 0.5) rubyzip (~> 1.2, >= 1.2.2) sexp_processor (4.11.0) - sidekiq (5.2.3) + sidekiq (5.2.5) connection_pool (~> 2.2, >= 2.2.2) + rack (>= 1.5.0) rack-protection (>= 1.5.0) redis (>= 3.3.5, < 5) simplecov (0.12.0) From 656510855dee33c969bc02ccd4e36d928c1b463d Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Fri, 18 Jan 2019 14:20:15 +1300 Subject: [PATCH 2/7] Switch to new syntax for initing uglifier --- config/environments/production.rb | 2 +- config/environments/staging.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index b9ab1a14e..fbd4453aa 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -24,7 +24,7 @@ Rails.application.configure do config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + config.assets.js_compressor = Uglifier.new(harmony: true) # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. diff --git a/config/environments/staging.rb b/config/environments/staging.rb index aa2afd565..40b6d2607 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -20,7 +20,7 @@ Rails.application.configure do config.serve_static_files = false # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + config.assets.js_compressor = Uglifier.new(harmony: true) config.assets.css_compressor = :sass # Don't fallback to assets pipeline if a precompiled asset is missed From b6a7fa0efdc07d12e475a17f866e6dca47b28f09 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Fri, 18 Jan 2019 14:41:57 +1300 Subject: [PATCH 3/7] Force to redirect to ssl --- config/environments/production.rb | 2 +- config/environments/staging.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index fbd4453aa..e12dcdc2b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -45,7 +45,7 @@ Rails.application.configure do # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # Use the lowest log level to ensure availability of diagnostic information # when problems arise. diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 40b6d2607..9ea110901 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -34,7 +34,7 @@ Rails.application.configure do # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. - # config.force_ssl = true + config.force_ssl = true # See everything in the log (default is :info) # config.log_level = :debug From 36765808b93c695e44988e23db007bfd37bb9ca4 Mon Sep 17 00:00:00 2001 From: Awesome Code Date: Fri, 18 Jan 2019 01:21:48 +0000 Subject: [PATCH 4/7] Auto corrected by following Format Css Code --- .../stylesheets/bootstrap-accessibility.css | 83 ++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/bootstrap-accessibility.css b/app/assets/stylesheets/bootstrap-accessibility.css index abf715176..78a4eb9d1 100644 --- a/app/assets/stylesheets/bootstrap-accessibility.css +++ b/app/assets/stylesheets/bootstrap-accessibility.css @@ -1 +1,82 @@ -.btn:focus{outline:dotted 2px #000}div.active:focus{outline:dotted 1px #000}a:focus{outline:dotted 1px #000}.close:hover,.close:focus{outline:dotted 1px #000}.nav>li>a:hover,.nav>li>a:focus{outline:dotted 1px #000}.carousel-indicators li,.carousel-indicators li.active{height:18px;width:18px;border-width:2px;position:relative;box-shadow:0px 0px 0px 1px #808080}.carousel-indicators.active li{background-color:rgba(100,149,253,0.6)}.carousel-indicators.active li.active{background-color:white}.carousel-tablist-highlight{display:block;position:absolute;outline:2px solid transparent;background-color:transparent;box-shadow:0px 0px 0px 1px transparent}.carousel-tablist-highlight.focus{outline:2px solid #6495ED;background-color:rgba(0,0,0,0.4)}a.carousel-control:focus{outline:2px solid #6495ED;background-image:linear-gradient(to right, transparent 0px, rgba(0,0,0,0.5) 100%);box-shadow:0px 0px 0px 1px #000000}.carousel-pause-button{position:absolute;top:-30em;left:-300em;display:block}.carousel-pause-button.focus{top:0.5em;left:0.5em}.carousel:hover .carousel-caption,.carousel.contrast .carousel-caption{background-color:rgba(0,0,0,0.5);z-index:10}.alert-success{color:#2d4821}.alert-info{color:#214c62}.alert-warning{color:#6c4a00;background-color:#f9f1c6}.alert-danger{color:#d2322d}.alert-danger:hover{color:#a82824} +.btn:focus { + outline: dotted 2px #000; +} +div.active:focus { + outline: dotted 1px #000; +} +a:focus { + outline: dotted 1px #000; +} +.close:hover, +.close:focus { + outline: dotted 1px #000; +} +.nav > li > a:hover, +.nav > li > a:focus { + outline: dotted 1px #000; +} +.carousel-indicators li, +.carousel-indicators li.active { + height: 18px; + width: 18px; + border-width: 2px; + position: relative; + box-shadow: 0px 0px 0px 1px #808080; +} +.carousel-indicators.active li { + background-color: rgba(100, 149, 253, 0.6); +} +.carousel-indicators.active li.active { + background-color: white; +} +.carousel-tablist-highlight { + display: block; + position: absolute; + outline: 2px solid transparent; + background-color: transparent; + box-shadow: 0px 0px 0px 1px transparent; +} +.carousel-tablist-highlight.focus { + outline: 2px solid #6495ed; + background-color: rgba(0, 0, 0, 0.4); +} +a.carousel-control:focus { + outline: 2px solid #6495ed; + background-image: linear-gradient( + to right, + transparent 0px, + rgba(0, 0, 0, 0.5) 100% + ); + box-shadow: 0px 0px 0px 1px #000000; +} +.carousel-pause-button { + position: absolute; + top: -30em; + left: -300em; + display: block; +} +.carousel-pause-button.focus { + top: 0.5em; + left: 0.5em; +} +.carousel:hover .carousel-caption, +.carousel.contrast .carousel-caption { + background-color: rgba(0, 0, 0, 0.5); + z-index: 10; +} +.alert-success { + color: #2d4821; +} +.alert-info { + color: #214c62; +} +.alert-warning { + color: #6c4a00; + background-color: #f9f1c6; +} +.alert-danger { + color: #d2322d; +} +.alert-danger:hover { + color: #a82824; +} From 4be6169c934af1e6cdc2e1e5c35072d7569a24cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Fri, 18 Jan 2019 20:03:47 +0000 Subject: [PATCH 5/7] Bump jsonapi-resources from 0.9.4 to 0.9.5 Bumps [jsonapi-resources](https://github.com/cerebris/jsonapi-resources) from 0.9.4 to 0.9.5. - [Release notes](https://github.com/cerebris/jsonapi-resources/releases) - [Commits](https://github.com/cerebris/jsonapi-resources/compare/v0.9.4...v0.9.5) Signed-off-by: dependabot[bot] --- Gemfile.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 66fc03724..29fcffce2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -221,7 +221,7 @@ GEM httparty (0.16.3) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.4.0) + i18n (1.5.2) concurrent-ruby (~> 1.0) i18n-tasks (0.9.28) activesupport (>= 4.0.2) @@ -244,7 +244,7 @@ GEM railties (>= 3.2) sprockets-rails json (2.1.0) - jsonapi-resources (0.9.4) + jsonapi-resources (0.9.5) activerecord (>= 4.1) concurrent-ruby railties (>= 4.1) @@ -296,7 +296,7 @@ GEM multipart-post (2.0.0) newrelic_rpm (5.6.0.349) nio4r (2.3.1) - nokogiri (1.9.1) + nokogiri (1.10.1) mini_portile2 (~> 2.4.0) oauth (0.5.4) oauth2 (1.4.1) From 6f23a203a247daca0e1033fb6e580b353ea05b2e Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Fri, 18 Jan 2019 14:13:11 +1300 Subject: [PATCH 6/7] Switch to SendGrid (remove sparkhost) --- Gemfile | 1 - Gemfile.lock | 3 --- app.json | 2 +- config/application.yml.example | 3 --- config/environments/production.rb | 13 +++++++------ 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Gemfile b/Gemfile index c0cd21aa5..d52faad1c 100644 --- a/Gemfile +++ b/Gemfile @@ -109,7 +109,6 @@ group :production, :staging do gem 'memcachier' gem 'newrelic_rpm' gem 'rails_12factor' # supresses heroku plugin injection - gem 'sparkpost_rails' end group :development do diff --git a/Gemfile.lock b/Gemfile.lock index 29fcffce2..76383e33d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -459,8 +459,6 @@ GEM json (>= 1.8, < 3) simplecov-html (~> 0.10.0) simplecov-html (0.10.2) - sparkpost_rails (1.5.1) - rails (>= 4.0, < 5.3) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -584,7 +582,6 @@ DEPENDENCIES sass-rails selenium-webdriver sidekiq - sparkpost_rails timecop uglifier unicorn diff --git a/app.json b/app.json index fc266aded..051e2bbf9 100644 --- a/app.json +++ b/app.json @@ -41,7 +41,7 @@ "bonsai-elasticsearch", "memcachier", "newrelic", - "sparkhost" + "sendgrid" ], "buildpacks": [ { diff --git a/config/application.yml.example b/config/application.yml.example index 1ff6b5f99..e0f0f67d2 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -81,7 +81,6 @@ GROWSTUFF_EMAIL: 'noreply@dev.growstuff.org' test: GROWSTUFF_SITE_NAME: Growstuff (test) GROWSTUFF_CAPYBARA_DRIVER: poltergeist - GROWSTUFF_EMAIL: 'noreply@test.growstuff.org' # Note: there is no good way to deploy settings from Figaro to # Travis-CI. If you need env vars set there in order for tests to pass, @@ -90,9 +89,7 @@ test: staging: GROWSTUFF_SITE_NAME: Growstuff (staging) GROWSTUFF_ELASTICSEARCH: "true" - GROWSTUFF_EMAIL: 'noreply@staging.growstuff.org' production: GROWSTUFF_SITE_NAME: Growstuff GROWSTUFF_ELASTICSEARCH: "true" - GROWSTUFF_EMAIL: 'noreply@growstuff.org' diff --git a/config/environments/production.rb b/config/environments/production.rb index e12dcdc2b..7c54019bb 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -82,12 +82,13 @@ Rails.application.configure do # Growstuff configuration config.action_mailer.default_url_options = { host: ENV['MAIL_SENDER_HOST'] } - ActionMailer::Base.smtp_settings = { - port: ENV['SPARKPOST_SMTP_PORT'], - address: ENV['SPARKPOST_SMTP_HOST'], - user_name: ENV['SPARKPOST_SMTP_USERNAME'], - password: ENV['SPARKPOST_SMTP_PASSWORD'], - authentication: :login, + config.action_mailer.smtp_settings = { + user_name: ENV['SENDGRID_USERNAME'], + password: ENV['SENDGRID_PASSWORD'], + domain: ENV['GROWSTUFF_EMAIL_DOMAIN'], + address: 'smtp.sendgrid.net', + port: 587, + authentication: :plain, enable_starttls_auto: true } ActionMailer::Base.delivery_method = :smtp From f4536826963893e216d24e22d70955e5de4bdb95 Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Sat, 19 Jan 2019 12:33:58 +1300 Subject: [PATCH 7/7] Fixing sendgrid --- config/environments/production.rb | 12 ++++++------ config/environments/staging.rb | 13 +++++++------ 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 7c54019bb..95f82b4c8 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -83,12 +83,12 @@ Rails.application.configure do config.action_mailer.default_url_options = { host: ENV['MAIL_SENDER_HOST'] } config.action_mailer.smtp_settings = { - user_name: ENV['SENDGRID_USERNAME'], - password: ENV['SENDGRID_PASSWORD'], - domain: ENV['GROWSTUFF_EMAIL_DOMAIN'], - address: 'smtp.sendgrid.net', - port: 587, - authentication: :plain, + user_name: ENV['SENDGRID_USERNAME'], + password: ENV['SENDGRID_PASSWORD'], + domain: ENV['GROWSTUFF_EMAIL_DOMAIN'], + address: 'smtp.sendgrid.net', + port: 587, + authentication: :plain, enable_starttls_auto: true } ActionMailer::Base.delivery_method = :smtp diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 9ea110901..8a6ecec43 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -71,12 +71,13 @@ Rails.application.configure do # Growstuff configuration config.action_mailer.default_url_options = { host: 'staging.growstuff.org' } - ActionMailer::Base.smtp_settings = { - port: ENV['SPARKPOST_SMTP_PORT'], - address: ENV['SPARKPOST_SMTP_HOST'], - user_name: ENV['SPARKPOST_SMTP_USERNAME'], - password: ENV['SPARKPOST_SMTP_PASSWORD'], - authentication: :login, + config.action_mailer.smtp_settings = { + user_name: ENV['SENDGRID_USERNAME'], + password: ENV['SENDGRID_PASSWORD'], + domain: ENV['GROWSTUFF_EMAIL_DOMAIN'], + address: 'smtp.sendgrid.net', + port: 587, + authentication: :plain, enable_starttls_auto: true } ActionMailer::Base.delivery_method = :smtp