confoog 0.2.0 → 0.2.1

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: 67eda83fbbfd733612d64817a500c788eed105ad
4
- data.tar.gz: 5e7f0886f7c014be9522d42dbd451b00ee605420
3
+ metadata.gz: 86a1fc3255701acf14e97a271e943b09e52470fa
4
+ data.tar.gz: 5447360f3f74e8ffbd85d7fe8d8aa5e680717e5e
5
5
  SHA512:
6
- metadata.gz: 905bae34ff999f4ebe7d81bb41e0bc758ea1266eddc8162dba47e424fe4d233a640ebe8d26cf7ca8c3f2fcdb47c02d33b627db236478a7624d6486db6869588a
7
- data.tar.gz: f9067c187fb8b99f234c3d7fbbcee109e62185c62e638564b833a80750fc756fe1ef493e11397ef75dd282410db366077f7cf3eaf8823371048a2ee23ec276d8
6
+ metadata.gz: 1215deb16939c2171a4081a667535cbe87b0bc26b54d1a9d399b265651ab36150d92e6e1c49aac3c83dd266657398170463148a25e3787e454ae1647cfe5bd01
7
+ data.tar.gz: cc05a4f69c21098d16a2276a370192bb5ea572231eeb9dcb8512604fc9201ca8d17db4bce6fef8d3fe3f0c3962e6c77164836be20b4cc00f017e8f60faa93005
data/README.md CHANGED
@@ -8,9 +8,9 @@
8
8
 
9
9
  A simple Gem to add YAML configuration files to your Ruby script / Gem.
10
10
 
11
- __*A WORK IN PROGRESS, Not really ready for production use. The API may be subject to changes before hitting version 1.0.0*__
11
+ __*Note : While this Gem is fully functional, the API may be subject to changes before hitting version 1.0.0*__
12
12
 
13
- This will add a class that takes care of all your configuration needs for Ruby scripts and Gems.
13
+ This Gem allows your Ruby scripts and Gems to save and load its settings to a configuration file in YAML format.
14
14
 
15
15
  ## Installation
16
16
 
@@ -63,6 +63,7 @@ settings.load # load the settings from YAML file.
63
63
  ```
64
64
 
65
65
  Confoog will take several parameters on creation, to specify the default config file and location. For example :
66
+
66
67
  ```ruby
67
68
  settings = Confoog::Settings.new(location: '/home/myuser', filename: '.foo-settings')
68
69
  ```
@@ -120,6 +121,8 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
120
121
 
121
122
  To install this gem onto your local machine, run `bundle exec rake install`.
122
123
 
124
+ Run `rake` to run the RSpec tests, which also runs `RuboCop` and `inch --pedantic` too.
125
+
123
126
  ## Contributing
124
127
 
125
128
  1. Fork it
@@ -128,6 +131,12 @@ To install this gem onto your local machine, run `bundle exec rake install`.
128
131
  4. Push to the branch (`git push origin my-new-feature`)
129
132
  5. Create new Pull Request
130
133
 
134
+ Please note - This Gem currently passes 100% on both [RuboCop][rubocop] and [Inch-CI][inch] (on pedantic mode), so all pull requests should do likewise.
135
+ Running `rake` will automatically test both these along with the RSpec tests.
136
+
137
+ [rubocop]: https://github.com/bbatsov/rubocop
138
+ [inch]: https://inch-ci.org
139
+
131
140
  ## Versioning
132
141
 
133
142
  This library aims to adhere to [Semantic Versioning 2.0.0][semver]. Violations
data/confoog.gemspec CHANGED
@@ -29,4 +29,5 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'coveralls'
30
30
  spec.add_development_dependency 'rubocop'
31
31
  spec.add_development_dependency 'inch'
32
+ spec.add_development_dependency 'simplecov', '~> 0.10'
32
33
  end
@@ -2,5 +2,5 @@
2
2
  module Confoog
3
3
  # Version of this Gem, using Semantic Versioning 2.0.0
4
4
  # http://semver.org/
5
- VERSION = '0.2.0'
5
+ VERSION = '0.2.1'
6
6
  end
data/lib/confoog.rb CHANGED
@@ -214,6 +214,7 @@ module Confoog
214
214
  file.write(@config.to_yaml)
215
215
  file.close
216
216
  rescue
217
+ status_set(errors: ERR_CANT_SAVE_CONFIGURATION)
217
218
  console_output("Cannot save configuration data to #{config_path}",
218
219
  OUTPUT_SEVERITY[:ERR])
219
220
  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.2.0
4
+ version: 0.2.1
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-03 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,6 +122,20 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.10'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.10'
125
139
  description: A simple Gem to add YAML configuration files to your Ruby script or Gem
126
140
  email:
127
141
  - seapagan@gmail.com