configer 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b78da41fd3a5fca93fb45ecca03a556ad463df4
4
- data.tar.gz: a8b166b52c809addb0ede7a60a2ac19a7b5d0a6b
3
+ metadata.gz: 289ebe062db31097bcb5eb65c166a5f263f21e59
4
+ data.tar.gz: 1b3d4cb6ea1f7ae77af56eb29b4e5f76c54f9d0e
5
5
  SHA512:
6
- metadata.gz: 1dc09b115d153361217a2eb2d3d06a7447859be9d8a2b727fd5c7221305bbe757ad4bdcbc4cbcd3ca166a2e6e77e76a21c9c77f61142ba97887c747a9de4d125
7
- data.tar.gz: 2f281faef0050d5b60e5b1a9a0274a7c33bfc3fb4d857e963e39b22fd5e63fe97e36e8b3bf41f6c7d1b7895f931e6c1b04c58160bfdda463c25cff9c67d68c9c
6
+ metadata.gz: d92002648fcf9678f2eb6379cd6e5ea1c59fd69e58ab01377452ba1753aad7cb7a6719215985a10e8a92ca432d62490b6fd5c8fed078da9cce8423ecff59ee3c
7
+ data.tar.gz: 6190430662b11cb980ce1cb7dee0dc6e3848e710d07116d8c8f1aa8c5b70f2343c721804cf500f91b317c950e68e31fcfe3f04cd027442e8abf96894baa5942e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -89,7 +89,13 @@ module Configer
89
89
 
90
90
  object = if %W[ yaml yml ].include?(extension)
91
91
  require 'yaml'
92
- YAML.safe_load(File.read(path))
92
+
93
+ if YAML.respond_to?(:save_load)
94
+ YAML.safe_load(File.read(path))
95
+ else
96
+ YAML.load(File.read(path))
97
+ end
98
+
93
99
  elsif extension == 'json'
94
100
  require 'json'
95
101
  JSON.parse(File.read(path))
@@ -37,7 +37,11 @@ module Configer
37
37
 
38
38
  }
39
39
 
40
- current_obj[ path_elements.last ]= YAML.safe_load File.read file_path
40
+ method_to_call = YAML.respond_to?(:safe_load) ? :safe_load : :load
41
+ current_obj[ path_elements.last ]= YAML.public_send(
42
+ method_to_call,
43
+ File.read(file_path)
44
+ )
41
45
 
42
46
  opts[:out].deep_merge!(tmp_hsh)
43
47
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-14 00:00:00.000000000 Z
11
+ date: 2014-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,3 +93,4 @@ signing_key:
93
93
  specification_version: 4
94
94
  summary: super easy to use config module for general use
95
95
  test_files: []
96
+ has_rdoc: