confoog 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/confoog.rb +4 -2
- data/lib/confoog/version.rb +2 -2
- 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: a220c741772bd56e80ac5e99f16975c1d53c4260
|
4
|
+
data.tar.gz: 4567baf4606fe935fdff4d78946891a9339e4ad4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7b337afa691225075653fc47a7b8bcedb20c50249ac9949d4450acf4e3a6759af35f64c490a5586d02537ca945573316c3d9c98da171a15812ad91dcb5541b
|
7
|
+
data.tar.gz: 22284144648177edba6e42c05bb983584863a98782a4467a7657786d7cb0bdee5eb781326acd2a11932183e76de9e38980f40cea39cd5d0a0084dcfaf12ee1b4
|
data/README.md
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
[![Coverage Status](https://coveralls.io/repos/seapagan/confoog/badge.svg?branch=master&service=github)](https://coveralls.io/github/seapagan/confoog?branch=master)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/seapagan/confoog/badges/gpa.svg)](https://codeclimate.com/github/seapagan/confoog)
|
7
7
|
[![Inline docs](http://inch-ci.org/github/seapagan/confoog.svg?branch=master)](http://inch-ci.org/github/seapagan/confoog)
|
8
|
+
[![PullReview stats](https://www.pullreview.com/github/seapagan/confoog/badges/master.svg?)](https://www.pullreview.com/github/seapagan/confoog/reviews/master)
|
8
9
|
|
9
10
|
A simple Gem to add YAML configuration files to your Ruby script / Gem.
|
10
11
|
|
data/lib/confoog.rb
CHANGED
@@ -143,8 +143,6 @@ module Confoog
|
|
143
143
|
@config = YAML.load_file(config_path)
|
144
144
|
@status.set(errors: Status::INFO_FILE_LOADED)
|
145
145
|
if @config == false
|
146
|
-
# console_output("Configuration file #{config_path} is empty!",
|
147
|
-
# OUTPUT_SEVERITY[:WARN])
|
148
146
|
@status.set(errors: Status::ERR_NOT_LOADING_EMPTY_FILE)
|
149
147
|
end
|
150
148
|
rescue
|
@@ -196,6 +194,10 @@ module Confoog
|
|
196
194
|
private
|
197
195
|
|
198
196
|
def save_to_yaml
|
197
|
+
unless File.exist?(config_path)
|
198
|
+
@status.set(config_exists: false, errors: Status::ERR_FILE_NOT_EXIST)
|
199
|
+
return
|
200
|
+
end
|
199
201
|
file = File.open(config_path, 'w')
|
200
202
|
file.write(@config.to_yaml)
|
201
203
|
file.close
|
data/lib/confoog/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.2
|
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-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|