confoog 0.4.1 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f947a6f8d6ac5314c4cc95283c0f96342073f5f0
4
- data.tar.gz: ce1050b7ef2b58be9e4aacdee1fe209986474873
3
+ metadata.gz: a220c741772bd56e80ac5e99f16975c1d53c4260
4
+ data.tar.gz: 4567baf4606fe935fdff4d78946891a9339e4ad4
5
5
  SHA512:
6
- metadata.gz: 88a306dd5acaabd9f402ca4a772f2a9dbff146beb4be81dfec2ece2461c4a953e3d59c018b87cecea7a53fd5a56192183bd109a79aaed33bbf56ddfa7b74ec78
7
- data.tar.gz: 17f9def6311f6ad7f41ee7fe52b23135d60c1fd41e84d888c6cb02b6e2d9604fdbb937f5191150320d4335a07bce0eb7987c9a016ee9fc373dee0940d1158d81
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
@@ -1,6 +1,6 @@
1
1
  # Define the Gem version string
2
2
  module Confoog
3
- # Version of this Gem, using Semantic Versioning 2.0.0
3
+ # Version of this Gem, using Semantic Versioning 2.0.1
4
4
  # http://semver.org/
5
- VERSION = '0.4.1'
5
+ VERSION = '0.4.2'
6
6
  end
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.1
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-12 00:00:00.000000000 Z
11
+ date: 2015-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler