trickery 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ module Trickery
8
8
  class Configurability < Struct.new(:prefix, :fields)
9
9
 
10
10
  def default_opts
11
- @default_opts ||= nested_hash.tap do |opts|
11
+ @default_opts ||= Hash.new_nested.tap do |opts|
12
12
  fields.each do |field|
13
13
  names = field[2].split('.')
14
14
  value = opts
@@ -24,7 +24,7 @@ module Trickery
24
24
  end
25
25
 
26
26
  def cli_opts(args)
27
- @cli_opts ||= nested_hash.tap do |opts|
27
+ @cli_opts ||= Hash.new_nested.tap do |opts|
28
28
  args.options do |o|
29
29
  fields.each do |field|
30
30
  o.on(field[0], field[1]+'=val', String) do |val|
@@ -45,7 +45,7 @@ module Trickery
45
45
  end
46
46
 
47
47
  def env_opts
48
- @env_opts ||= nested_hash.tap do |opts|
48
+ @env_opts ||= Hash.new_nested.tap do |opts|
49
49
  fields.each do |field|
50
50
  env = (prefix+'.'+field[2]).upcase.tr('.', '_')
51
51
  if val = ENV[env]
@@ -1,3 +1,3 @@
1
1
  module Trickery
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trickery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-11-03 00:00:00.000000000 Z
12
+ date: 2015-11-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -132,7 +132,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
132
132
  version: '0'
133
133
  segments:
134
134
  - 0
135
- hash: -4447898236271774713
135
+ hash: 913381754383812113
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  none: false
138
138
  requirements:
@@ -141,7 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
141
141
  version: '0'
142
142
  segments:
143
143
  - 0
144
- hash: -4447898236271774713
144
+ hash: 913381754383812113
145
145
  requirements: []
146
146
  rubyforge_project:
147
147
  rubygems_version: 1.8.23