Commit graph

590 commits

Author SHA1 Message Date
rhymes
d5057f7958 Show sponsorships in ledger (#3447) 2019-07-11 16:06:31 -04:00
rhymes
611f4b8675 Sponsorship: remove old columns (step 3) (#3446)
* Remove old sponsorship columns

* Rename redundant param names
2019-07-11 15:35:24 -04:00
Sushant Bajracharya
01d1d1bcea Make the Preview button dynamic (#3317) 2019-07-10 19:14:14 -04:00
rhymes
cecd1db070 Sponsorship: business logic (step 2) (#3440)
* Add Sponsorship model

* Add Sponsorship to admin

* Add correct relationships between models

* Add temporary script to migrate sponsorship data

* Use constants for enums

* Use Sponsorship model in PartnershipsController

* Use Sponsorship in the views

* Validate sponsorship levels and tag combos

* Replace the rest of the sponsorship code to use Sponsorship
2019-07-10 16:40:56 -04:00
rhymes
ad79116366 Sponsorship: add model (step 1) (#3438)
* Add Sponsorship model

* Add Sponsorship to admin

* Add correct relationships between models

* Add temporary script to migrate sponsorship data
2019-07-10 15:58:37 -04:00
Ben Halpern
091a0d1087
Add basic pro accounts lander test (#3433) 2019-07-09 22:10:50 -04:00
Ben Halpern
5545246a6a
Update self-serve sponsorship copy/functionality (#3416)
* Transform GET sign in links into POST

* Ignore CVE-2015-9284 for now

* Update app/views/layouts/_signup_modal.html.erb

Co-Authored-By: Mac Siri <krairit.siri@gmail.com>

* Modify sponsorship copy

* Update sponsorship stuff

* Fix spec and add tag sponsorship
2019-07-09 17:49:14 -04:00
Mac Siri
28e5ef1d12 Make RSS's self-referential link an option (#3428)
* Create migration

* Run migration

* Update validations

* Add additional form

* Update RssReader::Assembler#thorough_parsing

* Add spec for referential
2019-07-09 17:34:21 -04:00
Ben Halpern
87002e5786
Fix profile pin display limit (#3427) 2019-07-09 15:42:46 -04:00
rhymes
1f97669e66 Credits ledger (#3395)
* Add #purchase to Credit

* Assigns spent credits to the listing

* Add Credits::Ledger and use it

* Localize ledger datetimes

* Add organization to the ledger

* Add tests for ledger

* Remove unused class

* Fix scope error

* Compare UTC times

* Fix broken specs

* Wrap listing create in a transaction

* Wrap listings bump into a transaction

* Avoid microseconds issue with datetimes in tests

* Use .detect instead of .select.first

* Fix spec description
2019-07-09 10:11:18 -04:00
Zak Henry
a9acb8642e Add markdown to article api response (#3394)
* Add failing test asserting markdown is returned

* Add markdown to the get article api response
2019-07-09 10:09:20 -04:00
rhymes
5db8b7e1e5 Fix Rubocop lint (#3423) [ci skip] 2019-07-09 09:06:38 -04:00
Mario See
42cb72d185 Listing Liquid Tag (#3250)
* init wip

still needs html, styling, and specs

* add more html

similar to singleListing.jsx

* add generate_new_liquid method to spec

* remove unexpected period

* add error handling for invalid slugs and expired listings

* initial styling

* styling for author and tags

* import variables to sass

* more styling and swithc tags and author info

* add specs

* handle error for slug with no category

* add listing tag to editor guide

* reduce complexity

* render expired listing rather than raise error

* update expired listing spec

* import mixins to classified listing tag styling
2019-07-08 18:19:01 -04:00
cyrillefr
3c1d51b836 Move RssReader fetch_user to Active Jobs (#3387)
- add job + spec job
  - refactor call
2019-07-08 18:17:35 -04:00
Ben Halpern
a5ccfb2b32
Add history to sidebar for pro users (#3417)
* Add history to sidebar for pro users

* Add filmstrip image
2019-07-08 18:10:01 -04:00
cyrillefr
5146532c82 Move messages send_push delay calls to ActiveJob (#3314) 2019-07-08 18:00:19 -04:00
Edison Yap
8ffe0f3de3 Bust cache for articles in series (#3052) 2019-07-08 17:28:27 -04:00
Mac Siri
d997ffee4f
Run yarn upgrade (#3419) 2019-07-08 17:03:19 -04:00
Anna Buianova
727d2fadd0 Escape comment.title to fix failing spec (#3385) 2019-07-05 09:45:18 -04:00
Anna Buianova
c3ed38f832 Moved creating a new podcast to a separate ActiveJob #2952 (#3373)
* Podcasts reachable status #2952

* Specs for podcasts statuses

* Moved podcast episode create to a separate ActiveJob

* Use RssItemData wrapper in GetEpisode for consistency

* Reorganize services/podcasts
2019-07-04 13:10:54 -04:00
Andy Zhao
da224d56aa Remove notifications if article is unpublished (#3362)
* Add tests for article notifications

* Remove notifications if unpublished and refactor
2019-07-03 16:50:23 -04:00
Ben Halpern
4ebfcd8bc0
Self-serve sponsorship options (#3371)
* WIP - Initial work on sponsorship landing page

* Add initial partnership page
2019-07-03 12:04:03 -04:00
Andy Zhao
22e76bee84 Add functionality to remove and recover identity (#3377)
* Lint some quotation marks

* Add BackupData table

* Add identity and removal functionality

* Test additional functionality

* Remove dependent destroy for backup data

* Add auth_data_dump column

* Add challenge to reserved words

* Add more shoulda matchers
2019-07-03 12:01:16 -04:00
Anna Buianova
3d81753285 Rescue possible SSLError when fetching a podcast (#3374) 2019-07-03 10:36:36 -04:00
Andy Zhao
04ce7738ab Add /challenge redirect (#3368) 2019-07-02 16:27:39 -04:00
Anna Buianova
d6a151703c Podcasts reachable status #2952 (#3341)
* Podcasts reachable status #2952

* Specs for podcasts statuses
2019-07-02 09:18:27 -04:00
rhymes
9afdea06f5 Fix Rubocop Lint (#3361) [ci skip] 2019-07-01 14:07:39 -04:00
Anna Buianova
6395fe48e2 Moved podcast fixtures to their own folder (#3343) [ci skip] 2019-07-01 12:37:28 -04:00
Anna Buianova
186e5bb52b Fix lint (#3342) [ci skip] 2019-07-01 11:32:28 -04:00
Mazen Touati
6797567de9 Fix instagram URL validation rule (#3336) 2019-07-01 08:16:34 -04:00
Bolarinwa Balogun
86b0777938 Set max file size limit for profile images (#3313) 2019-06-28 12:06:25 -04:00
Andy Zhao
f8989ea9b2 Add GET /internal/tags/:id route back in (#3327)
* Add GET internal/tags/:id route

* Remove unused edit route
2019-06-28 08:13:03 -04:00
Andy Zhao
0633ba1f72 Fix org credits in internal view (#3321) 2019-06-28 07:56:09 -04:00
dependabot-preview[bot]
9c6673adc4 Bump rouge from 3.3.0 to 3.4.1 (#3289) [ci skip]
* Bump rouge from 3.3.0 to 3.4.1

Bumps [rouge](https://github.com/jneen/rouge) from 3.3.0 to 3.4.1.
- [Release notes](https://github.com/jneen/rouge/releases)
- [Changelog](https://github.com/rouge-ruby/rouge/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jneen/rouge/compare/v3.3.0...v3.4.1)

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

* Update approvals
2019-06-27 17:26:07 -04:00
Anna Buianova
7ee0350ac5 Refactored and optimized getting existing podcast episode (#3319)
* Refactored and optimized getting existing podcast episode

* Podcast#existing_episode fixes
2019-06-27 11:50:27 -04:00
Ben Halpern
26af371ebd
Fix comment title encoding issue (#3311)
* Fix comment title encoding issue

* Remove puts statements

* Fix flaky test

* Change flaky test

* Add & fix
2019-06-26 15:24:05 -04:00
Andy Zhao
111e5503b4 Hide delete article button for non-authors (#3315) 2019-06-26 15:23:46 -04:00
Bolarinwa Balogun
dbc4abc587 Add rel="nofollow" to links in comments (#3304)
* Add rel="nofollow" to links in comments

* Improve code quality and Add tests
2019-06-26 09:02:11 -04:00
Bolarinwa Balogun
b52d8e931d Add Instagram URL to profile links (#3307) 2019-06-26 08:56:07 -04:00
Bolarinwa Balogun
a30e06d673 Allow Embed of specific gist version (#3310)
* Allow Embed of specific gist version

* Add tests and documentation
2019-06-26 08:54:26 -04:00
rhymes
7da7a16d8d Pro: add referrers to dashboard and single article stats (#3295)
* Reorganize PageViewsController

* Add domain and path to PageView model

* Add before_create callback to populate domain and path

* Add list of referrers to AnalyticsService

* Add referrers to the UI

* Remove useless referrers card and tweak table line height

* Add referrer stats to article stats page

* Add not null and empty default to domain and path

* Refactor JS analytics client

* create_list is a step back here

* Revert "Add not null and empty default to domain and path"

This reverts commit bc02440076047a887c65d300bccd4661ecc8ffd0.

* Add index on domain concurrently

* Make the script more robust
2019-06-25 13:58:09 -04:00
Andy Zhao
16b59db15c Use publish date for article notifications (#3301) 2019-06-25 11:54:33 -04:00
Mike Coutermarsh
8afb797ec9 Improve social card caching 🚀 (#3265)
* Add failing tests for social previews controller. HTML changes between
requests, which breaks caching.

Since we use the HTML to generate the cache key. When the views have any
randomness in them, it breaks the cache, which means we regenerate
images on each request, rather than using what's in memcached.

Adding test to protect from regressions

* Fix randomness in social card templates

The aria tags are randomly generated. Since this is for rendering
images, they aren't needed.

* Make the linter happy by using the sanitize helper
2019-06-25 08:45:30 -04:00
Eduardo Alencar
6d800da4d4 Increase tag length from 20 to 30 chars (#3299)
This commit increases the tag length from 20 to 30 chars and also increases the cached_tag_list length to maintain the limit of 4 tags. Specs were adapted to respect the changes.
2019-06-24 16:43:21 -04:00
Ben Halpern
dcbb188cf1
Add pinned articles box to profiles (#3269)
* Initial pins work

* Add pin box to profiles

* Fix test snapshot spacing and optimize svg

* Fix listings spacing
2019-06-24 15:18:29 -04:00
cyrillefr
0267d4e829 Move bust_cache methods in own jobs (#3071) 2019-06-24 13:28:25 -04:00
rhymes
6cdc604333 Rubocop: disable style rule and fix some issues (#3278) [ci skip] 2019-06-24 12:20:29 -04:00
Ben Halpern
d48ad63aea
Add comment context for notifications and comment pages (#3262)
* Add comment context for notifications and comment pages

* Fix comment spec and adjust css
2019-06-22 14:50:15 -04:00
Anna Buianova
bfa1bdc37f More specs and refactoring podcasts fetching (#3245)
* More specs and refactoring podcasts fetching

* Fixed PodcastFeed references in tests

* Pass podcast_id instead of podcast to CreateEpisode
2019-06-21 21:31:15 -04:00
rhymes
91de529705 Remove code for legacy mentoring feature (#3186) 2019-06-21 17:18:11 -04:00