Closed spenceralan closed 5 years ago
@wernull I had intentionally left out clubhouse links since this is a public project and clubhouse is an internal tool. That was my thought process anyway and have no strong feelings either way.
@spenceralan good point
@wernull what version of Ruby are you running? I am thinking you are running 2.3 or earlier which is why those methods don't exist. I am thinking I will need to add a ruby dependency.
@wernull I tested a couple commands (previously I had only pulled them out of postman) and I noticed the server wasn't parsing the body. I added -H 'Content-Type: application/json'
to the sample requests so that the server would parse the body.
I will need to:
• add a ruby dependency
• update the Readme
• add a custom MIME because it is supposed to accept Content-Type: application/scim+json
and it does not
• add specs for the custom MIME
Yep, ruby version was the issue
@wernull thanks for the review!
In addition to the previously mentioned changes I will be: • adding comments to the recursive methods to explain what is going on • removing my personal email • stubbing config file changes in the specs
@wernull I made a few changes!
The biggest change is going to be the registering a custom MIME type.
Basically what that is doing is saying that the app can accept requests with the Content-Type
set to application/scim+json
. Previously, when the content type was set to application/scim+json
the app could not parse the params.
The new request specs are set so that we can send string parameters that need to be parsed. Strings cannot be sent as parameters in controller specs.
Strangely enough there is not a lot of documentation around custom MIME types so it took longer than expected to get to a good place with it but I generally understand what the changes meant.
Ping me if you have any questions!
Why?
The purpose of this Gem is to isolate code related to our SCIM integration but also to make that code accessible for other projects to use.
What?
This PR puts in place the pieces necessary for the Lessonly core app to interface with Okta through SCIM.
Testing Notes
There is a lot more documentation about what is going on in the README updated in this PR.
Dummy App
In this project is a fully functional rails app preconfigured to work with the Gem.
In the console, navigate to the dummy app at
/spec/dummy
.Next run
bin/setup
to setup the app. This will set up the gems and build the databases. The databases are local to the project.Last run
bundle exec rails server
.CURL Requests
The requests you can send to the server are listed out in the README but the basic request should look like:
Note: In production, any error that is not resolved in the Gem should be caught and displayed as a SCIM formatted error, http status 500.
Specs
Specs can be run with
rspec
at the top level of the Gem (if you runrspec
and it shows zero specs try runningrspec
from a different directory).All specs should be passing. (The dummy app will need to be setup first.)