Commit graph

87 commits

Author SHA1 Message Date
Mac Siri
fc9272fe71 Make Doorkeeper inherit from ApplicationController (#3591)
* Resolve doorkeeper issue

* Refactor spec

* Remove comment
2019-07-31 18:41:44 -04:00
Mac Siri
3071ac8c76 Implement Doorkeeper gem (#3504)
* Add doorkeeper gem

* Generate files with Doorkeeper's generator

* Create Doorkeeper tables

* Add new associations to User

* Update associations

* Remove confusing schemas

* Change oauth2_provider name
2019-07-31 10:30:58 -04:00
Ali Spittel
52c60ce37e Feature/refactored onboarding (#3333)
* set up refactored onboarding

* create onboarding page

* add in first slide and change slide functionality

* fix test suite

* profile refactor

* profile refactor

* refactor to api

* add checkbox fields

* add checkbox fields

* remove puts

* add basic css

* add styling

* add redirect

* hide back and next at first and last slides

* test refactored onboarding

* test refactored onboarding

* remove article edits

* Fix schema

* Add deleted file back in

* Add default value for checked_t&c column

* Adjust HTML structure to keep nav buttons in place

* Fix ESLint issues on Onboarding.jsx file

* Handling for undefined or empty followedTags on getUserTags

* Fix codeclimate issues

* Fix codeclimate issues

* Fix more codeclimate issues

* Fix more codeclimate issues

* Update Onboarding snapshots

* Uncheck the CoC and T&C checkboxes on render

* Update snapshots

* Return false instead of raising error

* Update spec to use new onboarding

* Redirect to onboarding if haven't seen it yet

* Prevent redirect to onboarding from /signout_confirm

* Use assign_attributes instead of saving twice

* Move COC and T&C checkbox page to second slide

* Add 'go back to original page' functionality

* Reuse ready prototype logic

* Keep track of the last visited onboarding page

* Fix email subscription bug

* Fix overflow issue for tags page

* Remove height to prevent page container scrolling

* Check for CoC and T&C for displaying onboarding

* Add InstantClick redirect and preserve referrer in client

* Fix async update + check by using localStorage

* Turn off onboarding for tests

* Finalize design for onboarding

* Finalize design for onboarding

* Make bulk follows during onboarding

* Fix bulk follow test
2019-07-26 15:53:32 -04:00
Kitten King
6290451273 Fix Typos (#3510) 2019-07-22 12:56:48 -04:00
Andy Zhao
22e76bee84 Add functionality to remove and recover identity (#3377)
* Lint some quotation marks

* Add BackupData table

* Add identity and removal functionality

* Test additional functionality

* Remove dependent destroy for backup data

* Add auth_data_dump column

* Add challenge to reserved words

* Add more shoulda matchers
2019-07-03 12:01:16 -04:00
Jess Lee
10674aed72 Buffer Listings (#2956)
* add share to buffer button

* wip

* wip

* adds listings to buffer via form

* create migration for buffered timestamp and update seed file

* display when listing was last buffered

* remove annoying spacing

* refactor article script for listings

* social preview wip

* add custom social card for indivdual listings

* add styling

* fix css

* tweak styling

* final css tweaks

* fix branch

* add buffer listings id

* update envfile

* add social previews spec
2019-06-14 19:33:19 -04:00
Andy Zhao
b953f17d0c New Feature: Subscribe to posts! (#3149)
* Add MVP of notification subscriptions

* Add rate limiting for notification subscriptions

* Show modal for logged out users on subscribe click

* Add enter key functionality for checkbox

* Add relationships for notification subscriptions

* Add model test for notification subscription

* Deprecated article mutes in favor of notification subscriptions

* Deprecated comment mutes in favor of notification subscriptions

* Move comment muting tests and logic over

* Merge comment and article muting into subscriptions

* Remove redundant check

* Use database to check for rate limit instead of cache

* Test for subscriptions handling notifications properly

* Fix notification model spec for subscriptions

* Fix tests for subscriptions

* Remove rate limiting

* Properly handle logged out users getting subscription status

* Fix test for new pattern

* Update reserved words

* Add config column to notification subscriptions

* Add logic for top level config and move tests

* Test for top level subscribers getting notified

* Fix logic mistake oops

* Add index and refactor comment_user_ids
2019-06-14 12:03:43 -04:00
Mac Siri
1ea1a30ca7
Remove js-yaml.js (#3054) 2019-06-05 21:27:39 -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
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
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
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
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
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
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
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
rhymes
3a53d5797e Upgrade Rails to 5.2.3 (#1408) 2019-04-03 13:08:59 -04:00
Ben Halpern
c90be27677
Ignore unnecessary airbrake notices (#2283) 2019-04-01 17:40:50 -04:00
Abraham Williams
9cb40e546b Enables Rails cops (#2186)
* Enable Rails cops

* Fix Rails/DynamicFindBy

* Fix Rails/HttpStatus

* Fix Rails/Blank

* Fix Rails/RequestReferer

* Fix Rails/ActiveRecordAliases

* Fix Rails/FindBy

* Fix Rails/Presence

* Fix Rails/Delegate

* Fix Rails/Validation

* Fix Rails/PluralizationGrammar

* Fix Rails/Present

* Fix Rails/Output

* Fix Rails/Blank

* Fix Rails/FilePath

* Fix Rails/InverseOf

* Fix Rails/LexicallyScopedActionFilter

* Add Rails/OutputSafety to TODO

* Add Rails/HasManyOrHasOneDependent to TODO

* Add Rails/SkipsModelValidations to TODO
2019-03-25 09:25:55 -04:00
Keshav Biswa
8d57d45ecc Rubocop Style cops enabled (#2056)
* Rubocop enabled style/alias

* Enabled Style/ArrayJoin Cop

* Enabled Style/Attr

* Enabled Case Equality

* Enabled CharacterLiteral

*  Enabled ColonMethodCall Cop

* Enabled CommentAnnotation cop

* Enabled PreferredHashMethods Cop

*  Enabled DoubleNegation Cop

* Enabled EachWithObject Cop

* Enabled EmptyLiteral Cop

* Enabled EvenOdd Cop

* Enabled IfWithSemicolon Cop

* Enabled Lambda and LambdaCall Cop

* Enabled LineEndConcatenation Cop

* Enabled ModuleFunction Cop;

* Enable NegatedIf and NegatedWhile Cop

* Enabled NilComparison Cop

* Enabled Not Cop

* Enabled NumericLiterals Cop

* Enabled OneLineConditional Cop

* Enabled PercentLiteralDelimiters Cop

* Excluded internal/users_controller from negated_if cop

* Reverted the double negation change from github_issue_tag and github_issue.rb"

* Enabled PerlBackrefs Cop

* Changed Regexp.last_match(1) to Regexp.last_match(0)

* Enabled proc cop

* Enabled RaiseArgs Cop

* Reverted Regexp.last_match(0) to Regexp.last_match(1)

* Enabled SelfAssignment Cop

* Enabled SingleLineMethods Cop

* Enabled SpecialGlobalVars Cop

* Enabled VariableInterpolation Cop

* Enabled WhenThen Cop

* Enabled WhileUntilModifier Cop

* Enabled WordArray Cop

* Enabled IfUnlessModifier Cop

* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
Anna Buianova
58b2013377 Fix delayed job errors related to follows #1621 (#1835)
* Add delayed_job_web to dev environment for debugging

* Add specs for the current Follow callbacks implementation

* Move follower touching to ActiveJob

* Spec for the touch followers job

* Move Follow#create_chat_channel to ActiveJob and make the job safe

* Add ActiveJob to send email notifications about follows

* Enqueue SendEmailNotificationJob after the follow is created

* Specs to wnsure jobs are enqueued on Follow creation

* Make CreateChatChannelJob queue name more specific
2019-02-23 18:16:20 -08:00
Jess Lee
49e3878239 Add Stripe Cancellation Webhook (#1682) 2019-02-13 15:56:19 -05:00
Mac Siri
1137d6fba4 Improve specs (#1693)
* Lock erb_lint

* Refactor moderation spec

* Remove & replace RequestSpecHelper

* Update uid to sequence

* Lower the need for persistence in specs

* Update moderation spec

* Update shoulda-matchers

* Enable backgroundjobs and update commenct spec

* Fix fail specs

* Update comment's validations

* Remove redundent specs

* Actually turn off DJ

* Apply run_background_jobs_immediately

* Remove giveawy specs

* Create Identity spec
2019-02-04 15:56:00 -04:00
Mac Siri
338ad0a6b5 Enable require_dependency for Liquid tags in prod (#1613) 2019-01-22 14:57:17 -05:00
rhymes
d09e8e481f Log ActiveRecord queries in development (#1549) [ci skip] 2019-01-15 10:35:55 -05:00
rhymes
6553f08d94 Rubocop cleanups (#1415)
* Update rubocop-todo.yml with new violations

* Fix Layout/EmptyLine* rules

* Fix Layout/Indentation* rules

* Fix remaining Layout/* rules

* Fix Lint/DuplicateMethods by removing unused accessor

* Fix Lint/IneffectiveAccessModifier

* Fix Lint/MissingCopEnableDirective

* Re-run rubocop auto gen config

* Fix Layout/RescueEnsureAlignment

* Fix Naming/* rules

* Fix some RSpec/* rules

* Fix typos

* Fix RSpec/LetBeforeExamples

* Series should only be an attr_writer, not an attr_accessor

* Fix RSpec/InstanceVariable

* Fix RSpec/InstanceVariable

* Fix RSpec/RepeatedDescription and RSpec/RepeatedExample

* Fix Style/ClassAndModuleChildren

* Fix Style/ConditionalAssignment

* Fix some Style/* rules

* Trigger Travis CI build because failing tests are not failing locally

* Revert "Fix Style/ClassAndModuleChildren"

This reverts commit 1686801d8a1516ba1894f79e24401a20dea65f99.
2019-01-02 11:20:02 -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
Christine Yen
cff6b5d589 Add Honeycomb gem and initial instrumentation (#695)
* Add basic Honeycomb initializers

* Add some basic instrumentation, capture basic IDs

* Correctly alphabetize Gemfile, embed env in dataset names

* Actually reorder Gemfile because I can read

* Add custom tracing instrumentation to RssReader

* Improve timing/tracing info in RssReader

* Even make sure Errors show up in trace if possible

* Make sure we capture this as Rails traffic

* Swap in dev/test Libhoney::Clients as appropriate

* Move context-snagging bits into lib/instrumentation.rb

* Merging Gemfile lines seems to be my Achilles heel
2018-11-28 10:08:27 -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
Andy Zhao
a1010201f2 Notifications part 2 (#1156)
* Remove stream and add new notification views

* Actually remove Stream

* Move followers query to async method

* Remove unused tests and fix query

* Try using without delay instead

* Add without delay and escape HTML

* Make all tests pending for now
2018-11-19 18:14:24 -05:00
Andy Zhao
e1fd5b38ba Update reserved words (#1035)
* Update reserved words and add test

* Update user_spec

* Remove unreliable spec
2018-10-30 13:43:49 -04:00
Mac Siri
5287d4a03b Create DelayedJob config and misc DX changes (#979)
* Change from #after_save to #after_create

* Update .babelrc

* Update cloud_name for test

* Update SlackBot's RssReader channel

* Update helpful-hints.md

* Create .gitdocs.json

* Remove serve-docs script

* Update docs/helpful-hints.md

* Update approval

* Revert "Change from #after_save to #after_create"

This reverts commit 548ee0d2c0d56a1aa67316468f4106ac9f437662.

* Create delayed_job.rb

* Bump ancestry gem to 3.0.3

* Fix broken spec

* Remove manual Delayed::Job config in test

* Update spec_helper.rb

* Fix broken specs

* Mute SlackBot in test

* Remove weekly-dgiest.yml

* Create PodcastEpisodeDecorator
2018-10-26 13:15:14 -04:00
Michael
cfda390845 Adds optional support for Docker/Compose (#296)
* Adds optional support for Docker/Compose

* Upgrades Dockerfile to use a multi-stage build

* Gets rest of stack running in Docker

* Renames queue to jobs, uses jobs namespace command

* Reverts file

* Adds webpacker

* Fixes yarn check issue

* Adds Database URL default connection string

* Remove daemons gem

* Update huskyhook config

* Update seed.rb

* Create .dockerignore

* Increase RackTimeout's config

* Simplify Docker config

* Update README

* Remove postgres url default

* Change docker entry point to 3000

* Remove duped integrity setting
2018-10-12 11:48:53 -04:00
Ben Halpern
0b2ecd44b3
Add pull-to-refresh for index views (#859) 2018-10-08 14:26:21 -04:00
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -04:00
Andy Zhao
6d7466e80c Silence cache logs (#507) 2018-08-27 16:03:11 -04:00
Monica Powell
d303692bc0 #260 increase mentee-mentor description length (#405)
* increase mentee-mentor description length and fix linting errors

* fix char limit issue and refactor tests
2018-08-20 10:20:23 -04:00
Andy Zhao
183976fde0 Unmute cache silencer temporarily (#324)
* Unmute cache silencer temporarily

* Update .travis.yml
2018-08-14 12:29:35 -04:00
Ben Halpern
16d301d013
Remove unused delayed_job_web (#273)
* Remove unused delayed_job_web

* Remove initializer file for delayed_job_web
2018-08-08 13:15:58 -04:00
Andy Zhao
e899cbbfae Remove unused secret key from config (#666) [ci skip] 2018-08-08 10:36:17 -04:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Mac Siri
c05ae7583e Make Algolia a requirement (#636)
* Make algolia a requirement

* Remove algolia defaults

* Fix Envfile issue
2018-08-01 11:27:04 -04:00