Commit Graph

52 Commits

Author SHA1 Message Date
Pierre Mesure
40ecbe0348 Remove fallbacks = true from staging, preprod and prod 2020-02-20 11:09:55 +01:00
Julian Herrero
df4f8810c5 Define force_ssl configuration in secrets file
this is usually configured in the production.rb file (which is under
version control), the natural place to configure it is the secrets.yml
file.

Until now we were using the capistrano shared folder, but that's a bit
inconvenient since changes we've done to the production.rb file (like
changing eager_load_paths when we upgraded to Rails 5) won't take effect
after a deployment.
2019-11-12 14:47:28 +01:00
Javi Martín
bc9471b49e Define SMTP configuration in the secrets file
Since SMTP passwords should not be in a file under version control, and
they're usually configured in the production.rb file (which is under
version control), the natural place to configure it is the secrets.yml
file.

Until now we were using the capistrano shared folder, but that's a bit
inconvenient since changes we've done to the production.rb file (like
changing eager_load_paths when we upgraded to Rails 5) won't take effect
after a deployment.
2019-11-11 12:11:20 +01:00
Javi Martín
db97f9d08c Add and apply rubocop rules for empty lines
We were very inconsistent regarding these rules.

Personally I prefer no empty lines around blocks, clases, etc... as
recommended by the Ruby style guide [1], and they're the default values
in rubocop, so those are the settings I'm applying.

The exception is the `private` access modifier, since we were leaving
empty lines around it most of the time. That's the default rubocop rule
as well. Personally I don't have a strong preference about this one.


[1] https://rubystyle.guide/#empty-lines-around-bodies
2019-10-24 17:11:47 +02:00
Javier Martín
cb6539d170 Merge pull request #3537 from PierreMesure/set-locales-in-test-environment
Set locales in test environment to avoid failed specs
2019-09-11 18:43:03 +02:00
Javi Martín
f9ed186909 Add rubocop spacing rules
We were following these rules in most places; we just didn't define them
anywhere.
2019-09-10 21:04:56 +02:00
Javi Martín
488461b8ac Remove consecutive blank lines 2019-09-10 20:02:15 +02:00
Pierre Mesure
7fc4106780 Cleaning a few lines 2019-09-08 22:39:01 +02:00
Pierre Mesure
d317af572c Set locales in test environment to avoid failed specs 2019-09-08 22:39:00 +02:00
German Galia
85722eb7c4 Rename admin/debates and admin/comments to hidden 2019-06-02 19:12:26 +02:00
Julian Herrero
2ba7355b00 Add lib folder path to eager_load_paths
Because autoloading is disabled in production with Rails 5,
using autoload_paths will not load needed classes from
specified paths. The solution to this, is to ask Rails
to eager load classes.

https://sipsandbits.com/2017/02/14/upgrading-a-ruby-on-rails-application/
2019-04-29 17:45:58 -05:00
Javi Martín
825367145c Remove redundant test order option
The test order is now random by default.
2019-04-29 13:08:43 -05:00
decabeza
cb22e6cbfb Merge branch 'master' into proposal-dashboard 2019-04-23 17:12:47 +02:00
Julian Herrero
b36fdb5604 Add lib folder path to eager_load_paths
Because autoloading is disabled in production with Rails 5,
using autoload_paths will not load needed classes from
specified paths. The solution to this, is to ask Rails
to eager load classes.

https://sipsandbits.com/2017/02/14/upgrading-a-ruby-on-rails-application/
2019-04-17 17:40:56 +02:00
Julian Herrero
6e88031537 Fix several rubocop warnings
Metrics/LineLength: Line is too long.
RSpec/InstanceVariable: Use let instead of an instance variable.
Layout/TrailingBlankLines: Final newline missing.
Style/StringLiterals: Prefer double-quoted strings.
2019-04-17 17:40:56 +02:00
Juanjo Bazán
eb36b7e2e5 updates config files 2019-04-16 17:28:06 +02:00
decabeza
eda6ea7f12 Merge branch 'master' into dashboard 2019-03-26 16:45:48 +01:00
Julian Herrero
c9cdc72537 Use double quotes in config/ 2019-03-15 10:29:07 +01:00
decabeza
546105d989 Merge branch 'master' into dashboard-master 2018-10-19 01:48:37 +02:00
voodoorai2000
2892d0e1d5 Add placeholder configuration for SMTP 2018-09-13 20:38:42 +02:00
rgarcia
2995734762 Increase max cache size to 2MB
We have lots of votes in this edition of participatory budgets and the
default cache size (1MB) is not enough to hold certain cache fragments
2018-07-27 12:08:20 +02:00
Juan Salvador Pérez García
8876b285ce Fixes #229
Adds email feature for proposals dashboard
2018-07-25 13:28:44 +02:00
Semyon Pupkov
65b13f4476 Change log level in production to warn
ref: https://github.com/AyuntamientoMadrid/consul/pull/828
2017-08-08 23:42:52 +05:00
rgarcia
bb3c4c6399 adds consistency to ruby code style
Keep a blank line before and after private
Keep a blank line before and after protected
Remove extra empty line at class body end
Remove extra blank line
Add final newline
Use 2 (not 3) spaces for indentation
Use 2 (not 4) spaces for indentation
Remove space before comma
Add space after comma
Remove trailing whitespaces
Remove unnecessary spacing
Use snake_case for variable names
Do not use then for multi-line if
Remove unused block argument - i
Use the new Ruby 1.9 hash syntax
Remove unused assignment to variable
Indent when as deep as case
Align attributes
Align end with def
2016-11-15 11:18:43 +01:00
Alberto Garcia Cabeza
d24efbad60 Changes .com urls examples to .consul 2016-07-06 12:32:07 +02:00
kikito
eda47effc4 Configures tests to minimize flackyness
Reference: https://bibwild.wordpress.com/2016/02/18/struggling-towards-reliable-capybara-javascript-testing/

The only thing I did not do was removing the random order in the tests.
2016-02-24 11:37:07 +01:00
rgarcia
91f9d5e6af removes unique language for production env 2015-11-10 10:57:39 +01:00
Juanjo Bazán
cb6949e918 disables english locale in production
(temporary change until texts are ready)
2015-09-03 23:48:25 +02:00
rgarcia
7af1bc526a adds preproduction environment 2015-09-01 19:54:21 +02:00
rgarcia
0fc51bee60 adds mailer asset host for staging and production envs 2015-09-01 17:31:28 +02:00
Juanjo Bazán
574133a50b updates environments files to use dalli store 2015-08-31 20:38:52 +02:00
kikito
599ea9a19f force ssl in production 2015-08-27 14:23:34 +02:00
Raimond Garcia
9ab13abf20 Merge pull request #256 from AyuntamientoMadrid/improve_emails
Improve emails
2015-08-26 20:06:28 +02:00
Alberto Garcia Cabeza
4382a83c30 Fixes asset host for development 2015-08-26 19:43:12 +02:00
kikito
048f7c9b73 Adds bullet to dev & test, but makes it visible only on-demmand
The logs are always stored in log/bullet.log

If you run the specs with `BULLET=true bin/rspec`:
* Any feature test which makes bullet angry will fail

If you run rails with `BULLET=true bin/rails s`:
* It will print the bullet logs in both the rails log and the bullet log
* It will show a footer on each page with the N+1 queries etc.
2015-08-26 17:24:08 +02:00
rgarcia
e219e5be4d adds force ssl to staging 2015-08-26 12:22:58 +02:00
rgarcia
c13aea5f1d removes force ssl from staging 2015-08-26 12:03:28 +02:00
rgarcia
30d996da84 force ssl in staging 2015-08-26 12:00:34 +02:00
rgarcia
1a806db80d removes ssl from production env 2015-08-26 11:46:09 +02:00
rgarcia
98c6f6561c removes force ssl in staging env 2015-08-26 11:37:41 +02:00
rgarcia
65a91ae821 configures ssl for staging and production environments 2015-08-25 16:01:43 +02:00
Juanjo Bazán
7edb45b0d7 configures the null cache store in all environments
This commit allows us to use caching and Rails.cache.
Temporarily we configure the null store in all environments,
but those will probably be memcached in the future.

References #235
2015-08-24 18:51:28 +02:00
rgarcia
0e6afa941d removes ssl from staging and production envs 2015-08-21 19:27:50 +02:00
rgarcia
24d3342af2 uses server_name from secrets 2015-08-21 19:18:30 +02:00
rgarcia
8e0c2c27da uses https for staging and production envs 2015-08-21 18:54:03 +02:00
rgarcia
6d14d07e5a adds deploy secrets to staging and production envs 2015-08-21 18:52:52 +02:00
rgarcia
dbc3a6596e adds mail host for staging and production 2015-08-21 17:06:51 +02:00
rgarcia
839314868c adding staging.rb 2015-08-20 12:50:36 +02:00
Juanjo Bazán
0ca3d2501f fixes build 2015-07-31 14:54:49 +02:00
Juanjo Bazán
e2f7b9c505 adds letter_opener 2015-07-31 13:51:31 +02:00