lstash 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +6 -0
- data/lib/lstash/cli.rb +1 -2
- data/lib/lstash/version.rb +1 -1
- data/spec/lstash/cli_spec.rb +14 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2Y0MGRlYmVkZmM1OTRjOGU2YmVmMmY1ZTEzMDllNWNiMjBiMjVjNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTk3YWI4ZGM2MzNiMGFjMjUxMjYyMmM4ZGUyODkyZDBhZTQwZTNiNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NWUzNDc5ZTk3MTE0YmM0ZDlkZjExZjM4MGY4MGZjYzYyYzNmZDg3ZWZiMzgw
|
10
|
+
Y2YwZGJlYTA3YjgxNjYwMWU0MjRlMWFkZDcyMWE0MWUzMWU1ZGNiM2MzNTJi
|
11
|
+
YWUyOTBiZDJhNzY2ODg4OWM1ZTA4OWVlNjFhNDAyNjg5ZGUwYTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzBkYWM3MjcyZDE0OGRiZDg4YTFhYzNmNDM0MzMxODVjMjRiY2FiNWIxNmU2
|
14
|
+
NWQxZmE4NWI4NWU4MGIyMWFlODgwMmUwMzUzN2FkZjFkZmFkZDNkYTQ5YjEy
|
15
|
+
MWNhOTU0ZmRkMTY0NDM5Yzk5NTE5OTNmMzI0MzNjMjlmNGJlODE=
|
data/CHANGELOG.md
CHANGED
data/lib/lstash/cli.rb
CHANGED
data/lib/lstash/version.rb
CHANGED
data/spec/lstash/cli_spec.rb
CHANGED
@@ -19,6 +19,18 @@ describe Lstash::CLI do
|
|
19
19
|
|
20
20
|
context "count" do
|
21
21
|
|
22
|
+
context "with full URI" do
|
23
|
+
let(:args) { %w(count "*" --es-url http://localhost:9200) }
|
24
|
+
it "should succeed" do
|
25
|
+
client = double('client')
|
26
|
+
|
27
|
+
allow(Lstash::Client).to receive(:new).and_return(client)
|
28
|
+
allow(client).to receive(:count).and_return(100)
|
29
|
+
|
30
|
+
expect { Lstash::CLI.start(args) }.not_to raise_error
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
22
34
|
context "with valid arguments" do
|
23
35
|
let(:args) { %w(count "program:haproxy" --es-url localhost) }
|
24
36
|
|
@@ -67,7 +79,7 @@ describe Lstash::CLI do
|
|
67
79
|
Time.parse('2014-07-01').to_i*1000,
|
68
80
|
Time.parse('2014-08-01').to_i*1000
|
69
81
|
])
|
70
|
-
})
|
82
|
+
}).exactly(32).times.and_return({count:1})
|
71
83
|
|
72
84
|
Lstash::CLI.start(args)
|
73
85
|
end
|
@@ -88,7 +100,7 @@ describe Lstash::CLI do
|
|
88
100
|
Time.parse('2014-07-31').to_i*1000,
|
89
101
|
Time.parse('2014-08-01').to_i*1000
|
90
102
|
])
|
91
|
-
}).and_return(
|
103
|
+
}).exactly(2).times.and_return({count:1})
|
92
104
|
|
93
105
|
Lstash::CLI.start(args)
|
94
106
|
end
|