Skip to content

rossetti-gov/identity-hostdata

 
 

Repository files navigation

LoginGov::Hostdata (identity-hostdata)

A gem to help read configuration from login.gov infrastructure, according to the login.gov infrastructure contract.

Installation

Add this line to your application's Gemfile:

gem 'identity-hostdata', github: '18F/identity-hostdata'

Usage

Use this gem to access config data on a per-host basis. The config data is read according to the login.gov infrastructure contract.

require 'identity/hostdata'

LoginGov::Hostdata.domain
# => "login.gov"

Download configs from S3:

root = File.expand_path('../../', __FILE__)

LoginGov::Hostdata.in_datacenter do |hostdata|
  hostdata.s3.download_configs(
    '/%{env}/v1/idp/database.yml' => File.join(root, 'config/database_s3.yml')
  )
end

Development

Run tests:

make test

Contributing

See CONTRIBUTING for additional information.

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

About

Ruby gem to help read per-host configs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 98.7%
  • Other 1.3%