Commit graph

664 commits

Author SHA1 Message Date
Molly Struve
d1e39a7dba
[deploy] Rate Limit Feedback Message Creation (#7832) 2020-05-14 12:00:22 -05:00
Alex
5b4ef24468
[deploy] Validate both images and pattern_images when creating podcasts (#7828)
* Validate both images and pattern_images

* Move image_keys to IMAGE_KEYS constant

* Use slice over select
2020-05-14 11:23:04 -04:00
Mac Siri
321b24d2a0
[deploy] Create write_articles oauth scope (#7834) 2020-05-14 09:55:53 -04:00
Juan Vasquez
9efd1d35fa
Add twitter hashtag to the site config (#7573)
* Add twitter hashtag to the site config

* Add twitter_hashtag field
2020-05-14 12:41:15 +02:00
Jacob Herrington
03bf1ac45e
Use build_stubbed where possible in tests (#7827)
I got a little sidetracked and found a few places where we could use
build_stubbed.
2020-05-14 10:56:29 +02:00
Ben Halpern
a288acf88f
[deploy] Add query-friendly article additions (Initial step) (#7794)
* Add query-friendly article additions

* Fiddle with font size

* Change from query_friendly_ to search_optimized_
2020-05-13 16:59:41 -04:00
Alex
004dbba500
[deploy] Remove logging of image data to Datadog (#7829) 2020-05-13 16:23:42 -04:00
Jacob Herrington
f388fb46e9
Handle negative reactions on comments (#7805)
It totally slipped my mind that we can create negative reactions on
comments. This PR accounts for that in the internal view that renders
negative reactions.
2020-05-13 09:27:38 -04:00
Anna Buianova
82799eb752
Remove code related to /live_articles (#7822) 2020-05-13 09:26:13 -04:00
rhymes
81fff248dd
Refactoring GitHub Repos functionality - step 1 (#7764)
* Rename find_or_create to upsert and improve validation and testing

* Add User.authenticated_through?

* Refactor settings/integrations

* Refactor profile github repositories rendering

* Refactor repos fetching

* Only fetch a single repo and improve error messages

* Remove unused code

* Cleanups

* Fix specs

* Remove trailing whitespace

* Fix spec

* Trigger Travis
2020-05-12 13:48:19 +02:00
Ben Halpern
614aaff644
[deploy] Shorten page title for unauthenticated traffic (#7738)
* Shorten page title for non-logged-in

* Update spec/requests/stories_show_spec.rb

* Fix tests
2020-05-11 18:06:27 -04:00
Molly Struve
744dea426d
Ensure Users are Authorized Before Checking Reaction Rate Limit (#7776) 2020-05-11 16:51:42 -04:00
Michael Kohl
1d578aa3ea
[deploy] Add org credit management to org mod page (#7761)
* Add org credit management to org mod page

* Fix typo
2020-05-11 16:49:05 +02:00
Sarthak Sharma
90d60bf73f
[deploy] 🚀 Feature: Ability to search discoverable channels and send request to join (#7385)
* 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

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* 🚀Feature : Ability to search Global Channels

* touch updated_at in after commit update

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* 🛠 Adding filter for new Query

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* removed unwanted code

* 🛠  Fix the Channel Name problem

* 🛠  Optimizing code further for CodeClimate

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* touch updated_at in after commit update

* 🚀Feature : Ability to search Global Channels

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* 🛠 Adding filter for new Query

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* 🛠  Fix the Channel Name problem

* 🛠  Fixing merge problem

* 🛠  Optimizing code further for CodeClimate

* updated UI for membership edit

* fixed test casses and fixed UI for chat_channel_edit

* 🛠napshots added

* test cases fixed

* 🛠 Test cases added for new component

* channel settings accesible only by mod

* 🛠 More Test cases added

* 🛠 Svg code optimized

* 🛠 Svg code optimized in videocontent

* optimized code for search query

* fix test case for query builder

* changes in joining closed channel logic

* refactored join channel

* redirect to edit channel after joining request

* changes in test case for redirect

* optimized code

* 🛠 Eslint bugs fixed

* test case fixed

* optimization

* olving channel repetition problem

* optimization of code for query builder

* changes in query builder

* test cases fixed

* 🛠 Handling reduntant data on frontend

* 🛠  Don't show data if no filter query

* 🛠 Optimized code for fixing bugs and code coverage

* 🛠  Optimizing code further for CodeClimate

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-05-11 09:29:15 -04:00
Jacob Herrington
d89f4e14d7
[deploy] Fix bug regarding negative reactions on users (#7741)
* Add tests for user and article negative reactions

* Fix weird conditonal logic

This fixes a bug that breaks the page on user vomits.
2020-05-08 17:07:10 -04:00
Molly Struve
ea1d38d3b8
[deploy] Bulk Fetch Follow Button Data for Users (#7676) 2020-05-08 13:58:58 -05:00
rhymes
b5ebf8f3dc
Routine rubocop fixes (#7743)
* Rubocop auto fixes

* Fix Capybara/VisibilityMatcher

* Regenerate todo
2020-05-08 19:38:06 +02:00
Julianna Tetreault
ab248edfe5
Refactor articles_show_spec to Better Test JSON-LD (#7733)
* Refactor articles_show_spec.rb to better test JSON data
  * Adds additional tests around JSON-LD data
  * Removes original tests for JSON-LD from articles_show_spec

* Add org data to spec to test against actual JSON-LD data
  * Removes inline variables in favor of let declarations
  * Adds and tests organization structured data
  * Removes unnecessary objs and variables from spec

* Adjust org JSON-LD description in the Stories::Controller
  * Replaces user summary with org summary in org data structure

* Capitalize the S in RSpec in articles_show_spec.rb

* Remove OR from dateModified in favor of published_timestamp
2020-05-08 10:16:41 -06:00
Jacob Herrington
a4f71c22b6
[deploy] Add automated email ownership emails (#7556)
* Add automated email ownership emails

This is task Michael does manually a lot. There are a lot of cases where
we need to validate that an individual has access to the email address
associated with their DEV account. This automates a singificant portion
of that, and hopefully we can use it in a lot of places.
2020-05-06 12:07:54 -05:00
Michael Kohl
79f1f5f0c8
Change string concatenation to interpolation (#7680)
* Change string concatenation to interpolation

* Replace more concatenation with interpolation

* Add forgotten interpolation
2020-05-06 17:13:10 +02:00
Molly Struve
3ede8912b8
[deploy] Limit Reactions Created in a 30 second Timeframe (#7683) 2020-05-06 08:30:05 -05:00
Molly Struve
56636f26c1
Dont Allow Multiple User Destroy Requests (#7685) 2020-05-06 09:01:23 -04:00
Molly Struve
caadf27288
[deploy] Rate Limit Classified Listing Creation (#7684) 2020-05-05 12:01:27 -05:00
Molly Struve
62290759e9
[deploy] Refactor Checking Rate Limits and Their Retry After settings (#7674) 2020-05-05 09:13:27 -05:00
Julianna Tetreault
d7b3b770e7
Refactor JSON-LD Within user_show_spec to Improve Testing (#7672)
* Refactor user_show_spec to check for exact JSON-LD data to improve testing
  * Extracts data out into factory objects to shorten # of lines in test
  * Extracts JSON-LD into a parsed object for more precise testing
  * Shortens test to be within the 15 line rubocop limit
  * Resolves rubocop multi-line errors

* Refactor user.update_columns to be a single method

* Add :with_all_info trait to users factory
  * Adds trait that holds all necessary info for user JSON-LD
  * Removes user.update_columns method from the user_show_spec
  * Adds the :with_all_info trait to the user in the spec

* Wrap test in rubocop:disable to resolve ExampleLength errors
  * Removes let blocks that once held extracted code
  * Adds code back to the data structure as inline code
  * Resolves even more rubocop errors... hopefully
2020-05-04 15:10:51 -06:00
rhymes
fc1cf71a3d
Fix showing "Remove OAuth" in settings with disabled identities (#7665) 2020-05-04 20:00:43 +02:00
Michael Kohl
fcd0639d2a
[deploy] Remove column and minor cleanup (#7642)
* Remove column and minor cleanup

* More cleanup

* Fix spec

* Remove category from select

* Wake up Travis

* No space for you
2020-05-03 11:52:03 -04:00
Vaidehi Joshi
692243ab50
Allow admins to configure default users to follow during onboarding (#7637) [deploy]
* Allow admins to suggest default users to follow during onboarding

Allows the onboarding "follow users" slide to be configured by admins.
Closes https://github.com/thepracticaldev/dev.to/issues/7106.

* Remove redundant safety checks, refactor specs

* Add explicit note about how suggested users are used in onboarding

* Some configs_controller cleanup and fix copypasta in configs/show template

* Fetch SiteConfig.suggested_users via before_action

* Use presence instead of empty?
2020-05-01 14:03:48 -07:00
Molly Struve
ba0ebbafa8
[deploy] RateLimit Refactor: Consolidate Logic for Checking a Limit and Raising an Error (#7636) 2020-05-01 13:31:44 -05:00
Ben Halpern
195da03edf
[deploy] Add proper 301 status to username change redirects (#7650) 2020-05-01 13:36:29 -04:00
Julianna Tetreault
0ee7b97b44
Remove Unnecessary .downcases From the Stories::Controller (#7646)
* Remove unnecessary .downcases from methods in Stories::Controller
  * Removes .downcase from methods using params[:username]
  * Removes .downcase from handle_user_or_organization_or_podcast_or_page_index
  * Removes .downcase from handle_user_index

* Add shared_examples for lowercase routing to stories_index_spec.rb

* Replace create with build in stories_index_spec.rb
2020-05-01 11:24:22 -06:00
Alex
5060652939
Validate images are files (#7639)
* Validate images are files

* Skip image validation if there aren't any images
2020-05-01 10:39:20 -04:00
Michael Kohl
46f94b135d
[deploy] Classified listings refactor part 3 (#7498)
* Ignore category column

* Move view oriented class methods to helper

* Start refactoring ClassifiedListingsToolkit

* Add attr_accessor instead of category

* Replace old category column with association

* More cleanup

* Trigger Travis

* Don't rename associations, category_slug -> category

* Indiana Kohl and the missing newline

* More refactoring and spec fixes

* Add dashboard for classified listing categories

* Remove TODO comment

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-04-30 18:57:01 -04:00
rhymes
7ebd95f193
Upgrade field_test to 0.3.2 (#7592)
* Make sure tests are testing the right thing

* Upgrade gem field_test to 0.3.2

* Fix things

* Add test

* Fix typo
2020-04-30 18:43:30 -04:00
Molly Struve
2e67cc252e
return usable error message when chat creation fails (#7629) 2020-04-30 15:49:09 -05:00
Alex
c222f78760
[deploy] Turn off broken article show spec - date time (#7634)
* Turn off broken spec

* Restore original spec
2020-04-30 15:17:07 -04:00
Vaidehi Joshi
8e555201d7
Extract onboarding + mascot configs (#7632) [deploy]
* Move onboarding-related configs into new onboarding section

* Extract mascot-related configs into a mascot section

* Update order of fields in SiteConfig model to match order in view

* Update ordering of specs for onboarding/mascot config changes
2020-04-30 11:54:23 -07:00
Alex
01d4972962
[deploy] Temporary article show date time spec fix (#7633) 2020-04-30 14:32:30 -04:00
Molly Struve
74e75b4067
[deploy] Rate Limit Organization Creation (#7595) 2020-04-30 10:55:37 -05:00
Molly Struve
1d6c1fe445
load article page AFTER updating the article (#7627) 2020-04-30 10:54:55 -05:00
rhymes
c7c498834f
[deploy] Authentication refactoring: generalize account settings (#7597)
* Rename remove_association to remove_identity and future proof its tests

* Use the signin_path everywhere

* Generalize account settings

* Use delegation
2020-04-30 17:29:53 +02:00
rhymes
014ec65e6b
Add multiple select to authentication providers configuration (#7609)
* Add multiple select to authentication providers configuration

* Remove hardcoded providers from SiteConfig
2020-04-30 17:28:08 +02:00
Julianna Tetreault
82f28a00fc
[deploy] Redirect Uppercase Routes to Lowercase Routes in the Stories::Controller (#7550)
* Add route_downcaser gem to Gemfile to make routes case-insensitive
  * Ensures paths are downcased and redirects to lowercase routes
  * Resolves SEO issue where uppercase routes do not redirect to lowercase

* Add before_action to redirect to lowercase user routes
  * Adds a before_action for the index only
  * Redirects lowercase usernames and article titles
  * Comments out route_downcaser gem in Gemfile for now

* Redirect to lowercase usernames in StoriesController#show for uppercase usernames
  * Redirects in before_action for the index method only
  * Adds nil check in #redirect_to_lowercase_username
  * Adjusts stories_index_spec.rb to be more concise
  * Removes old and unnecessary code from StoriesController and spec

* Add additional testing around lowercase name redirects and aggregate_failures

* Replace hardcoded URL with URL helper in Stories::Controller and stories_index_spec

* Fix GET request in stories_index_spec.rb

* Use upper in place of A-Z in regex in redirect_to_lowercase_username

* Revert URL helper changes and use params instead in Stories::Controller and stories_index_spec
2020-04-29 15:47:43 -04:00
rhymes
8407bf9b4e
[deploy] Authentication refactoring: cleanups (#7576)
* Use Devise registry to list available providers

* Cleanups following Devise+Omniauth docs

* More cleanups

* Use helpers

* More cleanups

* Oops, forgot to remove these specs
2020-04-29 10:33:30 -04:00
Anna Buianova
346ce44169
[deploy] Configurable meta keywords (#7591)
* Added configurable meta keywords

* Replaced hardcoded meta-keywords with the configurable ones

* Added tests for configurable meta_keywords

* Improve info for configuring meta-keywords
2020-04-29 09:40:06 -04:00
Ridhwana
a9b2508664
[deploy] Configure the community_member_label (rails console update required) (#7564)
* feat: add base site config

* chore: rename developer/developers

* feat: update to use community_member_label

* chore: amend text

* chore: update spec

* chore: extra space
2020-04-28 16:56:29 +02:00
rhymes
883eb170de
[deploy] Authentication refactoring: add available and enabled providers (#7505)
* Add Providers(.available|.enabled|.enabled?)

* Add provider_sidebar partial

* Add providers_signup_modal partial and Providers.sign_in_url

* Use path helpers

* Add providers_nav_menu partial

* Add providers_registration_form partial

* Generalize users/additional_authentication

* Refactor sign_in_path and authentication_path

* Add .official_name and fix specs

* Preload authentication providers correctly and use less Ruby magic

* Put require_dependency in the correct place
2020-04-28 16:16:28 +02:00
Ben Halpern
8f2c32249c
[deploy] Fix podcast pagination client/API mismatch (#7375)
* Fix podcast pagination API

* Adjust css for podcast header

* Adjust test

* Adjust test
2020-04-28 10:07:36 -04:00
Ridhwana
8140e46ceb
Add some placeholder pages (#7441)
* feat: add placeholders for some routes

* about_listings_url

* feat: tag-moderation

* chore: about_listings_url test

* chore: use post a job url

* chore: add pages methods

* chore: just reordered stuff

* oops forgot to save - oh man

* chore: change to single quotes

* chore: hopefully retrigger cc

* chore: update tests

* feat: PR suggestions:)

* chore: spec
2020-04-28 15:55:59 +02:00
rhymes
8b82103fd0
Escape titles to avoid encoding issues (#7535) 2020-04-27 12:27:19 -04:00