tcfg 0.1.1 → 0.2.0

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: ab856a0778cb79bb3d904c64c539dc3ff0f972d0
4
- data.tar.gz: bc051c263156ac131aad25df89d6a0020d9eb0b3
3
+ metadata.gz: e368269e17db9f30e5ad5728fc6e0eb1afabe45f
4
+ data.tar.gz: 003aee3a3d1d314dcc06f6c1b467d0913fa46066
5
5
  SHA512:
6
- metadata.gz: 37f12a1426534269e0c3660d33eddab8f3c620ae0ff7270e6ea0c11231fa942d2eb4bcc3e8c526d995e1dfdacd70d8bd2414b4c5727b2b15be834f9436a00c20
7
- data.tar.gz: 21925ca01357f8f511567a146169add218518d002fb381f48dce29fdfb450666bdc83bd35ebbb95168384110cf130365c03286b590fb8f907abecd43bd6696d9
6
+ metadata.gz: 8eb4303d7ff7c8699ed09bd1da6944deaa633a7f6a815a1b6d1f5f41cc37016d6951b70d52e7b89dd402cd80bd8113880cf57cea71d6be2025392d2e13237bc5
7
+ data.tar.gz: cbe3425379a81470249a86f3bc621fb4f3b9295051a5ac896bc7feca9a5cb1ac0043a32e7042176f2c06720eece514104cf3d5e5731aee7c4adf09d3dce5c0eb
data/Gemfile CHANGED
@@ -1,10 +1,11 @@
1
- source "http://rubygems.org"
1
+ source 'http://rubygems.org'
2
2
 
3
- #used for HashWithIndifferentAccess
4
- gem 'activesupport', '~> 3.2'
3
+ # activesupport used for HashWithIndifferentAccess
4
+ gem 'activesupport'
5
5
 
6
6
  group :development do
7
- gem "rspec", '~> 2.14'
8
- gem "jeweler", '~> 2'
9
- gem "yard", "~> 0.8"
7
+ gem 'jeweler'
8
+ gem 'rspec'
9
+ gem 'rubocop'
10
+ gem 'yard'
10
11
  end
@@ -1,16 +1,22 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- activesupport (3.2.13)
5
- i18n (= 0.6.1)
6
- multi_json (~> 1.0)
7
- addressable (2.3.5)
8
- builder (3.2.2)
9
- descendants_tracker (0.0.3)
10
- diff-lcs (1.2.5)
11
- faraday (0.9.0)
4
+ activesupport (5.1.0)
5
+ concurrent-ruby (~> 1.0, >= 1.0.2)
6
+ i18n (~> 0.7)
7
+ minitest (~> 5.1)
8
+ tzinfo (~> 1.1)
9
+ addressable (2.5.1)
10
+ public_suffix (~> 2.0, >= 2.0.2)
11
+ ast (2.3.0)
12
+ builder (3.2.3)
13
+ concurrent-ruby (1.0.5)
14
+ descendants_tracker (0.0.4)
15
+ thread_safe (~> 0.3, >= 0.3.1)
16
+ diff-lcs (1.3)
17
+ faraday (0.9.2)
12
18
  multipart-post (>= 1.2, < 3)
13
- git (1.2.6)
19
+ git (1.3.0)
14
20
  github_api (0.11.3)
15
21
  addressable (~> 2.3)
16
22
  descendants_tracker (~> 0.0.1)
@@ -19,56 +25,80 @@ GEM
19
25
  multi_json (>= 1.7.5, < 2.0)
20
26
  nokogiri (~> 1.6.0)
21
27
  oauth2
22
- hashie (2.0.5)
23
- highline (1.6.21)
24
- i18n (0.6.1)
25
- jeweler (2.0.1)
28
+ hashie (3.5.5)
29
+ highline (1.7.8)
30
+ i18n (0.8.1)
31
+ jeweler (2.3.5)
26
32
  builder
27
33
  bundler (>= 1.0)
28
34
  git (>= 1.2.5)
29
- github_api
35
+ github_api (~> 0.11.0)
30
36
  highline (>= 1.6.15)
31
37
  nokogiri (>= 1.5.10)
38
+ psych (~> 2.2)
32
39
  rake
33
40
  rdoc
34
- json (1.8.1)
35
- json (1.8.1-java)
36
- jwt (0.1.11)
37
- multi_json (>= 1.5)
38
- mini_portile (0.5.2)
39
- multi_json (1.9.0)
40
- multi_xml (0.5.5)
41
+ semver2
42
+ jwt (1.5.6)
43
+ mini_portile2 (2.1.0)
44
+ minitest (5.10.1)
45
+ multi_json (1.12.1)
46
+ multi_xml (0.6.0)
41
47
  multipart-post (2.0.0)
42
- nokogiri (1.6.1)
43
- mini_portile (~> 0.5.0)
44
- nokogiri (1.6.1-java)
45
- mini_portile (~> 0.5.0)
46
- oauth2 (0.9.3)
47
- faraday (>= 0.8, < 0.10)
48
- jwt (~> 0.1.8)
48
+ nokogiri (1.6.8.1)
49
+ mini_portile2 (~> 2.1.0)
50
+ oauth2 (1.3.1)
51
+ faraday (>= 0.8, < 0.12)
52
+ jwt (~> 1.0)
49
53
  multi_json (~> 1.3)
50
54
  multi_xml (~> 0.5)
51
- rack (~> 1.2)
52
- rack (1.5.2)
53
- rake (10.1.1)
54
- rdoc (4.1.1)
55
- json (~> 1.4)
56
- rspec (2.14.1)
57
- rspec-core (~> 2.14.0)
58
- rspec-expectations (~> 2.14.0)
59
- rspec-mocks (~> 2.14.0)
60
- rspec-core (2.14.8)
61
- rspec-expectations (2.14.5)
62
- diff-lcs (>= 1.1.3, < 2.0)
63
- rspec-mocks (2.14.6)
64
- yard (0.8.7.3)
55
+ rack (>= 1.2, < 3)
56
+ parser (2.4.0.0)
57
+ ast (~> 2.2)
58
+ powerpack (0.1.1)
59
+ psych (2.2.4)
60
+ public_suffix (2.0.5)
61
+ rack (2.0.1)
62
+ rainbow (2.2.2)
63
+ rake
64
+ rake (12.0.0)
65
+ rdoc (5.1.0)
66
+ rspec (3.5.0)
67
+ rspec-core (~> 3.5.0)
68
+ rspec-expectations (~> 3.5.0)
69
+ rspec-mocks (~> 3.5.0)
70
+ rspec-core (3.5.4)
71
+ rspec-support (~> 3.5.0)
72
+ rspec-expectations (3.5.0)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.5.0)
75
+ rspec-mocks (3.5.0)
76
+ diff-lcs (>= 1.2.0, < 2.0)
77
+ rspec-support (~> 3.5.0)
78
+ rspec-support (3.5.0)
79
+ rubocop (0.48.1)
80
+ parser (>= 2.3.3.1, < 3.0)
81
+ powerpack (~> 0.1)
82
+ rainbow (>= 1.99.1, < 3.0)
83
+ ruby-progressbar (~> 1.7)
84
+ unicode-display_width (~> 1.0, >= 1.0.1)
85
+ ruby-progressbar (1.8.1)
86
+ semver2 (3.4.2)
87
+ thread_safe (0.3.6)
88
+ tzinfo (1.2.3)
89
+ thread_safe (~> 0.1)
90
+ unicode-display_width (1.2.1)
91
+ yard (0.9.9)
65
92
 
66
93
  PLATFORMS
67
- java
68
94
  ruby
69
95
 
70
96
  DEPENDENCIES
71
- activesupport (~> 3.2)
72
- jeweler (~> 2)
73
- rspec (~> 2.14)
74
- yard (~> 0.8)
97
+ activesupport
98
+ jeweler
99
+ rspec
100
+ rubocop
101
+ yard
102
+
103
+ BUNDLED WITH
104
+ 1.13.6
data/README.md CHANGED
@@ -7,6 +7,8 @@ TCFG (pronounced "tee config") is test suite configuration for the real world.
7
7
 
8
8
  * A tiered structure to configuration which allows for every kind of configuration scenario to be supported.
9
9
 
10
+ * Support for easily integrating standalone test suites into common Continuous Integration platforms like Jenkins.
11
+
10
12
  Background
11
13
  ----------
12
14
 
@@ -62,14 +64,11 @@ Now you can access configuration in any before, after, or it block, like:
62
64
  @browser.get tcfg['BASE_URL']
63
65
  end
64
66
 
65
- config.after(:all) do
66
- @browser.quit
67
- end
68
67
  end
69
68
 
70
69
  If you need to access configuration outside of a before, after, or it block you can use the TCFG module directly:
71
70
 
72
- Log.level = TCFG['BASE_URL']
71
+ Log.level = TCFG['LOG_LEVEL']
73
72
 
74
73
  To control your test suite, you can use environment variables. To change the browser used:
75
74
 
@@ -87,4 +86,10 @@ To control your test suite, you can use environment variables. To change the br
87
86
 
88
87
  TCFG is a general purpose configuration framework. It should be possible to use with most Ruby test frameworks or even for non testing uses. If you have a use and aren't sure how to handle it with tcfg, file an issue we'll see if we can help you out.
89
88
 
89
+ ### Examples
90
+
91
+ TCFG is used in several projects that demonstrate it's capabilities.
92
+
93
+ * [Standable Capybara example](https://github.com/rschultheis/rspec_capybara_starter)
90
94
 
95
+ * More coming soon...
data/Rakefile CHANGED
@@ -7,32 +7,31 @@ begin
7
7
  Bundler.setup(:default, :development)
8
8
  rescue Bundler::BundlerError => e
9
9
  $stderr.puts e.message
10
- $stderr.puts "Run `bundle install` to install missing gems"
11
- exit e.status_code
10
+ $stderr.puts 'Run `bundle install` to install missing gems'
11
+ exit e.status_co
12
12
  end
13
13
  require 'rake'
14
14
 
15
15
  require 'jeweler'
16
16
  Jeweler::Tasks.new do |gem|
17
17
  # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
18
- gem.name = "tcfg"
19
- gem.homepage = "http://github.com/rschultheis/tcfg"
20
- gem.license = "MIT"
21
- gem.summary = "Test suite configuration for the real world"
22
- gem.description = "A tiered approach to configuration which allows for full control of your test suite through environment variables"
23
- gem.email = "robert.schultheis@gmail.com"
24
- gem.authors = ["robert schultheis"]
18
+ gem.name = 'tcfg'
19
+ gem.homepage = 'http://github.com/rschultheis/tcfg'
20
+ gem.license = 'MIT'
21
+ gem.summary = 'Test suite configuration for the real world'
22
+ gem.description = 'A tiered approach to configuration which allows for full control of your test suite through environment variables'
23
+ gem.email = 'robert.schultheis@gmail.com'
24
+ gem.authors = ['robert schultheis']
25
25
  gem.files = [
26
- "Gemfile",
27
- "Gemfile.lock",
28
- "LICENSE.txt",
29
- "README.md",
30
- "Rakefile",
31
- "VERSION",
26
+ 'Gemfile',
27
+ 'Gemfile.lock',
28
+ 'LICENSE.txt',
29
+ 'README.md',
30
+ 'Rakefile',
31
+ 'VERSION'
32
32
  ] + Dir.glob('lib/**/*.rb')
33
33
 
34
34
  # dependencies defined in Gemfile
35
-
36
35
  end
37
36
  Jeweler::RubygemsDotOrgTasks.new
38
37
 
@@ -42,11 +41,10 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
42
41
  spec.pattern = FileList['spec/**/*_spec.rb']
43
42
  end
44
43
 
45
- task :default => :spec
44
+ task default: :spec
46
45
 
47
- #documentation
46
+ # YARD for documentation
48
47
  require 'yard'
49
48
  YARD::Rake::YardocTask.new do |t|
50
- t.files = ['lib/**/*.rb'] # optional
51
- #t.options = ['--any', '--extra', '--opts'] # optional
49
+ t.files = ['lib/**/*.rb']
52
50
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.2.0
@@ -1,6 +1,5 @@
1
1
  require_relative 'tcfg_helper'
2
2
 
3
-
4
3
  module TCFG
5
4
  # The TCFG::Base object can used an instance of configuration
6
5
  #
@@ -18,13 +17,13 @@ module TCFG
18
17
  class Base
19
18
  include TCFG::Helper
20
19
 
21
- #the simplest way to acces configuration
20
+ # the simplest way to acces configuration
22
21
  #
23
22
  # cfg['my_key']
24
23
  # => 'some_value'
25
24
  #
26
25
  # @see TCFG::Helper#tcfg_get
27
- def [] key
26
+ def [](key)
28
27
  tcfg_get key
29
28
  end
30
29
  end
@@ -1,11 +1,21 @@
1
1
  require 'yaml'
2
+
3
+ # rather than load the ginormous activesupport library entirely,
4
+ # pull in some individual objects and utility methods from activesupport
2
5
  require 'active_support/core_ext/hash/indifferent_access'
3
6
  require 'active_support/core_ext/hash/deep_merge'
4
- require 'active_support/core_ext/hash/deep_dup'
5
7
  require 'active_support/core_ext/hash/slice'
8
+ # active_support 5 moved deep_dup,
9
+ # so this trick is in place to support all activesupport versions
10
+ begin
11
+ # deep_dup is here in active_support 5
12
+ require 'active_support/core_ext/object/deep_dup'
13
+ rescue LoadError
14
+ # and here in active_support < 5
15
+ require 'active_support/core_ext/hash/deep_dup'
16
+ end
6
17
 
7
18
  module TCFG
8
-
9
19
  # TCFG::Helper does all the "heavy lifting". Essentially all the logic within TCFG is defined by this module.
10
20
  # The intended ways to use this module are:
11
21
  #
@@ -37,12 +47,11 @@ module TCFG
37
47
  #
38
48
  #
39
49
  module Helper
40
-
41
50
  # the public config file that is looked for unless tcfg_config_file is called
42
- DEFAULT_CONFIG_FILE = 'tcfg.yml'
51
+ DEFAULT_CONFIG_FILE = 'tcfg.yml'.freeze
43
52
 
44
- #the default prefix that goes before environment variables and the environments section in config files
45
- DEFAULT_ENV_VAR_PREFIX = 'T_'
53
+ # the default prefix that goes before environment variables and the environments section in config files
54
+ DEFAULT_ENV_VAR_PREFIX = 'T_'.freeze
46
55
 
47
56
  # return a copy of the resolved configuration
48
57
  #
@@ -51,7 +60,7 @@ module TCFG
51
60
  # @return [ActiveSupport::HashWithIndifferentAccess] a copy of the resolved configuration
52
61
  def tcfg
53
62
  @tcfg_resolved_config ||= resolve_config
54
- #return a deep copy of the configuration object to prevent mutations
63
+ # return a deep copy of the configuration object to prevent mutations
55
64
  @tcfg_resolved_config.deep_dup
56
65
  end
57
66
 
@@ -68,8 +77,8 @@ module TCFG
68
77
  # @param filename [String] the path to a yaml file
69
78
  # @return [nil]
70
79
  #
71
- def tcfg_config_file filename
72
- confirm_config_file_existence filename
80
+ def tcfg_config_file(filename)
81
+ confirm_config_file_existence filename
73
82
  tcfg_reset
74
83
  @tcfg_config_filename = filename
75
84
  nil
@@ -84,8 +93,8 @@ module TCFG
84
93
  # @param filename [String] the path to a yaml file
85
94
  # @return [nil]
86
95
  #
87
- def tcfg_secret_config_file filename
88
- confirm_config_file_existence filename
96
+ def tcfg_secret_config_file(filename)
97
+ confirm_config_file_existence filename
89
98
  tcfg_reset
90
99
  @tcfg_secret_config_filename = filename
91
100
  nil
@@ -97,10 +106,10 @@ module TCFG
97
106
  # @param value [String, Integer, FixNum, Array, Hash] the value of the configuration
98
107
  # @return value The same value that was passed in
99
108
  #
100
- def tcfg_set key, value
109
+ def tcfg_set(key, value)
101
110
  tier_code_defaults[key] = value
102
111
  tcfg_reset
103
- return value
112
+ value
104
113
  end
105
114
 
106
115
  # return a single piece of configuration by key
@@ -108,16 +117,16 @@ module TCFG
108
117
  # @param key [String] the configuration to return
109
118
  # @return [String, Integer, FixNum, Array, Hash] the value of the configuration from the resolved configuration
110
119
  #
111
- def tcfg_get key
120
+ def tcfg_get(key)
112
121
  t_tcfg = tcfg
113
- unless t_tcfg.has_key? key
114
- raise NoSuchConfigurationKeyError.new "No configuration defined for '#{key}'"
122
+ unless t_tcfg.key? key
123
+ raise NoSuchConfigurationKeyError, "No configuration defined for '#{key}'"
115
124
  end
116
125
  t_tcfg[key]
117
126
  end
118
127
 
119
128
  # like tcfg_get but doesnt raise an exception if key is not defined
120
- def tcfg_fetch key, alt_value=nil
129
+ def tcfg_fetch(key, alt_value = nil)
121
130
  tcfg.fetch key, alt_value
122
131
  end
123
132
 
@@ -153,7 +162,7 @@ module TCFG
153
162
  # @param prefix [String] the new prefix. It can be an empty string to specify no prefix should be used.
154
163
  # @return [nil]
155
164
  #
156
- def tcfg_set_env_var_prefix prefix
165
+ def tcfg_set_env_var_prefix(prefix)
157
166
  @tcfg_env_var_prefix = prefix
158
167
  tcfg_reset
159
168
  end
@@ -185,40 +194,44 @@ module TCFG
185
194
 
186
195
  def tier_environment_overrides
187
196
  tenv = tcfg_fetch_env_var 'ENVIRONMENT', nil
188
- return {} unless @tcfg_environments_config and tenv
189
- unless @tcfg_environments_config.has_key? tenv
190
- raise TCFG::NoSuchEnvironmentError.new "No such environment in configuration '#{tenv}'"
197
+ return {} unless @tcfg_environments_config && tenv
198
+ unless @tcfg_environments_config.key? tenv
199
+ raise TCFG::NoSuchEnvironmentError, "No such environment in configuration '#{tenv}'"
191
200
  end
192
- @tcfg_environments_config[tenv].merge({tcfg_env_var_name('ENVIRONMENT') => tenv})
201
+ @tcfg_environments_config[tenv].merge(tcfg_env_var_name('ENVIRONMENT') => tenv)
193
202
  end
194
203
 
195
- #environment variable overrides is the most complex tier
196
- #The rules:
204
+ # environment variable overrides is the most complex tier
205
+ # The rules:
197
206
  # - You can only override configuration that exists in a lower tier. An exception is raised otherwise
198
207
  # - You can use a - character to override deeply
199
208
  # - All env variables must start with the prefix (T_)
200
209
  # - ignore the special T_ENVIRONMENT variable
201
- def tier_environment_variable_overrides lower_config={}
202
- tcfg_env_vars = ENV.keys.select{|ev| ev =~ /^#{tcfg_env_var_prefix}/}
210
+ def tier_environment_variable_overrides(lower_config = {})
211
+ tcfg_env_vars = ENV.keys.select { |ev| ev =~ /^#{tcfg_env_var_prefix}/ }
203
212
  tcfg_env = ENV.to_hash.slice(*tcfg_env_vars)
204
213
  tcfg_env.each_pair do |full_var_name, value|
205
214
  var_chain = full_var_name.sub(/^#{tcfg_env_var_prefix}/, '').split('-')
206
- next if var_chain.first.upcase == 'ENVIRONMENT'
215
+ next if var_chain.first.casecmp('ENVIRONMENT').zero?
207
216
  parent_of_config_to_modify = lower_config
208
217
  var_chain[0...-1].each do |parent_key|
209
- unless parent_of_config_to_modify.respond_to? :has_key? and parent_of_config_to_modify.has_key? parent_key
210
- raise BadParentInDeepOverrideError.new("No such parent '#{parent_key}' for deep override '#{full_var_name}'")
218
+ unless parent_of_config_to_modify.respond_to?(:key?) &&
219
+ parent_of_config_to_modify.key?(parent_key)
220
+ raise BadParentInDeepOverrideError,
221
+ "No such parent '#{parent_key}' for deep override '#{full_var_name}'"
211
222
  end
212
223
  parent_of_config_to_modify = parent_of_config_to_modify[parent_key]
213
224
  end
214
- unless parent_of_config_to_modify.respond_to? :has_key? and parent_of_config_to_modify.has_key? var_chain.last
215
- raise NoSuchConfigurationKeyError.new("No such configuration for '#{var_chain.last}' for override var '#{full_var_name}'")
225
+ unless parent_of_config_to_modify.respond_to?(:key?) &&
226
+ parent_of_config_to_modify.key?(var_chain.last)
227
+ raise NoSuchConfigurationKeyError,
228
+ "No such configuration for '#{var_chain.last}' for override var '#{full_var_name}'"
216
229
  end
217
230
  parent_of_config_to_modify[var_chain.last] = value
218
231
  end
219
232
  end
220
233
 
221
- def tcfg_load_optional_config_file filename
234
+ def tcfg_load_optional_config_file(filename)
222
235
  @tcfg_environments_config ||= ActiveSupport::HashWithIndifferentAccess.new
223
236
  if File.exist? filename
224
237
  file_contents = YAML.load_file filename
@@ -231,9 +244,9 @@ module TCFG
231
244
  end
232
245
  end
233
246
 
234
- def confirm_config_file_existence filename
247
+ def confirm_config_file_existence(filename)
235
248
  unless File.exist? filename
236
- raise TCFG::NoSuchConfigFileError.new "No such config file '#{filename}'"
249
+ raise TCFG::NoSuchConfigFileError, "No such config file '#{filename}'"
237
250
  end
238
251
  end
239
252
 
@@ -242,46 +255,45 @@ module TCFG
242
255
  @tcfg_env_var_prefix
243
256
  end
244
257
 
245
- def tcfg_env_var_name key
258
+ def tcfg_env_var_name(key)
246
259
  tcfg_env_var_prefix + key
247
260
  end
248
261
 
249
- def tcfg_fetch_env_var key, not_defined_value
262
+ def tcfg_fetch_env_var(key, not_defined_value)
250
263
  ENV.fetch tcfg_env_var_name(key), not_defined_value
251
264
  end
252
265
 
253
266
  def resolve_config
254
267
  resolved_config = ActiveSupport::HashWithIndifferentAccess.new
255
268
 
256
- #tier 1 code defaults
269
+ # tier 1 code defaults
257
270
  resolved_config.deep_merge! tier_code_defaults
258
271
 
259
- #tier 2, the main config file
272
+ # tier 2, the main config file
260
273
  resolved_config.deep_merge! tier_config_file
261
274
 
262
- #tier 3, the main config file
275
+ # tier 3, the main config file
263
276
  resolved_config.deep_merge! tier_secret_config_file
264
277
 
265
- #tier 4, environment overrides
278
+ # tier 4, environment overrides
266
279
  resolved_config.deep_merge! tier_environment_overrides
267
280
 
268
- #tier 5, environment variable overrides
281
+ # tier 5, environment variable overrides
269
282
  tier_environment_variable_overrides resolved_config
270
283
 
271
284
  resolved_config
272
285
  end
273
-
274
286
  end
275
287
 
276
- #Raised when the requested environment is not available
288
+ # raised when the requested environment is not available
277
289
  class NoSuchEnvironmentError < StandardError; end
278
290
 
279
- #raised when a non-existent config file is specified
291
+ # raised when a non-existent config file is specified
280
292
  class NoSuchConfigFileError < StandardError; end
281
293
 
282
- #raise when a non-existent piece of configuration is requested
294
+ # raised when a non-existent piece of configuration is requested
283
295
  class NoSuchConfigurationKeyError < StandardError; end
284
296
 
285
- #raise when a deep env var override specifies a non-existent parent hash in config
297
+ # raised when a deep env var override specifies a non-existent parent hash in config
286
298
  class BadParentInDeepOverrideError < StandardError; end
287
299
  end
@@ -18,13 +18,13 @@ module TCFG
18
18
  class << self
19
19
  include TCFG::Helper
20
20
 
21
- #the simplest way to acces configuration
21
+ # the simplest way to acces configuration
22
22
  #
23
23
  # TCFG['my_key']
24
24
  # => 'some_value'
25
25
  #
26
26
  # @see TCFG::Helper#tcfg_get
27
- def [] key
27
+ def [](key)
28
28
  tcfg_get key
29
29
  end
30
30
  end
metadata CHANGED
@@ -1,71 +1,85 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tcfg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - robert schultheis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-30 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jeweler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
- - - "~>"
45
+ - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: '2.14'
47
+ version: '0'
34
48
  type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
- - - "~>"
52
+ - - ">="
39
53
  - !ruby/object:Gem::Version
40
- version: '2.14'
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
- name: jeweler
56
+ name: rubocop
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - "~>"
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
- version: '2'
61
+ version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - "~>"
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
- version: '2'
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: yard
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
- - - "~>"
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
- version: '0.8'
75
+ version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - "~>"
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
- version: '0.8'
82
+ version: '0'
69
83
  description: A tiered approach to configuration which allows for full control of your
70
84
  test suite through environment variables
71
85
  email: robert.schultheis@gmail.com
@@ -105,9 +119,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
119
  version: '0'
106
120
  requirements: []
107
121
  rubyforge_project:
108
- rubygems_version: 2.2.2
122
+ rubygems_version: 2.5.1
109
123
  signing_key:
110
124
  specification_version: 4
111
125
  summary: Test suite configuration for the real world
112
126
  test_files: []
113
- has_rdoc: