* 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.
* set sidekiq session to be the same as Rails to prevent forbidden UI errors
* monkey patch rack until new version is released to make Sidekiq Admin work
rails-assets.org is often down, and apparently has been down intermittently since yesterday.
In addition to this the only thing the gem does is literally to add `honeybadger.js` to the assets path:
```ruby
gem_path.join('app/assets').each_child.to_a
```
Hence we can ditch the gem and use the library directly.
* Create podcast as a user [WIP]
* Sample css for podcast form
* Nicer podcasts suggesting form
* Validate podcast feed_url
* Validate podcast main_color_hex
* Fix podcasts specs
* Fix form appearance
* Placeholder for podcast main_color_hex
* Provide a link to suggest a podcast
* Add a checkbox and a role for when a podcast is added by an owner
* Prettier checkbox in the podcasts form
* Added creator to podcasts
* Set the podcast creator
* Fix the /pod spec
* Added creator information to the internal podcast page
* Added cta class to the podcasts submit button
* Global notice when a podcast was suggested
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
`redis_store` was initially introduced to switch sessions from the cookie store to Redis in https://github.com/thepracticaldev/dev.to/pull/4004. When we introduced a dual cache store in https://github.com/thepracticaldev/dev.to/pull/4991 we forgot to use the builtin Rails cache store - [ActiveSupport::Cache::RedisCacheStore](https://guides.rubyonrails.org/caching_with_rails.html#activesupport-cache-rediscachestore) - and instead kept using the external [ActiveSupport::Cache::RedisStore] which comes from the `redis-activesupport` gem included by `redis-rails`.
The gem `redis-activesupport` contains this disclaimer:
> Rails 5.2.0 includes a Redis cache store out of the box, so you don't really need this anymore if you're generating a new Rails application. We are no longer accepting new features for this gem, only pull requests for security and compatibility fixes will be accepted.
Other reasons to use the Rails builtin cache store, other than being supported and developed are the following:
- supports and uses `hiredis` as a client if installed:
22483b86a6/activesupport/lib/active_support/cache/redis_cache_store.rb (L12-L14)
- supports compressions for keys over 1kb (that can be configured)
- is evolved with Rails itself
* Implement Datadog tracing agent and APM
* if I had a nickle....
* more double quoted strings and rubocop fixes
* put gems in the right order
* Remove skylight to prevent initializer collisions with Datadog which cause infinite loops
* remove skylight config files
* Introduce Sidekiq to the app and update RateLimitCheckerJob to use it
* fix rate limit checker spec with new sidekiq syntax
* add Sidekiq to tech stack overview
* Remove RateLimitChecker job change, add sidekiq web UI and testing support
* Feature 🚀 : Ability to delete messages in chat channels
- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime
* Minor Bug 🐞: Show message action only for current user
- User can delete or edit their own messages
* Test cases added
* Bug 🐞: Update message id for receiver
Message id was not sent to receiver by pusher
* Refactoring🛠: Message controller refactoring
* Test Cases📝 : Specs for Delete message added
* Feature 🚀 : Ability to edit messages
* Test Cases📝 : Specs for Edit message added
* Refactoring🔩: Refactoring for edit messages
* Refactoring🔩: Refactoring:2 for edit messages
* Refactoring🔩: Refactoring:2 for edit messages
* Test Cases📝 : Test Cases for edit message added
* Minor Bug 🐞: Show message action only for current user
- User can delete or edit their own messages
* Test cases added
* Bug 🐞: Update message id for receiver
Message id was not sent to receiver by pusher
* Feature 🚀 : Ability to edit messages
* Test Cases📝 : Specs for Edit message added
* Refactoring🔩: Refactoring for edit messages
* Refactoring🔩: Refactoring:2 for edit messages
* Refactoring🔩: Refactoring:2 for edit messages
* Bug Fix 🐞: Added space between edited and timestamp
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Add view for managing organizations
This adds only an index and show action for the internal/organizations
page. Eventually we'll flesh this out with features to automate the more
mechanical org management tasks.
* Use instance variable for search query
* Convert multiple expects into one
* Add pagination to organizations
* Add search spec for organizations
* Use size over count
* 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
* Move admin specs
These tests should probably be grouped together, so I moved them into a
directory called "internal"
This also encourages some additional internal tests.
* Add an internal badges controller
* Add internal view for running BadgeRewarder task
Because:
- Peter is currently running this rake task from Heroku and this is
going to make his workflow easier
- It's a step towards having a decent tool under internal for managing
badges (though I'd hesitate to call this decent)
This change adds a view and controller action to award badges in
batches, it's an improvment over the current workflow that Peter is
using, but it's still very rough around the edges.
We could definitely improve this with some error handling around the way
the BadgeRewarder works, but for now this is a net gain over how Peter
has been doing this task. I think it's worth merging as is and future
work to improve the experience and reliability of this tool can be
prioritized against other tasks.