groonga-command-parser 1.1.3 → 1.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc1137f8b33fe61df8ac7114fef57a710dc7e663
|
4
|
+
data.tar.gz: 0d2cd08ee3bb181de0183c23c1929b763664ab4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2217aa7ee7d188241a34e195fa6701a948865876f59338a6f7656ccd59890d9c1b8ecc9c8eb4184a4df85204a25223cb83b1c80daa989f36f672a2ac926e0cb
|
7
|
+
data.tar.gz: c3c71271c60d6cc44a14b3c707bcd21ce10565f6c67f03ccc4020e444ef535614f42e9b128eaa356fd095592600428a37a68f2aa59c5996750d0a33202b99bde
|
data/doc/text/news.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (C) 2014-
|
1
|
+
# Copyright (C) 2014-2019 Kouhei Sutou <kou@clear-code.com>
|
2
2
|
#
|
3
3
|
# This library is free software; you can redistribute it and/or
|
4
4
|
# modify it under the terms of the GNU Lesser General Public
|
@@ -86,6 +86,7 @@ module Groonga
|
|
86
86
|
"Currently, we can specify 5, 6, 7, and 8" +
|
87
87
|
" in this option",
|
88
88
|
"Available only in elasticsearch format",
|
89
|
+
Integer,
|
89
90
|
"[#{@elasticsearch_version}]") do |version|
|
90
91
|
@elasticsearch_version = version
|
91
92
|
end
|
@@ -94,9 +95,24 @@ module Groonga
|
|
94
95
|
end
|
95
96
|
|
96
97
|
def convert(input)
|
97
|
-
parser = Parser.new
|
98
|
-
|
99
|
-
|
98
|
+
parser = Parser.new(need_original_source: false)
|
99
|
+
case @format
|
100
|
+
when :elasticsearch
|
101
|
+
parser.on_load_columns do |command, columns|
|
102
|
+
command[:columns] ||= columns.join(",")
|
103
|
+
end
|
104
|
+
loaded_values = []
|
105
|
+
parser.on_load_value do |command, value|
|
106
|
+
loaded_values << value
|
107
|
+
end
|
108
|
+
parser.on_load_complete do |command|
|
109
|
+
command[:values] = JSON.generate(loaded_values)
|
110
|
+
puts(convert_format(command))
|
111
|
+
end
|
112
|
+
else
|
113
|
+
parser.on_command do |command|
|
114
|
+
puts(convert_format(command))
|
115
|
+
end
|
100
116
|
end
|
101
117
|
input.each_line do |line|
|
102
118
|
parser << line
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: groonga-command-parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: groonga-command
|