hotdog 0.28.0 → 0.29.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hotdog/commands/search.rb +7 -9
- data/lib/hotdog/commands/ssh.rb +1 -1
- data/lib/hotdog/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd9ee4784a5a2ae1305938dad9acffbda27344f5
|
4
|
+
data.tar.gz: ab2ae3bdce389ba30f9bb20f11b9ab5952edc19a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a810b1448b94c8678e02bccf635a3716b796b2846d317cd493b092f707bc2111a1787dee5c7f6db4df8ad9d56cde2a9d95926cf177f771fec37e61bb4b2c91
|
7
|
+
data.tar.gz: b1bfbba8629422bb3ede7dee2c5b2f65c0ea1029723ab92d60b4a997656af6bc13a7bf6436600a7c72436d25d4b1ebc2eb59d0ba33052645cc1a770ca5f02781
|
@@ -48,15 +48,10 @@ module Hotdog
|
|
48
48
|
result0 = evaluate(node, self)
|
49
49
|
if 0 < result0.length
|
50
50
|
result, fields = get_hosts_with_search_tags(result0, node)
|
51
|
-
|
52
|
-
|
53
|
-
logger.info("found %d host(s), limited to %d in result." % [result.length, options[:limit]])
|
54
|
-
else
|
55
|
-
STDOUT.print(format(result, fields: fields))
|
56
|
-
logger.info("found %d host(s)." % result.length)
|
57
|
-
end
|
51
|
+
STDOUT.print(format(result, fields: fields))
|
52
|
+
logger.info("found %d host(s)." % result.length)
|
58
53
|
else
|
59
|
-
|
54
|
+
logger.error("no match found: #{expression}")
|
60
55
|
exit(1)
|
61
56
|
end
|
62
57
|
end
|
@@ -121,10 +116,13 @@ module Hotdog
|
|
121
116
|
|
122
117
|
private
|
123
118
|
def rewrite_expression(expression)
|
124
|
-
if expression.empty?
|
119
|
+
if expression.strip.empty?
|
125
120
|
# return everything if given expression is empty
|
126
121
|
expression = "*"
|
127
122
|
end
|
123
|
+
if options[:limit]
|
124
|
+
expression = "LIMIT((#{expression}), #{options[:limit]})"
|
125
|
+
end
|
128
126
|
expression
|
129
127
|
end
|
130
128
|
end
|
data/lib/hotdog/commands/ssh.rb
CHANGED
data/lib/hotdog/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotdog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.29.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yamashita Yuu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|