qb 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/exe/qb +24 -2
- data/lib/qb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54687128688607e61d8014d9ff30313dfa384f31
|
4
|
+
data.tar.gz: 317c700f6509ab626d48a84265aa039aa4284c5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4f727fdd46c64547cf5034c23bf9dcc5217f3c7af51ae660cc2684c68b4581453633478cf3ce97098e297022b033e7f8521404685dabb5eae63fb7e1af81479
|
7
|
+
data.tar.gz: 6fc724c46b9946ee5121289f1dfd54cd6e57c008ea9f4b703ca9f08d9d34eb7a0ced62f363a94ebd4b9f12319a1020b38564476067b9d25314a589f0fa3052ba
|
data/exe/qb
CHANGED
@@ -157,6 +157,22 @@ def parse! role_arg, var_prefix, vars, defaults, args
|
|
157
157
|
options
|
158
158
|
end
|
159
159
|
|
160
|
+
def help
|
161
|
+
puts <<-END
|
162
|
+
syntax:
|
163
|
+
|
164
|
+
qb ROLE [OPTIONS] DIRECTORY
|
165
|
+
|
166
|
+
use `qb ROLE -h` for role options.
|
167
|
+
|
168
|
+
available roles:
|
169
|
+
|
170
|
+
END
|
171
|
+
puts ROLES
|
172
|
+
puts
|
173
|
+
exit 1
|
174
|
+
end
|
175
|
+
|
160
176
|
def main args
|
161
177
|
set_debug! args
|
162
178
|
debug args: args
|
@@ -164,6 +180,8 @@ def main args
|
|
164
180
|
role_arg = args.shift
|
165
181
|
debug "role arg" => role_arg
|
166
182
|
|
183
|
+
help if role_arg.nil? || ['-h', '--help', 'help'].include?(role_arg)
|
184
|
+
|
167
185
|
matches = ROLES.select {|role|
|
168
186
|
role.include? role_arg
|
169
187
|
}
|
@@ -171,11 +189,15 @@ def main args
|
|
171
189
|
|
172
190
|
role = case matches.length
|
173
191
|
when 0
|
174
|
-
|
192
|
+
puts "ERROR - no roles match arg #{ role_arg.inspect }\n\n"
|
193
|
+
help
|
175
194
|
when 1
|
176
195
|
matches[0]
|
177
196
|
else
|
178
|
-
|
197
|
+
puts "ERROR - multiple role matches:\n\n"
|
198
|
+
puts matches
|
199
|
+
puts
|
200
|
+
exit 1
|
179
201
|
end
|
180
202
|
debug role: role
|
181
203
|
|
data/lib/qb/version.rb
CHANGED