ey_config 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  Ruby interface to additional services for customers of Engine Yard.
4
4
 
5
+ ## Synopsis
6
+
7
+ EY::Config.get(:shared_db_r_us, "db_hostname")
8
+
9
+ This will read the value for the `db_hostname` variable, as provided by the `shared_db_r_us` service.
10
+
11
+ In local development mode, you won't have access to the service, so you'll want to use `ey_config_local` command-line tool to write out a file at "config/ey_services_config_local.yml".
12
+ It's OK to commit this file to your repository. It will be used as a fallback in production in case you haven't activated the `shared_db_r_us` for a given environment.
13
+
14
+ See the **Code Snippet** documentation for individual services to see what variables they provide, and common usages.
15
+
16
+ ## How it works
17
+
18
+ When you deploy your app on Engine Yard cloud, the deployment system (https://github.com/engineyard/engineyard-serverside) will write out the file "config/ey_services_config_deploy.yml".
19
+ This file contains all the variables provided to your app, grouped by the Add-ons you have activated.
20
+
21
+ `EY::Config.get` will read variables from this file, or fallback to "config/ey_services_config_local.yml", which you should create for running your app in development mode.
22
+
23
+ That's it!
24
+
5
25
  ## Contributing to EY::Config
6
26
 
7
27
  * Check out the latest revision from the master branch
@@ -12,6 +32,12 @@ Ruby interface to additional services for customers of Engine Yard.
12
32
  * Send a pull request for your branch
13
33
  * Please add tests for any new code
14
34
 
35
+ ## Releasing
36
+
37
+ gem install gem-release
38
+ gem bump --tag
39
+ gem release
40
+
15
41
 
16
42
  ## Copyright
17
43
 
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  class Config
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
data/lib/ey_config.rb CHANGED
@@ -100,8 +100,9 @@ module EY
100
100
  end
101
101
 
102
102
  def valid_structure?(config)
103
- config.respond_to?(:has_key?) and
104
- config.values.first.respond_to?(:has_key?)
103
+ config == {} or
104
+ (config.respond_to?(:has_key?) and
105
+ config.values.first.respond_to?(:has_key?))
105
106
  end
106
107
  end
107
108
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_config
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 5
10
- version: 0.0.5
9
+ - 6
10
+ version: 0.0.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jacob Burkhart & Michael Broadhead & others
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-02 00:00:00 Z
18
+ date: 2012-05-14 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Access to additional services for Engine Yard customers.
@@ -63,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  requirements: []
64
64
 
65
65
  rubyforge_project:
66
- rubygems_version: 1.8.19
66
+ rubygems_version: 1.8.10
67
67
  signing_key:
68
68
  specification_version: 3
69
69
  summary: Engine Yard Configuration