daddy 0.2.9 → 0.2.10

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/daddy/utils/config.rb +5 -7
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29852b9c0bbe0f63505add99a54fec5e672345a9
4
- data.tar.gz: 7490a975eda432d3099c77a72e2c302578e3feeb
3
+ metadata.gz: d6e47a734958080769243fa6f7568874d703eee1
4
+ data.tar.gz: 65a8f0194bcca0a76756e36b50470b7cd758960e
5
5
  SHA512:
6
- metadata.gz: 42ae7f3e213041d91c5c544aa18eb54fc669b2c1445e69fa9215f95d47ed368b70bf319c4ca84f17e05e55d3e5b5a60c2d76fcb99fcb3c9971f4ba26bb511ae8
7
- data.tar.gz: 497da5999cf2528c641550d2f212c7a497f0e81a5a2e52ca3994c39dcf3661f206f20e80648358914e3d0dcf2d0405f4329bdc2394e5d40db17cfd7fb3dcf7d3
6
+ metadata.gz: 8811f04d3abb88552002b02f6e26e5de09ed3ef914fbe7be0b60ceaad4feeb96709139727aa8750ea48b68249bdeddfcc0eea9a97447f61ec97080828c784411
7
+ data.tar.gz: 5c8b22bfebe3dbcafbb583408582729219870bcd03473d074102963655c2b2084b0afa1e66523f84732c274f42e14d8b80abb9c09ee510178a4de57bc5886d12
@@ -3,17 +3,15 @@
3
3
  module Daddy
4
4
  module Utils
5
5
 
6
- class Config < Hash
6
+ class Config
7
7
 
8
8
  def initialize(yaml_path_or_hash = nil)
9
9
  if yaml_path_or_hash.is_a?(Hash)
10
- @hash = hash
10
+ @hash = yaml_path_or_hash
11
+ elsif yaml_path_or_hash and File.exist?(yaml_path_or_hash)
12
+ @hash = YAML.load_file(yaml_path_or_hash)
11
13
  else
12
- if yaml_path_or_hash and File.exist?(yaml_path_or_hash)
13
- @hash = YAML.load_file(yaml_path_or_hash)
14
- else
15
- @hash = {}
16
- end
14
+ @hash = {}
17
15
  end
18
16
  end
19
17
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - ichy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-19 00:00:00.000000000 Z
11
+ date: 2014-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara