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
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position ( #9262 )
2020-07-16 15:51:11 +02:00
rhymes
1166370818
Rubocop: activate Layout/ClassStructure ( #9304 )
2020-07-14 18:28:18 +02: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
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
rhymes
fd5643bc9d
Improve API controllers efficiency by selecting only columns needed for serialization ( #5805 ) [deploy]
2020-02-06 07:36:56 -05:00
rhymes
6c24357f16
Use edge caching for API Article show endpoint ( #5669 ) [deploy]
2020-01-23 20:12:58 -05:00
rhymes
1bc0469b2d
Add article's record key to Fastly Surrogate-Key to separate caches ( #5543 )
...
* Add article's record key to Fastly Surrogate-Key to separate caches
After #4744 we successfully setup an auto purging system based on Fastly's surrogate key based cache and purging API.
Unfortunately this worked only in the `:show` action as comments are their own tree-based resource.
The `:index` though, is related to a single article, so without the article's record key in the `Surrogate-Key` header the first time we hit the API the result would become the value stored in Fastly's API, for all articles.
* Fix commentable mock for job spec
* Add comment.commentable.purge to the worker as well
* Add more thorough tests for commentable
2020-01-17 08:45:47 -05:00
rhymes
bcd85452e9
Comments API: fix caching issues ( #4744 ) [deploy]
...
* Use ancestry in the index and add test
* Add tests for show action
* Return complete comments trees for index, kill n+1 and use correct edge cache key
* Return complete comments tree for show, kill n+1 and use correct edge cache key
* Refactor tests and add surrogate keys tests
* Preload users for the whole subtree
* Clarify explanation of the edge cache keys construction
* Refactor partials
* Remove action caching
* Replace .map.flatten with .flat_map
* Fix surrogate key prefix according to Fastly docs
* Add comment.purge to Comments::BustCacheJob to use Fastly-Rails
* Fix surrogate key spec
2020-01-15 10:45:56 -05:00
rhymes
40155812bd
Comments API: simplify controller code, add tests ( #4731 ) [deploy]
...
* Use ancestry in the index and add test
* Add tests for show action
2019-11-07 11:37:58 -05:00
Jacob Herrington
59e7c104f2
Remove commented code and tests ( #3989 ) [ci skip]
2019-09-09 14:51:02 -04:00
rhymes
6a626e819d
Refactor: fix issues raised by bullet ( #2965 )
...
* Preload organization, not user
* Preload users only when needed
* Pre-load podcasts for podcast episodes in API
* Avoid eager loading error by loading rating votes separately
* Preload associations for moderation
* Preload user comments in trees
* Preload organization for non org dashboard and cleanup queries
* Optimize ArticleSuggester to only load N articles at need
* Remove eager loading and pass variables to partials for easier debug
* Reorganize tags validation code and ignore actsastaggableon eager loading issues
* Remove unused eager loading and bring up comments relation
* Preload podcasts when loading podcast episodes
* Fix views specs
* Make sure ArticleSuggester never returns duplicates
* Remove commented code
* Re-trigger build
* Move suggested articles back to view to respect fragment caching
2019-05-28 17:32:53 -04:00
rhymes
941ab4178b
Articles API: create and update ( #2844 )
...
* Add system test to create article from the editor
* Move article creation from API to app controller
* Fix system test to edit posts
* Move article update from API to app controller
* Rewrite create article API using API key
* Add main_image and canonical_url to allowed creation params
* Rewrite update article API using API key
* Fix tests and have Comments API inherit from API
2019-05-16 12:26:24 -04:00
cyrillefr
4fd66372dc
Enable Layout/AlignParameters ( #2340 )
...
Check if the parameters on a multi-line method call or definition are aligned.
Resolves : #2021
2019-04-08 18:47:34 -04:00
Keshav Biswa
8d57d45ecc
Rubocop Style cops enabled ( #2056 )
...
* Rubocop enabled style/alias
* Enabled Style/ArrayJoin Cop
* Enabled Style/Attr
* Enabled Case Equality
* Enabled CharacterLiteral
* Enabled ColonMethodCall Cop
* Enabled CommentAnnotation cop
* Enabled PreferredHashMethods Cop
* Enabled DoubleNegation Cop
* Enabled EachWithObject Cop
* Enabled EmptyLiteral Cop
* Enabled EvenOdd Cop
* Enabled IfWithSemicolon Cop
* Enabled Lambda and LambdaCall Cop
* Enabled LineEndConcatenation Cop
* Enabled ModuleFunction Cop;
* Enable NegatedIf and NegatedWhile Cop
* Enabled NilComparison Cop
* Enabled Not Cop
* Enabled NumericLiterals Cop
* Enabled OneLineConditional Cop
* Enabled PercentLiteralDelimiters Cop
* Excluded internal/users_controller from negated_if cop
* Reverted the double negation change from github_issue_tag and github_issue.rb"
* Enabled PerlBackrefs Cop
* Changed Regexp.last_match(1) to Regexp.last_match(0)
* Enabled proc cop
* Enabled RaiseArgs Cop
* Reverted Regexp.last_match(0) to Regexp.last_match(1)
* Enabled SelfAssignment Cop
* Enabled SingleLineMethods Cop
* Enabled SpecialGlobalVars Cop
* Enabled VariableInterpolation Cop
* Enabled WhenThen Cop
* Enabled WhileUntilModifier Cop
* Enabled WordArray Cop
* Enabled IfUnlessModifier Cop
* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
rhymes
e588fa7ece
Code cleanups ( #659 )
...
* Initial automatic cleanup with rubocop
* Fix syntax error introduced by rubocop
* Cleanup seeds file
* Cleanup lib folder
* Exclude bin folder because it contains auto generated files
* Make Rubocop a little bit more chatty
* Block length should not include comments in the count
* Cleanup config folder
* Cleanup specs
* Updated Rubocop version and generated a todo file
* Fix broken ArticlesApi spec
* Fix tests
* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Mac Siri
301c6080e3
Initial commit
2018-02-28 16:11:08 -05:00