Commit graph

206 commits

Author SHA1 Message Date
Ben Halpern
ae47e8db2c
Add API portal (#2915)
* Add API portal

* Change title tag
2019-05-21 12:46:52 -04:00
rhymes
ff929fcf14 Some small performance improvements (#2876)
* Improve a few idioms with their faster counterparts

* Remove unused routes and some dead code

* Add the option to use bullet in testing mode and move rack host redirect

* Go back to the classic fetch to make mocking work

* Reorder gems and fix code climate issue
2019-05-20 18:53:31 -04:00
Ben Halpern
70580d0265
[WIP] Connect misc improvements/debugs (#2880)
* WIP Connect misc improvements/debugs

* Modify tests and update snapshots

* Change GitHub sidecar copy
2019-05-20 10:08:51 -04:00
Andy Zhao
97040ab603 Remove membership and stripe subscription routes (#2741) 2019-05-07 11:37:21 -04:00
Jess Lee
436fa2788c redirect /moderate to internal listings view (#2730) 2019-05-07 07:00:18 -04:00
Ben Halpern
a38602baa5
Fix listings form styles (#2729) 2019-05-06 20:11:41 -04:00
Andy Zhao
aadc775ffd Add listings to /internal pages (#2725)
* Add routes for listings in internal

* Add internal listings controller and views
2019-05-06 18:16:23 -04:00
Ben Halpern
1ddef633cc
Improve reading list (#2695)
* Initial readinglist adjustments

* Improve readinglist

* Finalize new reading list

* Fix indexing and final finalizations

* Fix tests

* fix tests
2019-05-05 19:19:30 -04:00
Ben Halpern
9e7dbf8356
Update JS listings form and other tweaks (#2697) 2019-05-05 10:14:07 -04:00
Wes Delp
f08f5fcdbf Customize RSS feed by tag (#2634)
* add tag param and filter

* add tag filter request specs

* order user above tag to maintain existingdefault

* refactor #new for code climate

* add rss feed spec

* move feed tags under explicit route
2019-05-03 11:35:54 -04:00
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
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
dependabot[bot]
5890542f01 Bump pusher-push-notifications from 1.0.0 to 1.1.0 (#1880) [ci skip] 2019-05-01 17:22:19 -04:00
Mike Coutermarsh
4c9959f0ff Social Cards Part 2 (#2188)
* Social Cards Part 2

This is a follow up to part 1: https://github.com/thepracticaldev/dev.to/pull/2090.

This PR updates the og:image URLs to use the new social_preview.png urls
added in Part 1.

So that the already generated/cached images do not need to be recreated,
this sets a MIGRATION_DATETIME. Any object that has been updated after
that date will generate a new image

Objects from before that date will not. They will use the new url.

* Fix weird change made by rubocop autocorrect

* Handle organizations + users

* Run CI

* Use time with zone to be explicit about timezone

* Simplify branching in user_social_image_url method

* Fix param alignment + bump migration date
2019-05-01 11:07:25 -04:00
Ben Halpern
158f56bc9d
Add page for users to "manage" their posts after publication (distribution, etc.) (#2627)
* Set up basic /manage route

* Add basic article manage page

* Add tips and finalize permissions for /manage

* Add final test and add manage button to article show

* Update failing specs
2019-05-01 09:00:09 -04:00
Anna Buianova
dd11478659 Change format of the user languages_settings #2369 (#2496)
* Change format of user preferred languages

* Make sure user language settings are set by default

* Add missing expect to the user spec

* Fix users/misc template

* Move existing languages to a constant

* Remove commented user code

* Move languages out of User model

* Update preferred languages accordingly to the available languages

* Set user estimated language only if the language is available

* Fix Portuguese spelling #2582
2019-04-30 17:01:19 -04:00
rhymes
50ed146515 Use only fog-aws with carrierwave instead of fog (#2569)
Currently dev.to is including the entire fog library just to support image uploads to AWS S3. carrierwave can be used just with fog-aws.
I preserved the same exact version is currently used now.
2019-04-30 15:22:01 -04:00
Ben Halpern
4b91dd5912
Make a couple changes to Twitch MVP before push (#2622) 2019-04-29 18:53:09 -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
rhymes
2bf3e38a73 Fix double AWS_LAMBDA initialization (#2570) 2019-04-26 11:15:18 -04:00
Anna Buianova
d57f8eec4a BlackBox specs #2524 (#2542)
* Specs for FuctionCaller

* Fix accepting nil values from AWS lambda

* Specs for the black_box #2524

* Spec for BlackBox#comment_quality_score

* Remove vcr cassette usage from the CouponGenerator spec
2019-04-25 10:19:11 -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
rhymes
d2fbd243c3 Upgrade airbrake to 9.1.0 (#2526) 2019-04-24 11:41:16 -04:00
rhymes
5057584458 Upgrade ahoy_email to 1.0.3 (#2534) 2019-04-23 16:32:14 -04:00
rhymes
f17d0f34e1 Update framework defaults to match those in Rails 5.1 (#2309)
* Enable all Rails 5.0 defaults, except for CSRF mitigations

* Enable all Rails 5.1 defaults

* Enable per_form_csrf_tokens

* Enable forgery_protection_origin_check

* Avoid replacing the CSRF in the comment form

Each form now has its own CSRF in addition to the global one.
I've left in place the setInterval

* Restore per_form_csrf_tokens to false
2019-04-17 12:21:15 -04:00
rhymes
7d3fb0c0b5 Enable random order for specs (#2466) [ci skip] 2019-04-17 11:30:23 -04:00
Mario See
c6ee9fe3b4 Add Console message ascii art (#2392) [ci skip] 2019-04-16 16:47:27 -04:00
rhymes
bf33490b04 Removed csv_shaper, bourbon and share_meow_client (#2450)
None of these gems seems to be in usage
2019-04-15 12:05:08 -04:00
Jess Lee
6629404ad9 Community Moderation Page (#2364)
* add more copy about bulk updating

* add the new file whooops
2019-04-11 15:40:35 -04:00
rhymes
5782ffd7e0 Use published scope for articles (#2374)
* Use published scope for articles

* Fix variable name

* The sequencing in the union query matters

* Fix spec

* Restore a published: true condition

* This test is actually misleading due to the union

* Revert this change, not sure why it's not a relation

* Fix useless diff
2019-04-11 13:18:26 -04:00
Andy Zhao
8ef611f879 Remove Honeycomb from the app (#2366)
* Remove Honeycomb related gems

* Remove Honeycomb related code from controllers

* Remove Honeycomb from RSS Reader

* Remove Honeycomb related files

* Remove Honeycomb related tests

* Remove leftover Honeycomb methods
2019-04-11 10:49:35 -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
cyrillefr
4fd66372dc Enable Layout/AlignParameters (#2340)
Check if the parameters on a multi-line method call or definition are aligned.

Resolves: #2021
2019-04-08 18:47:34 -04:00
Andy Zhao
36a21cd0f2 Add tech admin role and allow tech admins to view /delayed_job (#2343)
* Add tech support role

* Add tech support permission method

* Enabled /delayed_job for tech support users

* Fix typo oops

* Add tests for tech support viewing /delayed_job

* Fix typo again...

* Rename tech role to tech admin
2019-04-08 18:00:59 -04:00
rhymes
3b4bda89df Upgrade Honeycomb gem, fix and improve RssReader tests (#2319)
* Switch from deprecated honeycomb-rails to honeycomb-beeline

* Improve error handling, tests and add refactoring

* Fix multiple fetching test and add one more

The test wasn't actually testing the correct behavior, because the class
by default force fetches. It worked because it wasn't reloading the user
from the database.

* Test that Honeycomb's client is doing its thing

* Use some defensive programming to avoid any possible problem during shutdown

* Fix typo

* Use the new API to add fields to the current measured event

* Use default instrumentation and add user info to event

* Replace user.email with user.username, less personal data around

* Use mocking instead of calling Honeycomb.init

* Freeze time before traveling

* Remove a flaky test dependent on rand
2019-04-07 15:27:53 -04:00
rhymes
a1787d0702 Fixed some Style/* rubocop violations (#2314)
* Fix Style/FormatString and Style/TrivialAccessors

* Fix Style/NegatedIf and Style/DoubleNegation

* Style/ClassAndModuleChildren is already enabled by default

* Fix Style/GlobalVars

* Group all style/ cops inside rubocop config file
2019-04-06 14:24:33 -04:00
Jess Lee
175569fb97 "/videos" (#2291)
* set up video route

* add video index

* update styling

* fix mobile full width styling

* bust cache when new video is created

* add unlimited scrolling
2019-04-05 14:02:03 -04:00
Abraham Williams
b98565a931 Update rubocop to 0.67 (#2313) [ci skip] 2019-04-05 12:55:13 -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
Andy Zhao
3e89796d9d Add API Analytics Endpoints (#2293)
* Add API endpoints for analytics

* Remove comment and spacing

* Use proper time formatting

* Refactor and clean up some logic

* Add pro and org member traits

* Use shared examples for analytics API spec

* Add analytics authorization specs

* Remove accidental include Pundit

* Raise not_authorized for invalid requests

* Make attributes and time methods private

* Add custom UnauthorizedError

* Raise and use rescue_from to handle 4xx requests

* Enforce date parameters to follow a specific format

* Use current user to allow same origin requests

* Use custom headers and not params for token auth

* Default to current user for same origin requests

* Use correct boolean for choosing user

* Update tests to use request headers and add stricter tests
2019-04-04 10:52:45 -04:00
rhymes
3a53d5797e Upgrade Rails to 5.2.3 (#1408) 2019-04-03 13:08:59 -04:00
rhymes
dc2414c174 Add tests to PodcastEpisodesController (#2297)
* Add tests for existing API PodcastEpisodesController

* Generate only index route

There's no need to generate all routes if they are not implemented
2019-04-03 09:57:48 -04:00
Filip Defar
512c9ee8a0 Extract "followers" action from "show" in DashboardsController (#2270) 2019-04-01 18:43:44 -04:00
Ben Halpern
c90be27677
Ignore unnecessary airbrake notices (#2283) 2019-04-01 17:40:50 -04:00
Jess Lee
e5b9a1b7b1 Disable Scout's remote ip collection (#2239) 2019-03-29 15:09:30 -04:00
Filip Defar
7a3b16c1e5 Extract "following" action from "show" in DashboardsController (#2212) 2019-03-27 17:03:53 -04:00
Jess Lee
2b92371d4d Add Scout gem and config (#2219) 2019-03-27 14:01:24 -04:00
Ben Halpern
d1e73dceba
Clean up new chat channel functionality and add tests (#2220) 2019-03-26 13:35:32 -04:00
Mario See
91968e3860 block/report abuse in dev-connect (#2074)
* block chat method

* block and report buttons

* styling

* more styling

* add id redirect

* remove whitespace

* authorize channel in block_chat method

* remove trailing whitespace

* make variable local

* validate using policy

* check channel direct

* fix comparison in chat_channel model

* fix channel variable
2019-03-26 11:53:30 -04:00
Filip Defar
88fc2a66d3 Remove /dashboard/following_users route (#2191) 2019-03-25 14:49:09 -04:00