ey_config 0.0.6 → 0.0.7

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. data/lib/ey_config.rb +13 -4
  2. data/lib/ey_config/version.rb +1 -1
  3. metadata +21 -39
@@ -6,6 +6,10 @@ module EY
6
6
  DEPLOYED_CONFIG_PATH = 'config/ey_services_config_deploy.yml'
7
7
  PATHS_TO_CHECK = [DEPLOYED_CONFIG_PATH, EY::Config::Local.config_path]
8
8
 
9
+ def config
10
+ @config || init
11
+ end
12
+
9
13
  def config_path=(val)
10
14
  @full_path = nil
11
15
  @config_paths = [val]
@@ -31,16 +35,21 @@ module EY
31
35
  warn err_msg
32
36
  raise ArgumentError, err_msg
33
37
  end
38
+ begin
39
+ YAML
40
+ rescue
41
+ require 'yaml'
42
+ end
34
43
  @config = YAML.load_file(full_path)
35
- unless valid_structure?(@config)
36
- ey_config_empty_warning(full_path, @config)
44
+ unless valid_structure?(config)
45
+ ey_config_empty_warning(full_path, config)
37
46
  end
47
+ @config
38
48
  end
39
49
 
40
50
  def get(*args)
41
51
  @args = args
42
- init unless @config
43
- hash = @config.dup
52
+ hash = config.dup
44
53
  args.each do |arg|
45
54
  hash = hash[arg.to_s] if hash
46
55
  end
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  class Config
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,33 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ey_config
3
- version: !ruby/object:Gem::Version
4
- hash: 19
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.7
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 6
10
- version: 0.0.6
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Jacob Burkhart & Michael Broadhead & others
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-05-14 00:00:00 Z
12
+ date: 2014-03-03 00:00:00.000000000 Z
19
13
  dependencies: []
20
-
21
14
  description: Access to additional services for Engine Yard customers.
22
- email:
15
+ email:
23
16
  - jacob@engineyard.com
24
- executables:
17
+ executables:
25
18
  - ey_config_local
26
19
  extensions: []
27
-
28
20
  extra_rdoc_files: []
29
-
30
- files:
21
+ files:
31
22
  - bin/ey_config_local
32
23
  - lib/ey_config/local.rb
33
24
  - lib/ey_config/version.rb
@@ -36,36 +27,27 @@ files:
36
27
  - README.md
37
28
  homepage: http://github.com/engineyard/ey_config
38
29
  licenses: []
39
-
40
30
  post_install_message:
41
31
  rdoc_options: []
42
-
43
- require_paths:
32
+ require_paths:
44
33
  - lib
45
- required_ruby_version: !ruby/object:Gem::Requirement
34
+ required_ruby_version: !ruby/object:Gem::Requirement
46
35
  none: false
47
- requirements:
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- hash: 3
51
- segments:
52
- - 0
53
- version: "0"
54
- required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ! '>='
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
41
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
63
46
  requirements: []
64
-
65
47
  rubyforge_project:
66
- rubygems_version: 1.8.10
48
+ rubygems_version: 1.8.25
67
49
  signing_key:
68
50
  specification_version: 3
69
51
  summary: Engine Yard Configuration
70
52
  test_files: []
71
-
53
+ has_rdoc: