Commit graph

6 commits

Author SHA1 Message Date
Nihad Abbasov
4995a4af21 Performance: replace ruby methods with their faster alternatives (#949)
- Array#select.first is slower than Array#detect.

  - Array#shuffle.first is slower than Array#sample.
2018-10-19 13:21:18 -04:00
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -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
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
d74483dd5f Fix GitHub Repo feature (#78)
* Create MarkdownFixer spec

* Fix lint

* Fix lint

* Update GithubRepo::find_or_create

* Fix failing specs

* Fix failing specs

* Add error handling for GithubReposController

* Improve GithubRepo::update_to_latest
2018-03-15 11:36:22 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00