Commit graph

60 commits

Author SHA1 Message Date
Ben Halpern
a1be99ebf0
Add reaction confirm/invalidate workflow for admins (#1134) 2018-11-16 18:53:36 -05:00
sidemt
62d8a33111 Add GitLab URL field to user profile (#1121)
* Add SVG file of GitLab icon

* Add gitlab_url column to users table

* Add gitlab_url to user model, controller and policy

* Add gitlab_url to views

* Add tests for gitlab_url
2018-11-15 16:09:35 -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
Ben Halpern
1aa8e70a5b
Allow removal of collection element (#1036)
* Allow removal of collection element

* Update tests
2018-10-29 15:14:13 -04:00
Ben Halpern
359cc71b64
Add ability for users to publish series (#1034) 2018-10-29 13:04:42 -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
Ben Halpern
302e8f202d
Add HTML variants for cta optimization and other nav bar adjustments (#970)
* Add HTML variants for cta optimization and other nav bar adjustments

* Fix 1==1 non-random mistake

* Spruce up org call-to-action

* Change default text color

* Add html variant trial and success request specs

* Fix article sidebar caching issue

* One line adjustment

* Modify schema

* Add include ActionView::Helpers::TagHelper to user_tag_spec

* Modify follow_button to remove session context

* Dummy commit

* Change Edit Article to Edit Post

* Dummy commit

* Fix rubocop concerns

* Fix rubocop style
2018-10-22 17:03:57 -04:00
rhymes
1b60ee5009 Use timezone aware methods (#893)
* Use timezone aware datetime methods

* Use timezone aware date parse for GitHub issue tag

* Introduce a bit of chaos programming using Zonebie

Zonebie uses a random timezone to run tests, it's a really good way to see if the code is timezone dependent or not.

* Convert GitHub issue date as UTC
2018-10-18 16:26:29 -04:00
Ryan
95b2e181ff Add Medium URL to User's Profile (#943) 2018-10-18 11:39:39 -04:00
Ben Halpern
fcb68b4f29
Add automatic random mentee show page after quick match (#931) 2018-10-16 13:41:14 -04:00
Ben Halpern
75c4388e53
Add mentorship automation (#896) 2018-10-12 16:37:32 -04:00
Ben Halpern
ecb9645775
Make changes to editor (#837)
* Make changes to editor

* Make minor fixes and console log removals

* Fix test in article form

* Adjust rspec test
2018-10-05 16:03:06 -04:00
Ben Halpern
2c482a355f
Remove saw_onboarding condition (#824)
* Remove saw_onboarding condition

* Remove outdated onboarding test
2018-10-05 15:07:05 -04:00
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -04:00
Ben Halpern
2517bb555b
Add functionality for buffering to different accounts (#752)
* Create initial buffer updates logic

* Add UI functionality and test for sattelite tweets

* Add additional /mod functionality and re-use script partial in /internal
2018-09-26 15:51:39 -04:00
dependabot[bot]
eafefd7422 Bump octokit from 4.8.0 to 4.12.0 (#744) [ci skip]
* Bump octokit from 4.8.0 to 4.12.0

Bumps [octokit](https://github.com/octokit/octokit.rb) from 4.8.0 to 4.12.0.
- [Release notes](https://github.com/octokit/octokit.rb/releases)
- [Changelog](https://github.com/octokit/octokit.rb/blob/master/RELEASE.md)
- [Commits](https://github.com/octokit/octokit.rb/compare/v4.8.0...v4.12.0)

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

* Update spec
2018-09-25 17:04:58 -04:00
Andy Zhao
5814d0a263 Add slack notifications to notes for reports (#660)
* Remove extraneous string conversion

* Add slack message for new notes

* Move status and minimize buttons to the bottom

* Add note model spec

* Remove extraneous param for reported links
2018-09-25 14:36:54 -04:00
Mac Siri
32d15f2820 Update test suite configuration (#702)
* Update DatabaseCleaner

* Only retry in CI

* Update rubocop precommit hook

* Update spec

* Restructure spec configs WIP

* Restructure spec configs WIP

* Create OmniauthMacros

* Fix broken spec

* Update spec
2018-09-24 14:40:22 -04:00
Mac Siri
6521545fb3 Improve Comment's email logic (#699)
* Improve comment's email logic

* Change #activity_notify logic

* Update comment_spec

* Remove focus

* Update should_send_email_notification?
2018-09-19 18:20:15 -04:00
Jess Lee
4451e5eb38 Update User Dashboard With Mentorship Admin Features (#440)
* create mentor relationship table and begin dashboard

* add missing files from previous commit

* add mentorship relationship status

* remove uniqueness validation

* add multiple notes

* ban from mentorship deactives all relationships

* add untracked files

* fix logic issue and add specs

* add model specs

* add request specs

* add request specs and fix linting

* fix internal users spec

* remove phantom columns

* remove bizzaro character

* move all attr_accessor to one line
2018-09-11 15:59:25 -04:00
Timothy Ng
b32ebdb9b9 Update profile links regex to allow trailing slash (#614)
* Update url validation specs to include multiple cases of usernames

* Allow trailing slash in profile links

* Add username with dot separators to list of valid fb usernames

* Update fb url regex to allow dots in between words

* Push existing fb regex allowing for dot separators

* Revert to old regex with added period to character class

* Revert length restriction on fb regex
2018-09-10 16:34:45 -04:00
Kohei Sugi
f34c717027 Fix rubocop lint (#583)
* $ rm .rubocop_todo.yml && rubocop --auto-gen

* 👮 Layout/AlignHash

* 👮 Layout/IndentationConsistency

* 👮 Layout/TrailingBlankLines

* 👮 Lint/UnusedBlockArgument

* 👮 Style/TrailingCommaInHashLiteral

* Fix rubocop.yml setting

* Delete last conma

* Style/TrailingCommaInArguments and Style/TrailingCommaInArrayLiteral are comma style
2018-09-10 11:19:11 -04:00
Andy Zhao
22c9714919 V2 of Reports System (#441)
* Fix weird breakpoint top-nav issue

* Fix error handling when submitting blank note

* Change status closed to invalid

* Add ability to sort between status

* WIP

* Add working views for new report page

* Add mailer WIP

* Add MVP of new reports system

* Move collapse to the right & add show page link

* Fix buttons for index page

* Change collapse to collapse/expand

* Remove email functionality from new report

* Update copy of report abuse responses

* WIP of showing emails in reports

* Fix notes for user_role_service.rb

* Remove unused scripts from internal.html.erb

* Update tests for reports dashboard

* Add missing migration file

* Add finishing touches to reports dashboard

* Remove deprecated methods

* Update view with better timestamps

* Update and write new tests

* Add .codeclimate.yml

* Remove commented out editor thing

* Undo commented out code for recaptcha method

* Undo comment out code for development

* Use new comment path instead of old comment path
2018-09-04 17:08:41 -04:00
Andy Zhao
d9b6941537 Fix user profile additional links (#587)
* Fix user profile additional links

* Update user model and user spec
2018-09-04 13:06:48 -04:00
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
Andy Zhao
79d8661ccc Increase #cache_tag_list limit (#436)
* Update error message for single tag length

* Increase cached_tag_list length to match tag length limit
2018-08-22 14:17:58 -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
4b3951cfb2 Silence cache logs and fix a small bug (#370)
* Test that async_score_calc only changes ratings if published

* Run async_score_calc only if an article is published

* Turn delaying jobs back on after tests run
2018-08-18 16:57:57 -04:00
rhymes
c4802218ff Fix LinkedIn accepted urls (#390)
* Add support for country specific Linkedin urls

Closes #343

* Add tests to make sure three letters country codes are prohibited
2018-08-17 17:25:23 -04:00
Kohei Sugi
9b841f8235 Use TimeWithZone (#351) [ci skip]
before
```
$ bundle exec rspec  spec/models/article_spec.rb:431
Run options: include {:locations=>{"./spec/models/article_spec.rb"=>[431]}}
F

Failures:

  1) Article does not show year in readable time if not current year
     Failure/Error: expect(article.readable_publish_date).to eq(time_now.strftime("%b %e"))

       expected: "Aug 15"
            got: "Aug 14"

       (compared using ==)
     # ./spec/models/article_spec.rb:434:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:84:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:84:in `block (2 levels) in <top (required)>'

Finished in 0.88093 seconds (files took 15.54 seconds to load)
1 example, 1 failure
```

after
```
$ bundle exec rspec  spec/models/article_spec.rb:431
Run options: include {:locations=>{"./spec/models/article_spec.rb"=>[431]}}
.

Finished in 0.86248 seconds (files took 12.44 seconds to load)
1 example, 0 failures
```
2018-08-14 14:44:53 -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
Jess Lee
33f590ecc8 Jess/mentorship form updates (#653)
* add timestamps for mentroship form updates

* update placeholder text

* Add tests for mentee description change
2018-08-06 13:04:11 -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
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
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
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
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
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
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
Ben Halpern
1127b2e61b
Add protection against reactions to unpublished articles (#473) 2018-06-21 15:44:04 -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
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
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
7bc3e60283
Add browser push notifications (attempt) (#412) 2018-06-09 17:33:58 -04:00
Ben Halpern
fd4390983c
Add badge achievemnt context message markdown (#382)
* Add badge achievemnt context message markdown

* Add badge rewarder method for beloved comments
2018-06-04 17:31:01 -04:00
Ben Halpern
4171a0814a
Add basic alpha DM functionality to chat (#375)
* Initial chat DM features

* Update functionality for DM chats
2018-06-01 16:21:48 -04:00