centroid 1.1.0.pre.alpha2 → 1.1.0.pre.alpha3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df795b772134e8a324de1458de777abbc9cc536c
4
- data.tar.gz: fec9de1bb2c4d766dfcf96e8333acf12047f82f5
3
+ metadata.gz: 32db5ae25caa826680c6150fc818113a935d5fde
4
+ data.tar.gz: b64c473a5e2bf525a9d3c105bee06081467fc355
5
5
  SHA512:
6
- metadata.gz: 6c56b4ea74fd10f1258a294c2eca63edcb1b8ae568888ead7c97691901727cd56ed4b7047dd5a6d0e8f9504c573f8fead691139c23b3f3290bfdb143c7074e52
7
- data.tar.gz: 300a1aa16b2c8aa7fa8b6c5170206b31e584cf1a3a3dcfe6eea6f427bfe340b618f69e4edfb7e4a6319d7c44c0b48d7f3975a94648cfe06d844aa4c8f3964794
6
+ metadata.gz: 00a3f269031593a8f8d2a9808f8879677b07557dd70bf51f336ed41dd4569a4f308dc00ffc3271b7f58773340133d52e65b0e5b05e9e0afa1c662d78460f45ca
7
+ data.tar.gz: 046077cad9cb0c0c2bae6fc23c1b156ceeb59e814bf6e2d95ec4674281140f9539c9d44b9bf0d2a040393f24e4b9c5acc49472b404802ec777b5a60fb30af439
data/centroid.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'centroid'
3
- s.version = '1.1.0-alpha2'
3
+ s.version = '1.1.0-alpha3'
4
4
  s.summary = 'A centralizaed paradigm to configuration management.'
5
5
  s.description = 'Centroid is a tool for loading configuration values declared in JSON, and accessing those configuration values using object properties.'
6
6
  s.author = 'Resource Data, Inc'
data/lib/centroid.rb CHANGED
@@ -57,6 +57,7 @@ module Centroid
57
57
 
58
58
  def for_environment(env)
59
59
  env_json = raw_config[env]
60
+ env_json["environment"] = env
60
61
  all_key = actual_key("all")
61
62
  if all_key.nil?
62
63
  Config.new(env_json)
@@ -49,6 +49,12 @@ class ConfigTests < Test::Unit::TestCase
49
49
  assert_equal(config.the_environment.the_key, "TheValue")
50
50
  end
51
51
 
52
+ def test_environment_property_is_included
53
+ config = Centroid::Config.new(json_config)
54
+ environment_config = config.for_environment("theEnvironment")
55
+ assert_equal(environment_config.environment, "theEnvironment")
56
+ end
57
+
52
58
  def test_environment_specific_config_is_included
53
59
  config = Centroid::Config.new(json_config)
54
60
  environment_config = config.for_environment("theEnvironment")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: centroid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0.pre.alpha2
4
+ version: 1.1.0.pre.alpha3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Resource Data, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-03 00:00:00.000000000 Z
11
+ date: 2014-07-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Centroid is a tool for loading configuration values declared in JSON,
14
14
  and accessing those configuration values using object properties.