Skip to content

Commit

Permalink
Merge pull request #14 from healthify/update-gemspec-email-and-contribs
Browse files Browse the repository at this point in the history
Update gemspec email, README, and bump to v0.4.0
  • Loading branch information
cbortz authored Jan 7, 2019
2 parents 227d497 + d37d748 commit 90a289d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 13 deletions.
6 changes: 2 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ GIT
PATH
remote: .
specs:
fake_idp (0.3.0)
builder
fake_idp (0.4.0)
ruby-saml-idp
sinatra (~> 2.0.0)

GEM
remote: https://rubygems.org/
specs:
builder (3.2.3)
diff-lcs (1.2.5)
dotenv (1.0.2)
macaddr (1.7.1)
Expand Down Expand Up @@ -61,4 +59,4 @@ DEPENDENCIES
ruby-saml-idp!

BUNDLED WITH
1.16.6
1.17.3
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,17 @@ Then navigate to `http://localhost:9292/saml/auth` to begin making your SAML req

## Running in Test

If you are using this gem to provide a Fake IDP server in a test suite, add the gem
to the Gemfile:
### Gemfile

If you are using this gem to provide a Fake IDP server in a test suite, add the gem to the Gemfile:

```ruby
gem 'fake_idp', github: 'healthify/fake_idp'
```

You can set the relevant variables in a configuration block if they aren't provided
as environment variables. For example:
### Configuration

You can set the relevant variables in a configuration block if they aren't provided as environment variables. For example:

```ruby
FakeIdp.configure do |config|
Expand All @@ -59,10 +61,21 @@ FakeIdp.configure do |config|
config.idp_certificate = "YOUR CERT HERE"
config.idp_secret_key = "YOUR KEY HERE"
config.algorithm = :sha512
config.additional_attributes = { custom_saml_attr: "DELIVERED_IN_ASSERTION" }
end
```

And then use Capybara Discoball to spin it up in a test:
#### Resetting Configuration

If you ever want to reset your FakeIdp configuration (e.g. between test specs), you can use the following:

```ruby
FakeIdp.reset!
```

### Use

You can use Capybara Discoball to spin `FakeIdp::Application` up in a test:

```ruby
require 'fake_idp'
Expand Down
4 changes: 2 additions & 2 deletions fake_idp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ Gem::Specification.new do |spec|
"Shelby Switzer",
"Tyler Willingham",
"Robyn-Dale Samuda",
"Chet Bortz",
]
spec.email = ["shelby@healthify.us"]
spec.email = ["engineering@healthify.us"]

spec.summary = 'Fake IDP to test SAML authentication'
spec.license = "MIT"
Expand All @@ -35,5 +36,4 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "dotenv", "~> 1.0"
spec.add_runtime_dependency "sinatra", "~> 2.0.0"
spec.add_runtime_dependency "ruby-saml-idp"
spec.add_runtime_dependency "builder"
end
1 change: 0 additions & 1 deletion lib/fake_idp.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'sinatra/base'
require 'ruby-saml-idp'
require 'builder'
require 'zlib'
require 'tilt/erb'
require 'fake_idp/configuration'
Expand Down
2 changes: 1 addition & 1 deletion lib/fake_idp/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module FakeIdp
VERSION = "0.3.0"
VERSION = "0.4.0"
end

0 comments on commit 90a289d

Please sign in to comment.