Commit graph

2854 commits

Author SHA1 Message Date
Anna Buianova
78472d1529 Send only public events to the webhook endpoints #3715 (#4046)
* Dispatch an event only when a published article is created

* Skip sending events about drafts updates

* Skip sending events when a draft is destroyed

* Fix article request spec

* Slight refactoring
2019-09-17 08:00:04 -07:00
Mac Siri
eae4fb3d88 Revert "Bump puma from 4.1.0 to 4.1.1 (#4043)"
This reverts commit f0fe6d5693.
2019-09-16 15:47:33 -04:00
dependabot-preview[bot]
0f9d471140 Bump administrate from 0.11.0 to 0.12.0 (#4045)
Bumps [administrate](https://github.com/thoughtbot/administrate) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/thoughtbot/administrate/releases)
- [Changelog](https://github.com/thoughtbot/administrate/blob/master/CHANGELOG.md)
- [Commits](https://github.com/thoughtbot/administrate/compare/v0.11.0...v0.12.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 15:07:35 -04:00
dependabot-preview[bot]
f0fe6d5693 Bump puma from 4.1.0 to 4.1.1 (#4043)
Bumps [puma](https://github.com/puma/puma) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/puma/puma/releases)
- [Changelog](https://github.com/puma/puma/blob/master/History.md)
- [Commits](https://github.com/puma/puma/compare/v4.1.0...v4.1.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 15:03:30 -04:00
dependabot-preview[bot]
00fd4d5db2 Bump addressable from 2.6.0 to 2.7.0 (#4042) [ci skip]
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.6.0 to 2.7.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.6.0...addressable-2.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 13:44:28 -04:00
dependabot-preview[bot]
a8966ebcc4 Bump rubyzip from 1.2.3 to 1.2.4 (#4044) [ci skip]
Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/rubyzip/rubyzip/releases)
- [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md)
- [Commits](https://github.com/rubyzip/rubyzip/compare/v1.2.3...v1.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 13:30:38 -04:00
dependabot-preview[bot]
49d6e848a4 Bump scout_apm from 2.5.2 to 2.6.0 (#4040)
Bumps [scout_apm](https://github.com/scoutapp/scout_apm_ruby) from 2.5.2 to 2.6.0.
- [Release notes](https://github.com/scoutapp/scout_apm_ruby/releases)
- [Changelog](https://github.com/scoutapp/scout_apm_ruby/blob/master/CHANGELOG.markdown)
- [Commits](https://github.com/scoutapp/scout_apm_ruby/compare/v2.5.2...v2.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 12:49:15 -04:00
dependabot-preview[bot]
bea6ad2a3d Bump reverse_markdown from 1.2.0 to 1.3.0 (#4041) [ci skip]
Bumps [reverse_markdown](https://github.com/xijo/reverse_markdown) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/xijo/reverse_markdown/releases)
- [Changelog](https://github.com/xijo/reverse_markdown/blob/master/CHANGELOG.md)
- [Commits](https://github.com/xijo/reverse_markdown/compare/v1.2.0...v1.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 12:48:42 -04:00
dependabot-preview[bot]
a94aa46850 Bump @github/clipboard-copy-element from 1.0.5 to 1.0.6 (#4035) [ci skip]
Bumps [@github/clipboard-copy-element](https://github.com/github/clipboard-copy-element) from 1.0.5 to 1.0.6.
- [Release notes](https://github.com/github/clipboard-copy-element/releases)
- [Commits](https://github.com/github/clipboard-copy-element/compare/1.0.5...v1.0.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 12:46:47 -04:00
dependabot-preview[bot]
aa6a2f3cf3 Bump google-api-client from 0.30.8 to 0.31.0 (#4038) [ci skip]
Bumps [google-api-client](https://github.com/google/google-api-ruby-client) from 0.30.8 to 0.31.0.
- [Release notes](https://github.com/google/google-api-ruby-client/releases)
- [Changelog](https://github.com/googleapis/google-api-ruby-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/google-api-ruby-client/compare/0.30.8...0.31.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 12:46:11 -04:00
dependabot-preview[bot]
9c3dd31f77 Bump faker from 2.2.1 to 2.3.0 (#4039) [ci skip]
Bumps [faker](https://github.com/faker-ruby/faker) from 2.2.1 to 2.3.0.
- [Release notes](https://github.com/faker-ruby/faker/releases)
- [Changelog](https://github.com/faker-ruby/faker/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faker-ruby/faker/compare/v2.2.1...v2.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 12:45:35 -04:00
dependabot-preview[bot]
a065b1d7d4 Bump eslint-config-prettier from 6.2.0 to 6.3.0 (#4033) [ci skip]
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.2.0...v6.3.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-16 12:44:54 -04:00
Bolarinwa Balogun
8d4aa8b157 Resolve inconsistent reading time estimate (#3328) 2019-09-16 10:05:07 -04:00
Mac Siri
64f70fff8f
Use build_stubbed in Policy specs (#4017) [ci skip] 2019-09-13 11:38:58 -04:00
Ben Halpern
1e8954e581
Add iframe resizer content lib (#4019) 2019-09-12 20:14:54 -07:00
Ben Halpern
4076a74cdf
Disallow banned users from updating profile, add noindex to page (#4018)
* Disallow banned users from updating profile, add noindex to page

* Fix user profile tests
2019-09-12 19:24:57 -07:00
Mac Siri
5fba3bd4b9
Improve test speed (#3957) [ci skip] 2019-09-12 16:17:20 -04:00
rhymes
a87fbe6ebf Add index to notifications.notified_at (#3999) 2019-09-12 13:11:31 -07:00
Dmitro Pochapsky
d0f615f3af Fix chat.jsx lints (#3889) 2019-09-12 09:30:59 -04:00
Yash Dave
65d706b1d0 Adjust poll's hover css (#4012) [ci skip] 2019-09-12 09:04:20 -04:00
Ben Halpern
d9634150d8
Add new mod links and tooling (#4009)
* Add new mod links and tooling

* Adjust mod page copy, test
2019-09-12 00:11:01 -04:00
Mario See
01a60b1ee9 Internal Listings: Filter by Category (#3993)
* add select tag and category param

* change filter from onchange to submit

* change options list to call from set list
2019-09-11 19:27:39 -04:00
Jacob Herrington
b00505e9f4 Replace try with safe navigation operator (#3988) [ci skip] 2019-09-11 16:16:37 -04:00
Rishabh Budhiraja
653a266141 Fix links in badge email (#4006) 2019-09-11 15:55:15 -04:00
Mac Siri
57eeceeb74
Generate doorkeeper's view (#3991) [ci skip] 2019-09-11 15:53:46 -04:00
Anna Buianova
2d04488f4d Dispatch events only to the corresponding user endpoints (#4008)
* Dispatch events only to the corresponding user endpoints

* Specify user for dispatch webhook event test to be sure

* Fix webhooks specs
2019-09-11 15:33:11 -04:00
Mario See
6be90c9ad4 Internal Listings: Fill Tweet Text (#3992)
* fill tweet with info even if user doesn't have twitter

* shorten twitter username check

access user from listing instead of finding user via id
2019-09-11 10:25:11 -04:00
Ben Halpern
590149fd48
Fix notifications past aggregation query (#3998) 2019-09-10 11:27:23 -04:00
rhymes
80e6cf4801 Notifications: increase efficiency and fix pagination offset issue (#3986)
* Increase efficiency and fix pagination offset issue

Right now we filter recently aggregated notifications at runtime, which worked before when there was no pagination, but now filtering is not a good idea combined with offset pagination because it throws off the calculations.

The filtering should be done in the SQL query before paginating, which is what we've switched to. I added a bunch of scopes to make the code clearer as well.

To avoid nesting tags I've also updated the HTML and the JS logic to insert it in the right place.

* Add explanation for hiding the load more button for new users
2019-09-10 09:43:45 -04:00
Anna Buianova
8d4991f906 Show webhooks list in internal (#3997) 2019-09-10 09:43:21 -04:00
Jacob Herrington
59e7c104f2 Remove commented code and tests (#3989) [ci skip] 2019-09-09 14:51:02 -04:00
John Curcio
1a8132f892 Fix encoding of special characters on organization page rendering (#3944) 2019-09-09 14:13:23 -04:00
dependabot-preview[bot]
869f3ea90d Bump twilio-ruby from 5.25.4 to 5.26.0 (#3978)
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.25.4 to 5.26.0.
- [Release notes](https://github.com/twilio/twilio-ruby/releases)
- [Changelog](https://github.com/twilio/twilio-ruby/blob/master/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-ruby/compare/5.25.4...5.26.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:51:10 -04:00
dependabot-preview[bot]
cde34778e4 Bump bullet from 6.0.1 to 6.0.2 (#3981) [ci skip]
Bumps [bullet](https://github.com/flyerhzm/bullet) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/flyerhzm/bullet/releases)
- [Changelog](https://github.com/flyerhzm/bullet/blob/master/CHANGELOG.md)
- [Commits](https://github.com/flyerhzm/bullet/compare/6.0.1...6.0.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:44:14 -04:00
dependabot-preview[bot]
47aad8ce1a Bump webmock from 3.6.2 to 3.7.2 (#3979) [ci skip]
Bumps [webmock](https://github.com/bblimke/webmock) from 3.6.2 to 3.7.2.
- [Release notes](https://github.com/bblimke/webmock/releases)
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.6.2...v3.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:41:22 -04:00
dependabot-preview[bot]
c6b9da1563 Bump storext from 3.0.0 to 3.1.0 (#3980) [ci skip]
Bumps [storext](https://github.com/g5/storext) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/g5/storext/releases)
- [Changelog](https://github.com/G5/storext/blob/master/CHANGELOG.md)
- [Commits](https://github.com/g5/storext/compare/v3.0.0...v3.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:28:37 -04:00
dependabot-preview[bot]
6feec161e4 Bump rouge from 3.9.0 to 3.10.0 (#3983) [ci skip]
Bumps [rouge](https://github.com/rouge-ruby/rouge) from 3.9.0 to 3.10.0.
- [Release notes](https://github.com/rouge-ruby/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rouge-ruby/rouge/compare/v3.9.0...v3.10.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:25:47 -04:00
dependabot-preview[bot]
8d8be4f93e Bump eslint-config-prettier from 6.1.0 to 6.2.0 (#3985) [ci skip]
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.1.0 to 6.2.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.1.0...v6.2.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:23:43 -04:00
dependabot-preview[bot]
95cccee98f Bump devise from 4.7.0 to 4.7.1 (#3977) [ci skip]
Bumps [devise](https://github.com/plataformatec/devise) from 4.7.0 to 4.7.1.
- [Release notes](https://github.com/plataformatec/devise/releases)
- [Changelog](https://github.com/plataformatec/devise/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plataformatec/devise/compare/v4.7.0...v4.7.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:19:17 -04:00
dependabot-preview[bot]
de57ca7db9 Bump capybara from 3.28.0 to 3.29.0 (#3975) [ci skip]
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.28.0 to 3.29.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.28.0...3.29.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 13:13:25 -04:00
Andy Zhao
c9a116db42 Fix edge case for rewarding when unpublished (#3987) 2019-09-09 12:33:50 -04:00
dependabot-preview[bot]
3a8a154e9e Bump carrierwave from 2.0.0 to 2.0.1 (#3976)
Bumps [carrierwave](https://github.com/carrierwaveuploader/carrierwave) from 2.0.0 to 2.0.1.
- [Release notes](https://github.com/carrierwaveuploader/carrierwave/releases)
- [Changelog](https://github.com/carrierwaveuploader/carrierwave/blob/master/CHANGELOG.md)
- [Commits](https://github.com/carrierwaveuploader/carrierwave/compare/v2.0.0...v2.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-09 12:25:08 -04:00
rhymes
b6c27f34fa Use a sortable unique ID for the event_id (#3972) 2019-09-09 10:15:12 -04:00
Dhananjay
ac5509e181 Update image of Algolia backend docs (#3956) [ci skip] 2019-09-09 09:45:52 -04:00
Mac Siri
14263b287d
Make markdown's mention work with italic (#3868) 2019-09-09 09:23:06 -04:00
Jacob Herrington
6443d66be4 Add missing commas [ci skip] (#3966) 2019-09-07 13:59:12 -04: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
rhymes
f7d6874956 Paginate notifications (#3948)
* Use offset instead of page and explain things

* Make load more button work

* Add tests for admin view

* Restore the previous logged out behavior

* Modernize initNotifications.js

* Revert "Modernize initNotifications.js"

This reverts commit 4a112b797d7911c4ab63ad0c0a07111b4e7abe25.

* Fix elements presence errors

* Change load-more-button to only appear if 7 or more posts (and some notification copy adjustments)
2019-09-07 11:54:30 -04:00
rhymes
61494d2343 Images uploads: fix UI for multiple images (#3958)
* Fix spacing of images button in editor v1

* Fix wording for multiple images in editor

* Update JS tests
2019-09-07 10:57:14 -04:00
Jess Lee
65fccf00a9 add rake task for fixing credit counter cache (#3962) 2019-09-06 13:08:39 -04:00