Commit graph

392 commits

Author SHA1 Message Date
Ben Halpern
5891b2ea58
Add application "page" model (#2657)
* Generate page model

* Add page model

* Conditionally modify html rendering
2019-05-02 18:24:06 -04:00
Ben Halpern
821d45104a
Create serialized cached user and cached organization for articles (#2658)
* Create cached user and cached organization for articles

* Remove pages table
2019-05-02 14:42:28 -04:00
Jess Lee
5e193fdcd7 Create listings permalink (#2637)
* create listings show route

* add link to listings

* include slug in json

* migrate test environment

* unlink listing title

* fix formatting

* remove slug data from json

* remove auto linting

* fix spacing

* add to algolia index?

* actually add index?

* fix merge conflicts?

* update query
2019-05-02 14:14:40 -04:00
Ben Halpern
f0663d83ca
Add nightmode image (#2640) 2019-05-01 15:14:18 -04:00
Anna Buianova
065ef29e31 Added unique index to notifications #2124 (#2213)
* Added unique index to notifications #2124

* Fix migration + add index to schema.rb

* Shoulda matcher notification unique validation
2019-05-01 13:15:06 -04:00
Anna Buianova
b50c2d333d Add indexes to classified_listings (#2624) 2019-04-30 09:35:30 -04:00
Corey Alexander
ec388804df Embed Twitch Live Streaming (#2591)
* Get a job created that can create a webhook subscription for a twitch user login

* Remove ngork url

* Refactor add store the access token in the cache

* Get a controller stood up to recieve the webhooks. Now they just need to be processed

* Get User columns added and got webhook controller bones working

* Update the webhook job to use the User

* Add a way for the User to input their Twitch User Name. Plus a linter fix

* Delay webhook registration when profile is updated

* Don't add _ in username

* Use String columns

* Quick fix and add some more requests specs

* Specs for the webhook job

* Get a show page Twitch Live Streams. Just a straight embed of the Twitch Everything Embed UI. Works surprisingly well responsively, and works on all screen sizes

* Fix Gemfile.lock from merge issues

* Add support for expired tokens and add spec

* Add secrets to webhook registration and clean up spec to remove token logic

* Verify webhook secret and spec it

* Add rake task to enqueue webhook registration for all Users. This can be used from Heroku Scheduler

* Update the lease seconds to be for 5 days

* Actually lets do 7 so we can refresh twice a week and try to make sure that we can always miss one

* Hijack the existing Twitch logo instead of making a duplicate one

* Remove comment and replace with log line

* Remove some white space

* Log to Airbrake when webhook errors occur

* Move to passing in an id instead of User object

* Extract logic from Job to Service object

* Capitilize in the view

* Move out of models and into services

* Remove letover stub

* Remove one usage of Faraday

* Use HTTParty for all the HTTP here
2019-04-29 18:11:53 -04:00
Ben Halpern
a711e2246e
Add proper twitch url migration (#2561)
* Add proper twitch url migration

* Change schema version
2019-04-25 17:38:21 -04:00
Bolarinwa Balogun
1578befdf1 Add Twitch to Profile Links (#2557) 2019-04-25 16:14:28 -04:00
Ben Halpern
78138532c8
Classified Listings (#2545)
* Initial classified listings work

* More work on tags

* Additional work finalizing stripe and getting the listings page along

* Finalize-ish listings 🤞
2019-04-24 16:17:01 -04:00
Andy Zhao
182a787ac4 Add OrganizationMembership model (#2471)
* Remove deprecated analytics role

* Make anchor tag a bit more readable

* Add OrganizationMembership table and model

* Add organization_membership associations

* Add unique indices for user_id and org_id

* Wrap update and create calls in transactions

* Remove specs of deprecated analytics_beta_tester
2019-04-22 14:08:02 -04:00
Ben Halpern
583a772d52
Add inbox guidelines to users (#2473) 2019-04-17 15:49:48 -04:00
Anna Buianova
25cafaae8c Add missing indexes to comments table (#2413) 2019-04-12 06:18:06 -04:00
Jess Lee
f637d9e02b Manage tag and community mod lists in Mailchimp (#2362)
* add moderation email list columns

* automate tag moderator mailing list

* reorder logic for tag mod list

* add community mod list

* remove trusted privileges when reverting a user to a regular member

* automatically make tag mods community mods

* fix merge conflicts

* add community view

* make methods less complex based on code climate sugggestion

* add specs

* refactor tag moderator module

* fix spec
2019-04-10 14:45:06 -04:00
Anna Buianova
f1d371c670 Set users email to nil instead of blank (#2305)
* Set users email to nil instead of blank

* Remove uniqueness validation duplication for users

* Fix organization following test in case the name contains quotes
2019-04-08 19:12:56 -04:00
Ben Halpern
1552df98d2
Add ability for trusted users to suggest social copy for posts (#2306)
* Add ability for trusted users to suggest social copy for posts

* Fix schema

* Fix tests

* Fix test
2019-04-04 17:01:58 -04:00
Anna Buianova
1a0d4667c5 Unique twitter and github usernames #2061 (#2255)
* Set github and twitter usernames to nil if they are blank

* Verify github and twitter username in the Admin::UsersController (just in case)

* Add unique indexs on users twitter_username and github_username
2019-04-02 18:16:29 -04:00
Anna Buianova
d1db3abc35 Optimize sign in: User (#2237)
* Unique index on users email, conditional user unique validations

* Only uniqueness validations are conditional
2019-04-02 17:12:35 -04:00
Ben Halpern
490645ea92
Add sponsors to sponsors page and add sponsor order field (#2284)
* Add sponsorship page

* Fix schema

* dev => DEV
2019-04-01 18:24:47 -04:00
Ben Halpern
cc0e4b40dd
Allow orgs to be marked as sponsors (#2282)
* Allow orgs to be marked as sponsors

* Remove community sponsor condition
2019-04-01 16:41:25 -04:00
Anna Buianova
4b02fe87a4 Optimize sign in: Identity #2061 (#2231)
* Add unique index to identity

* Conditional uniqueness validations on identities

* Remove redundant Identity specs
2019-03-28 16:10:23 -04:00
Ben Halpern
91bd6322ad
Add organic page view sums and modify seo boostables (#2109)
* Add organic page view sums and modify seo boostables

* Add score minimum for SEO boostable
2019-03-19 09:32:26 -04:00
Ben Halpern
158640e3f0
Add originally published at migration (#2085) 2019-03-16 21:15:29 -04:00
Mario See
d8709c0334 Implement open inbox for dev-connect (#1563) 2019-03-15 14:39:57 -04:00
Ben Halpern
d6ab255a45
Allow users to configure to use night mode (beta) and sans-serif article body (#2072)
* Initial work for config

* Add config for users

* Fix schema
2019-03-15 13:11:53 -04:00
Anna Buianova
343f109c0f Optimize stories (#1988)
* Add db index to articles path

* Slight stories optimizations

* Select only needed fields for the flare tag

* Revert the last commit (to check builds)

* Return selecting only needed fields for tag
2019-03-12 16:38:22 -07:00
Ben Halpern
825aa9be91
Add page_view model (#1985)
* Add page_view model

* Uncomment DJ routes

* Add time on site max and don't update article page views every time
2019-03-07 11:53:33 -08:00
Ben Halpern
532903c688
Add experience level averaging to articles (#1922)
* Add experience level averaging to articles

* Adjust copy on /mod ratings page
2019-02-28 08:17:29 -08:00
Andy Zhao
5ace9a5fc9 Organization Notifications (#1762)
* Add spec for org reaction notification

* Add organization_id to notifications

* Add validations for user and org IDs

* Move comment json_data out of loop

* Use actual column names instead

* Add organization filters

* Remove extra text-align

* Add organization filtering

* Refactor to reduce complexity

* Add receiver argument to handle orgs

* Add has_many notifications for orgs

* Add follow notifications for orgs

* Add comment notifications for orgs

* Rename some tests for specificity

* Add mark org notifications as read functionality

* Add radix to parseInt

* Define json_data outside of loop

* Notify org followers of a new post as well

* Move test to proper location

* Add test for aggregated method

* Make send org reaction notification more readable

* Test the rest of the notification model

* Refactor tag adjustment spec

* Fix extra html
2019-02-25 14:25:37 -08:00
Ben Halpern
bce0b4fff6
Remove harsh video restriction and add video duration (#1811)
* Remove harsh video restriction and add video duration

* Fix video meta data and tests

* Modify video tests

* Rescue video duration fetch error

* Change log to puts in test
2019-02-16 17:42:44 -04:00
Ben Halpern
71a419e5ee
Add profile_updated_at and github_repos_updated_at to avoid extra fet… (#1754)
* Add profile_updated_at and github_repos_updated_at to avoid extra fetches

* Fix variant_number issue

* Fix test
2019-02-06 20:39:15 -04:00
Ben Halpern
2d97a5d837
Improve performance for additional content boxes and tags index (#1750)
* Improve performance for additional content boxes and tags index

* Modify followed_articles endpoint with new classic article api
2019-02-06 16:50:35 -04:00
Ben Halpern
d7665fcc3f
Add comment template to post (#1692)
* add myself to the core contributors

* add comment template

* merge upstream

* make sure the template re-appears for top level comments after submission

* make interface admin only

* Adjust comment template form

* Fix merge conflicts

* Remove unnecessary comment template from json
2019-01-30 13:32:34 -05:00
Ben Halpern
7c7c39149c
Modify cache keys for well-trafficked views. (#1681)
* Add cache to sidebar sticky to make it stick longer

* Add last_article_at and last_comment_at

* Clean up schema.rb
2019-01-29 13:27:22 -05:00
Ben Halpern
47e8fbc9ec
Add feed_fetched_at for users to not refetch unnecessarily (#1555)
* Fix RSS issues by not refetching users as often

* Make rss fetch not forced in rake task

* Remove unnecesary schema line
2019-01-15 13:29:11 -05:00
Andy Zhao
68807c6df7 Allow Organizations to Update Slug/Username (#1411)
* Close anchor tag typo

* Remove confusing message in profile

* Fix typo in spec

* Add old_slug and old_old_slug fields to org

* Test for check_for_slug_change method

* Add ability for orgs to change slug

* Update copy to match new org language

* Add redirect for organizations with old slugs

* Use less queries for handling org/user redirect

* Use consistent syntax for user creation

* Test for organization slug redirects

* Refactor user article redirect
2019-01-10 14:16:43 -05:00
Timothy Ng
84bd3a69d7 ApiSecret model for Developer API (#1369)
* Add ApiSecret model scaffold

* Add relationships between ApiSecret, User, Organization

* Add placeholder template to account tab

* Add description column to ApiSecrets

* Add very basic access token generation

* Add basic access token deletion

* Show access token on success flash

* Add placeholder message when user has no secrets

* Use cta style on token generation button

* Add presence validation for ApiSecret description

* Add ApiSecrets factory

* Add pundit policy for ApiSecret

* Nest form field within api_secret hash to allow rails strong params

* Use pundit to authorize ApiSecretController actions

* Add error message flash for ApiSecretsController actions

* Add specs for ApiSecretsController

* Add length validation to api secret description

* Flash model error instead of generic message on save failure

* Truncate ApiSecret factory objects descriptions to prevent validation error

* Remove length restriction on ApiSecret.description

* Use darker font color for token creation date

* Consolidate ApiSecret migrations
2019-01-08 12:30:54 -05:00
Mac Siri
bd4a81f539 Replace flipflop with sail migrations (#1361) 2018-12-18 16:48:17 -05:00
Mac Siri
06e0cbabbb Revert "Replace Flipflop with Sail (#841)"
This reverts commit 21870e805a.
2018-12-18 13:44:40 -05:00
Vinicius Stock
21870e805a Replace Flipflop with Sail (#841)
* Replace Flipflop with Sail

* Address PR comments

* Bump sail version to latest

* Bump Sail to latest version

* Move setting creation to config/sail.yml

* Bump Sail to latest version

* Use correct limit for cast_type in schema

* Update Sail's route
2018-12-18 12:42:30 -05:00
Jibran Kalia
f569f33e4f [WIP] Really simple calculate reading time function (#1283)
* Really simple calculate reading time function

* Move parse_it so that the number of methods in MarkdownParser is at 20

* Added test and default value for reading time
2018-12-09 13:42:32 -05:00
Ben Halpern
6b96201265
[WIP] Allow mods to remove tags and send user notification (#1252)
* Initial tag adjustments

* Finalize tag adjustments and tag adjustments controller

* Fix schema.rb

* Finalize tag removal logic

* Adjust edge cases/tests for tag adjustment moderation

* Adjust tag adjustments spec
2018-12-04 16:45:32 -05:00
Michael Kohl
ffd24f791e Add Mastodon URL to profile (#1137) 2018-12-04 13:24:53 -05:00
Ben Halpern
651ab3ce35
Add point weights for tag follows (#1229)
* Add point weights for tag follows

* Adjust num articles to initially show up on home page

* Fix schema.rb

* Adjust follow policy spec

* Adjust dashboard styling for follow points form
2018-11-30 15:36:58 -05:00
Ben Halpern
db6232adf3
Add initial ios push notifications to server (#1207)
* Add initial push notification logic for iOS

* Adjust notification form css

* Clean up schema.rb

* Add mark-all-as-read functionality for ios notifications

* Update app/models/notification.rb

Fix `find` to `find_by`

Co-Authored-By: benhalpern <bendhalpern@gmail.com>
2018-11-27 17:40:43 -05:00
rhymes
915e2d77b6 Export articles/posts (#576)
* Add EditorConfig file for all editors

* Add article export service

* Add setting to request an export of all articles

* On the outside they are called posts

* Add articles exported email to mailer and service

* Refactor to one public method and test flags

* Trigger the export if it was requested and send the email

* Recreated migration file with generic export fields

* Rename fields and switch to a whitelist

* Refactor ArticleExportService into a more generic structure

* Rename articles_exported_email to export_email

* Fix notify mailer spec

* Rename Exporter::Exporter to Exporter::Service

* Remove commented out line

* Removed body_html, coordinates and updated_at from export

* Invert DJ config

* Update spec
2018-11-21 11:13:36 -05:00
Ben Halpern
115e52c748
Move follow and reaction aggregation into Notification model to avoid… (#1164)
* Move follow and reaction aggregation into Notification model to avoid re-compute

* Ugh. Fixing schema

* Update tests

* Skip some tests in notifications_spec
2018-11-20 15:00:21 -05:00
Andy Zhao
2db2dd1e5a WIP Refactor/notifications (#1131)
* Add new columns to notifications table

* Remove stream from notifications and add new methods

* Turn off moderation comment notifications

* Add notifiable_type index to migration

* Stop creation of Stream-based notification model instances

* Add notification model create hooks

* Add badge achievement notification creation hook

* Fix some specs

* Add missing @ symbol

* Fix for tests and rename a few things

* forgot to uncomment code sigh
2018-11-19 16:09:02 -05:00
Ben Halpern
a1be99ebf0
Add reaction confirm/invalidate workflow for admins (#1134) 2018-11-16 18:53:36 -05:00
sidemt
62d8a33111 Add GitLab URL field to user profile (#1121)
* Add SVG file of GitLab icon

* Add gitlab_url column to users table

* Add gitlab_url to user model, controller and policy

* Add gitlab_url to views

* Add tests for gitlab_url
2018-11-15 16:09:35 -05:00