Spencer
6e2aab623e
API: Endpoint to get an organization's listings ( #11823 )
...
* add tests
* add route
* add controller action
* add jbuilder file
* update api docs
* update query
* update jbuilder listing
* add organization/user and category to listing
* update api docs/spec file
2020-12-18 12:20:35 -05:00
rhymes
5e9be0c32d
Disable ActionController auto params wrapping ( #11692 )
...
* Disable ActionController auto params wrapping
Rails by default accepts wrapped and unwrapped parameters in JSON requests (with or without a root object), regardless of the fact that the contract with the client requests wrapped parameters or not. This results in unforeseeable bugs when the client sends unwrapped parameters in lieu of wrapped ones.
As undeterministic bugs are a PITA and this is the classic grey area in Rails apps and as the customer facing API is fully documented and the internal can be manually adjusted, we disable this and be done with this odd feature.
https://github.com/forem/forem/issues/11645
https://github.com/forem/forem/pull/11638
* Remove accidentally committed file
2020-12-02 15:17:43 +01:00
Ben Halpern
54937fa5a7
Add configs/show api for admins ( #11358 )
...
* Add configs/show api for admins
* Add initial test
* Add test
* Update docs/api_v0.yml
Co-authored-by: rhymes <rhymes@hey.com>
* Change to single resource
* Change authentication approach
* Change to status code spec
* Fix spec path
* Final touches
* Update spec/requests/api/v0/admin/configs_spec.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Proper stubbing
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-12-01 12:22:07 -05:00
Spencer
de3d62bc40
API: Endpoint to get an organization's users ( #11514 )
...
* add tests
* add route
* add users action to organizations controller
* add jbuilder file
* update api docs
* add recource routes
* make updates to organizations controller
* remove org_users from api docs
* update spec
* add users show jbuilder
* bug fix for user show
2020-11-25 12:50:57 +01:00
Krzysztof Rybka
d6956180ad
Return video_source_url in API V0 Videos index ( #11040 )
2020-11-09 06:27:28 +01:00
Spencer
c0168df2a8
API: Endpoint to get an organization's details ( #10931 )
...
* add organizations api request spec
* add organizations api controller
* add organizations api show route
* add show jbuilder file
* fix merge conflict on routes
* add organization show to api docs
* update created_at to iso format
* api docs add format field/cleanup
2020-10-30 16:22:30 -04:00
Jacob Herrington
d479834344
Do not set SiteConfig values in specs ( #11125 )
2020-10-27 15:56:31 -04:00
Diogo Osório
2b72a35d3d
[deploy] Introduce /api/profile_images/:username endpoint ( #10547 )
...
* Documents the new /profile-images/:username API endpoint
* Introduces the /api/profile_images/:username endpoint
This endpoint receives either an user or organization username as input
via the URL path and returns the profile image information for that
user/orgnization.
* Updates the /api/profile_images/:username response
Adapts the response according to the review comments:
1. Removes the cache directives
1. Tweaks how the user query is being done
1. Adds a `image_of` property to the response
* Bump API version
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-10-14 14:24:25 -05:00
Jean-Francis Bastien
9ff7f82664
[deploy] API - New endpoint to retrieve the articles in the reading list of the authenticated user ( #10540 )
2020-10-14 13:20:03 -05:00
Rafal Trojanowski
2a488a19f8
Articles API: filtering by tags ( #3654 ) ( #10614 )
...
* Articles API: filtering by tags (#3654 )
* Address CR comments (#3654 )
* Add test case
* Move tests
* Update docs
* Use _any_ option for querying by tags (#3654 )
2020-10-09 12:49:34 +02:00
rhymes
fe75dcde1c
Routine rubocop fixes ( #10478 )
2020-09-29 10:14:26 -04:00
Dana Scheider
24641d537a
API: Add route for fetching a user's followed tags ( #9108 )
...
* Add route for fetching a user's followed tags
* Move followed tags route to FollowsController instead of TagsController and add JSON view
* Add missing new line
* Change the dots for our linter
Co-authored-by: rhymes <rhymes@hey.com>
Co-authored-by: Molly Struve <mollylbs@gmail.com>
2020-09-18 16:28:42 -05:00
Mac Siri
9ebd742712
[deploy] Reintroduce sticky_nav changes ( ab81f36 & 7f92855) ( #10263 )
...
* Revert "[deploy] Revert removal of unneeded eager load (if needed) (#10179 )"
This reverts commit 11c7b148da .
* Revert "[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055 )" (#10149 )"
This reverts commit 5657067e55 .
2020-09-09 15:33:13 -04:00
Molly Struve
5657067e55
[deploy] Revert "Migrate ProfileImage to Images::Profile ( #10055 )" ( #10149 )
...
This reverts commit ab81f36a38 .
2020-09-01 18:28:58 -05:00
Mac Siri
ab81f36a38
[deploy] Migrate ProfileImage to Images::Profile ( #10055 )
2020-09-01 17:16:03 -04:00
Molly Struve
f37b2007c8
Flaky Spec Fix:User Comment created_at in Expectation ( #9878 )
2020-08-19 19:19:06 -05:00
rhymes
f5d35c6506
Rubocop: Enable and fix Style/StringConcatenation ( #9844 )
2020-08-18 14:50:15 +02: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
Vaidehi Joshi
63816035bb
Add X-Accel-Expires header to support Nginx caching ( #9655 ) [deploy]
...
* Replace in Cache-Control header to support Nginx caching
* Add 'X-Accel-Expires' header for Nginx caching
* Remove max-age directive from remaining specs
* Update caching header specs to test against x-accel-expires header
2020-08-13 14:24:50 -07: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
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
5a2cae4fbb
Rubocop: enable and fix new Rails cops ( #9537 )
...
* Enable new Rails/* cops and use autocorrect on them
* Fixed Rails/PluckInWhere leftovers
* Fix Rails/DefaultScope
* Enable and fix Rails/PluckId
* Fix manual mistake with forcing autocorrection on Rails/PluckId
* Apply PR feedback to remove Rails/PluckId inline disables
* Apply PR feedback to get rid of Rails/PluckInWhere inline
2020-07-29 11:14:19 +02:00
Molly Struve
f84f88f9bf
Flaky Spec Fix:Remove let_it_be usage from Comment Model Spec ( #9529 )
2020-07-26 17:22:51 -05:00
benhalpern
b564592a4e
Fix test typo
2020-07-17 13:38:47 -04:00
benhalpern
b611a9847a
Enable public or private forem config
2020-07-16 09:58:00 -04: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
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
Molly Struve
d9fd170a85
[deploy] Optimization: Dont Use Redis For Flare Tag IDs, Load Them On Boot ( #8987 )
2020-06-30 09:48:08 -05:00
Molly Struve
f647944046
[deploy] Spec Speedup: Use Knapsack to Run Parallel Builds ( #8390 )
2020-06-11 10:27:11 -05:00
Molly Struve
dd1cfd33e0
Remove video_permissions Role Reference From Specs and Code ( #8344 )
2020-06-08 10:23:53 -05:00
Molly Struve
5d22e71ad6
nothing to see here....except maybe reverting a push to master ( #8308 )
...
🙈
2020-06-05 20:34:21 -05:00
mstruve
533cab50d6
synchronous roles
2020-06-05 20:02:41 -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
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
fe96375110
Set Redis URL that will not be reused in specs ( #8227 )
2020-06-01 16:46:23 -05: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
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
Mac Siri
321b24d2a0
[deploy] Create write_articles oauth scope ( #7834 )
2020-05-14 09:55:53 -04:00
Molly Struve
62290759e9
[deploy] Refactor Checking Rate Limits and Their Retry After settings ( #7674 )
2020-05-05 09:13:27 -05:00
Michael Kohl
fcd0639d2a
[deploy] Remove column and minor cleanup ( #7642 )
...
* Remove column and minor cleanup
* More cleanup
* Fix spec
* Remove category from select
* Wake up Travis
* No space for you
2020-05-03 11:52:03 -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
Ben Halpern
8f2c32249c
[deploy] Fix podcast pagination client/API mismatch ( #7375 )
...
* Fix podcast pagination API
* Adjust css for podcast header
* Adjust test
* Adjust test
2020-04-28 10:07:36 -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