Commit graph

5 commits

Author SHA1 Message Date
Ben Halpern
4a28f90b29
[deploy] Fix height/width mismatch (#7485) 2020-04-23 13:38:10 -04:00
Julianna Tetreault
8b6566da6b
Allow Height and Width to be Specified in Options (#7417)
* Allow height and width to be specified in options in CloudCoverUrl

* Allow height and width to be specified in options in social_image.rb
  * Remove options from cloud_cover_url.rb in favor of social_image.rb

* Add double splat operator for height and width options in social_image.rb
  * Add double splat operator to options in application_helper.rb
  * Add options to call in article_serializer.rb

* Remove options from the CloudCOverUrl call in application_helper.rb

* Remove options from article_serializer.rb

* Add height and width variables to cl_image_path
  * Remove hardcoded height and width from social_image.rb

* Adjust width to be 500 rather than 420 in social_image.rb
2020-04-22 15:04:32 -04:00
Molly Struve
7c650dcb1c
Remove RedisRailsCache and replace with Rails.cache (#5059) [deploy] 2019-12-10 13:11:08 -06:00
jeffin sam
da2fa608c2 Move social_image cache to Redis (#4818) 2019-11-15 14:03:41 -05:00
Anna Buianova
4c9a40be41 Dispatch events to the webhook endpoints #3715 (#3872)
* 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
2019-09-07 13:17:45 -04:00