mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-13 18:55:45 -04:00
Merge branch 'dev' into upgrade/rails-5-2
This commit is contained in:
@@ -12,6 +12,7 @@ env:
|
||||
- STATIC_CHECKS=true
|
||||
global:
|
||||
- secure: "Z5TpM2jEX4UCvNePnk/LwltQX48U2u9BRc+Iypr1x9QW2o228QJhPIOH39a8RMUrepGnkQIq9q3ZRUn98RfrJz1yThtlNFL3NmzdQ57gKgjGwfpa0e4Dwj/ZJqV2D84tDGjvdVYLP7zzaYZxQcwk/cgNpzKf/jq97HLNP7CYuf4="
|
||||
- GROWSTUFF_EMAIL="noreply@test.growstuff.org"
|
||||
- GROWSTUFF_SITE_NAME="Growstuff (travis)"
|
||||
- RAILS_SECRET_TOKEN='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||
before_install:
|
||||
|
||||
51
app.json
Normal file
51
app.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "growstuff",
|
||||
"stack": "heroku-18",
|
||||
"description": "Open data project for small-scale food growers",
|
||||
"scripts": {
|
||||
"postdeploy": "bundle exec rails db:migrate db:seed"
|
||||
},
|
||||
"env": {
|
||||
"GROWSTUFF_ELASTICSEARCH": {
|
||||
"required": true
|
||||
},
|
||||
"GROWSTUFF_FACEBOOK_KEY": {
|
||||
"required": true
|
||||
},
|
||||
"GROWSTUFF_FACEBOOK_SECRET": {
|
||||
"required": true
|
||||
},
|
||||
"GROWSTUFF_FLICKR_KEY": {
|
||||
"required": true
|
||||
},
|
||||
"GROWSTUFF_FLICKR_SECRET": {
|
||||
"required": true
|
||||
},
|
||||
"GROWSTUFF_SITE_NAME": {
|
||||
"required": true
|
||||
},
|
||||
"GROWSTUFF_EMAIL": {
|
||||
"required": true
|
||||
},
|
||||
"MAIL_SENDER_HOST": {
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"formation": {
|
||||
"web": {
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
"addons": [
|
||||
"heroku-postgresql",
|
||||
"bonsai-elasticsearch",
|
||||
"memcachier",
|
||||
"newrelic",
|
||||
"sparkhost"
|
||||
],
|
||||
"buildpacks": [
|
||||
{
|
||||
"url": "heroku/ruby"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
class Notifier < ApplicationMailer
|
||||
include NotificationsHelper
|
||||
default from: "Growstuff <noreply@growstuff.org>"
|
||||
default from: "Growstuff <#{ENV['GROWSTUFF_EMAIL']}>"
|
||||
|
||||
def verifier
|
||||
unless ENV['RAILS_SECRET_TOKEN']
|
||||
|
||||
@@ -81,7 +81,7 @@ module Growstuff
|
||||
|
||||
# Growstuff-specific configuration variables
|
||||
config.currency = 'AUD'
|
||||
config.bot_email = "noreply@growstuff.org"
|
||||
config.bot_email = ENV['GROWSTUFF_EMAIL']
|
||||
config.user_agent = 'Growstuff'
|
||||
config.user_agent_email = "info@growstuff.org"
|
||||
|
||||
|
||||
@@ -75,9 +75,13 @@ GROWSTUFF_ELASTICSEARCH: "false"
|
||||
# To see current settings on Heroku, use "heroku config --app=whatever".
|
||||
##############################################################################
|
||||
|
||||
### EMAil addres for notifier and mailers to use as from
|
||||
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,
|
||||
@@ -86,7 +90,9 @@ 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'
|
||||
|
||||
@@ -5,7 +5,7 @@ Devise.setup do |config|
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
||||
config.mailer_sender = "Growstuff <noreply@growstuff.org>"
|
||||
config.mailer_sender = "Growstuff <#{ENV['GROWSTUFF_EMAIL']}>"
|
||||
|
||||
config.secret_key = ENV['RAILS_SECRET_TOKEN']
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ describe Notifier do
|
||||
mail.subject.should == notification.subject
|
||||
end
|
||||
|
||||
it 'comes from noreply@growstuff.org' do
|
||||
mail.from.should == ['noreply@growstuff.org']
|
||||
it 'comes from noreply@test.growstuff.org' do
|
||||
mail.from.should == ['noreply@test.growstuff.org']
|
||||
end
|
||||
|
||||
it 'sends the mail to the recipient of the notification' do
|
||||
@@ -26,8 +26,8 @@ describe Notifier do
|
||||
mail.subject.should == "What have you planted lately?"
|
||||
end
|
||||
|
||||
it 'comes from noreply@growstuff.org' do
|
||||
mail.from.should == ['noreply@growstuff.org']
|
||||
it 'comes from noreply@test.growstuff.org' do
|
||||
mail.from.should == ['noreply@test.growstuff.org']
|
||||
end
|
||||
|
||||
it 'sends the mail to the recipient of the notification' do
|
||||
@@ -52,8 +52,8 @@ describe Notifier do
|
||||
mail.subject.should == "#{crop.requester.login_name} has requested Ultra berry as a new crop"
|
||||
end
|
||||
|
||||
it 'comes from noreply@growstuff.org' do
|
||||
mail.from.should == ['noreply@growstuff.org']
|
||||
it 'comes from noreply@test.growstuff.org' do
|
||||
mail.from.should == ['noreply@test.growstuff.org']
|
||||
end
|
||||
|
||||
it 'sends the mail to the recipient of the notification' do
|
||||
@@ -74,8 +74,8 @@ describe Notifier do
|
||||
expect(mail.subject).to eq "Magic bean has been approved"
|
||||
end
|
||||
|
||||
it 'comes from noreply@growstuff.org' do
|
||||
expect(mail.from).to eq ['noreply@growstuff.org']
|
||||
it 'comes from noreply@test.growstuff.org' do
|
||||
expect(mail.from).to eq ['noreply@test.growstuff.org']
|
||||
end
|
||||
|
||||
it 'sends the mail to the recipient of the notification' do
|
||||
@@ -102,8 +102,8 @@ describe Notifier do
|
||||
expect(mail.subject).to eq "Fail bean has been rejected"
|
||||
end
|
||||
|
||||
it 'comes from noreply@growstuff.org' do
|
||||
expect(mail.from).to eq ['noreply@growstuff.org']
|
||||
it 'comes from noreply@test.growstuff.org' do
|
||||
expect(mail.from).to eq ['noreply@test.growstuff.org']
|
||||
end
|
||||
|
||||
it 'sends the mail to the recipient of the notification' do
|
||||
|
||||
Reference in New Issue
Block a user