elasticsearch-explain-response 0.0.1 → 0.0.2

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: c2299eb0a20900ac58c72b1bd5dd60bb2b0c3861
4
- data.tar.gz: 0f969d270256226f68544794baa05dbce0c2c805
3
+ metadata.gz: c822048d23b8eb6ecef0b50a001ac6fe7920b235
4
+ data.tar.gz: a4ac2c69bd430726bafd0b2c03b12a8e87d36921
5
5
  SHA512:
6
- metadata.gz: b0ee27611287865e4013b8d2ee43b2056325377aa2af26f1b2884a84522af89ba9b6a8bfd04289109d1155216fc22bf008f4869cd33f503cc3193b9af1c552c2
7
- data.tar.gz: 6852990a83ecf7235c985c767a4d36f83bde12915b1de05a21827a5a73b73c74965950575300228c9d6df26783ccfe0611519d7bb068b004c590704d9d0b8f03
6
+ metadata.gz: 048a06e88a9db16969dd8c1176dae1f9665dada2abafe8cc333bc6904d16142cc1a3ac92bb64438cec7cdc521ea13e3e1e4fce3061580bea98bf3f7dba10f38e
7
+ data.tar.gz: d2736531de2222eec71a59dd65b2ed53b1481798c934397b05e74d1b35313cbcf757448fb550f42812ff37589a9aa6f072739c4806ceb17f6b094cba6151c6aa
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "elasticsearch-explain-response"
7
- spec.version = "0.0.1"
7
+ spec.version = "0.0.2"
8
8
  spec.authors = ["Tomoya Hirano"]
9
9
  spec.email = ["hiranotomoya@gmail.com"]
10
10
  spec.summary = %q{Parser for Elasticserach Explain response}
@@ -17,6 +17,7 @@ module Elasticsearch
17
17
 
18
18
  def load_ansi
19
19
  require "ansi/core"
20
+ true
20
21
  rescue LoadError
21
22
  false
22
23
  end
@@ -45,4 +45,19 @@ describe Elasticsearch::API::Response::ExplainResponse do
45
45
  ]
46
46
  end
47
47
  end
48
+
49
+ describe "colorization" do
50
+ let(:response) do
51
+ described_class.new(fake_response["explanation"])
52
+ end
53
+
54
+ subject do
55
+ response.render_in_line
56
+ end
57
+
58
+ it "includes ansi color codes" do
59
+ expect(subject).to include("\e[35;1m0")
60
+ expect(subject).to include("\e[0m")
61
+ end
62
+ end
48
63
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-explain-response
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomoya Hirano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-06 00:00:00.000000000 Z
11
+ date: 2015-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler