Commit graph

95 commits

Author SHA1 Message Date
Molly Struve
23ef8b7580
Bug Fix:Fix development.rb to Correctly Detect Rails command (#12191)
* Bug Fix:Fix development.rb to Correctly Detect Rails command

* add DBConsole to dus check
2021-01-11 08:49:20 -06:00
Nick Taylor
04b91520c4
Reenable End to End Testing... Again 😄 (#11977)
* Re-eneabled e2e tests in Travis.

* Explicitly set cache_template_loading to true for action views.
2020-12-21 06:27:00 -05:00
Ben Halpern
3c297ff05e
Lengthen local caching max-age (#11970) 2020-12-20 11:08:10 -05:00
Molly Struve
025c5213d1
Refactor:Remove Deprecated SENDGRID_USERNAME and SENDGRID_PASSWORD From production.rb (#11376) 2020-11-12 09:58:10 -06:00
rhymes
38963c6629
Move TimeZoneSetter middleware in proper place (#11336)
* Move TimeZoneSetter middleware in proper place

* Use explicit naming
2020-11-09 17:11:10 +01:00
Michael Kohl
32e461c66b
Update to Ruby 2.7.2 (#10594)
* Update to Ruby 2.7.2

* Update remaining files

* Remove VERBOSE from development.rb and test.rb

* Update Ruby version for dependabot and docs

* Readd accidentally removed code
2020-11-05 16:11:09 +01:00
Molly Struve
c55bd0948f
[deploy] Flaky Spec Fix:Set TimeZone For All Spec Requests to Match Zonebie (#10891) 2020-10-19 09:24:58 -05:00
rhymes
fe75dcde1c
Routine rubocop fixes (#10478) 2020-09-29 10:14:26 -04:00
Ben Halpern
3e09a7768f
[deploy] Remove need for ENV vars during asset precompile (#10349)
* Remove need for ENV vars during asset precompile

* Add open-search test
2020-09-16 13:57:05 -04:00
Ben Halpern
3a469a99e2
[deploy] Enable admin-configured app_domain (#10206)
* Move app_domain from env var to siteconfig *within app area*

* Fix SiteConfig

* Don't change URL.domain yet

* Not use in fastly cache purge yet

* Session store magoo

* Revert domain issue

* Add SetCookie middleware

* Temporarily remove cookie middleware and release tasks

* Re-enable SetCookieDomain

* Add some more comments, get it ready for testing

* Remove host from url options and temporarily show errors

* Allow forwarded host to be cookie

* Fix typo

* Change invalidAuthenticityToken

* Properly set app domain

* Proper Fastly cache

* Remove config.app_domain

* Remove config.app_domain

* Explicitely set remember_user_token

* More play with cookies

* Fiddle with remember_user_token

* Add remember_user_token changes

* Monkeypatch devise

* Sessions controller

* Include rememberable

* Include rememberable

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Remove extra cookie code

* User sign in tweak

* Close the loop

* Experiment with carrierwave public_url

* Finalize carrierwave monkeypatch

* Remove async controller specs

* Change some tests

* Update domain test

* Remove temporary production.rb change

* modify cookie logic

* Remove unneeded changes

* Remove unneeded changes

* Explicitely pass host

* Fix linting

* Fix social image test

* Add some cookie tests

* Modify article url

* Fix canonical urls

* Fix typo

* Remove sessions controller

* Remove devise monkeypatch

* Add monkeypatch

* Remove elsif

* Update spec/helpers/application_helper_spec.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Adjust remember_cookie_sync

* Remember user token experimentation

* Fiddle with devise

* Properly configure devise

* Fix typo

* Fix formatting issue

* Add comment about middleware

* Fix typo

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Remove commented-out code

Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-09-11 09:38:34 -04:00
rhymes
2d881ef571
Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
Molly Struve
268d2fc144
[deploy] Optimization:Default Production Logging to Error (#10025) 2020-08-26 16:15:29 -05:00
Molly Struve
00ad509c3a
[deploy] Update Sendgrid to Use API Key if Present (#9981) 2020-08-24 14:20:50 -05:00
Molly Struve
e371446833
Use APP_DOMAIN Locally if Set (#9920) 2020-08-21 12:57:36 -04:00
Michael Kohl
eff28766fc
[deploy] Migrate profile data (#9750)
* Add temporary Rake task for creating profile fields

* Fix problems after splitting branch

* Add profile migration Rake task

* Add unique index to profiles

* Add migration code to users

* Be smarter about updating profiles

* Update spec

* Update Bullet config

* Fix typo

* Change temporary rake task to data update script

* Re-add profile factory and update spec

* Change private declaration to make CodeClimate happy

* Update comment

* Drop validation in favor of DB default

* Update spec
2020-08-20 11:17:57 +07:00
Ben Halpern
244d632565
Check for heroku url presence before working with it (#9866) 2020-08-19 10:01:15 -04:00
Molly Struve
0a64ac067b
[deploy] Remove ENVied Gem, Use dotenv Take 2 (#9767) 2020-08-14 12:20:47 -05:00
rhymes
e727956640
Revert "[deploy] Refactor:Remove ENVied Gem, Use dotenv Instead for Test and Development (#9621)" (#9757)
This reverts commit 1be8c72206.
2020-08-12 13:28:38 -04:00
Molly Struve
1be8c72206
[deploy] Refactor:Remove ENVied Gem, Use dotenv Instead for Test and Development (#9621)
* Refactor:Remove ENVied Gem in Favor of Default application.yml

* Copy sample_application.yml for Travis

* Create .env_sample file, Warn of missing ENV variables, ignore .env file

* Use dotenv For ENV variables and create Rake Task to Populate

* Update docs to copy .env_sample file

* make application config a bit more resilient

* update more documentation and only initialize dotenv in dev and test

* Update doc code snippet types and refactor rake task and app config

* remove push defaults

* Make initializers more resilient, remove unused ENV from travis

* Exit new rake task if application.yml does not exist, include dotenv in docs
2020-08-12 11:01:38 -04:00
rhymes
cc8bfcb5c0
Enable Rubocop 0.89 cops and fix Lint/ violations (#9709)
* Enable new Lint/ cops and run rubocop -a

* Fixing last remaining things with rubocop -a

* Enable and fix Style/ExplicitBlockArgument and Style/GlobalStdStream

* Forgot parenthesis
2020-08-10 16:57:12 +02:00
Molly Struve
8f50c2246e
[deploy] Bug Fix:Hide To Email Field and Content Field on Ahoy Messages (#9634) 2020-08-05 12:02:28 -05:00
Molly Struve
e2e034b910
[deploy] Refactor:Remove No Longer Needed Timber Logging (#9555) 2020-07-28 14:00:38 -05:00
Molly Struve
7167587de5
[deploy] Feature:Allow Log Level to be Set with ENV Variable (#9456) 2020-07-25 16:46:48 -05:00
Molly Struve
25f739b389
[deploy] Optimization:Change Log Level in Prod to Info (#9257) 2020-07-10 15:51:11 -05:00
Molly Struve
628c16fd79
[deploy] Bug Fix: Setup STDOUT Logger bc we need it (#9256) 2020-07-10 14:25:21 -05:00
rhymes
8126c5c2c1
Rubocop: Address Metrics/BlockLength violations (#9246)
* Address Metrics/BlockLength violations

* Add jbuilder to package auto correct
2020-07-10 13:53:32 -04:00
Molly Struve
8377620e31
[deploy] Refactor:Use if/else When Selecting Production Log Strategy (#9224) 2020-07-10 11:53:48 -05:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Mac Siri
9607549312
Use custom UglifierCompressor to enable source-maps (#9188) 2020-07-08 11:55:53 +02:00
Molly Struve
fbdce03712
[deploy] Feature: Filter Sensitive Data From Production Logs (#9181) 2020-07-07 09:49:57 -04:00
Josh Puetz
62fdf6f897
Let's try this again (#8747) 2020-06-17 18:34:40 -04:00
Michael Kohl
ac3c12f574
Update config.hosts for GitPod (#8677)
* fake gitpod dockerfile commit

* install ruby 2.7.1 to different directory

* remove fakevar

* affix node version to 12.16.3

* try setting explicit version

* Add GitPod workspace URL to config.hosts

Co-authored-by: snackattas <zach.attas@gmail.com>
2020-06-15 17:18:33 +02:00
Fernando Valverde
97fb2f9973
Adds config.hosts option in development environment (#8295) 2020-06-08 09:24:40 -06:00
Ernesto Tagwerker
9ea3a8c67d
Upgrade to Rails 6.0 (#7658)
* Add dual booting logic to Gemfile

This might be helpful for the Rails 6.0 upgrade project.

* Add more than one gemfile to Travis' configuration

We want to see how the application behaves with more than one Rails versions:

- Gemfile -> Rails 5.2
- Gemfile.next -> Rails 6.0

This will help us figure out what needs to be addressed before migrating to Rails 6.0.

If you want to read more about this technique (dual booting) you can check out this page: https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html

* Fix joins

* Upgrade Gemfile.next.lock

* Make sure we're installing the correct versions of gems

* Add Rails 6 notes

* Update rubocop in Gemfile.next.lock

* Fix organization spec

* Fix page_views_spec

* Add Rails 6 and run rails app:update

* Remove some tricks

* Remove Gemfile.next for now

* Fix .content_type deprecation

* Fix deprecation of .where.not NAND/NOR behavior

* Fix deprecation of parameterized emails

* Fix specs

* Remove next flag for now

* Fix spec (hopefully)

* Add wait_for_javascript

* Fix spec, thanks @maestromac!

* Try without wait for javascript hack

* Remove unnecessary bin/update

* Remove file that snuck in the rebase

* Update the vendored gems

* Replace migrate+db:setup with db:prepare

* Update vendored gems

* Fix Gemfile.lock and update vendored stuff

* Fix Gemfile.lock to be the same as master's minus the changes

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-04 11:54:25 +02:00
rhymes
db9186043e
Removed yarn integrity check (#7478) 2020-04-23 19:23:12 -04:00
Josh Puetz
ab133671e2
Supress unused eager loading warning for comment -> user (#7301) 2020-04-15 18:25:42 +02:00
Josh Puetz
802e225a07
[deploy] Add top comments to articles feed (#6988)
* Add 'top_comments' to article feed

* Only include root comments

* Cache and eagerly load top comments

* Clear top comments cache when article score is updated

* Add articles.top_comments to bullet whitelist

* Update app/models/article.rb

Co-Authored-By: rhymes <rhymesete@gmail.com>

* Remove limit in top_comments association, remove Rails caching of top comments

* Remove unnecessary test

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-04-13 10:21:03 -04:00
rhymes
9f6ce0bef3
Silence Ruby warnings in Travis (#7196) 2020-04-09 17:43:25 +02:00
Ben Halpern
a4a14a5377
[deploy] Make force_ssl an environment variable to make sure new communities can get proper ssl config. (#7090)
* Add conditional for redirect

* Force ssl

* Redis secure

* More push

* Add FORCE_SSL_IN_RAILS env var
2020-04-08 14:23:50 -04:00
rhymes
6bede2a92b
Upgrade to Ruby 2.7.0 (#5281) [deploy]
* Upgrade to Ruby 2.7.0

* Upgrade Travis's Ruby as well

* Fix conflict

* Silence all Ruby 2.7 deprecation warnings in dev mode

* Silence dev and test unless CI
2020-04-03 17:36:19 +02:00
Michael Kohl
99da2a0863
Run rails app:update for 5.2.4.2 (#6743) [deploy]
* Run rails app:update for 5.2.4.2

* Remove bin/update and disable ActiveStorage
2020-03-23 10:38:20 -04:00
Vaidehi Joshi
99c87d7a17
Replace WELCOMING_USER_ID with mascot_user_id (#6484) [deploy]
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2020-03-09 08:08:53 -07:00
rhymes
52b2a8f520
Enable caching in Redis in development (#6442) 2020-03-04 10:49:50 -05:00
rhymes
2fcdb9bcaa
Use DataUpdateScript.scripts_to_run? in development (#6309) 2020-02-26 13:34:16 -05:00
rhymes
cf11268949
Add logging to data scripts runner (#6201) 2020-02-25 13:41:43 -05:00
rhymes
9153f61ef8
Optionally log to stdout (#6230) 2020-02-21 13:56:39 -05:00
rhymes
f3c2adfa45
Routine rubocop fixes (#6138) 2020-02-18 11:21:42 -05:00
Vaidehi Joshi
76fe99b76a
Add Broadcast seeds + generator service to set up for welcome notifications (#6080)
* Add more Broadcasts to seeds for welcome notification flow

* Remove unnecessary welcoming_user_id from development config

* Add basic service class for generating appropriate broadcast per user

Eventually, this should be called from a rake task that will rely on this service to determine which broadcast, if any, is the appropriate one to send to newly signed-up users, and will enqueue a worker to create/send a welcome notification when appropriate.

* Add a few TODOs, plus some general cleanup

* Add some skipped tests for WelcomeNotification::Generator
2020-02-14 12:30:25 -08:00
Michael Kohl
f1aca16a1e
Improve Docker configuration (#6055) 2020-02-14 14:28:27 -05:00
Molly Struve
65eba740ab
Document DataUpdateScripts, Add to Deploy Process, Add Development Check (#6068) [deploy] 2020-02-14 11:45:27 -05:00