qb 0.1.34 → 0.1.35

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e62142abe2a76e71137c01f70e49701b3072ac5
4
- data.tar.gz: bb5edb184e68c11f551f4e0ef088880b7f31df4f
3
+ metadata.gz: 34b87b9d7874575c192ab37a4c7f017e2e5ab747
4
+ data.tar.gz: e01816796d5b073d666c4482b71a9b0c94126a9e
5
5
  SHA512:
6
- metadata.gz: 1fb7c905548beac4a67b047ef47740ba3632a6b5bb8399e99114352f4b7bd9594f529f71bf0af42b643361d574c8bef2c61cb3e98baebb0bdd0f746ed4f2e2cb
7
- data.tar.gz: f4686f8a913ee855c612f700e41acfcb9acb09be3eafef6a8c96e48323b72eb150f865588e7668ab6712f8903aaafd729bd1f01b07aaae5e64d738f9f8b82c7f
6
+ metadata.gz: da1f3337c183e348d05b4763bdc2a89bd1d715871623d2ac023c256568c962d22de2a50ce0cf18ff3e5a7dbdce5c463d2a3227846df0d9c361e43957d41f0954
7
+ data.tar.gz: 3dd4dfc1d842552a6b2bc218fe61daf334b6a1fd82f472df3411da4b5b0c5ebac0f5d9c0b4790398008318ea36e23f5c4f82cfd394a7589a94fbdd977c3e63fd
@@ -66,14 +66,10 @@ module QB
66
66
  # create an option
67
67
  option = Option.new role, option_meta, include_path
68
68
 
69
- arg_style = if option.required?
70
- :REQUIRED
71
- else
72
- :OPTIONAL
73
- end
74
-
75
- on_args = [arg_style]
76
- # on_args = []
69
+ # this dictates whether or not the option's *argument* is required.
70
+ # we always require the argument, except in the case of boolean
71
+ # options or options that accept false.
72
+ on_args = [:REQUIRED]
77
73
 
78
74
  if option.meta['type'] == 'boolean'
79
75
  # don't use short names when included (for now)
@@ -137,14 +133,14 @@ module QB
137
133
  end
138
134
 
139
135
  if role.defaults.key? option.var_name
140
- on_args << if option.meta['type'] == 'boolean'
141
- if role.defaults[option.var_name]
136
+ if option.meta['type'] == 'boolean'
137
+ on_args << if role.defaults[option.var_name]
142
138
  "DEFAULT: --#{ option.cli_name }"
143
139
  else
144
140
  "DEFAULT: --no-#{ option.cli_name }"
145
141
  end
146
- else
147
- "DEFAULT: #{ role.defaults[option.var_name] }"
142
+ elsif !role.defaults[option.var_name].nil?
143
+ on_args << "DEFAULT: #{ role.defaults[option.var_name] }"
148
144
  end
149
145
  end
150
146
 
@@ -61,7 +61,7 @@ module QB
61
61
  def self.available
62
62
  search_path.
63
63
  select {|search_dir|
64
- # make sure it's there (and a direcotry)
64
+ # make sure it's there (and a directory)
65
65
  search_dir.directory?
66
66
  }.
67
67
  map {|search_dir|
@@ -1,7 +1,7 @@
1
1
  module QB
2
2
  GEM_NAME = 'qb'
3
3
 
4
- VERSION = "0.1.34"
4
+ VERSION = "0.1.35"
5
5
 
6
6
  def self.gemspec
7
7
  Gem.loaded_specs[GEM_NAME]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.34
4
+ version: 0.1.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - nrser