Commit graph

836 commits

Author SHA1 Message Date
rhymes
ae8a58fec2
[deploy] Decouple GitHub authentication from fetching GitHub issues (#7660)
* Improve error handling

* Add tests for Github::Client

* Add GithubIssue validation

* Refactor GithubIssue and fix bug with pull requests

* Improve tests

* Fix PR API URL generation

* Improve logic and get rid of the issue fragment

* Fix disappeared avatar

* Improve rendering

* Activate client side caching using Redis

* Remove unnecessary file

* Add RemoveGithubIssues data update script

* Fix comma

* Forgot to disable the approvals verify text

* Apply PR feedback
2020-05-04 16:17:16 -04: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
Anna Buianova
c734457a44
Fix finding existing podcast episode by website url (#7608) 2020-04-30 19:08:17 -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
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
Molly Struve
74e75b4067
[deploy] Rate Limit Organization Creation (#7595) 2020-04-30 10:55:37 -05: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
Molly Struve
67a1109f6b
Remove redundant user method from User Model (#7599) 2020-04-30 11:03:10 +02:00
Molly Struve
a4cc606291
[deploy] Remove Elasticsearch from Index Worker Names (#7594) 2020-04-29 12:12:29 -05: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
Molly Struve
566a3e30e9
[deploy] Remove Algolia from Reaction and Algolia Workers (#7571) 2020-04-28 15:10:56 -05:00
Yechiel Kalmenson
131d11aa73
[deploy] Add optional fields to user (#7246)
* add optional fields to user

- this provides the back-end implementation for #2365

* fix mistakes in schema.rb

* renamed OptionalField to userOptionalField

* rename field column in user_optional_fields to label

* add uniqueness validation on user_optional_field labels

* scope flag uniqueness to user_id

* add indexing on label in user_optional_fields

* add optional fields to user

- this provides the back-end implementation for #2365

* fix mistakes in schema.rb

* add index on user_id for user_optional_fields

* Remove duplicate model

* Fix schema

* Re-add past indexes

* Remove old index

* Remove another old index

* add `null:false` to columns in optional fields

* add `null: false` to the migration

- Updated test to account for the null constraint

* add null:false to user_id on user_optional_tables

Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-04-28 15:42:41 -04:00
Molly Struve
2d7f4acbbe
[deploy] Only Calculate Comment Score on Update and Create (#7574) 2020-04-28 13:35:18 -05:00
Molly Struve
d910945c74
Dont double up on cache busting and reactable updates when destroying reactions (#7568) 2020-04-28 13:34:50 -05: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
Molly Struve
ee373fa6c0
[deploy] Remove Algolia from Article Model (#7540) 2020-04-28 09:55:48 -05: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
618c3b5c75
[deploy] Add codenames proof-of-concept to /connect (#7553) 2020-04-27 19:19:12 -04:00
Rafi
bdcfba7d70
[deploy] Saving youtube url (#7516)
* Saving youtube url

* Fixing description in the spec

* Optimizing youtube logo svg

* Fixing indentation of form
2020-04-27 14:14:07 -04:00
rhymes
1c3b619583
[deploy] Fix settings billing section and other profile improvements (#7525)
* Truncate displayed username length to max length

* Better error notice

* Fix broken billing Stripe functionality

* Display server side credits purchasing errors

* Be explicit in the name of the partial

* Full name
2020-04-27 16:59:03 +02:00
rhymes
d87c3dbb18
[deploy] Improve comment posting error handling (#7519)
* Improve comment posting error handling

* Incorporate PR suggestions
2020-04-27 16:54:59 +02:00
Ben Halpern
d447d0cadf
[deploy] Update design and functionality of internal/articles (#7517)
* Update design and functionality of internal/articles

* Fix spec

* Update specs

* Fiddle with test

* Fix request spec
2020-04-26 18:27:09 -04:00
Molly Struve
a7e664fc9c
[deploy] Remove Algolia from User Model (#7454)
* Remove Algolia from User Model

* check banned on self for user

* fine have your redundant method

* remove a couple more unnecessary specs
2020-04-24 18:39:36 -04:00
Molly Struve
94f3a4b6fd
[deploy] Remove Algolia from Podcast Episodes (#7489) 2020-04-24 18:36:13 -04:00
Mac Siri
57ae315c31
[deploy] Generalize Onboarding's task-card image (#7452)
* Generalize Onboarding's task-card image

* Rename SiteConfig's onboarding_taskcard_sticker

* Add & reorganize #config_params

* Update Internal::Config's view

* Add spec
2020-04-24 10:24:50 -04:00
Molly Struve
7f98d7e54c
[deploy] Revert "Remove algolia from podcast episode model (#7453)" (#7481)
This reverts commit b29671cb7f.
2020-04-23 11:01:01 -05:00
Molly Struve
b29671cb7f
[deploy] Remove algolia from podcast episode model (#7453) 2020-04-23 10:21:37 -05:00
Ridhwana
17fdc556ee
Generalization: Replace static dev emails with configurable ones. (#7438)
* feat: update the email addresses in the site config

* chore: update the default email address everywhere

* feat: update the template for the config

* chore: remove default_site_mail as an allowed parameter

* feat: change biz@dev.to to teh business email address and with a subject

* feat: update partners@dev.to to use SiteConfig.email_addresses[:business]

* feta: update to business email address

* feat: update members@dev.to to use the site config

* feat: update privacy email

* chore: Anna's suggestion to loop through object instead of keys
2020-04-23 11:26:58 +02:00
Michael Kohl
9df68f3920
Use new classified listing categories (#7250)
* Add ClassifiedListingCategoryModel

* Add data update script for classified listing categories

* Refactor and fix specs

* Resolve conflict

* Incorporate PR feedback
2020-04-23 10:06:58 +07:00
Josh Puetz
98365c878e
Parse comment html as fragments instead of docs (#7419) 2020-04-21 15:01:44 -05:00
Molly Struve
13e8ea1f64
Ensure records are updated properly after a user merge (#7416) 2020-04-21 14:17:11 -04:00
Molly Struve
984e2647e7
only run scoring, touch_collection, and update background callbacks on create and update (#7409) 2020-04-21 10:34:59 -04:00
rhymes
e97d2ccf63
[deploy] Improve badge slug generation (#7386)
* Fix badge generation and add tests

* Add unique index to badges slug
2020-04-20 15:47:44 +02:00
Fernando Valverde
f2ee0378f9
[deploy] Decorator podcast episode metadata (#7303)
* Moves podcast episode metadata to decorator

* Updates the podcast episode metadata to use image_url

* Syntax tweaks, initializeMedia() fix for initialized audio & brought back use strict
2020-04-17 12:52:11 -06:00
rhymes
1b93666b3b
[deploy] Add user_id presence validation for Identity (#7365)
* Add user_id presence validation for Identity

* Remove duplicated validation

* Save user within build_user

* Fix typo

* Fix spec with in memory user
2020-04-17 20:02:26 +02:00
rhymes
a2893056b6
Routine rubocop fixes (#7356)
* rubocop -a

* Fix stuff

* rubocop -a again

* autocorrect
2020-04-17 15:48:39 +02:00
Ben Halpern
697c0df5b1
[deploy] Manually create channel and add users for org channels (#7346) 2020-04-16 19:13:39 -04:00
Ben Halpern
03c28a5671
[deploy] Create private group chat channel for orgs (#7270)
* WIP chat channel for orgs

* Finalize

* Enable upsert functionality for role switch

* Private group chat

* Rearrange permissions code

* fix typo
2020-04-16 17:02:06 -04:00
Andy Zhao
f5ec83653c
[deploy] Finalize and add response templates feature (#7068) 2020-04-16 15:53:29 -04:00
rhymes
0a6be8b967
[deploy] Improve some validations (#7335)
* Validations

* Fix specs

* Revert twitter tag change
2020-04-16 18:59:12 +02:00
Jitendra Rajpurohit
7656d10e2b
Generalized shop url by creating SiteConfig field for it (#7262)
* added shop_url to SiteConfig

* fixed issue in show config erb file

* add spec for shop_url SideConfig

* added spec

* handles blank shop_url case

* code review changes
2020-04-15 16:28:34 -04:00
Molly Struve
817f12c788
no need to use search_id for indexing worker (#7304) 2020-04-15 15:35:12 -04:00
rhymes
f5166e28a8
Nullify audit logs on users delete (#7275)
* Nullify audit logs on users delete

* Fix specs

* Set user as optional and test moderator audit log page

* Fix spec
2020-04-15 18:26:16 +02:00
rhymes
d6e47a03c7
[deploy] Authentication refactoring - step 1 (#7259)
* Add Authentication providers

* Making strides on refactoring

* New usr from Twitter

* Existing Twitter user

* Existing user Github

* Test skip_confirmation!

* Refactor a bit and add simplecov groups

* Test user already logged in

* Rename to Authentication::Authenticator

* Refactor to a common class

* Add existing user test for twitter login

* Refactor global handler

* Fix spec and comment Twitter provider

* Update comments and strategy TODO

* Move providers loading code to Authentication::Providers

* add SubclassResponsibility error

* Use delegation
2020-04-15 12:13:10 -04:00
Molly Struve
b10668a454
[deploy] Create a Bulk Index Elasticsearch Worker (#7265) 2020-04-15 09:08:59 -05:00
Josh Puetz
73c16c9a9d
[deploy] Tweak comments in feed (#7261)
* Only include needed fields for top comments

* Test for included user info in comments in feed

* Omit hidden and deleted comments from feed json

* Optimize selected columns from comment

* Revert field selection to prevent user n+1

* Add profile_image_90 to users in comments in feed
2020-04-14 15:23:14 -05:00
Andy Zhao
50ba93c232
[deploy] Add character limits for reported_url and message (#7283)
* Add character limits for reported_url and message

* Use one line for reported_url validation

* Revert accidental removal of index line

* Adjust length limits to account for production values
2020-04-14 15:57:21 -04:00