Commit graph

2284 commits

Author SHA1 Message Date
dependabot-preview[bot]
dcd29e27a2 Bump shoulda-matchers from 4.0.1 to 4.1.0 (#3100) [ci skip]
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 4.0.1 to 4.1.0.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/master/NEWS.md)
- [Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v4.0.1...v4.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 10:59:57 -04:00
dependabot-preview[bot]
907a489ba9 Bump webmock from 3.5.1 to 3.6.0 (#3096) [ci skip]
Bumps [webmock](https://github.com/bblimke/webmock) from 3.5.1 to 3.6.0.
- [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.5.1...v3.6.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 10:49:23 -04:00
dependabot-preview[bot]
9184645fc7 Bump google-api-client from 0.30.0 to 0.30.2 (#3094) [ci skip]
Bumps [google-api-client](https://github.com/google/google-api-ruby-client) from 0.30.0 to 0.30.2.
- [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.0...0.30.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 10:30:56 -04:00
dependabot-preview[bot]
009a1e4bf6 Bump ruby-prof from 0.17.0 to 0.18.0 (#3095) [ci skip]
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 0.17.0 to 0.18.0.
- [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/v0.17.0...0.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-06-10 10:30:05 -04:00
rhymes
a8b7f6eea4 Analytics: refactoring for speed improvements (#3072)
* Use proper auth chain before checking parameters

* Refactor AnalyticsController

* Add a bunch of test and rewrite reactions counts with a single query

* Add tests for follows totals

* Use round and add more refactoring

* Add tests to group by day to fallback during refactoring

* Use group by to calculate comments count by day

* Use group by to calculate follows count by day

* Use group by to calculate reactions stats by day

* Use group by to calculate page_views stats by day

* Move calculations per day back in the cached block

* Add a few comments and a little bit of refactoring

* Add indexes (concurrently) for analytics

* Make tests more time robust

* Use a date range cache related to the requesting user or org

* Freezing time in UTC should help when tests are ran on time zones over the day line

* Remove explicit returns

* Page title is escaped, guard against that

* Move Analytics service spec in the proper place
2019-06-10 09:27:39 -04:00
rhymes
7d89a55d76 Disable Podcast episodes fetching during seeding (#3075)
After #3057, that converts from Delayed::Job to ActiveJob, podcast episodes are fetched inline during seeding, which makes the seeding process painfully slow and most of the times unsuccessful.

This PR disables the fetching during seeding. Episodes can be fetched with `rails get_podcast_episodes` task if needed for local testing.
2019-06-10 09:22:00 -04:00
Daniel Compton
f75aef42f9 Add a space between "Change meta tag" and canonical_url (#3063)
Without the space, this shows up as "Change meta tagcanonical_url".
2019-06-07 21:15:32 -04:00
Ben Halpern
b731df44ca
Add badges to key tags (#3074)
* Add badges to key tags

* Adjust vertical-align

* Fix YouTube tag mistake and refactor map to pluck
2019-06-07 19:09:43 -04:00
Desi Rottman
18d6ff0d74 Adds bug bounty link to console (#3067) [ci skip] 2019-06-07 13:58:07 -04:00
Desi Rottman
6f59431778 Adds bug bounty and security info to contact page (#3066) [ci skip] 2019-06-07 13:47:16 -04:00
Ben Kooiman-Cox
7fe6cd296b Add linuxrocks.online to Mastodon whitelist (#3068) 2019-06-07 10:02:49 -04:00
Ben Halpern
a3a9f51103
Fix improper archive redirect (#3064) 2019-06-06 17:03:59 -04:00
Andy Zhao
141c8f27d2 Clear Rails cache for destroyed comment's ancestors and destroy buffer_updates for articles (#3065)
* Touch all ancestors before destroying comment

* Destroy buffer_updates when article is destroyed
2019-06-06 17:03:39 -04:00
Mac Siri
6e1c568483 Improve ISSUE_TEMPLATE [ci skip] 2019-06-06 11:27:45 -04:00
Jess Lee
5ca069f93f Fix listings cache/indexing and add bumping feature to internal (#3053)
* wip utilize concerns

* wip concerns

* refactor listings update
2019-06-06 09:51:32 -04:00
Anna Buianova
9751e84549 Moved Podcast#pull_all_episodes to a separate ActiveJob #2952 #2497 (#3057)
* Use one PodcastFeed instance while fetching podcasts

* Moved Podcast#pull_all_episodes to a separate ActiveJob
2019-06-06 09:49:10 -04:00
Anna Buianova
8b55d32640 Rubocop fixes (#3058) 2019-06-06 09:48:14 -04:00
Anna Buianova
0ecb937875 Added rubocop-rails (#3059)
* Added rubocop-rails

* Update rubocop version in the CodeClimate config
2019-06-06 09:47:57 -04:00
Mac Siri
1ea1a30ca7
Remove js-yaml.js (#3054) 2019-06-05 21:27:39 -04:00
Andy Zhao
982658d3ab Remove switch organizations tab from settings and clear Rails cache for PUT /admin/organizations (#3045)
* Remove switch organization functionality

* Touch profile_updated_at when updating org
2019-06-05 19:01:34 -04:00
Ben Halpern
df44cbd254
Change design of main feed CTA and remove from tag pages (#3050)
* Change design of main feed CTA and remove from tag pages (to prevent complexity)

* Lock Chromedriver to 74.0.3729.6

* Fix tests and modify reserved words (tack on)

* Removed less useful shared examples from rspec

* Remove references to file that no longer exists in test

* Remove unneeded tests
2019-06-05 14:33:22 -04:00
Samyuktha J
8e7bfe3cec Format issue label in CONTRIBUTING.md (#3048) [ci skip] 2019-06-05 12:54:37 -04:00
Andy Zhao
a55bce99ac Cache bust banished users' posts after the posts are deleted (#3044)
* Bust article caches after they've been deleted

* Use less instances of cachebuster class
2019-06-04 15:04:30 -04:00
Mac Siri
40832602ce
Add Vulnerability disclosure to README (#3043) [ci skip] 2019-06-04 14:52:53 -04:00
Anna Buianova
f6bb00a26a Add specs for the PodcastFeed #2952 (#3039) [ci skip] 2019-06-04 14:50:25 -04:00
briwa
7c254dc8bf Remove an extra @ in Connect (#3040) [ci skip] 2019-06-04 14:43:37 -04:00
Ben Halpern
119d0f69d6
Finalize multi-org features (#3041)
* Finalize multi-org features

* Fix credits count issues

* Only show org list if multiple orgs on dashboard

* Add check for organizations to JS
2019-06-04 13:56:22 -04:00
Mac Siri
0ebf4232fb
Update stale.yml [ci skip] 2019-06-04 10:41:55 -04:00
Andy Zhao
47d9ec27fb Allow users to belong to multiple orgs (#2583)
* Allow user to have many orgs

* Allow users to handle multi orgs in settings

* Make rounded buttons inline

* Add multi org function to dashboards

* Fix merge conflicts

* Fix mistake in merge conflict fix oops

* Display the correct membership level

* Fix accessibility issues

* Display organizations for article editors

* Handle submitting org id with preact editors

* Make listings work with multiple organizations

* Allow listings to have multiple orgs on create

* Display the correct number of credits for each org

* Move script tag to Webpack

* Allow multi orgs for purchasing and viewing credits

* Use OrganizationMembership as authorization check

* Display multiple organizations for notifications

* Allow dashboard to be viewable under multi-orgs

* Remove unused method

* Add multi-org functionality for article editors

* Show pro dashboard buttons for member+ org levels

* Leave the correct organization

* Allow article API to change org id

* Add left-out authorization method oops

* Make nav buttons a bit more clear

* Fix merge conflict

* Fix adding org id for /api/articles and tests

* Fix tests for org policy

* Use proper logic for displaying org members

* Update org actions with new authorization

* Use correct org when creating a listing

* Remove additional payment charge oops

* Mark org notifications as read with authorization

* Remove deprecated post_as_organization attribute

* Use new org_admin syntax

* Remove deprecated org logic for article create and update

* Default all RSS posts to not belong to any org

* Render org_member page for guest users

* Update org policy spec to work with multi orgs

* Use org_membership for org traits and move identity code

* Use org_member trait

* Update to work with multi-orgs

* Validate article's org_id if param org_id is blank

* Make  a let variable

* Remove unnecessary eager load for credits

* Fix HTML structure and org logic for non-org users

* Update credits spec for multi-org

* Add test for failed payment when purchased by org

* Lint listings_spec

* Test that the listing was created under the user

* Add tests for POST /listings multi-org

* Use double quotes for classes

* Fix /manage and a few other multi-org bugs

* Fix test for multi org

* Use correct method SQL exists? not Rails exist?

* Fix reads spec for multi-org

* Fix org_controller actions to work with multi org

* Test only multi org and not old usage and fix leave_org

* Fix org showing user profile img test for multi-org

* Fix org logic for users with no orgs

* Remove switch org functionality

* Update tests and add hidden param for org id

* Redirect to the specific organization

* Test other org button actions

* Use settings_notice instead of legacy notice and refactor

* Fix weird extra end issue prob from merge conflicts

* Test for with new flash key

* Fix user_views_org tests for multi-org

* Test for new flash message

* Update snapshot with new a11y html

* Move styling to stylesheet

* Add site admins functionality

* Move org_member? method in user model and refactor

* Use unspent_credits_count for organizations

* Add tests for /listings/new and minor bug fixes

* Use .present? in case of empty array

* Fix a lingering deprecated method

* Use greater than 1 for random numbers

* Add tests for counting spent and unspent credits
2019-06-04 09:30:52 -04:00
Andy Zhao
c2d3384f80 Fix 404 issue when submitting abuse report (#3038) 2019-06-03 19:24:24 -04:00
Mac Siri
cea77663ad Fix flaky editor spec & change dev configs (#3022)
* Update .simplecov

* Downgrade factory_bot_rails

* Update flaky test

* Update .travis.yml

* Update user_edits_an_article_spec
2019-06-03 15:01:05 -04:00
Mario See
6bbdb73019 adjust spacing and hide scrollbar (#3027) 2019-06-03 15:00:22 -04:00
dependabot-preview[bot]
7be0b56469 Bump vcr from 4.0.0 to 5.0.0 (#3030)
Bumps [vcr](https://github.com/vcr/vcr) from 4.0.0 to 5.0.0.
- [Release notes](https://github.com/vcr/vcr/releases)
- [Changelog](https://github.com/vcr/vcr/blob/master/CHANGELOG.md)
- [Upgrade guide](https://github.com/vcr/vcr/blob/master/Upgrade.md)
- [Commits](https://github.com/vcr/vcr/compare/v4.0.0...v5.0.0)
2019-06-03 14:52:48 -04:00
dependabot-preview[bot]
9d7bfc7a7d Bump rubyzip from 1.2.2 to 1.2.3 (#3028)
Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 1.2.2 to 1.2.3.
- [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.2...v1.2.3)
2019-06-03 14:50:35 -04:00
dependabot-preview[bot]
ae94dc82bf Bump activerecord-import from 1.0.1 to 1.0.2 (#3032) [ci skip]
Bumps [activerecord-import](https://github.com/zdennis/activerecord-import) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/zdennis/activerecord-import/releases)
- [Changelog](https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zdennis/activerecord-import/compare/v1.0.1...v1.0.2)
2019-06-03 13:51:51 -04:00
dependabot-preview[bot]
d01becf7a2 Bump rubocop from 0.70.0 to 0.71.0 (#3031) [ci skip]
Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.70.0 to 0.71.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.70.0...v0.71.0)
2019-06-03 13:49:10 -04:00
dependabot-preview[bot]
7d796428fd Bump twilio-ruby from 5.23.0 to 5.23.1 (#3033) [ci skip]
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.23.0 to 5.23.1.
- [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.23.0...5.23.1)
2019-06-03 13:46:51 -04:00
dependabot-preview[bot]
e6d558a3dd Bump capybara from 3.20.2 to 3.22.0 (#3034) [ci skip]
Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.20.2 to 3.22.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.20.2...3.22.0)
2019-06-03 13:46:13 -04:00
dependabot-preview[bot]
f861e880f8 Bump jsdom from 15.1.0 to 15.1.1 (#3036) [ci skip]
Bumps [jsdom](https://github.com/jsdom/jsdom) from 15.1.0 to 15.1.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/15.1.0...15.1.1)
2019-06-03 13:44:38 -04:00
Charles Stover
f8e31f6865 https URLs by default (#3019)
This was so upsetting I fixed it on mobile.
2019-06-01 10:16:23 -04:00
Alireza Zekavat Fetrat
4d3203be82 Fixes inappropriate comment header background bug #3020 (#3021) 2019-06-01 10:01:22 -04:00
Ben Halpern
10151f9f4c
Fix close modal click action (#3018) 2019-06-01 10:00:42 -04:00
Mario See
8359ab555f Add reading time to reading list (#2929)
* init

- add reading_time to reactions
- make migration
- add to algolia index in reaction model
- add method in reaction model to define reading time based on reactable reading time

* add time to front end

* Revert "Return errors instead of raising an exception on ArticleCreation (#2922)"

This reverts commit 09a99d93a3.

* Revert "init"

This reverts commit 53650ebcc3c93c54e396977f7c34f7aa35a589c4.

* Revert "Revert "Return errors instead of raising an exception on ArticleCreation (#2922)""

This reverts commit e8cf1f3a290dd06b937247e3ff7593e7c7036553.

* Update reaction.rb

* remove duplicate searchableAttribute
2019-05-31 16:45:29 -04:00
Ben Halpern
1775f42cc4
Finalize DEV Connect for listings (#3016) 2019-05-31 15:22:59 -04:00
Mario See
19b46a86e2 Add messaging option in listings (#2854)
* add prop for message modal method

* clean up comments from open inbox method

* add inbox type to listing model author

* add sample methods for opening message modal in listings and listing modal

* only show for users with open inbox and hide for self

* use contact_via_connect instead of inbox_type

* fix edit listing to include contact via connect attribute

* wip send message method

* adjust message styling

* change id name

* update destination

* remove unused methods
2019-05-31 13:48:45 -04:00
rhymes
36ad407c1d Fix zen mode's global key bug (#2969) 2019-05-31 13:33:29 -04:00
briwa
b301bf8def fix(article): scroll to top when inserting image (#2998) 2019-05-31 10:29:42 -04:00
Mohammadjavad Raadi
2e8eda4974 Fixes Listing Items Spacing Inconsistency and Content Overflow Issue #2846 (#3011) 2019-05-31 09:02:32 -04:00
briwa
b35fc23a82 refactor(svgs): remove empty group tags (#3002)
* refactor(svgs): remove empty group tags

* fix(spec): update liquid tag twitter spec
2019-05-31 08:54:31 -04:00
Anna Buianova
a7332846df Validate on creating a reaction notification (#3010) 2019-05-31 07:30:17 -04:00