-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
278 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,4 @@ | |
.ruby-version | ||
.rspec | ||
Guardfile | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class UserMailer < ActionMailer::Base | ||
default from: ENV['MAILER_FROM'] || 'Urbem <no-responder@urbem.org>' | ||
|
||
def notify_service_request_status_change(service_request_id, previous_status_id) | ||
@service_request = ServiceRequest.find(service_request_id) | ||
@user = @service_request.requester | ||
@previous_status = Status.find(previous_status_id) | ||
mail(subject: I18n.t('mailer.subject.status_change_notification'), to: @user.email) | ||
end | ||
|
||
end | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
app/views/user_mailer/notify_service_request_status_change.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<p>Hola <b><%= @user.name || @user.email %></b>, </p> | ||
|
||
<p>Tu reporte con folio <b>#<%= @service_request.id %></b> ha cambiado de estatus <%= @previous_status.name %> a <%= @service_request.status.name %></p> | ||
|
||
<p>Puedes ver más sobre este reporte y el mensaje dejado por el administrador ingresando a la siguiente página: <%= link_to nil, service_request_url(@service_request) %></p> | ||
|
||
<p>Saludos</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# More info at https://github.com/laserlemon/figaro | ||
|
||
|
||
# Facebook credentials | ||
FACEBOOK_SECRET: '' | ||
FACEBOOK_KEY: '' | ||
|
||
# Twitter credentials | ||
TWITTER_KEY: '' | ||
TWITTER_SECRET: '' | ||
TWITTER_OAUTH_TOKEN: '' | ||
TWITTER_OAUTH_TOKEN_SECRET: '' | ||
|
||
# Sendgrid credentials | ||
SENDGRID_USERNAME: '' | ||
SENDGRID_PASSWORD: '' | ||
|
||
# Coverall creadentials | ||
COVERALLS_TOKEN: '' | ||
|
||
# From whom do I send the emails from | ||
MAILER_FROM: '' | ||
|
||
# Who's my host? | ||
HOST: '' | ||
|
||
# Redis server URL | ||
REDISCLOUD_URL: '' | ||
|
||
# S3 credentials | ||
S3_BUCKET: '' | ||
AWS_SECRET: '' | ||
AWS_KEY: '' | ||
|
||
# Google Maps credentials | ||
GOOGLE_KEY: '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
development: | ||
adapter: postgresql | ||
encoding: unicode | ||
host: localhost | ||
database: reporte_ciudadano_development | ||
pool: 5 | ||
password: | ||
|
||
test: | ||
adapter: postgresql | ||
encoding: unicode | ||
database: reporte_ciudadano_test | ||
pool: 5 | ||
password: | ||
|
||
production: | ||
adapter: postgresql | ||
encoding: unicode | ||
database: reporte_ciudadano_production | ||
pool: 5 | ||
password: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if Rails.env.production? | ||
Sidekiq.configure_server do |config| | ||
config.redis = { url: ENV["REDISCLOUD_URL"], size: 3 } | ||
|
||
database_url = ENV['DATABASE_URL'] | ||
if database_url | ||
ENV['DATABASE_URL'] = "#{database_url}?pool=20" | ||
ActiveRecord::Base.establish_connection | ||
end | ||
end | ||
|
||
Sidekiq.configure_client do |config| | ||
config.redis = {size: 1} | ||
end | ||
end | ||
|
Oops, something went wrong.