Commit graph

1586 commits

Author SHA1 Message Date
Ben Halpern
1aaf91c37c
[deploy] Add config for whether campaign posts require approval (#7961)
* Add config for whether campaign posts require approval

* Fix logic
2020-05-21 21:00:11 -04:00
Ben Halpern
b51d56159a
[deploy] Implement web-monetization/payment pointer (#6345)
* WIP payment pointer

* Add payment pointer config

* Add proper siteconfig var to view

* Finalize

* Fix typo

Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
2020-05-21 12:10:02 -04:00
Dana Scheider
c59db25387
[deploy] Gracefully handle missing linked users from comments (#7941) 2020-05-21 09:07:51 -05:00
Anna Buianova
5fcc44677e
Display existing sponsorships even when an org doesn't have enough credits (#7978) 2020-05-21 13:10:39 +03:00
Molly Struve
76da5a7a66
Remove ProMembership Models (#7989) 2020-05-21 12:04:41 +02:00
Vaidehi Joshi
71852e6975
Remove some superfluous Percy snapshots (#7992) [deploy]
There doesn't seem to be enough of a difference between these snapshots, and, for some reason, they date doesn't not seem to be freezing for some of the data captured within them. Since we already have a snapshot of this page, we don't need so many versions of it.
2020-05-20 15:56:04 -07:00
Julianna Tetreault
97c46cfbf8
Refactor User-Specific JSON-LD in the Stories::Controller (#7731)
* Refactor user_same_as_json_ld method to be more readable

* Refactor user JSON-LD to be less verbose in Stories::Controller
  * Removes set_user_same_as_json_ld method
  * Removes set_user_profile_json_ld method
  * Adds user_works_for and user_disambiguating_description
  * Adds inline logic to the data structure
  * Simplifies user_same_as method

* Add documentation around specific data properties

* Add .reject to user_json_ld to remove key, value if value blank
  * Checks for blank values and rejects key,value if blank
  * Accounts for JSON-LD preference for no key,value if blank

* Add reject and compact to worksFor in Stories::Controller
  * Ensures any nil/empty values for worksFor are removed
  * Cleans up existing code within Stories::Controller

* Add test for values that eval to true when .blank? is called
  * Adds test to check that empty key/values are not included
  * Adds test to check that nil key/values are not included
  * Refactors variables to be inline in user_show_spec
  * Refactors existing code in user_show_spec

* Add reject for blank values to user_same_as in Stories::Contrroller
  * Adds a check for email_public to email

* Fix typo within comment in Stories::Controller

* Add ternary operation to email in Stories::Controller
2020-05-20 14:40:34 -06:00
Molly Struve
2b8fc7473d
[deploy] Skip pro memberships for spec (#7988) 2020-05-20 14:10:08 -05:00
Andy Zhao
e686d63d78
[deploy] Add public reactions count fields to Elasticsearch (#7956)
* Add public_reactions_count field to elasticsearch

* Add new data update scripts and update old ones

* Use BulkIndexWorker to batch indexing

* Use proper search class for handling feed content

* Remove redundant script oops

* Rename data update script and remove old specs

* Combine specs into one file
2020-05-20 13:06:48 -04:00
Molly Struve
1c461f8891
[deploy] Remove Unused Pro Memberships (#7894) 2020-05-20 11:54:30 -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
Anna Buianova
c02a103c7f
Refactored creating sponsorships (#7946)
* Refactored sponsorships levels and purchasing sponsorships

* Fix partnerships tests

* Refactored creating partnerships, removed unused functionality

* Display flashes in /partnerships

* Fix views
2020-05-19 18:00:01 -04:00
Molly Struve
ef39860875
Use raw Option When Incrementing Redis Keys (#7959)
* Use raw Option When Incrementing Redis Keys

* include raw option in image upload spec
2020-05-19 17:38:25 -04:00
Ben Halpern
97bc5fd8b1
[deploy] Add campaign url for sidebar link (#7943)
* Add campaign url for sidebar link

* Add proper test
2020-05-19 14:31:34 -04:00
Molly Struve
a326019ba4
[deploy] Use User reactions_count for Reaction Cache Keys (#7939) 2020-05-19 11:34:06 -05:00
rhymes
a5e6555469
Flaky Spec Fix: Hard-code, be happy 😁 (#7951) 2020-05-19 10:19:28 -05:00
Liz Fong-Jones
a6305fd0a3
[deploy] Honeycomb instrumentation: distinguish between literal vs prefix matching for sampling (#7936) 2020-05-19 09:49:41 -05:00
icncsx
d15290420f
replace hardcoded twitter hashtag (#7895)
* replace hardcoded DEVCommunity

* make sure # is a part of the string

* set site config explicity in test for twitter hashtag
2020-05-19 14:02:28 +02:00
rhymes
691efd1f7b
Enable comment liquid tag and alias devcomment to it (#7912)
* Enable comment liquid tag and alias devcomment to it

* Update editor guide

* Add explanation
2020-05-19 10:57:35 +02:00
Vaidehi Joshi
b1de4cb1cf
Add Percy 🦔 (#7783) [deploy]
* Add Percy to Gemfile, rails helper

* Percy snapshots for using the editor

* Add PERCY_TOKEN to sample_application.yml

* Percy snapshots for visiting the homepage

* Percy snapshots for viewing an article's comments

* Percy snapshots for creating an article

* Percy snapshots for editing an article

* Percy snapshots for logged in/out user

* Remove empty spec file

* Percy snapshots for settings page

* Percy snapshots for reading list

* Percy snapshots for admin view

* Percy snapshots for moderator view

* Percy snapshots for authentication views

* Percy snapshots for article and tag views

* Percy snapshots for editing/deleting comment views

* Percy snapshots for admin views

* Percy snapshots for comment views

* Percy snapshots for organization views

* Percy snapshots for pro membership views

* Percy snapshots for podcast views

* Percy snapshots for user views

* Percy snapshots for dashboard views

* Percy snapshots for homepage views

* Percy snapshots for video views

* Add js: true in tests that require it for Percy

* Percy dependency cleanup

* Add the Percy agent
* Remove the PERCY_TOKEN from sample_application.yml
* Move the Percy gem into the "test" group in the Gemfile

* Remove duplicate snapshots, provide unique names to snapshots

* Set seed on Faker::Config for deterministic Percy snapshots

* Freeze time in js: true tests for determinstic snapshots

* Upgrade Percy to v0.26.3

* Add percy: true flag for Percy snapshotting tests

* Add more percy: true flags
2020-05-18 11:35:53 -07:00
rhymes
9ea00dfe53
[deploy] Fix Github::OauthClient access token auth (#7922) 2020-05-18 11:15:14 -05:00
Molly Struve
548fd21768
[deploy] Limit the User Updates (#7892) 2020-05-18 11:13:38 -05:00
Molly Struve
dbb5c752ab
[deploy] Sample Noisy Honeycomb Spans (#7891) 2020-05-18 10:36:01 -05:00
Michael Kohl
b5885f6c29
Fix internal category filtering for listings (#7908) 2020-05-18 09:26:38 -04: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
decae056f1
Routine rubocop fixes (#7885) 2020-05-18 10:27:51 +02:00
Molly Struve
3432c96ede
[deploy] Limit Response Template Count for Users (#7890) 2020-05-15 15:18:28 -05: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
Rafi
be3d977565
Sanitizing and rendering html entities in article title (#7593) 2020-05-15 08:04:43 -04: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
dd7f51f7fa
Limit the Number of API Keys a User Can Have (#7870)
* Limit the Number of API Keys a User Can Have

* tweak error message and throw in flaky spec fix
2020-05-15 11:33:02 +02:00
Michael Kohl
c23850f795
[deploy] Credit refactoring (#7841)
* Simplify Credit model

* Use enough_credits? method
2020-05-14 18:04:26 -04:00
Molly Struve
7dd249ac21
[deploy] Add Back Tracking API-keys in Honeycomb (#7868) 2020-05-14 15:10:15 -05:00
Molly Struve
8ae486a362
[deploy] Track and Limit API writes by IP Address (#7847) 2020-05-14 14:13:56 -05:00
Molly Struve
d1e39a7dba
[deploy] Rate Limit Feedback Message Creation (#7832) 2020-05-14 12:00:22 -05:00
Molly Struve
d2fbad08d4
[deploy] Use bulk_show Endpoint for Follow Buttons on Followers Dashboard (#7849) 2020-05-14 11:25:29 -05:00
Alex
5b4ef24468
[deploy] Validate both images and pattern_images when creating podcasts (#7828)
* Validate both images and pattern_images

* Move image_keys to IMAGE_KEYS constant

* Use slice over select
2020-05-14 11:23:04 -04:00
Mac Siri
321b24d2a0
[deploy] Create write_articles oauth scope (#7834) 2020-05-14 09:55:53 -04:00
Molly Struve
815248884c
[deploy] Enforce Uniq Abuse Reports from Reporters (#7831) 2020-05-14 09:03:10 -04:00
Juan Vasquez
9efd1d35fa
Add twitter hashtag to the site config (#7573)
* Add twitter hashtag to the site config

* Add twitter_hashtag field
2020-05-14 12:41:15 +02:00
Jacob Herrington
03bf1ac45e
Use build_stubbed where possible in tests (#7827)
I got a little sidetracked and found a few places where we could use
build_stubbed.
2020-05-14 10:56:29 +02:00
Ben Halpern
a288acf88f
[deploy] Add query-friendly article additions (Initial step) (#7794)
* Add query-friendly article additions

* Fiddle with font size

* Change from query_friendly_ to search_optimized_
2020-05-13 16:59:41 -04:00
Alex
004dbba500
[deploy] Remove logging of image data to Datadog (#7829) 2020-05-13 16:23:42 -04:00
Molly Struve
225b87390d
[deploy] Limit Suggestions for Social Service Posts (#7811) 2020-05-13 08:38:23 -05:00
Jacob Herrington
f388fb46e9
Handle negative reactions on comments (#7805)
It totally slipped my mind that we can create negative reactions on
comments. This PR accounts for that in the internal view that renders
negative reactions.
2020-05-13 09:27:38 -04:00
Anna Buianova
82799eb752
Remove code related to /live_articles (#7822) 2020-05-13 09:26:13 -04:00
rhymes
3d313efbd6
Fix profile page rendering when a username contains spaces (#7787) 2020-05-13 08:37:50 +02:00
Molly Struve
42d4ff4790
[deploy] Raise an Error If Trying to Limit with a Missing User ID (#7782) 2020-05-12 10:23:26 -05:00