Skip to content

Add WorkOS::Portal.list_organizations#48

Merged
willmanduffy merged 1 commit intomasterfrom
feature/ch3022/add-list-organizations-method-to-ruby-sdk
Sep 11, 2020
Merged

Add WorkOS::Portal.list_organizations#48
willmanduffy merged 1 commit intomasterfrom
feature/ch3022/add-list-organizations-method-to-ruby-sdk

Conversation

@willmanduffy
Copy link
Copy Markdown
Contributor

  • Returns a list of the organizations accessible to the provided
    API key. Includes pagination functionality via the list_metadata
    property.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 9, 2020

Codecov Report

Merging #48 into master will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #48      +/-   ##
==========================================
+ Coverage   98.87%   98.95%   +0.07%     
==========================================
  Files          13       15       +2     
  Lines         267      287      +20     
==========================================
+ Hits          264      284      +20     
  Misses          3        3              
Impacted Files Coverage Δ
lib/workos.rb 100.00% <100.00%> (ø)
lib/workos/portal.rb 100.00% <100.00%> (ø)
lib/workos/types.rb 100.00% <100.00%> (ø)
lib/workos/types/list_struct.rb 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af47110...0bdf5aa. Read the comment docs.

# so we're using Sorbet throughout this Ruby gem.
module Types
require_relative 'types/connection_struct'
require_relative 'types/list_struct'
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This really threw me though a loop and lost a couple hours to finding this...

Thoughts on pulling require_all?

https://github.com/jarmo/require_all

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will follow up with this in a future PR to avoid merge conflicts.

expect(Net::HTTP::Get).to receive(:new).with(*request_args).
and_return(expected_request)

VCR.use_cassette 'organization/list', match_requests_on: [:path] do
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to use the same cassette for all the tests since the response is handled the same regardless. What we really want to test is the request we are sending out and trusting the API will Do The Right Thing™. expected_request is the real test in these option tests.

@willmanduffy willmanduffy force-pushed the feature/ch3022/add-list-organizations-method-to-ruby-sdk branch from 0f780b5 to 8d88e37 Compare September 9, 2020 19:42
* Returns a list of the organizations accessible to the provided
  API key. Includes pagination functionality via the list_metadata
  property.
@willmanduffy willmanduffy force-pushed the feature/ch3022/add-list-organizations-method-to-ruby-sdk branch from 8d88e37 to 0bdf5aa Compare September 9, 2020 21:32
@willmanduffy willmanduffy changed the title Add WorkOS::Organization.list Add WorkOS::Portal.list_organizations Sep 9, 2020
@willmanduffy
Copy link
Copy Markdown
Contributor Author

@marktran @maxchehab This has been updated with the new naming we outlined in our call today.

@willmanduffy willmanduffy merged commit 0d05476 into master Sep 11, 2020
@willmanduffy willmanduffy deleted the feature/ch3022/add-list-organizations-method-to-ruby-sdk branch September 11, 2020 15:02
willmanduffy added a commit that referenced this pull request Sep 14, 2020
* Resolves a hidden step needed before adding a file to the types
  folder that can be confusing for developers new to the SDK
  codebase.
* Discussion here: #48 (comment)
willmanduffy added a commit that referenced this pull request Sep 14, 2020
* Resolves a hidden step needed before adding a file to the types
  folder that can be confusing for developers new to the SDK
  codebase.
* Discussion here: #48 (comment)
willmanduffy added a commit that referenced this pull request Sep 28, 2020
* Resolves a hidden step needed before adding a file to the types
  folder that can be confusing for developers new to the SDK
  codebase.
* Discussion here: #48 (comment)
willmanduffy added a commit that referenced this pull request Sep 28, 2020
* Resolves a hidden step needed before adding a file to the types
  folder that can be confusing for developers new to the SDK
  codebase.
* Discussion here: #48 (comment)
blairworkos pushed a commit that referenced this pull request Jan 29, 2021
* Returns a list of the organizations accessible to the provided
  API key. Includes pagination functionality via the list_metadata
  property.
blairworkos pushed a commit that referenced this pull request Jan 29, 2021
* Resolves a hidden step needed before adding a file to the types
  folder that can be confusing for developers new to the SDK
  codebase.
* Discussion here: #48 (comment)
blairworkos pushed a commit that referenced this pull request Mar 3, 2021
* Returns a list of the organizations accessible to the provided
  API key. Includes pagination functionality via the list_metadata
  property.
blairworkos pushed a commit that referenced this pull request Mar 3, 2021
* Resolves a hidden step needed before adding a file to the types
  folder that can be confusing for developers new to the SDK
  codebase.
* Discussion here: #48 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants