* Add "Welcome" type to Broadcasts, allow dynamic "authoring" of Broadcasts
This adds a new `type_of` to the Broadcast model: "Welcome". As we begin to create a new "welcome notification" workflow, we'll categorize them by making them all of the same type.
This also adds a concept of a "welcoming user", which can be set via an ENV var. The WELCOMING_USER_ID will allow us to explicitly set (and change) which user in the database is the one that "sends" welcoming notification. In production, we plan for this to be dev.to/sloan.
* Allow WelcomeNotificationWorker to accept + send any kind of broadcast
This abstracts out the logic of deciding which broadcast to send from the woker into the calling method. This will help us send many different kinds of welcome notifications using one, resuable worker class.
* Raise if a Notification can't be created
* Add STAFF_USER_ID as an ENV var
This is in preparation for moving away from SiteConfig.staff_user_id, and replacing it with an ENV var. We will need to set this in production first, and then make a separate PR to replace all instances of staff_user_id with the newly-set ENV var.
* Fix logging for dev and test environments
We had some unused code for Timber in our config files for development and test.
However, this was completely clobbering Rails' default behavior of logging out to log/development.log and log/test.log. We should allow for logging in these environments in particular, and since we're not using Timber there, we can just revert to using the Rails default debugging log levels.
* Add Timber logger to specs that explicitly require it
* Restore default Rails.logger in specs using Timber logger
* Explicitly use Rails.logger in OmniauthCallbacksController
We seem to have different logger classes leaking into this controller in tests.
I'm not entirely sure why this is/haven't been able to investigate yet, but I do think we should be using the Rails.logger explicitly until we can figure that out.
* Initial work for streaming app shell way of using serviceworkers
* Close in on serviceworker adjustment finalization
* Add docs and loading indicator
* Remove useless code
* Don't run on API
* Update app/javascript/contentDisplayPolicy/hideBlockedContent.js
* Fix small details
* Don't run serviceworker.js code in test env
* Fix JS in serviceworker
* Move private keyword to proper place in async controller
* Change shell_version to HEROKU_SLUG_COMMIT
* Update caching config
* Add test for async_info/shell_version
* Start with webhooks: table and model
* Start with webhooks api
* Start with webhooks api
* Webhook::Event class and events list
* Remove commented callbacks
* Start with sending events to webhook endpoints
* A couple of tests for Articles::Creator
* Send event to webhook endpoint on article destroy
* Dispatch event on article update
* Dispatch event when an article updated from admin
* Spec for the webhook job
* One more test for the dispatch event job
* Integration-like spec for event dispatching to webhook endpoints when creating an article
* Use Addressable::URI to parse endpoint url
* Add oj as a faster fast_jsonapi backend
* Renamed serializers
* Move article serialization out of a model
* Don't allow to create a webhook event with invalid type
* Add fields for ArticleSerializer
* Fix webhook event job specs
* Specify timeout when dispatching events
* Fix webhook job spec
* Change webhook events queue name
* Change serialized article fields for the dispatchable events
* Include user data when serializing an article for webhook event
* Moved decorating out of Webhook::DispatchEvent, fixed most specs
* Fix route in ArticleSerializer
* Move Article decoration to Webhook::PayloadAdapter
* Refactor image url helpers to avoid including helpers into serializer
* Fix specs
* Default url options for production
* Improve a few idioms with their faster counterparts
* Remove unused routes and some dead code
* Add the option to use bullet in testing mode and move rack host redirect
* Go back to the classic fetch to make mocking work
* Reorder gems and fix code climate issue
* Replace Flipflop with Sail
* Address PR comments
* Bump sail version to latest
* Bump Sail to latest version
* Move setting creation to config/sail.yml
* Bump Sail to latest version
* Use correct limit for cast_type in schema
* Update Sail's route
* Initial automatic cleanup with rubocop
* Fix syntax error introduced by rubocop
* Cleanup seeds file
* Cleanup lib folder
* Exclude bin folder because it contains auto generated files
* Make Rubocop a little bit more chatty
* Block length should not include comments in the count
* Cleanup config folder
* Cleanup specs
* Updated Rubocop version and generated a todo file
* Fix broken ArticlesApi spec
* Fix tests
* Restored rubocop pre-commit hook
* Add Algolia to search and add Only My Posts filter
* Actually fix Algolia index possible issue
* Fix search issue
* Make minor adjustments to sponsorship sidebar
* Make submission rules headsup html allowed and remove devise trackable
* Remove devise_trackable from application_controller
* Adjust login CTA for /new
* Adjust string in test to reflect changes
* Quick fix for internal navigatioon draft caching issue
* Add ID to internal/articles
* Fix auth with Twitter in two places
* Added comments to algolia and modified design
* Update sidebar styles and make other small adjustments
* Clean up tag styling and other small improvements
* Finalize design adjustments
* Add indexing condition for comments
* Fix Algolia typo
* Fix Algolia indexing on comment