Commit graph

243 commits

Author SHA1 Message Date
Mac Siri
11684331d4
Silence Delayed::Workers in spec [ci skip] 2019-01-10 16:33:58 -05:00
Andy Zhao
68807c6df7 Allow Organizations to Update Slug/Username (#1411)
* Close anchor tag typo

* Remove confusing message in profile

* Fix typo in spec

* Add old_slug and old_old_slug fields to org

* Test for check_for_slug_change method

* Add ability for orgs to change slug

* Update copy to match new org language

* Add redirect for organizations with old slugs

* Use less queries for handling org/user redirect

* Use consistent syntax for user creation

* Test for organization slug redirects

* Refactor user article redirect
2019-01-10 14:16:43 -05:00
Andrew Bone
4673496830 SlideShare Liquid tag (#1485)
* Create slideshare_tag.rb

* Create slideshare_tag_spec.rb

* Add slide share

* rubocop compliance

* Still learning

https://ruby-doc.org/core-2.5.1/Regexp.html

* More secure match

Co-Authored-By: Link2Twenty <AndrewB05@gmail.com>

* Strip whitespace

Co-Authored-By: Link2Twenty <AndrewB05@gmail.com>

* Strip before regex

Co-Authored-By: Link2Twenty <AndrewB05@gmail.com>

* Remove latter strip

Co-Authored-By: Link2Twenty <AndrewB05@gmail.com>
2019-01-10 12:58:16 -05:00
Anna Buianova
8f348f9831 Fix comment cancel button url (#1508) 2019-01-10 12:25:11 -05:00
Jess Lee
5e4508ebe1 Remove callbacks from banisher + specs! (#1501)
* wip remove callbacks from banisher

* remove pry
2019-01-09 15:12:38 -05:00
Andy Zhao
08e01b2c2a Fix Podcast Liquid Tag (#1500)
* Test for podcast tag properly rendering

* Include CL helper
2019-01-08 18:45:42 -05:00
Mario See
8bb1716935 connect chat message markdown styling (#1487)
* remove inline markdown rule

* broaden evaluate_inline_markdown

basically same as evaluate_markdown but without class attributes

* remove inline markdown parser

* change code block color and background

* even out code padding top/bottom
2019-01-08 17:48:12 -05:00
Timothy Ng
84bd3a69d7 ApiSecret model for Developer API (#1369)
* Add ApiSecret model scaffold

* Add relationships between ApiSecret, User, Organization

* Add placeholder template to account tab

* Add description column to ApiSecrets

* Add very basic access token generation

* Add basic access token deletion

* Show access token on success flash

* Add placeholder message when user has no secrets

* Use cta style on token generation button

* Add presence validation for ApiSecret description

* Add ApiSecrets factory

* Add pundit policy for ApiSecret

* Nest form field within api_secret hash to allow rails strong params

* Use pundit to authorize ApiSecretController actions

* Add error message flash for ApiSecretsController actions

* Add specs for ApiSecretsController

* Add length validation to api secret description

* Flash model error instead of generic message on save failure

* Truncate ApiSecret factory objects descriptions to prevent validation error

* Remove length restriction on ApiSecret.description

* Use darker font color for token creation date

* Consolidate ApiSecret migrations
2019-01-08 12:30:54 -05:00
Mac Siri
f4ca4a15e5 Fix liquid tag parsing error (#1481)
* Fix liquid tag parsing error

* Update spec
2019-01-07 15:54:57 -05:00
Mac Siri
8e50e58844 Add list-style to Widget (#1448)
* Add list

* Remove retry
2019-01-04 17:48:12 -05:00
rhymes
de5b889445 Fix Rubocop Style/MixinUsage and cleanup prefix_all_images (#1451)
* Use sanitizer to strip HTML tags

* Fix Style/MixinUsage

* Cleanup prefix_all_images

* Stay under 25 lines of code
2019-01-04 14:20:53 -05:00
Arun Kumar
08c070b7e3 Fix block delimiters Rubocop offense (#1456) 2019-01-03 16:45:28 -05:00
Jess Lee
4214bcbbf6 Add user status to internal/users (#1444)
* wip

* add indiviual user partial

* remove unnecessary attributes

* wip

* add indiviual user partial

* remove unnecessary attributes

* remove mentorship matching from view

* fix linting

* add mentor matching method back and refine test

* remove duplicate mentee descriptions

* Update app/controllers/internal/users_controller.rb

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>
2019-01-03 16:44:43 -05:00
Arun Kumar
80a23ba403 Fix rubocop offenses (#1452) 2019-01-03 09:23:38 -05:00
rhymes
dbf5fc63ad Fix Rubocop Security/Open (#1447)
* Re-run rubocop autogen config

* Fix Layout/* violations

* Fix Security/Open and use HEAD if GET is not needed
2019-01-02 16:35:19 -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
Ben Halpern
c6644f9e97
Create tag liquid tag (#1417)
* Create tag liquid tag

* Add tag embed to editor guide
2018-12-29 12:12:18 -05:00
Ben Halpern
fc0175b18d
Refactor articles api controller (#1409)
* Refactor articles api controller

* Modify authorization logic in api
2018-12-27 16:47:04 -05:00
Ben Halpern
e4c120db5d
Replace dev.to with APP_DOMAIN config in a few places (#1406)
* Replace dev.to with APP_DOMAIN config in a few places

* Modify some tests
2018-12-26 18:13:05 -05:00
Andy Zhao
0a8f9ca654 Fix URL Validations and Update Admin Dashboard (#1392)
* Validate for trailing slash instead of strict validation

* Remove unused sign_in_count field

* Add profile URLs to edit view

* Add profile URLs to admin controller params

* Add profile URLs to edit view

* Clean up index and search views for user

* Move around user fields to make more sense

* Display more informative label

* Remove name_of_user field in favor of new display label

* Fix typo

* Remove duplication for website, employer, and Mastodon URLs

* Add score to comment params

* Remove unused name_of_user field views

* Fix typo for medium url
2018-12-26 18:00:02 -05:00
Ben Halpern
2bb48d27c4
Add two-year-club auto-rewarder (#1383) 2018-12-20 16:53:22 -05:00
Ashwin Vaswani
fbdd80d5fc Add headings to header tags (#1003)
* updating all headers to have h* tags, or changing elements

* Remove commented out binding.pry

* Remove unused page

* Use article instead of div for consistency

* Update snapshot with new section tag

* Use h4 tags again for new views
2018-12-19 16:47:44 -05:00
Jess Lee
c2a85540f0 Fix tag mod spec (#1365)
* fix slug typo

* fix specs
2018-12-19 14:35:15 -05:00
Jess Lee
1d2a6def4a Add tag moderation info page (#1360)
* clarifies tag edit form and updates photo

* add better image

* add tag moderation route and page info

* adds labor module for assigning bulk tag moderators

* Apply Peter's changes from code review

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>

* fix typo

Co-Authored-By: jessleenyc <jessleenyc@gmail.com>

* replace with cloudinary image links

* add specs
2018-12-19 09:27:55 -05:00
Andy Zhao
cf36025a16 Fix reactions rendering on notifications (#1362)
* Use more specific find for looking for reactions

* Use basic notification tests

* Test for proper reaction button rendering

* Use the proper user for reaction test
2018-12-18 20:58:31 -05:00
Andy Zhao
8fb35e84c2 Add title to organization profile page (#1355)
* Add test for page title

* Add organization name as title
2018-12-18 17:14:23 -05:00
Andy Zhao
88cd4c13f3 Remove all flipflop related code (#1358)
* Remove all flipflop related code

* Undo an amend

* Comment out one last test

* Remove last test
2018-12-18 16:01:18 -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
Ben Halpern
28736cda20
Add missing title attribute to user profile page (#1349)
* Add missing title attribute

* Add spec

* Fix test
2018-12-17 15:04:00 -05:00
Andy Zhao
b3f2789eb2 Check if author_id is nil before querying for author (#1325)
* Check if author_id is nil before querying for author

* Remove some legacy code

* Remove tests that test for unused functionality
2018-12-15 12:44:45 -05:00
Andy Zhao
cf060d09e9 Visit a page before visiting the delete confirm page (#1326) 2018-12-13 17:20:01 -05:00
Anna Buyanova
074d50d2b7 Stories views reorganization (#1317)
* Added stories feature specs

* Structure feature specs

* Spec for the articles by tag page

* Spec for clicking "week" button on the tag page

* Reorganize stories views

* Feature spec for displaying sponsors on tag page

* Increase allowed rspec example length

* Spec for the users comments view

* Articles by tag: reeplace view code with rendering partials
2018-12-13 14:54:02 -05:00
Mac Siri
56ec3e55a2 Refactor Reaction (#1320)
* Refactor Reaction's spec

* Create singleton class in Reaction

* Refactor Reaction
2018-12-13 14:24:33 -05:00
Mac Siri
72eb2fc7b6 Revert "Extract background jobs from Reaction (#1312)" [ci skip]
This reverts commit cd54bece92.
2018-12-12 17:10:42 -05:00
Mac Siri
cd54bece92 Extract background jobs from Reaction (#1312)
* Refactor Reaction

* Update reaction_spec

* Extract update_reactable to job class

* Create ApplicationJob

* Rename Engagement::UpdateReactableJob to ReactionCascadeJob

* Rename ReactionCascadeJob to Reaction::UpdateRecordsJob

* Refactor Reaction::UpdateRecordsJob

* Remove unused method

* Change module to class
2018-12-12 16:41:31 -05:00
Ben Halpern
14bba5e4d5
Adjust button style/placement on desktop (#1288)
* Adjust button style/placement on desktop

* Change opacity on side comments

* Adjust css for side article actions

* Adjust opacity

* Adjust opacity

* Adjust opacity

* Fix test language

* Remove opacity deal
2018-12-11 13:08:43 -05:00
dependabot[bot]
f115cca714 Bump capybara from 3.10.0 to 3.12.0 (#1294)
* Bump capybara from 3.10.0 to 3.12.0

Bumps [capybara](https://github.com/teamcapybara/capybara) from 3.10.0 to 3.12.0.
- [Release notes](https://github.com/teamcapybara/capybara/releases)
- [Changelog](https://github.com/teamcapybara/capybara/blob/master/History.md)
- [Commits](https://github.com/teamcapybara/capybara/compare/3.10.0...3.12.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>

* Update spec
2018-12-10 16:06:21 -05:00
rhymes
96d01b20a2 Use allow/allowed instead of whitelist (#1296)
* Use allow/allowed instead of whitelist

* Remove duplication in comment
2018-12-10 13:16:16 -05:00
Jibran Kalia
f569f33e4f [WIP] Really simple calculate reading time function (#1283)
* Really simple calculate reading time function

* Move parse_it so that the number of methods in MarkdownParser is at 20

* Added test and default value for reading time
2018-12-09 13:42:32 -05:00
Andy Zhao
afce7acbf6 Fix profile's path for comment (#1280)
* Use user path instead of comment path, oops

* Fix typo

* Add 3 retries to capybara failing spec
2018-12-07 13:11:27 -05:00
Anna Buyanova
7b1c4084a8 Basic feature specs for the stories (#1269)
* Added stories feature specs

* Structure feature specs

* Spec for the articles by tag page

* Disable example length for feature specs

* Spec for clicking "week" button on the tag page
2018-12-07 10:32:38 -05:00
Jess Lee
f96bc7c6f3 Revert banisher (#1274)
* remove stalebot from milestone issues

* simplify banisher
2018-12-06 13:44:53 -05:00
Ben Halpern
6b96201265
[WIP] Allow mods to remove tags and send user notification (#1252)
* Initial tag adjustments

* Finalize tag adjustments and tag adjustments controller

* Fix schema.rb

* Finalize tag removal logic

* Adjust edge cases/tests for tag adjustment moderation

* Adjust tag adjustments spec
2018-12-04 16:45:32 -05:00
Michael Kohl
ffd24f791e Add Mastodon URL to profile (#1137) 2018-12-04 13:24:53 -05:00
Ben Halpern
651ab3ce35
Add point weights for tag follows (#1229)
* Add point weights for tag follows

* Adjust num articles to initially show up on home page

* Fix schema.rb

* Adjust follow policy spec

* Adjust dashboard styling for follow points form
2018-11-30 15:36:58 -05:00
Andy Zhao
32ed3ced11 Fix raw tag (#1215)
* Fix raw tag

* Remove constant first to prevent warning
2018-11-29 15:18:24 -05:00
Jason Yu
3af90f1d0e remove punctuations in header anchor links (#1219)
* remove punctuations in header anchor links

* remove punctuations first

* added test case for punctuation headings
2018-11-29 15:16:09 -05:00
Andy Zhao
8b9aa98f64 Add retry in case sign in failed for whatever reason (#1221) 2018-11-29 13:39:48 -05:00
Ben Halpern
011e267769
Update mentor matching page (#1218)
* Update mentor matching page

* Update mentorship relationship spec
2018-11-28 19:02:47 -05:00