CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Mon, 01 Sep 2025 13:02:39 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20100506013824
location: https://web.archive.org/web/20100506013824/https://github.com/opscode/mixlib-config/tree/v1.0.8
server-timing: captures_list;dur=0.767299, exclusion.robots;dur=0.040222, exclusion.robots.policy;dur=0.023219, esindex;dur=0.017473, cdx.remote;dur=15.291588, LoadShardBlock;dur=595.217437, PetaboxLoader3.resolve;dur=263.093420, PetaboxLoader3.datanode;dur=203.285467
x-app-server: wwwb-app200
x-ts: 302
x-tr: 665
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app200; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Mon, 01 Sep 2025 13:02:42 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.7.61
x-archive-orig-date: Thu, 06 May 2010 01:38:24 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-etag: "8e6b56a8c5c9ffd1ed2b39ac716052f5"
x-archive-orig-x-runtime: 166ms
x-archive-orig-content-length: 24246
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Thu, 06 May 2010 01:38:24 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 06 May 2010 01:38:24 GMT", ; rel="memento"; datetime="Thu, 06 May 2010 01:38:24 GMT", ; rel="next memento"; datetime="Fri, 07 May 2010 02:41:56 GMT", ; rel="last memento"; datetime="Fri, 07 May 2010 02:41:56 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_15_20100506010508_crawl103-c/52_15_20100506013801_crawl101.arc.gz
server-timing: captures_list;dur=0.682636, exclusion.robots;dur=0.033973, exclusion.robots.policy;dur=0.021179, esindex;dur=0.016435, cdx.remote;dur=1710.780448, LoadShardBlock;dur=666.421547, PetaboxLoader3.resolve;dur=511.658960, PetaboxLoader3.datanode;dur=290.968054, load_resource;dur=360.284969
x-app-server: wwwb-app200
x-ts: 200
x-tr: 2808
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
opscode's mixlib-config at v1.0.8 - GitHub
opscode / mixlib-config
- Source
- Commits
- Network (14)
- Issues (0)
- Downloads (14)
- Wiki (1)
- Graphs
-
Tag:
v1.0.8
click here to add a description
click here to add a homepage
Sending Request…
A simple class based Config mechanism, similar to the one found in Chef — Read more
name | age | message | |
---|---|---|---|
![]() |
.gitignore | Loading commit data... ![]() |
|
![]() |
LICENSE | Wed Mar 11 18:11:34 -0700 2009 | Initial commit [adamhjk] |
![]() |
NOTICE | ||
![]() |
README.rdoc | Wed Mar 11 18:11:34 -0700 2009 | Initial commit [adamhjk] |
![]() |
Rakefile | ||
![]() |
VERSION.yml | ||
![]() |
features/ | ||
![]() |
lib/ | ||
![]() |
mixlib-config.gemspec | ||
![]() |
spec/ |
README.rdoc
Mixlib::Config
Mixlib::Config provides a class-based configuration object, like the one used in Chef. To use in your project:
require 'rubygems' require 'mixlib/config' class MyConfig extend(Mixlib::Config) configure do |c| c[:first_value] = 'something' c[:other_value] = 'something_else' end end
Or…
class MyConfig extend(Mixlib::Config) first_value 'something' other_value 'something_else' end
To check a configuration variable:
MyConfig.first_value # returns 'something' MyConfig[:first_value] # returns 'something'
To change a configuration variable at runtime:
MyConfig.first_value('foobar') # sets first_value to 'foobar' MyConfig[:first_value] = 'foobar' # sets first_value to 'foobar'
You should populate your class with the default values for every configuration variable that might be accessed. If you try and access a variable that does not exist, Mixlib::Config will throw an <ArgumentError>.
To load a ruby configuration file (which will evaluate in the context of your configuration class):
MyConfig.from_file('your_config_file.rb')
Enjoy!