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 52f222fc7..76383e33d 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) @@ -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) @@ -458,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) @@ -583,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/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; +} 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 b9ab1a14e..95f82b4c8 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. @@ -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. @@ -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 diff --git a/config/environments/staging.rb b/config/environments/staging.rb index aa2afd565..8a6ecec43 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 @@ -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 @@ -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