Commit graph

135 commits

Author SHA1 Message Date
Molly Struve
b40af82b66
Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556)
* Flaky Spec Fix:Remove let_it_be Test Prof Helper

* Spec cleanup and fixes
2020-07-29 11:31:01 +02:00
rhymes
bbd56875c7
Rubocop: address feedback of #9430 and use kwargs (#9538)
* Use fetch.to_i

* Rubocop: address feedback of #9430 and use kwargs
2020-07-29 11:13:36 +02:00
rhymes
0b4ad49cf8
Rubocop: Enable and fix Style/OptionHash (#9430)
* Enable and fix Style/OptionHash

* Add 10 seconds default timeout to DB statements
2020-07-25 10:41:21 +02:00
rhymes
88f0a0e58a
Rubocop: re-activate Style/RegexpLiteral and fix violations (#9418)
* Rubocop: re-activate Style/RegexpLiteral and fix violations

* Add 10 seconds default timeout to DB statements
2020-07-22 16:28:27 +02:00
rhymes
696c712883
Rubocop: routine fixes (#9345)
* rubocop -A

* Fix Style/HashLikeCase

* regenerated todo file
2020-07-16 18:18:13 +02:00
Molly Struve
e03f337c9c
Refactor: Send RSS Reader and Payment Errors to Honeybadger (#9209)
* Refactor: Send RSS Reader and Payment Errors to Honeybadger

* remove old VCR cassettes
2020-07-09 08:48:52 +02:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Michael Kohl
e25936ff57
Fix RSS import (#8877)
* FIx RSS import part 1

* Add spec for medium.com/feed/@dvirsegal

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-24 10:51:07 -04:00
Molly Struve
757e611f6d
Spec Fix: Use Truncation For Tests Where Transactions Get Stuck (#8865) 2020-06-24 09:23:52 -05:00
Zach Attas
db468a6cfc
Adds ability to run spec not headlessly (#8844) 2020-06-23 08:37:37 -05:00
Zach Attas
d380077592
adds travis branch to ci formatter (#8825) 2020-06-22 13:52:51 -04:00
Alberto Pérez de Rada Fiol
5f75d2a49a
Fix erblint errors on the app/views/liquids folder (#8403)
* Fix erblint errors on the `app/views/liquids` folder

* Make tests pass

* Make failing test pass
2020-06-11 20:03:27 +02:00
Molly Struve
f647944046
[deploy] Spec Speedup: Use Knapsack to Run Parallel Builds (#8390) 2020-06-11 10:27:11 -05:00
Molly Struve
87c258bdec
Flaky Spec Fixes: Override Warden Test Helpers to Prevent Auth Race Conditions (#8379) 2020-06-10 09:30:36 -05:00
Molly Struve
9e3b6a090b
Flaky Spec Fixes: Dont Assume No Elasticsearch Data, Refresh before delete_by_query (#8354) 2020-06-09 07:55:28 -05:00
Ernesto Tagwerker
9ea3a8c67d
Upgrade to Rails 6.0 (#7658)
* Add dual booting logic to Gemfile

This might be helpful for the Rails 6.0 upgrade project.

* Add more than one gemfile to Travis' configuration

We want to see how the application behaves with more than one Rails versions:

- Gemfile -> Rails 5.2
- Gemfile.next -> Rails 6.0

This will help us figure out what needs to be addressed before migrating to Rails 6.0.

If you want to read more about this technique (dual booting) you can check out this page: https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html

* Fix joins

* Upgrade Gemfile.next.lock

* Make sure we're installing the correct versions of gems

* Add Rails 6 notes

* Update rubocop in Gemfile.next.lock

* Fix organization spec

* Fix page_views_spec

* Add Rails 6 and run rails app:update

* Remove some tricks

* Remove Gemfile.next for now

* Fix .content_type deprecation

* Fix deprecation of .where.not NAND/NOR behavior

* Fix deprecation of parameterized emails

* Fix specs

* Remove next flag for now

* Fix spec (hopefully)

* Add wait_for_javascript

* Fix spec, thanks @maestromac!

* Try without wait for javascript hack

* Remove unnecessary bin/update

* Remove file that snuck in the rebase

* Update the vendored gems

* Replace migrate+db:setup with db:prepare

* Update vendored gems

* Fix Gemfile.lock and update vendored stuff

* Fix Gemfile.lock to be the same as master's minus the changes

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-04 11:54:25 +02:00
Molly Struve
b0d28aadfd
Actually Replace File Name Colons (#8036) 2020-05-22 15:02:29 -05:00
Molly Struve
a236cec67f
Dont Use Colons In Timestamps For CI CSVs (#8035) 2020-05-22 14:10:15 -05:00
Zach Attas
52277ea0ba
Adds csv formatter only in CI and makes screenshot names unique with timestamp (#7838)
* adds csv formatter only in CI and adds --format progress to rspec in CI

* addressing feedback

* adds more functionality to csv reporter, and makes screenshots taken from rspec/retry have unique names

* induces intentional fails (will revert after testing)

* induces intentional fails (will revert after testing)

* makes screenshot timestamp more precise and tweaks intentional fails (again willremove later)

* restores spec files to normal and tweaks screenshot microseconds

* remove the putses at end of CSVFormatter
2020-05-20 10:40:55 +02:00
rhymes
300ba1b33f
[deploy] Decouple Twitter authentication from fetching tweets (#7920)
* Add TwitterClient::Client

* Use TwitterClient::Client for Tweet

* Test retweets

* Test assignment to user

* Fix TweetTag spec

* Remove TwitterBot

* Fix some specs

* Fix RSS Reader specs
2020-05-19 18:05:41 -04:00
rhymes
9ea00dfe53
[deploy] Fix Github::OauthClient access token auth (#7922) 2020-05-18 11:15:14 -05:00
rhymes
3130261384
Refactor GitHub::Client to extract Github::OauthClient for users (#7848)
* Introduce Github::OAuthClient and refactor shortcut Github::Client

* Better stubbing and fix specs

* Fix Badge rewarder

* Add dummy values for Travis

* Fix spec?

* Simplify

* Fix spec take 2?

* Is this the right one?

* Hopefully this is the last time, for realz

* Fix spec for the nth time?

* Which deity do I have to offer a sacrifice to?

* This is it

* Fix Honeycomb name
2020-05-18 14:23:55 +02:00
rhymes
e104c8b5c5
Upgrade validate_url to 1.0.11 to fix load error (#7882)
* Upgrade validate_url to 1.0.11 to fix load error

* Fix spec
2020-05-15 16:17:07 +02:00
Dmitry Maksyoma
f63c7f9289
Fix Runkit tags not being activated when comment is added (#6767)
* Fix Runkit tags not being activated when comment is added

* Runkit tag activation was ran once, on page load. I've changed it to
  run on on comment preview and submit.
* It was necessary to add a check to skip already activated Runkit
  tags. The code didn't take into account that a tag could be already
  processed, and would just crash.

* Fix Runkit tags and add tests

* Add test for previewing article with Runkit tag

* "Fix CodeClimate not finding waitForRunkitAndActivateTags()

* Refactor a test for readability

* Make Rubocop happy

* Improve test for previewing article with Runkit tag

* Use one method for determining active Runkit tags

* Defer loading of JS from embed.runkit.com

* Add utility function dynamicallyLoadScript(url)

* Switch to dynamic loading of Runkit

* parsed content code block is also hidden now to avoid displaying <code /> block before runkit iframe loads.

* Fix Runkit test

* Remove Runkit script caching in v2 form

* Use <%== instead of .html_safe in v2 form

* Update app/assets/javascripts/utilities/dynamicallyLoadScript.js

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-05-15 14:27:46 +02:00
Mac Siri
f15797ac17
Expand webhook API request specs (#7872)
* Expand webhook API specs

* Use single expectation

* Refactor include examples
2020-05-15 11:35:44 +02:00
Molly Struve
4e2cbe9b9f
Add Feature Search Tests for Users and Articles (#7745) 2020-05-08 17:06:05 -04:00
rhymes
64943016c4
Decouple GithubReadmeTag liquid tag from GitHub auth (#7707)
* Decouple GithubReadmeTag from GitHub auth

* Remove commented code

* Remove unused VCR file

* Fix spec and improve error handling
2020-05-08 13:09:27 +02:00
rhymes
ae8a58fec2
[deploy] Decouple GitHub authentication from fetching GitHub issues (#7660)
* Improve error handling

* Add tests for Github::Client

* Add GithubIssue validation

* Refactor GithubIssue and fix bug with pull requests

* Improve tests

* Fix PR API URL generation

* Improve logic and get rid of the issue fragment

* Fix disappeared avatar

* Improve rendering

* Activate client side caching using Redis

* Remove unnecessary file

* Add RemoveGithubIssues data update script

* Fix comma

* Forgot to disable the approvals verify text

* Apply PR feedback
2020-05-04 16:17:16 -04:00
rhymes
c7c498834f
[deploy] Authentication refactoring: generalize account settings (#7597)
* Rename remove_association to remove_identity and future proof its tests

* Use the signin_path everywhere

* Generalize account settings

* Use delegation
2020-04-30 17:29:53 +02:00
Mac Siri
2ea320a245
Support docker-selenium (#7583)
* Support use of selenium-docker

* Apply suggestion

* Add documentation
2020-04-30 11:07:45 +02:00
Molly Struve
4c779be2ed
[deploy] Remove ALL Algolia Code (#7577) 2020-04-29 10:11:57 -05:00
rhymes
8407bf9b4e
[deploy] Authentication refactoring: cleanups (#7576)
* Use Devise registry to list available providers

* Cleanups following Devise+Omniauth docs

* More cleanups

* Use helpers

* More cleanups

* Oops, forgot to remove these specs
2020-04-29 10:33:30 -04:00
rhymes
178a049262
Add SVG optimizer (#7542) 2020-04-28 08:28:25 -04:00
Molly Struve
5bf12a51d7
Clear Elasticsearch data for user viewing timeline specs (#7549) 2020-04-27 17:11:47 -05:00
Maja Komel
4499e5eb6e
[deploy] Add Wikipedia liquid tag (#7193) 2020-04-22 17:54:56 +02:00
Molly Struve
13e8ea1f64
Ensure records are updated properly after a user merge (#7416) 2020-04-21 14:17:11 -04:00
Ridhwana
a2f1a0049f
Removal of morrrre hardcoded dev.to links (#7390)
* feat: remove 90% of hardcoded dev.to links now

* chore: update tests

* chore: implement suggested changes

* chore: update url

* chore: update to use URL helper
2020-04-21 11:50:18 +02:00
rhymes
0a6be8b967
[deploy] Improve some validations (#7335)
* Validations

* Fix specs

* Revert twitter tag change
2020-04-16 18:59:12 +02:00
rhymes
d6e47a03c7
[deploy] Authentication refactoring - step 1 (#7259)
* Add Authentication providers

* Making strides on refactoring

* New usr from Twitter

* Existing Twitter user

* Existing user Github

* Test skip_confirmation!

* Refactor a bit and add simplecov groups

* Test user already logged in

* Rename to Authentication::Authenticator

* Refactor to a common class

* Add existing user test for twitter login

* Refactor global handler

* Fix spec and comment Twitter provider

* Update comments and strategy TODO

* Move providers loading code to Authentication::Providers

* add SubclassResponsibility error

* Use delegation
2020-04-15 12:13:10 -04:00
Ridhwana
6c8cbabdff
Remove unused file and fix social media icon css on information page (#7295)
* chore: does not look like this file is being used anywhere

* fix: the svg's didn't seem to be resizing because we did not have a viewBox tag on the svg

* chore: update spec file
2020-04-15 13:22:28 +02:00
rhymes
f2b0be2043
Add Slack messengers: part 2 (#6916)
* Add Slack::Messengers::ArticlePublished

* Add Slack::Messengers::ReactionVomit

* Add Slack::Messengers::CommentUserWarned

* Add missing URL helpers

* Add Slack::Messengers::ArticleFetchedFeed

* Remove callback condition

* Build, don't create
2020-04-03 17:00:06 +02:00
ludwiczakpawel
19da53450e
[deploy] Profile link fix (#7019)
* wtf

* fix

* gitattributes

* test ???
2020-04-02 19:33:17 -04:00
rhymes
a58596f25f
Correctly save Tweet reply ids (#6951) 2020-03-31 11:09:19 +02:00
rhymes
336c195228
Remove redundant Puma silencing in system specs (#6905) 2020-03-27 09:51:35 -04:00
rhymes
118762ca9b
Some RSpec fixes (#6757)
* Fix spec/uploaders/profile_image_uploader_spec.rb

* Additional ordering based fixes

* Fix spec/requests/comments_spec.rb

* Fix spec
2020-03-24 13:16:19 -04:00
ludwiczakpawel
61b913e5e8
Replacing theme variables (#6682)
* add tons of colors

* add tons of colors

* moving cheese around and prepping for new theming system

* documenting

* .

* moving theme code to own files

* replacing some variables

* whitespaces

* replacing another batch of variables

* get rid of another variable

* replace loading animation variable with one-fits-all-sizes

* get rid of theme-anchor-color

* remove code colors variables

* another batch of variables replaced

* mostly bringing in variables for haxor theme

* remove invert-image variable for chat

* remove another inver-image variable

* forgot to remove reaction-background variable

* remove border variable

* series

* .

* remove another variable

* remove another variable..

* another batch of variables

* and more...

* drop comments

* Update approval file for tweet

Co-authored-by: rhymes <rhymesete@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
2020-03-24 15:05:35 +01:00
rhymes
b8b321c13d
Fix VCR warnings and use initializers (#6672) 2020-03-17 15:51:07 +01:00
Mac Siri
8e4905522d
Implement KatexTag (#6237) [deploy]
* Install Katex gem

* Add Katex stylesheet and spec

* Implement basic error handling

* Remove comment

* Create more spec

* Update approval file

Changes is due to turning off RedCarpet's superscript feature

* Add instruction to _editor_guide_text

* Serve our own KaTeX css

* Apply Rhyme's suggestion

* Limit Katex's css use

* Update spec

* Add spec

Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
2020-03-09 17:58:54 -04:00
Alex
e40c28117b
Search ClassifiedListings backend code (#6348)
* Add search methods

* Add spec for new search methods

* Add QueryBuilder for ClassifiedListing

* Add QueryBuilder spec for ClassifiedListing

* Refact build_query in ClassifiedListings

* Refactor logic for filter and query conditions

* Refactor index_documents to helper_method

* Update elasticsearch helper for single objects

* Refactor specs from stubbing to record update

* Update search and specs for query_builder

* Refactor set_size

* Update Search::ClassifiedListing

- Add DEFAULT_PAGE constant
- ADD DEFAULT_PER_PAGE constant
- Add pagination

* Fix paging

* Add pagination specs

* Remove manual Array conversion for Array.wrap()

* Change guard clause to .key? for readability
2020-02-28 10:51:33 -05:00
rhymes
168f5c597c
Bump Twitter to 7.0 and refactor TwitterBot (#6246) [deploy] 2020-02-24 08:34:41 -05:00