confoog 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/confoog/version.rb +1 -1
- data/lib/confoog.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4336bba436a680049e0f664d3160f0be3089664
|
4
|
+
data.tar.gz: 026279c492238be89eba517417e884e9dc992109
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d961c0d7fd8e277ff37a903d5cda39e229aa46bdaa2bb3eddb8f5dfee833c09a7aaf2001d2796fa070c9ed168bdc7df22824e4d1253fb1ab47f4f10afa7fd689
|
7
|
+
data.tar.gz: af619574ceedd1841ee0ce75665344ff959613068b6286ada339695d31df2562a67230700558bc472b80aec36cf6b67a88e006ce663742ac99184bfcca01ad2c
|
data/README.md
CHANGED
@@ -79,6 +79,9 @@ prefix: 'My Application'
|
|
79
79
|
|
80
80
|
# Should we avoid outputting errors to the console? (ie in a GUI app)
|
81
81
|
quiet: true | false
|
82
|
+
|
83
|
+
# Should we automatically load the configuration file when the class is created?
|
84
|
+
auto_load: true | false
|
82
85
|
```
|
83
86
|
If these are not specified, Confoog will use the following defaults :
|
84
87
|
|
@@ -88,6 +91,7 @@ filename: '.confoog'
|
|
88
91
|
create_file: false
|
89
92
|
prefix: 'Configuration'
|
90
93
|
quiet: false
|
94
|
+
auto_load: false
|
91
95
|
```
|
92
96
|
|
93
97
|
Confoog will set the following error constants which will be returned in the `.status['errors']` variable as needed :
|
data/lib/confoog/version.rb
CHANGED
data/lib/confoog.rb
CHANGED
@@ -46,7 +46,8 @@ module Confoog
|
|
46
46
|
quiet: false,
|
47
47
|
prefix: 'Configuration',
|
48
48
|
location: '~/',
|
49
|
-
filename: DEFAULT_CONFIG
|
49
|
+
filename: DEFAULT_CONFIG,
|
50
|
+
auto_load: false
|
50
51
|
}
|
51
52
|
|
52
53
|
# Provide an encapsulated class to access a YAML configuration file.
|
@@ -106,6 +107,9 @@ module Confoog
|
|
106
107
|
status_set(errors: ERR_NO_ERROR)
|
107
108
|
# make sure the file exists or can be created...
|
108
109
|
check_exists(options)
|
110
|
+
|
111
|
+
# if auto_load is true, automatically load from file
|
112
|
+
load unless @options[:auto_load] == false
|
109
113
|
end
|
110
114
|
|
111
115
|
# Return the value of the 'quiet' option.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: confoog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seapagan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|