Commit graph

155 commits

Author SHA1 Message Date
Ben Halpern
01e43a99e7
Fix /connect bug and add email-if-inactive functionality (#482)
* Add basic functionality for connect message emails

* Fix lint

* Add connect messages email permission
2018-08-27 14:29:53 -04:00
Kohei Sugi
7760a8d196 Fix Lint/UselessAssignment (#388) 2018-08-23 15:03:29 -04:00
Kohei Sugi
3343998391 Fix Naming/MemoizedInstanceVariableName lint (#389) 2018-08-21 16:35:57 -04:00
Kohei Sugi
5927b13667 Fix Style/DateTime Lint (#385) [ci skip] 2018-08-20 16:23:06 -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
de25d33ce9 Delay all destroys and bust old username path (#391) 2018-08-17 17:23:33 -04:00
Kohei Sugi
fc49fc002c Fix Style/Semicolon Lint (#376) [ci skip] 2018-08-17 12:15:38 -04:00
Araslanov Evgeny
8095c8fc4d Added ArticleWithVideoCreationService (#344) 2018-08-15 17:19:54 -04:00
Araslanov Evgeny
4ba8296298 API: Fix find tags by name (#359) 2018-08-15 17:01:43 -04:00
Kohei Sugi
91c3eef1e1 Fix Layout/EndAlignment lint (#349) [skip ci] 2018-08-15 15:49:38 -04:00
Kohei Sugi
36d2dfd122 Apply rubocop some rule (#295)
* Fix FactoryBot/StaticAttributeDefinedDynamically and Metrics/LineLength

* Fix RSpec/NotToNot: Prefer not_to over to_not

* Fix RSpec/NotToNot: Prefer not_to over to_not and Metrics/LineLength

* Fix Layout/MultilineMethodCallIndentation and Metrics/LineLength

* Fix Naming/PredicateName

* Fix Style/ConditionalAssignment

* Avoid code climate error
2018-08-13 16:32:11 -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
Andy Zhao
468ffd5fc2 Temporarily remove email notification and status page (#657) 2018-08-06 10:53:43 -04:00
Ben Halpern
05789f6ef6
Add client-side /connect maxlength and add badge setting on model only (#660) 2018-08-06 10:45:01 -04:00
Andy Zhao
885cdb5941 Make internal events descending order (#648) 2018-08-02 09:22:02 -04:00
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
Ben Halpern
1181a952ed
Fix small caching issues and adjust serviceworker logic (#632)
* Fix small caching issues and adjust serviceworker logic

* Assign state to follow buttons to avoid refetch

* Modify serviceworker push issue

* Change asset_path to javascript_pack_path in serviceworker

* Change javascript_pack_path to javascript_path in serviceworker

* Remove javascript_path for now
2018-07-30 10:43:29 -07:00
Ben Halpern
1c3331d77f Add proper body_markdown back in 2018-07-27 21:02:14 -07:00
Mac Siri
0f3342bcec [WIP] Implement non front-matter editor (#415)
* Create alternate editor

* Install linkstate (?)

Not sure how it disappear in the first place

* Run yarn install

* Modulize ArticleForm component

* Refactor

* Isolating css WIP

* Implement simplified frontmatter-less editor

* Modulize individual form element

* Ajust props names

* Transform json params to snakecase

* Remove codes

* Update /new, almost there for release

* Fix editor resize issues

* Change defaultvalue to value in article form tag element

* Modify html buttons in article form
2018-07-27 20:12:33 -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
e4bb8d7823
Modify timeout and make some queries more efficient (#593)
* Modify timeout and make some queries more efficient

* Only query podcasts if user signed in

* Remove unnecessary columns selected in boosted query etc.
2018-07-19 11:55:59 -04:00
Ben Halpern
5a2c549927
Add reactions to /connect content (#585) 2018-07-13 20:05: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
9fa9a22d54 Add a comment for more public controllers (#553) 2018-07-09 18:14:34 -04:00
Ben Halpern
926991f5fc
Fix timezone issues and small adjustment to connect features (#548) 2018-07-05 16:39:04 -04:00
Andy Zhao
749ffabbe7 [Done] Adjust abuse reports (#540)
* Fix bad formatting of links

* Change spam bot to post in potential-spam

* Add internal report link to Slack message
2018-07-05 11:16:11 -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
4565476fa7
Add monkeypatched auth method to admin application_controller (#525) 2018-06-29 17:20:55 -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
Andy Zhao
62352fe6d6 Authorize admin after checking csrf (#523) 2018-06-29 13:59:03 -04:00
Ben Halpern
71c94b6546
Fix boosted posts and add spec (#521) 2018-06-28 17:22:02 -04:00
Mac Siri
6bae46fbbf Remove escaping of user_params (#500)
* Remove the need to escape user_params

* Fix lint

* Permit password and password_confirmation

* Fix lint
2018-06-28 15:56:24 -04:00
Ben Halpern
799aa16378
Fix /live for workshop (#516) 2018-06-28 14:28:24 -04:00
Tiffany Wismer
414d259c0d Fixed errors in last pull request (#502) 2018-06-28 12:11:04 -04:00
Ben Halpern
7e9280390c
Add /survey and modified several page titles (droped the the) (#515)
* Add /survey and modified several page titles (droped the the)

* Add emojis to page title
2018-06-28 11:07:42 -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
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
b44a3eecc2
Modify valid_request_origin? (#483) 2018-06-22 13:38:19 -04:00
Tiffany Wismer
7f0f2328c0 Refactor handle_tag_index in stories_controller (#481) 2018-06-22 10:40:11 -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
Ben Halpern
2b4749bf11
Whitelist columns on to_json call (#477) 2018-06-21 17:43:56 -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
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