hotdog 0.1.12 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hotdog/application.rb +2 -0
- data/lib/hotdog/commands/hosts.rb +1 -1
- data/lib/hotdog/commands/search.rb +4 -2
- data/lib/hotdog/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 505e69a908d6c3e2ddb619720f9f79bf3217cb1d
|
4
|
+
data.tar.gz: 70f5d8ac5e652dfd43c036e7dd1e50a9c04a97a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfa2a35e628a1987d6e02ba325c097634ef926cf4e47ef57c258de678ef44de0c491fa45b67736cad99c26c5b0fbcd75b35204017bd91147d91783a782f4f54c
|
7
|
+
data.tar.gz: 94ab71d98c5a0cd615bea26473b39012cc92f41efe1c333a45f0267107375025137e028256598c486a8ab62acb4a00e758a4ce5c6bb8765c1eba45fd891e79e3
|
data/lib/hotdog/application.rb
CHANGED
@@ -5,11 +5,13 @@ require "optparse"
|
|
5
5
|
require "yaml"
|
6
6
|
require "hotdog/commands"
|
7
7
|
require "hotdog/formatters"
|
8
|
+
require "hotdog/version"
|
8
9
|
|
9
10
|
module Hotdog
|
10
11
|
class Application
|
11
12
|
def initialize()
|
12
13
|
@optparse = OptionParser.new
|
14
|
+
@optparse.version = Hotdog::VERSION
|
13
15
|
@options = {
|
14
16
|
api_key: ENV["DATADOG_API_KEY"],
|
15
17
|
application_key: ENV["DATADOG_APPLICATION_KEY"],
|
@@ -77,6 +77,7 @@ module Hotdog
|
|
77
77
|
| term.as(:left) >> spacing.maybe >> (str('|') >> str('|').maybe).as(:binary_op) >> spacing.maybe >> expression.as(:right) \
|
78
78
|
| term.as(:left) >> spacing.maybe >> (match('[Aa]') >> match('[Nn]') >> match('[Dd]')).as(:binary_op) >> spacing.maybe >> expression.as(:right) \
|
79
79
|
| term.as(:left) >> spacing.maybe >> (match('[Oo]') >> match('[Rr]')).as(:binary_op) >> spacing.maybe >> expression.as(:right) \
|
80
|
+
| term.as(:left) >> spacing.maybe.as(:binary_op) >> expression.as(:right) \
|
80
81
|
)
|
81
82
|
}
|
82
83
|
rule(:unary_expression) {
|
@@ -184,6 +185,7 @@ module Hotdog
|
|
184
185
|
|
185
186
|
def initialize(op, left, right)
|
186
187
|
@op = op
|
188
|
+
@op ||= "or" # use OR expression by default
|
187
189
|
@left = left
|
188
190
|
@right = right
|
189
191
|
end
|
@@ -202,7 +204,7 @@ module Hotdog
|
|
202
204
|
right_values = @right.evaluate(environment)
|
203
205
|
(left_values | right_values).uniq
|
204
206
|
else
|
205
|
-
raise(SyntaxError.new("unknown binary operator: #{@op}"))
|
207
|
+
raise(SyntaxError.new("unknown binary operator: #{@op.inspect}"))
|
206
208
|
end
|
207
209
|
end
|
208
210
|
end
|
@@ -228,7 +230,7 @@ module Hotdog
|
|
228
230
|
EOS
|
229
231
|
end
|
230
232
|
else
|
231
|
-
raise(SyntaxError.new("unknown unary operator: #{@op}"))
|
233
|
+
raise(SyntaxError.new("unknown unary operator: #{@op.inspect}"))
|
232
234
|
end
|
233
235
|
end
|
234
236
|
end
|
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.1.
|
4
|
+
version: 0.1.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yamashita Yuu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -154,3 +154,4 @@ signing_key:
|
|
154
154
|
specification_version: 4
|
155
155
|
summary: Yet another command-line tool for Datadog
|
156
156
|
test_files: []
|
157
|
+
has_rdoc:
|