Commit graph

96 commits

Author SHA1 Message Date
Ben Halpern
57d1bc48d5
Fix navigation issue in connect and allow leaving channels (#635)
* Fix navigation issue in connect and allow leaving channels

* Fix chat channel memberships request spec
2018-07-30 18:40:30 -04:00
Arun Kumar
52486a4edd Update instance methods to module methods (#613) 2018-07-23 12:13:42 -07:00
Mac Siri
40f488d991 Migrate to Travis CI (part 2) (#591)
* Update Travis.yml

* Update README

* Update README

* Adjust test to not rely on env vars

* Update encryption

* Refactor

* Update env key

* Stub AWS calls

* Create ApplicationConfig

* Fix specs

* Fix lint

* Update ApplicationConfig

* Remove travis env vars

* Fix lint

* Extend character limit to 100

* Add env to travis

* Take out auto-restart after deploy

* Immediately discarded test cache

* Stub GA in request specs

* Stub Pusher

* Fix broken specs

* Update fixture

* Add CodeClimate id

* Change CodeClimate key

* Remove merge mistakes

* WIP

* Add Envied gem & Change README

* Add missing keys

* Add missing key

* Update fixture

* Fix broken spec

* Add Slack Notification for Travis

* Fix wording

* Fix typo
2018-07-20 20:17:18 -04:00
Ben Halpern
b2b1068715
Add minimum name length for users (#594) 2018-07-19 15:36:29 -04:00
Mac Siri
1555388f12 Migrate to Travis CI --skip-ci (#588)
* Create .travis.yml

* Update .travis.yml

* Add postgresql to travis

* Change travis's postgresql version

* Add chrome addon to travis

* Adjust travis config --skip-ci

* Change travis dist

* Change travis to use Chrome --skip-ci

* Use IntegraitonHelpers --skip-ci

* Add no-sandbox option to headless chrome

* Add sudo to travis

* Fix broken spec

* Update travis.yml

* Change how travis store bundler cache

* Update chromedriver command

* Add CodeClimate to travis --skip-ci

* Remove deadcode --skip-ci

* Remove dead code

* Change rspec-retry back to 3

* Add deploy script to travis

* Safelist only master for Travis --skip-ci
2018-07-16 17:11:42 -04:00
Ben Halpern
e2dbd7cfcc
Remove beta label on /connect and other small changes (#589)
* Remove beta label on /connect and other small changes

* Add better placeholder for narrow screens

* Adjust comma/bracket placement

* Add description to chat channels
2018-07-16 14:48:38 -04:00
Jess Lee
d407d9bc52 Allow members to add other social links to profile (#555)
* add social icons to profile

* fix spacing

* add validations

* update user spec

* check for user in profile settings

* fix regex validation

* refactor regex to multiple lines
2018-07-13 19:51:56 -04:00
Yechiel Kalmenson
37e0059ade open markdown links in new tab (take 2) (#512)
* open links in chats in new tabs

* fixed target_blank vulnerability

* add test to make sur links are being generated with target _blank

* add test for target blank vulnerability

* add rel and target to the whitelisted attributes

* add the link attributes to HTMLRouge#link
2018-07-11 15:04:03 -04:00
Edem Attikese
6e3b64f060 Apply bundler-audit fix & Update gems (#472)
* added bundler workaround so git repos are accessed via https

* Use forked version of fix-db-schema-conflicts gem

* Update #update_stripe_plan_for_subscription

* Update stripe version

This was actually already done but not reflexed in the Gemfile

* Pessimize Gemfile

* Fix lint

* Fix lint
2018-07-11 11:01:47 -04:00
Andy Zhao
e7466fc436 [Done] Add Reaction Policy Spec (#547)
* Delete old files and combine into one spec

* Write new reaction request spec

* Use a single route for logged in/out reaction count

* Refactor a bit

* Remove unused file

* Add reaction policy and spec

* Fix eslint issue

* Remove dead route
2018-07-10 14:12:04 -04:00
Andy Zhao
a920d6cf1c Add dependent destroys to automate some deletion tasks (#554)
* Add dependent destroys for dependency-less models

* Add before destroy for empty dm channels

* Fix typo

* Add new tests for new dependent destroys

* Remove failing test b/c rethinking relationships later

* Use find_by to return nil instead of erroring out

* Add before_destroy to destroy follows
2018-07-09 15:54:09 -04:00
Ben Halpern
424be43865
Add chat_channel_membership roles and invite functionality (#541) 2018-07-03 13:16:48 -04:00
Andy Zhao
beac877e44 Add stripe policies and specs (#529)
* Add stripe policies and specs, and some refactor

* Update moderation test to test for 404
2018-07-02 17:19:25 -04:00
Ben Halpern
94e5154668
Add initial invitation framework for chat channels (#528)
* Add initial invitation framework for chat channels

* Update chat_channel specs

* Add DIY concept of accepting invite

* Add some js and fix spec

* Add full invite accept functionality

* Remove console.log from chat
2018-07-02 16:31:20 -04:00
Ben Halpern
92a541a517
Add a couple specs for notifications and pages (#522)
* Add a couple specs

* Remove stream VCR from notifications_spec

* Add github readme spec

* Add notifications count specs

* Add guards in notifications controller

* Fix test

* Fix test
2018-06-29 14:14:36 -04:00
Mac Siri
808550afb0 Create 'proper_status' shared context (#506) 2018-06-29 10:43:46 -04:00
Ben Halpern
71c94b6546
Fix boosted posts and add spec (#521) 2018-06-28 17:22:02 -04:00
Ben Halpern
799aa16378
Fix /live for workshop (#516) 2018-06-28 14:28:24 -04:00
Edem Attikese
0ad8cd9eab Edem/improvements/pundit coverage (#498)
* added organization policy + spec

* user specs for is_org_admin?

* added authroize to organization controller

* admin policy + specs

* deleted enforce admin due to pundit policy redundancy

* applied admin policy to entire admin namespace

* refactoring analytics controller WIP - wanna test codeship

* Add protection against reactions to unpublished articles (#473)

* Add chat channel policy and spec (#474)

* Add comment policy and specs (#475)

* Fix edge case with apostrophes

* Add comment policy and specs

* Add login for deleting comment spec

* Change test to raise pundit error instead of 404

* Clean up comment destroy request specs

* Remove redundant raise

* Whitelist columns on to_json call (#477)

* Add pundit policy for several controllers (#476)

* Add pundit policy for several controllers

* Adjust video spec

* Fix tag request specs

* Add proper twilio tokens request specs

* Remove puts statements

* Add a couple basic request specs (#478)

* Add a few tests and fix user tag color bug (#482)

* Refactor handle_tag_index in stories_controller (#481)

* Modify valid_request_origin? (#483)

* Add misc specs and remove banned attribute from user model (#484)

*  Fix missing Cloudinary tags and misc specs (#486)

* removing current_user_is_admin? to use .is_admin? method

* added missing org policy routes

* Add comment for all public controllers

* Fix edge case for test

* Authorize mod controller and add specs

* Refactor methods via inheritance and use only super_admin role

* Create policy method for analytics via article_policy and refactor

* Capitalize all buttons in dashboard page

* Fix org tests and remove old admin test

* Use only happy path for analytics

* Fix tests to use Pundit error

* Update org_policy spec
2018-06-28 09:38:20 -04:00
Andy Zhao
cd9f6d9ada [Done] Add BDEFGI Policies and Specs (#487)
* Add comment for public controllers

* Add block policy and specs

* Add policy for authorizing dashboard

* Add follow policy and specs

* Refactor a tiny bit

* Prevent banned users from following anything

* Add a note for email sub controller about auth

* Add image upload policies

* Add policy for github repos

* Fix typo and use correct github repo variable

* Fix image uploader and use regular params

* Add authenticate_user before action back in

* Rename test

* Update slack bot message formatting and fix reported URL
2018-06-26 09:23:07 -04:00
Ben Halpern
75d3a79c12
Add search_keywords record and associated functionality (#494)
* Add search_keywords record and associated functionality

* Fix test and add badge rewarder method
2018-06-25 11:58:07 -04:00
Mac Siri
dd5a22dc80 Create UserPolicy (#480)
* Fix lint

* Create User#settings_tab_list

* Remove UsersController#finish_signup

* Remove UsersController#index

* Create UserPolicy WIP

* Replace UsersController's spec with request spec

* Fix broken specs

* Fix broken specs

* Remove comment

* Upgrade UserPolicy

* Fix specs
2018-06-22 20:40:08 -04:00
Ben Halpern
5a59b4c8a9
Fix missing Cloudinary tags and misc specs (#486) 2018-06-22 16:29:17 -04:00
Ben Halpern
0755a07713
Add misc specs and remove banned attribute from user model (#484) 2018-06-22 16:06:04 -04:00
Ben Halpern
03e4f6531f
Add a few tests and fix user tag color bug (#482) 2018-06-22 10:22:53 -04:00
Ben Halpern
13a92d17cb
Add a couple basic request specs (#478) 2018-06-21 18:35:34 -04:00
Ben Halpern
c60268b76f
Add pundit policy for several controllers (#476)
* Add pundit policy for several controllers

* Adjust video spec

* Fix tag request specs

* Add proper twilio tokens request specs

* Remove puts statements
2018-06-21 18:26:35 -04:00
Andy Zhao
0785720908 Add comment policy and specs (#475)
* Fix edge case with apostrophes

* Add comment policy and specs

* Add login for deleting comment spec

* Change test to raise pundit error instead of 404

* Clean up comment destroy request specs

* Remove redundant raise
2018-06-21 17:20:34 -04:00
Ben Halpern
8b53f68574
Add chat channel policy and spec (#474) 2018-06-21 16:58:21 -04:00
Ben Halpern
1127b2e61b
Add protection against reactions to unpublished articles (#473) 2018-06-21 15:44:04 -04:00
Mac Siri
ff36271108 Improve ArticlesController's authorization (#466)
* Fix lint

* Add pundit-matchers gem

* Strengthen ArticlePolicy & create spec

* Change ApplicationPolicy to a closed system

* Globally handle pundit's NotAuthorizedError

* Fix lint

* Adjust /new's authorization
2018-06-21 14:18:32 -04:00
Yechiel Kalmenson
c121dd63d3 Yechiel/feature/add route for shop (#468)
* add test for /shop route

* route /shop to shop.dev.to
2018-06-21 13:14:13 -04:00
Andy Zhao
691ad2e771 Fix tests for live (#465) 2018-06-20 18:45:12 -04:00
Andy Zhao
e2184d2ff0 Tests for /live and minor style adjustments (#462)
* Add spec for badges show page

* Test live feature and minor styling changes
2018-06-20 18:29:31 -04:00
Andy Zhao
263a74bcb6 Add more request specs (#460)
* Remove email blank onboarding redirect

* Add authorization specs for video upload

* Add registration spec

* Remove skip before actions for signup complete

* Use new param for abuse reports

* Remove else because it never runs

* Add more dashboard request specs

* Use let with no bang in case there are errors
2018-06-20 17:46:23 -04:00
Ben Halpern
0941b2e4fb
Add some tests around model validations (#459)
* Modify sample_application.yml and write test

* Add ahrefs verification

* Add some tests around model validations

* Indent an end

* Add a few tests

* Add tests and reserved words

* Fix live articles spec typo

* Modify ga_events_controller
2018-06-20 17:14:08 -04:00
Ben Halpern
3a623993d4
Modify sample_application.yml and write test (#456)
* Modify sample_application.yml and write test

* Add ahrefs verification
2018-06-19 19:06:22 -04:00
Andy Zhao
ecbb9d4ab1 [Done] New Reporting System MVP (#408)
* Move validations from controller to model

* Add new columns to feedback message model

* Use polymorphic notes relationship

* MVP of ticketing system

* Use new URL for reported_url param

* Add missing files

* Add validations and tests for feedback_messages

* Clean up some html

* Update create spec and add update spec

* Add mail tests and lint

* Add link to user profile
2018-06-19 16:41:31 -04:00
Mac Siri
ec264bf802 Clean up spec outputs (#450)
* Improve BadgeAchievementSpec

* Create specs for PushNotificationSubscription

* Clean-up specs for VideoStatesController

* Refactor spec
2018-06-19 16:27:15 -04:00
Andy Zhao
74266db0d9 Add name length validation (#453) 2018-06-19 16:22:02 -04:00
Andy Zhao
cfd95a65af Update "Connect Twitter acct" in settings with new callback url (#439)
* Update "Connect Twitter acct" in settings with new callback url

* Remove name from comments (#437)
2018-06-15 12:52:14 -04:00
Ben Halpern
cc45ec8ec6
Remove wrong test (#436) 2018-06-13 17:42:57 -04:00
Ben Halpern
66cb24dddf Fix callback issue 2018-06-12 22:19:44 -04:00
Ben Halpern
7dac253de1 Remove specs 2018-06-12 21:48:55 -04:00
Ben Halpern
cb4340819e Change Twitter callback_url 2018-06-12 21:40:55 -04:00
Ben Halpern
87c6a758bb
Add top bar indicator and other Connect features (#424)
* Add algolia public search key

* Add status to chat_channels
2018-06-12 18:24:57 -04:00
Ben Halpern
cfb0bff881
Fix /live and codemirror stuff (#417) 2018-06-11 14:56:52 -04:00
Ben Halpern
fb20b8adf7
Add content sidecar for chat (#413)
* Rearchitect chat channel subscriptions

* Add browser push notifications (attempt)

* Add content sidecar for chat

* Add live code basics

* Add content features to chat

* Fix chat_channels test
2018-06-11 11:00:51 -04:00
Ben Halpern
7bc3e60283
Add browser push notifications (attempt) (#412) 2018-06-09 17:33:58 -04:00
Mac Siri
923e1acbda Create Suggester service object (#372)
* Create Suggester::Article::Boosted

* Fix lint & Remove .compact

* Expand Suggester service-object WIP

* Create Suggester::Users

* Remove ClassicArticle

* Replace old refactored classes

* Move Suggester specs into appropriate folder

* Fix broken spec & Fix lint

* Fix lint

* Fix lint

* Fix broken code
2018-06-08 17:17:20 -04:00