Skip to content

A sub-stack lib for configuring ruby-maxcdn using maxcli configuration method.

License

Notifications You must be signed in to change notification settings

MaxCDN/maxconf.rb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maxconf.rb Build Status

A sub-stack lib for loading MaxCDN configuration files using the standard set forth by MaxCLI.

Install

gem install maxconf

Use

###
# option:  default   :: description
# ------------------------------------
# "file":  undefined :: config file to be used, default is
#                      '$HOME/.maxcdn.yml'
# "[opt]": n/a       :: set or overide [opt]
###

require 'maxconf'

# default
###
conf = MaxConf.load()
puts conf["alias"]
# => YOUR_ALIAS

# custom file path
###
conf = MaxConf.load("/path/to/maxcdn.yml")
puts conf["alias"]
# => YOUR_ALIAS

# option overides
###
opts = {
  "file" => "/path/to/maxcdn.yml",
  "alias" => "ALIAS_OVERIDE"
}

conf = MaxConf.load(opts)
puts conf["alias"]
# => ALIAS_OVERIDE

Tests

$ ruby ./test/maxconf_test.rb

About

A sub-stack lib for configuring ruby-maxcdn using maxcli configuration method.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages