configliere 0.3.1 → 0.3.2

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
data/configliere.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{configliere}
8
- s.version = "0.3.1"
8
+ s.version = "0.3.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["mrflip"]
12
- s.date = %q{2011-03-01}
12
+ s.date = %q{2011-03-07}
13
13
  s.default_executable = %q{configliere}
14
14
  s.description = %q{ You've got a script. It's got some settings. Some settings are for this module, some are for that module. Most of them don't change. Except on your laptop, where the paths are different. Or when you're in production mode. Or when you're testing from the command line.
15
15
 
@@ -163,6 +163,7 @@ module Configliere
163
163
 
164
164
  # Help on environment variables.
165
165
  def env_var_help
166
+ return if params_with_env_help.empty?
166
167
  [ "\nEnvironment Variables can be used to set:"] + params_with_env_help.map{ |param, env| " %-27s %s"%[env.to_s, param]}
167
168
  end
168
169
 
@@ -104,6 +104,13 @@ describe "Configliere::Commandline" do
104
104
  end
105
105
 
106
106
  end
107
+
108
+ describe "constructing help messages" do
109
+ it "should not display a help message about environment variables if no environment variables exist with documentation" do
110
+ @config = Configliere::Param.new :param_1 => 'val 1', :cat => :hat
111
+ @config.env_var_help.should be_nil
112
+ end
113
+ end
107
114
 
108
115
  end
109
116
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configliere
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 1
10
- version: 0.3.1
9
+ - 2
10
+ version: 0.3.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - mrflip
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-01 00:00:00 -06:00
18
+ date: 2011-03-07 00:00:00 -06:00
19
19
  default_executable: configliere
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency