* Add proper error handling when creating a listing
* Remove accidentally committed stylesheet
* Make error text
* Preserve input values if the submission is invalid
* Add periods for consistency
* Update category cost with potential correction
* Update product cost with potential correction
* Display correct text dependent on purchaser
* Use name instead of org username
* Twitch Webhook Registration Fix
This fixes the broken twitch webhook registration. I previously added
the `to_json` when I was switching to using HTTParty and working through
WebMock. I apparently forgot to test this manually however after and
relied on the specs that had some baked in bad assumptions.
This removes the `to_json` and configures the mocking properly in the
spec setup.
I tested locally that this can now succesfully register for webhooks
with Twitch!
* Fix Webhook verification digesting as well, hardcode the specs for durability
* Refactor to use shorter digest method
* Add cache buster lines from Bens branch
* Allow users to follow podcasts
* Only display podcasts user follows
* Add main_color_hex to factory
* Fix podcast test and modify styles
* Fix tests
* Remove weird test
* create listings show route
* add link to listings
* include slug in json
* migrate test environment
* unlink listing title
* fix formatting
* remove slug data from json
* remove auto linting
* fix spacing
* add to algolia index?
* actually add index?
* fix merge conflicts?
* update query
* Social Cards Part 2
This is a follow up to part 1: https://github.com/thepracticaldev/dev.to/pull/2090.
This PR updates the og:image URLs to use the new social_preview.png urls
added in Part 1.
So that the already generated/cached images do not need to be recreated,
this sets a MIGRATION_DATETIME. Any object that has been updated after
that date will generate a new image
Objects from before that date will not. They will use the new url.
* Fix weird change made by rubocop autocorrect
* Handle organizations + users
* Run CI
* Use time with zone to be explicit about timezone
* Simplify branching in user_social_image_url method
* Fix param alignment + bump migration date
* Set up basic /manage route
* Add basic article manage page
* Add tips and finalize permissions for /manage
* Add final test and add manage button to article show
* Update failing specs
* Change format of user preferred languages
* Make sure user language settings are set by default
* Add missing expect to the user spec
* Fix users/misc template
* Move existing languages to a constant
* Remove commented user code
* Move languages out of User model
* Update preferred languages accordingly to the available languages
* Set user estimated language only if the language is available
* Fix Portuguese spelling #2582
* Get a job created that can create a webhook subscription for a twitch user login
* Remove ngork url
* Refactor add store the access token in the cache
* Get a controller stood up to recieve the webhooks. Now they just need to be processed
* Get User columns added and got webhook controller bones working
* Update the webhook job to use the User
* Add a way for the User to input their Twitch User Name. Plus a linter fix
* Delay webhook registration when profile is updated
* Don't add _ in username
* Use String columns
* Quick fix and add some more requests specs
* Specs for the webhook job
* Get a show page Twitch Live Streams. Just a straight embed of the Twitch Everything Embed UI. Works surprisingly well responsively, and works on all screen sizes
* Fix Gemfile.lock from merge issues
* Add support for expired tokens and add spec
* Add secrets to webhook registration and clean up spec to remove token logic
* Verify webhook secret and spec it
* Add rake task to enqueue webhook registration for all Users. This can be used from Heroku Scheduler
* Update the lease seconds to be for 5 days
* Actually lets do 7 so we can refresh twice a week and try to make sure that we can always miss one
* Hijack the existing Twitch logo instead of making a duplicate one
* Remove comment and replace with log line
* Remove some white space
* Log to Airbrake when webhook errors occur
* Move to passing in an id instead of User object
* Extract logic from Job to Service object
* Capitilize in the view
* Move out of models and into services
* Remove letover stub
* Remove one usage of Faraday
* Use HTTParty for all the HTTP here
The char "-" in regexp defaults a a separator for a range of character, for example: "a-z", Ruby is smart enough to understand "-_" is no range but it does emit a warning, by properly escaping the char "-" we ensure that no warning or issues can arise in the future.
* Initial classified listings work
* More work on tags
* Additional work finalizing stripe and getting the listings page along
* Finalize-ish listings 🤞
* Remove deprecated analytics role
* Make anchor tag a bit more readable
* Add OrganizationMembership table and model
* Add organization_membership associations
* Add unique indices for user_id and org_id
* Wrap update and create calls in transactions
* Remove specs of deprecated analytics_beta_tester
* be able to sort dashboard articles (#1837)
* remember to escape order clause is arel (#1837)
* add back in missing character for created_at (#1837)
* use case statement to avoid threat of injection (#1837)
* write specs to ensure sorting works for dashboard articles (#1837)
* add publish sort options, refactor sort options into articles helper (#1837)
* refactor to use model scope (#1837)
* Move estimating user language logic to a service object
* Call a service from a User#estimate_default_language!
* ActiveJob for estimating default user language
* Call ActiveJob from the User#estimate_default_language
* Handle nil user email when estimating default language
* Switch user.estimate_default_language_without_delay! to estimate_default_language! in specs