Merge branch 'master' of github.com:AyuntamientoMadrid/participacion
This commit is contained in:
@@ -2,4 +2,10 @@
|
||||
recaptcha_public_key: <%= ENV["MADRID_RECAPTCHA_PUBLIC_KEY"] %>
|
||||
recaptcha_private_key: <%= ENV["MADRID_RECAPTCHA_PRIVATE_KEY"] %>
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
server_name: <%= fetch(:server_name) %>
|
||||
twitter_key: <%= ENV["TWITTER_KEY"] %>
|
||||
twitter_secret: <%= ENV["TWITTER_SECRET"] %>
|
||||
facebook_key: <%= ENV["FACEBOOK_KEY"] %>
|
||||
facebook_secret: <%= ENV["FACEBOOK_SECRET"] %>
|
||||
google_oauth2_key: <%= ENV["GOOGLE_KEY"] %>
|
||||
google_oauth2_secret: <%= ENV["GOOGLE_SECRET"] %>
|
||||
server_name: <%= fetch(:server_name) %>
|
||||
|
||||
@@ -16,6 +16,7 @@ Rails.application.configure do
|
||||
# Don't care if the mailer can't send.
|
||||
config.action_mailer.raise_delivery_errors = false
|
||||
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
|
||||
config.action_mailer.asset_host = "http://localhost:3000"
|
||||
|
||||
# Deliver emails to a development mailbox at /letter_opener
|
||||
config.action_mailer.delivery_method = :letter_opener
|
||||
@@ -44,4 +45,13 @@ Rails.application.configure do
|
||||
# config.action_view.raise_on_missing_translations = true
|
||||
|
||||
config.cache_store = :null_store
|
||||
|
||||
config.after_initialize do
|
||||
Bullet.enable = true
|
||||
Bullet.bullet_logger = true
|
||||
if ENV['BULLET']
|
||||
Bullet.rails_logger = true
|
||||
Bullet.add_footer = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -42,7 +42,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
|
||||
|
||||
# Use the lowest log level to ensure availability of diagnostic information
|
||||
# when problems arise.
|
||||
|
||||
@@ -45,4 +45,13 @@ Rails.application.configure do
|
||||
# config.action_view.raise_on_missing_translations = true
|
||||
|
||||
config.cache_store = :null_store
|
||||
|
||||
config.after_initialize do
|
||||
Bullet.enable = true
|
||||
Bullet.bullet_logger = true
|
||||
if ENV['BULLET']
|
||||
Bullet.raise = true # raise an error if n+1 query occurs
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -239,6 +239,9 @@ Devise.setup do |config|
|
||||
# Add a new OmniAuth provider. Check the wiki for more information on setting
|
||||
# up on your models and hooks.
|
||||
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
|
||||
config.omniauth :twitter, Rails.application.secrets.twitter_key, Rails.application.secrets.twitter_secret
|
||||
config.omniauth :facebook, Rails.application.secrets.facebook_key, Rails.application.secrets.facebook_secret
|
||||
config.omniauth :google_oauth2, Rails.application.secrets.google_oauth2_key, Rails.application.secrets.google_oauth2_secret
|
||||
|
||||
# ==> Warden configuration
|
||||
# If you want to use other strategies, that are not supported by Devise, or
|
||||
@@ -263,3 +266,7 @@ Devise.setup do |config|
|
||||
# so you need to do it manually. For the users scope, it would be:
|
||||
# config.omniauth_path_prefix = '/my_engine/users/auth'
|
||||
end
|
||||
|
||||
Rails.application.config.to_prepare do
|
||||
Devise::Mailer.layout "mailer" # email.haml or email.erb
|
||||
end
|
||||
@@ -55,4 +55,4 @@ es:
|
||||
not_locked: "no estaba bloqueado."
|
||||
not_saved:
|
||||
one: "1 error impidió que este %{resource} fuera guardado:"
|
||||
other: "%{count} errores impidieron que este %{resource} fuera guardado:"
|
||||
other: "%{count} errores impidieron que este %{resource} fuera guardado:"
|
||||
|
||||
@@ -6,17 +6,20 @@ en:
|
||||
submit: "Resend confirmation instructions"
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
title: "Welcome to open government"
|
||||
welcome: "Welcome"
|
||||
text: "You can confirm your account email through the link below:"
|
||||
confirm_link: "Confirm my account"
|
||||
reset_password_instructions:
|
||||
hello: "Hello"
|
||||
text: "Someone has requested a link to change your password. You can do this through the link below."
|
||||
title: Change your password
|
||||
text: "Someone has requested to change your password. You can do this through the link below:"
|
||||
change_link: "Change my password"
|
||||
ignore_text: "If you didn't request this, please ignore this email."
|
||||
info_text: "Your password won't change until you access the link above and create a new one."
|
||||
unlock_instructions:
|
||||
hello: "Hello"
|
||||
title: Your account has been locked
|
||||
info_text: "Your account has been locked due to an excessive number of unsuccessful sign in attempts."
|
||||
instructions_text: "Click the link below to unlock your account:"
|
||||
unlock_link: "Unlock my account"
|
||||
@@ -66,6 +69,13 @@ en:
|
||||
phone_number_label: "Phone number"
|
||||
password_confirmation_label: "Confirm password"
|
||||
submit: "Sign up"
|
||||
success:
|
||||
title: "Registration of organization / collective"
|
||||
thank_you: "Thank you for registering your organization or collective in the website. Now is <b>pending verification</b>."
|
||||
instructions_1_html: "We will <b>contact you soon</b> in order to verify that you represent your collective."
|
||||
instructions_2_html: "Meanwhile, <b>review your email</b>. We have sent you a <b>confirmation link to activate your account</b>."
|
||||
instructions_3_html: "When you confirm your account will then be able to participate as a non-verified organization."
|
||||
back_to_index: "Ok, go back to index"
|
||||
sessions:
|
||||
new:
|
||||
title: "Log in"
|
||||
|
||||
@@ -6,17 +6,20 @@ es:
|
||||
submit: "Reenviar instrucciones de confirmación"
|
||||
mailer:
|
||||
confirmation_instructions:
|
||||
welcome: "Bienvenido"
|
||||
title: "Bienvenido/a a gobierno abierto"
|
||||
welcome: "Bienvenido/a"
|
||||
text: "Puedes confirmar tu cuenta de correo electrónico en el siguiente enlace:"
|
||||
confirm_link: "Confirmar mi cuenta"
|
||||
reset_password_instructions:
|
||||
hello: "Hola"
|
||||
text: "Se ha solicitado un enlace para cambiar tu contraseña, puedes hacerlo en el siguiente enlace:"
|
||||
change_link: "cambiar mi contraseña"
|
||||
ignore_text: "Si tu no lo has solicitado, puedes ignorar este email"
|
||||
title: "Cambiar tu contraseña"
|
||||
text: "Se ha solicitado cambiar tu contraseña, puedes hacerlo en el siguiente enlace:"
|
||||
change_link: "Cambiar mi contraseña"
|
||||
ignore_text: "Si tu no lo has solicitado, puedes ignorar este email."
|
||||
info_text: "Tu contraseña no cambiará hasta que no accedas al enlace y la modifiques."
|
||||
unlock_instructions:
|
||||
hello: "Hola"
|
||||
title: Tu cuenta ha sido bloqueada
|
||||
info_text: "Tu cuenta ha sido bloqueada debido a un excesivo número de intentos fallidos de alta."
|
||||
instructions_text: "Sigue el siguiente enlace para desbloquear tu cuenta:"
|
||||
unlock_link: "Desbloquear mi cuenta"
|
||||
@@ -66,6 +69,13 @@ es:
|
||||
phone_number_label: "Teléfono"
|
||||
password_confirmation_label: "Confirmar contraseña"
|
||||
submit: "Registrarse"
|
||||
success:
|
||||
title: "Registro de organización / colectivo"
|
||||
thank_you: "Gracias por registrar tu colectivo en la web. Ahora está <b>pendiente de verificación</b>."
|
||||
instructions_1_html: "En breve <b>nos pondremos en contacto contigo</b> para verificar que realmente representas a este colectivo."
|
||||
instructions_2_html: "Mientras <b>revisa tu correo electrónico</b>, te hemos enviado un <b>enlace para confirmar tu cuenta</b>."
|
||||
instructions_3_html: "Una vez confirmado, podrás empezar a participar como colectivo no verificado."
|
||||
back_to_index: "Entendido, volver a la página principal"
|
||||
sessions:
|
||||
new:
|
||||
title: "Entrar"
|
||||
|
||||
@@ -61,7 +61,6 @@ en:
|
||||
zero: No votes
|
||||
one: 1 vote
|
||||
other: "%{count} votes"
|
||||
votes_weighted_score: "Total: %{score}"
|
||||
form:
|
||||
debate_title: Debate title
|
||||
title_instructions: "SBe clear and precise with the title, but make it informative"
|
||||
@@ -134,8 +133,8 @@ en:
|
||||
shared:
|
||||
tags_cloud:
|
||||
tags: Topics
|
||||
flag_as_inappropiate: Flag as inappropiate
|
||||
undo_flag_as_inappropiate: Undo flag as inappropiate
|
||||
flag_as_inappropiate: Flag as inappropriate
|
||||
undo_flag_as_inappropiate: Undo flag
|
||||
collective: Collective
|
||||
mailer:
|
||||
comment:
|
||||
@@ -148,3 +147,12 @@ en:
|
||||
all: "You are not authorized to %{action} %{subject}."
|
||||
welcome:
|
||||
last_debates: Last debates
|
||||
omniauth:
|
||||
finish_signup:
|
||||
title: Add Email
|
||||
twitter:
|
||||
sign_in: Sign in with Twitter
|
||||
facebook:
|
||||
sign_in: Sign in with Facebook
|
||||
google_oauth2:
|
||||
sign_in: Sign in with Google
|
||||
|
||||
@@ -61,7 +61,6 @@ es:
|
||||
zero: Sin votos
|
||||
one: 1 voto
|
||||
other: "%{count} votos"
|
||||
votes_weighted_score: "Total: %{score}"
|
||||
form:
|
||||
debate_title: Título del debate
|
||||
title_instructions: "Sé claro y conciso a la hora de poner un título, pero recuerda que debe explicar bien tu idea, ¡es tu carta de entrada!"
|
||||
@@ -135,7 +134,7 @@ es:
|
||||
tags_cloud:
|
||||
tags: Temas
|
||||
flag_as_inappropiate: Denunciar como inapropiado
|
||||
undo_flag_as_inappropiate: Deshacer denunciar como inapropiado
|
||||
undo_flag_as_inappropiate: Deshacer denuncia
|
||||
collective: Colectivo
|
||||
mailer:
|
||||
comment:
|
||||
@@ -148,3 +147,12 @@ es:
|
||||
all: "No tienes permiso para realizar la acción '%{action}' sobre %{subject}."
|
||||
welcome:
|
||||
last_debates: Últimos debates
|
||||
omniauth:
|
||||
finish_signup:
|
||||
title: Añade tu email
|
||||
twitter:
|
||||
sign_in: Entra con Twitter
|
||||
facebook:
|
||||
sign_in: Entra con Facebook
|
||||
google_oauth2:
|
||||
sign_in: Entra con Google
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
en:
|
||||
mailers:
|
||||
comment:
|
||||
hi: "Hello, %{recipient}"
|
||||
new_comment_by: "There'is a new comment by %{commenter}"
|
||||
hi: Hello
|
||||
title: New comment on your debate
|
||||
new_comment_by_html: "There'is a new comment by <b<%{commenter}</b> on"
|
||||
reply:
|
||||
hi: "Hello, %{recipient}"
|
||||
new_reply_by: "There'is a new reply by %{commenter} to your comment"
|
||||
hi: Hello
|
||||
title: New reply on your comment
|
||||
new_reply_by_html: "There'is a new reply by <b>%{commenter}</b> to your comment on"
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
es:
|
||||
mailers:
|
||||
comment:
|
||||
hi: "Hola, %{recipient}"
|
||||
new_comment_by: "Hay un nuevo comentario de %{commenter}"
|
||||
hi: Hola
|
||||
title: Nuevo comentario en tu debate
|
||||
new_comment_by_html: "Hay un nuevo comentario de <b>%{commenter}</b> en"
|
||||
reply:
|
||||
hi: "Hola, %{recipient}"
|
||||
new_reply_by: "Hay una nueva respuesta de %{commenter} a tu comentario"
|
||||
hi: Hola
|
||||
title: Nueva respuesta a tu comentario
|
||||
new_reply_by_html: "Hay una nueva respuesta de <b>%{commenter}</b> a tu comentario en"
|
||||
|
||||
@@ -8,7 +8,7 @@ en:
|
||||
title: Moderation
|
||||
comments:
|
||||
index:
|
||||
title: Comments flagged as inappropiate
|
||||
title: Comments flagged as inappropriate
|
||||
headers:
|
||||
flags: Flags
|
||||
updated_at: Date
|
||||
@@ -16,27 +16,27 @@ en:
|
||||
commentable: Root
|
||||
comment: Comment
|
||||
hide: Hide
|
||||
mark_as_reviewed: Mark as reviewed
|
||||
reviewed: Reviewed
|
||||
archive: Archive
|
||||
archived: Archived
|
||||
filter: Filter
|
||||
filters:
|
||||
all: All
|
||||
pending_review: Pending
|
||||
reviewed: Reviewed
|
||||
pending: Pending
|
||||
archived: Archived
|
||||
debates:
|
||||
index:
|
||||
title: Debates flagged as inappropiate
|
||||
title: Debates flagged as inappropriate
|
||||
headers:
|
||||
flags: Flags
|
||||
updated_at: Date
|
||||
title: Title
|
||||
description: Description
|
||||
actions: Actions
|
||||
hide: Hide
|
||||
mark_as_reviewed: Mark as reviewed
|
||||
reviewed: Reviewed
|
||||
archive: Archive
|
||||
archived: Archived
|
||||
filter: Filter
|
||||
filters:
|
||||
all: All
|
||||
pending_review: Pending
|
||||
reviewed: Reviewed
|
||||
|
||||
pending: Pending
|
||||
archived: Archived
|
||||
|
||||
@@ -8,7 +8,7 @@ es:
|
||||
title: Moderación
|
||||
comments:
|
||||
index:
|
||||
title: Comentarios Denunciados como Inapropiados
|
||||
title: Comentarios denunciados como inapropiados
|
||||
headers:
|
||||
flags: Denuncias
|
||||
updated_at: Fecha
|
||||
@@ -16,28 +16,27 @@ es:
|
||||
commentable: Raíz
|
||||
comment: Comentario
|
||||
hide: Ocultar
|
||||
mark_as_reviewed: Marcar como revisado
|
||||
reviewed: Revisado
|
||||
archive: Archivar
|
||||
archived: Archivado
|
||||
filter: Filtrar
|
||||
filters:
|
||||
all: Todos
|
||||
pending_review: Pendientes
|
||||
reviewed: Revisados
|
||||
pending: Pendientes
|
||||
archived: Archivados
|
||||
debates:
|
||||
index:
|
||||
title: Debates Denunciados como Inapropiados
|
||||
title: Debates denunciados como inapropiados
|
||||
headers:
|
||||
flags: Denuncias
|
||||
updated_at: Fecha
|
||||
title: Título
|
||||
description: Descripción
|
||||
actions: Acciones
|
||||
hide: Ocultar
|
||||
mark_as_reviewed: Marcar como revisado
|
||||
reviewed: Revisado
|
||||
archive: Archivar
|
||||
archived: Archivado
|
||||
filter: Filtrar
|
||||
filters:
|
||||
all: Todos
|
||||
pending_review: Pendientes
|
||||
reviewed: Revisados
|
||||
|
||||
|
||||
pending: Pendientes
|
||||
archived: Archivados
|
||||
|
||||
@@ -1,10 +1,23 @@
|
||||
Rails.application.routes.draw do
|
||||
devise_for :users, controllers: { registrations: 'users/registrations' }
|
||||
devise_for :users, controllers: {
|
||||
registrations: 'users/registrations',
|
||||
omniauth_callbacks: 'users/omniauth_callbacks'
|
||||
}
|
||||
devise_for :organizations, class_name: 'User',
|
||||
controllers: {
|
||||
registrations: 'organizations/registrations',
|
||||
sessions: 'devise/sessions'
|
||||
}
|
||||
sessions: 'devise/sessions',
|
||||
},
|
||||
skip: [:omniauth_callbacks]
|
||||
|
||||
devise_scope :organization do
|
||||
get "organizations/sign_up/success", to: "organizations/registrations#success"
|
||||
end
|
||||
|
||||
devise_scope :user do
|
||||
get :finish_signup, to: 'users/registrations#finish_signup'
|
||||
patch :do_finish_signup, to: 'users/registrations#do_finish_signup'
|
||||
end
|
||||
|
||||
# The priority is based upon order of creation: first created -> highest priority.
|
||||
# See how all your routes lay out with "rake routes".
|
||||
@@ -79,7 +92,7 @@ Rails.application.routes.draw do
|
||||
member do
|
||||
put :hide
|
||||
put :hide_in_moderation_screen
|
||||
put :mark_as_reviewed
|
||||
put :archive
|
||||
end
|
||||
end
|
||||
|
||||
@@ -87,7 +100,7 @@ Rails.application.routes.draw do
|
||||
member do
|
||||
put :hide
|
||||
put :hide_in_moderation_screen
|
||||
put :mark_as_reviewed
|
||||
put :archive
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -14,12 +14,30 @@ default: &default
|
||||
|
||||
development:
|
||||
secret_key_base: 56792feef405a59b18ea7db57b4777e855103882b926413d4afdfb8c0ea8aa86ea6649da4e729c5f5ae324c0ab9338f789174cf48c544173bc18fdc3b14262e4
|
||||
twitter_key: AAAA
|
||||
twitter_secret: BBBB
|
||||
facebook_key: AAAA
|
||||
facebook_secret: BBBB
|
||||
google_oauth2_key: AAAA
|
||||
google_oauth2_secret: BBBB
|
||||
<<: *default
|
||||
|
||||
test:
|
||||
secret_key_base: 4d5adf961ddd27aef19622d6c0b3234d555f9ee003f022b1f829c92bbe33aaee907be7feb67bd54c14a1a32512fa968565ad405971fbc41bd0797af73c26a796
|
||||
twitter_key: AAAA
|
||||
twitter_secret: BBBB
|
||||
facebook_key: AAAA
|
||||
facebook_secret: BBBB
|
||||
google_oauth2_key: AAAA
|
||||
google_oauth2_secret: BBBB
|
||||
<<: *default
|
||||
|
||||
production:
|
||||
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
||||
<<: *default
|
||||
twitter_key: <%= ENV["TWITTER_KEY"] %>
|
||||
twitter_secret: <%= ENV["TWITTER_SECRET"] %>
|
||||
facebook_key: <%= ENV["FACEBOOK_KEY"] %>
|
||||
facebook_secret: <%= ENV["FACEBOOK_SECRET"] %>
|
||||
google_oauth2_key: <%= ENV["GOOGLE_KEY"] %>
|
||||
google_oauth2_secret: <%= ENV["GOOGLE_SECRET"] %>
|
||||
<<: *default
|
||||
|
||||
Reference in New Issue
Block a user