kennethkalmer-smsinabox 0.0.2 → 0.0.3

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.
@@ -26,16 +26,19 @@ module Smsinabox
26
26
  private
27
27
 
28
28
  def load_config
29
- @configuration = File.open( config_name, 'r' ) do |f|
30
- YAML::load( f )
29
+ begin
30
+ @configuration = File.open( config_name, 'r' ) do |f|
31
+ YAML::load( f )
32
+ end
33
+ rescue
31
34
  end
32
- rescue
33
- @configuration = {}
35
+
36
+ @configuration ||= {}
34
37
  end
35
38
 
36
39
  def check_file!
37
40
  unless File.exist?( config_name )
38
- File.open( config_name, 'w' ) { |f| f.write('') }
41
+ File.open( config_name, 'w+' ) { |f| f.write('') }
39
42
  File.chmod( 0600, config_name )
40
43
  end
41
44
  end
@@ -2,7 +2,7 @@ module Smsinabox
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  self
data/smsinabox.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{smsinabox}
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
 
5
5
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
6
6
  s.authors = ["Kenneth Kalmer"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kennethkalmer-smsinabox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenneth Kalmer