rhymes
c9e72858b7
Enable pending Style/SingleArgumentDig ( #9842 )
2020-08-18 10:26:40 -04:00
jkrsn98
dbdc6ead38
[deploy] API: add created_at datetime to comments ( #9829 )
...
* added created_at to comments in api response
* added test to ensure a date is returned for comment
* fix offenses in test
* updated docs to include addition of created_at to comment api response
2020-08-17 20:10:24 -04:00
jkrsn98
8639e3b748
API: retrieve podcast episodes comments ( #9677 )
...
* modified index to allow retreival of comments belonging to either articles or podcast episodes
* updated comments section in api documentation to include info on podcast comments
* Remove DEV badge link (#9675 )
* [deploy] Profile Admin UI Setup Screen Refactor (v1.5) (#9649 )
* implement some suggestions from https://github.com/forem/forem/pull/9610
* chore: update the errors based on suggestions
* feat: make query readable on blazer
* added new parameter p_id to safe parameters
* Remove forward slash from br tags in pages partial (#9678 )
* [deploy] Change lingering `/internal` paths to `/admin` (#9673 )
* Change lingering `/internal` paths to `/admin`
* Fix multiline test expectation
* [deploy] Add new support admin role (#9681 )
* Add new support admin role
* Allow support admins to banish users
* Fix spec order for new support admin role
* Migrate serialization to jsonapi-serializer (#9682 )
This replaces the abandoned fast_jsonapi.
* [deploy] Async Handle Notifications for Comments When Saved (#9680 )
* [deploy] Optimization: Change Large Table Primary Keys to Bigints (#9476 )
* [deploy] Revert "Async Handle Notifications for Comments When Saved (#9680 )" (#9686 )
This reverts commit 852223dd86 .
* Bump ddtrace from 0.38.0 to 0.39.0 (#9695 )
* Bump ddtrace from 0.38.0 to 0.39.0
Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb ) from 0.38.0 to 0.39.0.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases )
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md )
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.38.0...v0.39.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump ddtrace from 0.38.0 to 0.39.0 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump vault from 0.14.0 to 0.15.0 (#9697 )
* Bump vault from 0.14.0 to 0.15.0
Bumps [vault](https://github.com/hashicorp/vault-ruby ) from 0.14.0 to 0.15.0.
- [Release notes](https://github.com/hashicorp/vault-ruby/releases )
- [Changelog](https://github.com/hashicorp/vault-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/hashicorp/vault-ruby/compare/v0.14.0...v0.15.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump vault from 0.14.0 to 0.15.0 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* [deploy] Optimization:Set Honeybadger send_data_at_exit to False (#9687 )
* Travis Optimization:Bundle from Bash File to Use Cache (#9705 )
* Bump stripe from 5.22.0 to 5.23.1 (#9692 )
* Bump stripe from 5.22.0 to 5.23.1
Bumps [stripe](https://github.com/stripe/stripe-ruby ) from 5.22.0 to 5.23.1.
- [Release notes](https://github.com/stripe/stripe-ruby/releases )
- [Changelog](https://github.com/stripe/stripe-ruby/blob/master/CHANGELOG.md )
- [Commits](https://github.com/stripe/stripe-ruby/compare/v5.22.0...v5.23.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump stripe from 5.22.0 to 5.23.1 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* [deploy] Bump ancestry from 3.0.7 to 3.1.0 (#9689 )
* Bump ancestry from 3.0.7 to 3.1.0
Bumps [ancestry](https://github.com/stefankroes/ancestry ) from 3.0.7 to 3.1.0.
- [Release notes](https://github.com/stefankroes/ancestry/releases )
- [Changelog](https://github.com/stefankroes/ancestry/blob/master/CHANGELOG.md )
- [Commits](https://github.com/stefankroes/ancestry/compare/v3.0.7...v3.1.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump ancestry from 3.0.7 to 3.1.0 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump rubocop from 0.88.0 to 0.89.0 (#9699 )
* Bump rubocop from 0.88.0 to 0.89.0
Bumps [rubocop](https://github.com/rubocop-hq/rubocop ) from 0.88.0 to 0.89.0.
- [Release notes](https://github.com/rubocop-hq/rubocop/releases )
- [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.88.0...v0.89.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump rubocop from 0.88.0 to 0.89.0 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump twilio-ruby from 5.39.2 to 5.39.3 (#9690 )
* Bump twilio-ruby from 5.39.2 to 5.39.3
Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby ) from 5.39.2 to 5.39.3.
- [Release notes](https://github.com/twilio/twilio-ruby/releases )
- [Changelog](https://github.com/twilio/twilio-ruby/blob/main/CHANGES.md )
- [Commits](https://github.com/twilio/twilio-ruby/compare/5.39.2...5.39.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump twilio-ruby from 5.39.2 to 5.39.3 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump ibm-openapi-validator from 0.28.0 to 0.28.1 (#9703 )
Bumps [ibm-openapi-validator](https://github.com/IBM/openapi-validator ) from 0.28.0 to 0.28.1.
- [Release notes](https://github.com/IBM/openapi-validator/releases )
- [Changelog](https://github.com/IBM/openapi-validator/blob/master/CHANGELOG.md )
- [Commits](https://github.com/IBM/openapi-validator/compare/v0.28.0...v0.28.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump sass-loader from 9.0.2 to 9.0.3 (#9702 )
Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader ) from 9.0.2 to 9.0.3.
- [Release notes](https://github.com/webpack-contrib/sass-loader/releases )
- [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/sass-loader/compare/v9.0.2...v9.0.3 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump jsdom from 16.3.0 to 16.4.0 (#9701 )
Bumps [jsdom](https://github.com/jsdom/jsdom ) from 16.3.0 to 16.4.0.
- [Release notes](https://github.com/jsdom/jsdom/releases )
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md )
- [Commits](https://github.com/jsdom/jsdom/compare/16.3.0...16.4.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump eslint-plugin-react from 7.20.3 to 7.20.5 (#9694 )
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react ) from 7.20.3 to 7.20.5.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases )
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md )
- [Commits](https://github.com/yannickcr/eslint-plugin-react/compare/v7.20.3...v7.20.5 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Flaky Spec Fix:HTML Escape Special Characters in Assertion like Template (#9708 )
* Bump redoc-cli from 0.9.9 to 0.9.10 (#9698 )
Bumps [redoc-cli](https://github.com/Redocly/redoc ) from 0.9.9 to 0.9.10.
- [Release notes](https://github.com/Redocly/redoc/releases )
- [Changelog](https://github.com/Redocly/redoc/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Redocly/redoc/commits )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump css-loader from 4.2.0 to 4.2.1 (#9700 )
Bumps [css-loader](https://github.com/webpack-contrib/css-loader ) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/webpack-contrib/css-loader/releases )
- [Changelog](https://github.com/webpack-contrib/css-loader/blob/master/CHANGELOG.md )
- [Commits](https://github.com/webpack-contrib/css-loader/compare/v4.2.0...v4.2.1 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump brakeman from 4.8.2 to 4.9.0 (#9691 )
* Bump brakeman from 4.8.2 to 4.9.0
Bumps [brakeman](https://github.com/presidentbeef/brakeman ) from 4.8.2 to 4.9.0.
- [Release notes](https://github.com/presidentbeef/brakeman/releases )
- [Changelog](https://github.com/presidentbeef/brakeman/blob/main/CHANGES.md )
- [Commits](https://github.com/presidentbeef/brakeman/compare/v4.8.2...v4.9.0 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
* Bump brakeman from 4.8.2 to 4.9.0 (Update vendor/cache)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump @babel/core from 7.11.0 to 7.11.1 (#9693 )
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core ) from 7.11.0 to 7.11.1.
- [Release notes](https://github.com/babel/babel/releases )
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md )
- [Commits](https://github.com/babel/babel/commits/v7.11.1/packages/babel-core )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Bump preact from 10.4.6 to 10.4.7 (#9696 )
Bumps [preact](https://github.com/preactjs/preact ) from 10.4.6 to 10.4.7.
- [Release notes](https://github.com/preactjs/preact/releases )
- [Commits](https://github.com/preactjs/preact/compare/10.4.6...10.4.7 )
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
* Enable Rubocop 0.89 cops and fix Lint/ violations (#9709 )
* Enable new Lint/ cops and run rubocop -a
* Fixing last remaining things with rubocop -a
* Enable and fix Style/ExplicitBlockArgument and Style/GlobalStdStream
* Forgot parenthesis
* changed variable name from article to commentable
* [deploy] Bug Fix:Dont Set Active Channel if ChatChannel Does Not Exist (#9704 )
* Rubocop: Enable and fix Style/OptionalBooleanParameter cop (#9711 )
* Enable and fix Style/OptionalBooleanParameter cop
* Keep regular parameters for workers
* Keep regular parameters for workers
* Fix spec
* Trigger Travis correctly
* Fix Netlify catch all redirections (#9717 )
* added test for get comments by podcast episode
* [deploy] Upgrade Chartkick to fix CVE-2020-16254 Vulnerability (#9718 )
* [deploy] Redirect /internal to /admin (#9716 )
* Update docs with details on where to install Elasticsearch (#9670 ) [deploy]
* Gitignore elasticsearch installations
* Add a note to explain that ES should be installed at the root level
Remove `/elasticsearch/*` from .gitignore as well!
* Update reference to home directory in mac + windows installation guides
* [deploy] Improve clean up of user language settings (#9671 )
* modified index to allow retreival of comments belonging to either articles or podcast episodes
* updated comments section in api documentation to include info on podcast comments
* changed variable name from article to commentable
* added test for get comments by podcast episode
* added new parameter p_id to safe parameters
* modified index to allow retreival of comments belonging to either articles or podcast episodes
* changed variable name from article to commentable
* Trigger Travis correctly
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
Co-authored-by: Josh Puetz <joshpuetz@gmail.com>
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
Co-authored-by: Jan Klimo <jan.klimo@gmail.com>
Co-authored-by: Molly Struve <mollylbs@gmail.com>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Alex <alexandersmith223@gmail.com>
2020-08-11 14:36:49 +02:00
rhymes
696c712883
Rubocop: routine fixes ( #9345 )
...
* rubocop -A
* Fix Style/HashLikeCase
* regenerated todo file
2020-07-16 18:18:13 +02:00
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position ( #9262 )
2020-07-16 15:51:11 +02:00
Ben Halpern
da6a6739e5
[deploy] Invite users to join and create password ( #9294 )
...
* Initial invitation work
* Add more invitation code
* Add proper registration page
* Fix up tests
* Fix failings
* Fix spec
* Add self-serve auth config
* Add registered condition
* Change profile image call and registered_at test
* Change comment
* Fix copy test
* Stub emojipedia
* Linting
* Add registered at to factory
* Ensure registered for user tag
* Update app/views/internal/invitations/index.html.erb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Update app/controllers/internal/invitations_controller.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Slight changes
* Update recover password flow
* Update app/views/internal/invitations/index.html.erb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Update app/controllers/internal/invitations_controller.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Update db/schema.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-07-15 11:37:19 -04:00
rhymes
1166370818
Rubocop: activate Layout/ClassStructure ( #9304 )
2020-07-14 18:28:18 +02:00
rhymes
ffc96db209
Rubocop: fix additional violations in todo file ( #9218 )
2020-07-09 10:25:44 -04:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength ( #9197 )
2020-07-08 08:36:36 -05:00
Raphael Noriode
1a4dba2475
API: Fetch article by slug ( #8929 )
...
* Add check to id param to use slug if passed
* modify to use slug in a different action
* wrote test for this api endpoint
* update test to check array equality
the test also checks if the first tag in the parsed list is the same as the first tag in the article
2020-07-01 10:58:45 +02:00
Michael Kohl
b06e9901d5
Add ApplicationRecord#errors_as_sentence ( #8265 )
...
* Add ApplicationRecord#errors_as_sentence
* Refactor existing uses
* Use errors as sentence more consistently
2020-06-04 16:02:41 +02:00
Joe Doss
6406b0727b
Allow localhost or 127.0.0.1 to access api/health_checks without health-check-token ( #8231 )
...
* This change allows access to api/health_checks if you are coming from localhost
or 127.0.0.1. Pretty sweet huh?
The reason for this change is because I want to easily get to these healthcheck
end points from localhost without having to get the health-check-token beforehand.
Buttttt.... this addition has some issues. You can spoof the host header pretty
easily:
https://daniel.haxx.se/blog/2018/04/05/curl-another-host/
I thought about doing `return if !request.ssl? && request.local?`
to check of the request was over https or not. Any localhost healthcheck we do
directly to puma will be over http. Checking for TLS seemed like a logical next
check, but since we force https on the edge and not necessarily from the edge to
Puma the Host header can still be spoofed to get at these end points.
More info on host header attacks and what Rails 6 is doing about it:
https://github.com/rails/rails/issues/29893
While I do think it is a good idea to protect these healthcheck end points from
the outside world, I do want to be able to get to them easily locally. WWYD?
* Fix Health Check spec by stubbing request
Co-authored-by: mstruve <mollylbs@gmail.com>
2020-06-02 11:29:04 -04:00
Molly Struve
eda0a78d47
Add Health Check Endpoint for Cache ( #8222 )
2020-06-01 15:19:56 -05:00
Molly Struve
8a4c2c1cb4
[deploy] Add App, Database, and Search Health Check Endpoints ( #8071 )
2020-05-28 08:33:31 -05:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings ( #7910 )
...
* Change models and related files
* Update controllers and specs
* More renaming
* Seek and destroy, I mean search and replace
* Round up the stragglers
* Ground control to Major Travis...
* More fixes
* PR feedback
* Various fixes
* Rename view
* Fix list query builder
* Unify request specs
* Fix some API spec errors
* Fix remaining API specs
* Make spec conform to API
* Fix leftover problems
* Fix JS tests
* Fix column name in select
* Fix API specs
* Fix search specs
* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Andy Zhao
c42fd3461e
[deploy] Rename positive_reactions_count to public_reactions_count in logic ( #7926 )
...
* Rename positive_reactions_count to public_reactions_count
* Add positive reactions count back in so we can remove it
* Use public_category method for reactions
* Add positive_reactions_count in case any old caches rely on it
* Add positive_rxn_count to account for API endpoints
* Remove unused method
* One more spot...
* Add method back in because of caches
* Update specs to match new functionality
* Fix typo
* Remove unused methods
2020-05-26 12:36:28 -04:00
Mac Siri
321b24d2a0
[deploy] Create write_articles oauth scope ( #7834 )
2020-05-14 09:55:53 -04:00
Molly Struve
ba0ebbafa8
[deploy] RateLimit Refactor: Consolidate Logic for Checking a Limit and Raising an Error ( #7636 )
2020-05-01 13:31:44 -05:00
Michael Kohl
46f94b135d
[deploy] Classified listings refactor part 3 ( #7498 )
...
* Ignore category column
* Move view oriented class methods to helper
* Start refactoring ClassifiedListingsToolkit
* Add attr_accessor instead of category
* Replace old category column with association
* More cleanup
* Trigger Travis
* Don't rename associations, category_slug -> category
* Indiana Kohl and the missing newline
* More refactoring and spec fixes
* Add dashboard for classified listing categories
* Remove TODO comment
Co-authored-by: rhymes <rhymesete@gmail.com>
2020-04-30 18:57:01 -04:00
rhymes
0186fd9aee
Add Retry-After for API rate limit errors and document limits in API spec ( #7444 )
...
* Add correct rate limit exception to Articles::Updater
* Send Retry-After with HTTP 429 back to the client
* Update API specs for error 429
* Test build
* Fix spec
* Add retry after to ImageUploadsController and fix specs
* Generalize a bit
2020-04-24 17:35:28 +02:00
Michael Kohl
9df68f3920
Use new classified listing categories ( #7250 )
...
* Add ClassifiedListingCategoryModel
* Add data update script for classified listing categories
* Refactor and fix specs
* Resolve conflict
* Incorporate PR feedback
2020-04-23 10:06:58 +07:00
Molly Struve
de88a08ebd
[deploy] handle rate limit errors gracefully ( #7422 )
2020-04-22 08:55:26 -05:00
rhymes
34848a4209
Upgrade Rubocop to 0.81 ( #7219 )
...
* Upgrade rubocop to 0.81.0
* Reordered rubocop file and updated it
* Regenerate todo
* Correct some things
* Fix specs
2020-04-11 10:10:04 +02:00
Michael Kohl
1ae9cfbdc6
Remove POST /api/reactions endpoint ( #6968 ) [deploy]
2020-03-31 16:12:30 +02:00
Michael Kohl
244ab297c8
Move user following suggestions to internal API ( #6601 ) [deploy]
2020-03-13 13:37:24 +01:00
rhymes
1428013ebd
API: add users and videos docs ( #6611 ) [deploy]
...
* Fix IDs size
* Document /api/users/{id}
* Document /users/me
* Add videos API docs
2020-03-13 09:12:09 +01:00
Michael Kohl
f975c4c9f3
Move chat_channel info to internal API ( #6581 ) [deploy]
2020-03-11 13:57:21 +01:00
rhymes
01e4a0b0f1
API: add docs for /followers/users and remove organizations endpoint ( #6551 )
...
* Use api-key for api tests
* Remove /api/followers/organizations endpoint
* Add more tests
* Add documentation for /api/followers/users
2020-03-11 10:56:43 +01:00
Michael Kohl
8ab7a3fb6c
API: Remove reactions onboarding ( #6529 )
...
* Move reactions onboarding to internal API
* Don't add reactions onboarding to internal API
* Remove obsolete worker
2020-03-10 10:25:16 -04:00
rhymes
21fca3e0f2
Comments API: hide deleted and hidden comments (plus docs) ( #6482 ) [deploy]
...
* Modernize index test
* Hide comments body_html and user info if the comment is either deleted or hidden
* Shorten lines a bit
* Freeze repeated strings
* Document all /comments
* Document /comments/{id}
2020-03-07 09:02:10 +01:00
Michael Kohl
8df0a72ce7
Move onboarding tags from public to internal API ( #6329 )
...
* Move onboarding tags from public to internal API
* Fix typo
* Undo wrong chang
2020-03-06 19:34:31 +01:00
Michael Kohl
0fd6c948d1
Move followings to internal API ( #6494 )
2020-03-06 19:33:26 +01:00
rhymes
c8c5088fbd
API: Access unpublished listings only if you are the owner ( #6458 ) [deploy]
...
* Access only unpublished listings if they belong to the user when authenticated
* Make sure we never send unpublished listings in the index
* Update API docs
* oops
* Remove unused preloading as this loads a single item
2020-03-05 11:28:31 +01:00
rhymes
f3e76e7fe5
Improve API docs for articles, add listings to it and fix bugs ( #6413 ) [deploy]
...
* Fix articles index state param values
* Update Articles API docs
* Fix ClassifiedListing.cost_by_category with invalid category
* Add docs for GET|POST /listings and fix bugs
* Document PUT /api/listings/:id
* Add docs for /listings/category/{category}
* One variable down
* Improve listings update error handling
2020-03-04 15:30:02 +01:00
Michael Kohl
6ad74517d7
[deploy] Remove github_repos from public API ( #6304 )
2020-02-26 11:23:39 -05:00
rhymes
145d5e610e
Use scopes for Follow instead of where all the time ( #6149 ) [deploy]
2020-02-25 19:29:52 -05:00
rhymes
fd1c13c7b6
API listings: improve caching ( #6247 )
2020-02-25 09:24:19 -05:00
Michael Kohl
d13cbbb3c1
Change authorization to signed in users ( #6136 ) [deploy]
2020-02-21 13:53:30 -05:00
rhymes
bc385ae6d5
Switch decorators to Rails builtin decorations - take 2 ( #6125 ) [deploy]
...
* Revert "Revert "[deploy] Switch decorators from Draper to Rails builtin decorations (#6040 )" (#6122 ) [deploy]"
This reverts commit d438349550 .
* Enable serialization for decorators
* Refactor and test default home feed serialization
* Improve spec
* Applied @vaidehijoshi suggestions
* Applied @citizen428 suggestions
* Make CodeClimate happy
* Cleanup stories_index_spec.rb
* Refactor UserDecorator#cached_followed_tags to loop less
2020-02-19 15:30:53 -05:00
rhymes
6cbfb01394
Stop using legacy user's organization_id and remove followers unused code ( #6079 ) [deploy]
2020-02-18 11:27:43 -05:00
rhymes
a56eb8fab0
Enable CORS on public API endpoints ( #6116 ) [deploy]
...
* Enable CORS for public API
* Add specs for Articles API
* Mention CORS in the API docs
2020-02-18 10:47:07 -05:00
Ben Halpern
d0dd79ac29
Make sure profile images show up in onboarding ( #6134 ) [deploy]
2020-02-17 20:19:06 -05:00
rhymes
d438349550
Revert "[deploy] Switch decorators from Draper to Rails builtin decorations ( #6040 )" ( #6122 ) [deploy]
...
This reverts commit cc53b55a4a .
2020-02-17 11:28:32 -05:00
rhymes
cc53b55a4a
[deploy] Switch decorators from Draper to Rails builtin decorations ( #6040 )
...
* Convert SponsorshipDecorator to Rails decorator
* Remove empty ReactionDecorator
* Rename SponsorshipDecorator#level_color_hex to level_background_color
* Convert CommentDecorator to Rails decorator
* Add specs and fix bugs for NotificationDecorator
* Convert NotificationDecorator to Rails decorator
* Add specs and fix bugs for OrganizationDecorator
* Convert OrganizationDecorator to Rails decorator
* Add specs to PodcastEpisodeDecorator and fix bugs
* Convert PodcastEpisodeDecorator to a Rails decorator
* Add missing specs for ArticleDecorator and fix bugs
* Convert ArticleDecorator to Rails decorator
* Add missing specs to UserDecorator and fix issues
* Convert UserDecorator to Rails decorator
* Add .decorate_collection method
* Add decorator for AR relations and remove Draper
* Rename BaseDecorator back to ApplicationDecorator
* Rename .decorate_ back to .decorate
* Restore decorate_collection (WTH)
* Add decorated?
* Fix bugs and failing specs
* Decoration should always be explicit
2020-02-17 09:32:32 -05:00
rhymes
1df24046d8
Small API controllers refactoring ( #6021 ) [deploy]
...
* TagsController inherits from ApiController
* Let ApiController inherit from ActionController::Base to have its own lifecycle
* Remove unused method
* Use only one respond_to :json for the entire API
* ApiController inherits from ActionController::Base
* Use Pundit only where needed
2020-02-12 11:51:42 -05:00
Alex
78a25dfd54
Validate that API article params are a Hash ( #5963 )
...
* Add check for article param being a Hash & spec
* Remove unnecessary blank line
* Move logic to private method and before_action call
* Change check_if to validate
* Use is_a? to type check
* Fix type check for specs
2020-02-10 10:24:11 -05:00
rhymes
69b04d38aa
Refactor API Reactions controller and add specs ( #5936 )
...
* Add specs
* Check the object, not the ID
* Use permitted params and delete cache only after create
* Inherit from ApiController, bail if the reaction user does not exist, fix naming
* Remove superflous test
2020-02-07 12:39:24 -05:00
rhymes
92f6a9f007
Fix serialization error with video_thumbnail_url ( #5933 )
2020-02-06 10:50:44 -05:00
rhymes
fd5643bc9d
Improve API controllers efficiency by selecting only columns needed for serialization ( #5805 ) [deploy]
2020-02-06 07:36:56 -05:00
rhymes
5444c53df2
Improve API podcast episodes controller caching and fetching ( #5772 ) [deploy]
...
* Refactor caching and add some tests
* Only select needed columns
* Add more tests
2020-01-27 16:57:37 -05:00