Commit graph

144 commits

Author SHA1 Message Date
Maksim Litvinov
33db32e5f4 Fix rubocop lints (#794) 2018-10-03 13:00:09 -04:00
Ben Halpern
18c5e8718d
Add page_views_count to articles and track from analytics (#761) 2018-09-28 14:33:25 -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
Ben Halpern
cf075d4a9f
Ben/fix authorization edge case (#748)
* Add top param to article tag api

* Fix user validation persistence bug
2018-09-25 18:46:17 -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
Ben Halpern
e80bf919fc
Add top param to article tag api (#741) 2018-09-25 15:13:49 -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
Gabriel Lebec
4d673e9601 Support RunKit preamble (#696)
* feat(runkit-tag): support preamble

* chore(runkit-tag): remove unnecessary length check

* docs(editor guide text): add preamble to runkit snippet

* fix(spec/runkit-tag): add preamble code to spec

* fix(runkit-tag): prevent xss attacks

* fix(runkit-tag): prevent race condition
2018-09-21 11:27:42 -04:00
Ben Halpern
160056a19d
Add organization users to sidebar and other org ajustments (#707) 2018-09-20 15:43:43 -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
rhymes
88d2e7343a Remove a puts statement (#691) [ci skip] 2018-09-17 16:08:37 -04:00
Benny Powers
3025999a45 Fix/glitch regression test (#684)
* Add regression test for glitch glitch

* Modify regression test for glitch glitch

Co-authored-by: rhymes <rhymesete@gmail.com>
2018-09-17 15:38:21 -04:00
Benny Powers
95fe0eeb94 Add glitch embed options in liquid tag (#680)
* Add glitch embed options in liquid tag

* Add glitch embed options in liquid tag
2018-09-17 10:26:02 -04:00
Andy Zhao
da87fe2e0d Fix YouTube tag (#649)
* Fix YouTube tag

* Remove solargraph from VS Code recommendations

* Update editor guide for more clarity
2018-09-13 14:21:10 -04:00
Jess Lee
191588b34b Adds method to create bulk mentorship matches (#631)
* add mentorship module

* update spec file name for consistency
2018-09-11 16:46:01 -04:00
Andy Zhao
13ab37951c Update analytics controller with new policy (#630) 2018-09-11 16:45:27 -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
Andy Zhao
744c2d4fff Fix email formatting (#627) 2018-09-11 10:25:21 -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
49428cc09f Add liquid variable class and specs (#615) 2018-09-06 14:24:14 -04:00
Andy Zhao
a4c3d97aa9 Fix Liquid Filters and Fix DevComment Tag (#608)
* Update standard filters

* Update comment tag and rename devcomment tag

* Update tests with new file name

* Refactor liquid tags into null tag

* Fix renaming issue and refactor

* Fix useless assignment via codeclimate

* Add test for null tag

* Update LiquidTags.scss with new file name
2018-09-05 17:42:47 -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
832e892373 Fix Liquid Tags (#590)
* Fix glitch tag

* Add custom solutions for default liquid tags

* Update liquid tags regex

* Add speakerdeck tag and format guide a bit
2018-09-04 16:19:24 -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
Andy Zhao
c888fd6faa Add ability to prevent comment creation (#554) 2018-08-31 12:11:21 -04:00
Andy Zhao
c631209921 Fix codepen tag (#564)
* Fix codepen tag

* Fix codepen tag
2018-08-31 11:52:16 -04:00
Andy Zhao
b99566afb3 Improve GistTag (#555) 2018-08-30 16:32:20 -04:00
Ben Halpern
f1abd283f9 Expand BadgeRewarder functionality (#540)
- Refactor badge rewarder
- Add contributor badge functionality
- Create BadgeRewarder rake tasks
2018-08-30 16:03:38 -04:00
Mac Siri
2dbf16eeb2
Expand README's setup steps (#520)
* Remove duplicate key

* Improve test specs

* Update README
2018-08-28 17:37:29 -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
Grey Baker
519d1e1fea Bump factorybot rails (#475)
* Bump factory_bot_rails from 4.10.0 to 4.11.0

Bumps [factory_bot_rails](https://github.com/thoughtbot/factory_bot_rails) from 4.10.0 to 4.11.0.
- [Release notes](https://github.com/thoughtbot/factory_bot_rails/releases)
- [Changelog](https://github.com/thoughtbot/factory_bot_rails/blob/master/NEWS)
- [Commits](https://github.com/thoughtbot/factory_bot_rails/compare/v4.10.0...v4.11.0)

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

* Update factories to always use blocks
2018-08-24 17:28:26 -04:00
Brett Stevenson
f423511178 Add youtube start time feature (#437) 2018-08-24 12:59:29 -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
Andy Zhao
b1f6587a3a Fix #valid_link for CodePen and Gist Liquid tags (#425) 2018-08-21 14:16:56 -04:00
Josh Cheek
4a2a003a98 Feature/vimeo tag (#409)
* Add liquid tag for vimeo

* VimeoTag works when Markdown makes its input HTML

* VimeoTag documentation
2018-08-20 14:26:18 -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
Derek Hopper
7c8472b782 Add request specs (#275) (#329) 2018-08-13 18:03:34 -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
Mac Siri
69fc87a67d Refactor CacheBuster (#286) 2018-08-08 17:45:14 -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
Andy Zhao
d77db61d0a Disable report specs (#661) 2018-08-06 12:45:31 -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
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