groonga-query-log 1.5.9 → 1.6.0

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
  SHA256:
3
- metadata.gz: 99da1139f30806bb7ead68b469c2122368bcad8ea91586160096751e3919b4ab
4
- data.tar.gz: ab791f07d33e784531372dd3c4cad59e57e1ae38d778529a3b65dbd8ea1d4466
3
+ metadata.gz: '023904fd821f10549843a393066606dc362b18cf37a0fdf367dad9fa2112510b'
4
+ data.tar.gz: 13c88359ceff1ac99c0a56c9c53deac527c1fd2158c62ebaef70ade2a623b149
5
5
  SHA512:
6
- metadata.gz: 9ae76dd7338c155860f1b74dea49fc202baeaa4216018dda0e2c22144663c4ea93db08a4042f3487c429bd565281876d46d9348a4fa27e510c082f9dcb065507
7
- data.tar.gz: 6d4f6912e00abd0a0ff41c18bcbbd3c251dab17a9d142974ab0719e5dbb5309e97f7fe174ec7cd239cddd0cf1b15c8940b7da2d31e4f8c7c723337d0902940a7
6
+ metadata.gz: 981cb090997ecb1644b4e891e60bae06a985b0a84abb4c186ca69f053c3c024ea16cc7333a95b9f57d50392ad2fb00aca6633447a9e4b296ea6c6a1b02046792
7
+ data.tar.gz: 94c88472305982b6f1be3833d2dbc7a79223def680cfb7f424ce197edab06dc2360cc087c4221b038b3cbb2697d93bdfa97883d77db6c8fee22b4d4f61f94d20
@@ -1,9 +1,19 @@
1
1
  # News
2
2
 
3
- ## 1.5.9: 2020-04-06
3
+ ## 1.6.0: 2020-04-15
4
+
5
+ ### Improvements
6
+
7
+ * `format-regression-test-logs`: Ensured using UTF-8 for input.
4
8
 
5
9
  ### Fixes
6
10
 
11
+ * `verify-server`: Fixed a executed commands count bug on failure.
12
+
13
+ ## 1.5.9: 2020-04-06
14
+
15
+ ### Improvements
16
+
7
17
  * `replay`: Added `--output-type` option.
8
18
 
9
19
  * `replay`: Added support for outputting logs to stdout.
@@ -50,12 +50,12 @@ module GroongaQueryLog
50
50
  if File.directory?(path)
51
51
  Find.find(path) do |sub_path|
52
52
  next unless File.file?(sub_path)
53
- File.open(sub_path) do |file|
53
+ File.open(sub_path, encoding: "UTF-8") do |file|
54
54
  format_log(file, sub_path)
55
55
  end
56
56
  end
57
57
  else
58
- File.open(path) do |file|
58
+ File.open(path, encoding: "UTF-8") do |file|
59
59
  format_log(file, path)
60
60
  end
61
61
  end
@@ -462,11 +462,11 @@ module GroongaQueryLog
462
462
  n_leaked_objects,
463
463
  n_executed_commands)
464
464
  formatted = format_elapsed_time(elapsed_time)
465
- formatted << "Number of executed commands: #{n_executed_commands}\n"
465
+ formatted << "The number of executed commands: #{n_executed_commands}\n"
466
466
  if success
467
467
  formatted << "Success\n"
468
468
  else
469
- formatted << "Failure"
469
+ formatted << "Failure\n"
470
470
  end
471
471
  unless n_leaked_objects.zero?
472
472
  formatted << "\nLeaked: #{n_leaked_objects}"
@@ -31,11 +31,20 @@ module GroongaQueryLog
31
31
 
32
32
  def run(command_line, &callback)
33
33
  input_paths = create_parser.parse(command_line)
34
- same = true
35
34
  verifier = ServerVerifier.new(@options)
35
+ begin
36
+ verify(verifier, input_paths, &callback)
37
+ ensure
38
+ @n_executed_commands = verifier.n_executed_commands
39
+ end
40
+ end
41
+
42
+ private
43
+ def verify(verifier, input_paths, &callback)
36
44
  if input_paths.empty?
37
- same = verifier.verify($stdin, &callback)
45
+ verifier.verify($stdin, &callback)
38
46
  else
47
+ same = true
39
48
  input_paths.each do |input_path|
40
49
  case input_path
41
50
  when /\.tar\.gz\z/
@@ -52,12 +61,10 @@ module GroongaQueryLog
52
61
  end
53
62
  end
54
63
  end
64
+ same
55
65
  end
56
- @n_executed_commands = verifier.n_executed_commands
57
- same
58
66
  end
59
67
 
60
- private
61
68
  def verify_tar_gz(verifier, tar_gz_path, &callback)
62
69
  same = true
63
70
  Zlib::GzipReader.open(tar_gz_path) do |gzip|
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2012-2019 Kouhei Sutou <kou@clear-code.com>
1
+ # Copyright (C) 2012-2020 Sutou Kouhei <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
@@ -15,5 +15,5 @@
15
15
  # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
  module GroongaQueryLog
18
- VERSION = "1.5.9"
18
+ VERSION = "1.6.0"
19
19
  end
@@ -92,7 +92,7 @@ class RunRegressionTestCommandTest < Test::Unit::TestCase
92
92
  end
93
93
 
94
94
  def n_executed_commands(output)
95
- output.slice(/^Number of executed commands:\s+(\d+)/, 1).to_i
95
+ output.slice(/^The number of executed commands:\s+(\d+)/, 1).to_i
96
96
  end
97
97
 
98
98
  def fixture_path(*components)
@@ -110,7 +110,7 @@ class RunRegressionTestCommandTest < Test::Unit::TestCase
110
110
  assert_equal([
111
111
  true,
112
112
  "Elapsed: 0days 00:00:00\n" +
113
- "Number of executed commands: #{@n_commands}\n" +
113
+ "The number of executed commands: #{@n_commands}\n" +
114
114
  "Success\n"
115
115
  ],
116
116
  [success, normalize_output(output)])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: groonga-query-log
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.9
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-06 00:00:00.000000000 Z
11
+ date: 2020-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: charty