groonga-query-log 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7420f29c336d80bf892fa8c8a5a8368ee6344f2e6d02846f7da1172daca83d7b
4
- data.tar.gz: 0a6833bd88e699ea7e102a0466b4db7944d273a84adb6ccc7e9262795cf1e5c0
3
+ metadata.gz: 292e6cac875522bbe44ce9e3ba9720662607e73e2caff72dbb64ef01b403c353
4
+ data.tar.gz: 7c8ca5a6868504360814aae0c8726cdcbe909ba1806aa8a4c99e1b5324b85087
5
5
  SHA512:
6
- metadata.gz: e4e4fbae0c9fb4b9fe3d6b474b2a77fb250f4a48c7a1775fd9aaed07a527a35c40e543fb21a250a4ef47ebadd75ef7626da17630462b52eef9395b9149ddef0a
7
- data.tar.gz: 06fcd20a1e52b0edcd1697a4712ac8781b624a915fef57963518054fb501b1ec93c0b3d7195fbd3c898c5e6231139c5f1fd4781bf65fdb98c4a939057e620974
6
+ metadata.gz: 7ba5b0df58160f31cee7f9acb675bbd5c79b4f878550b184112ca8b557b591007cf8d32477beb7455e21737924785dba8305c2242a7e267a0e12b67bd3c14de6
7
+ data.tar.gz: 5be7b4777f3153332cea06f6b942b121a4983136dcf6b804f8c0e699b43b2fe70636a7cd8a0da9f4c240a6d2103c0b316e96c8afab659821d40cf0c78a6ea1b2
data/doc/text/news.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # News
2
2
 
3
+ ## 1.6.2: 2020-05-09
4
+
5
+ ### Improvements
6
+
7
+ * `run-regression-test`: Added leaked information to the first line.
8
+
9
+ * `run-regression-test`: Added `--mail-only-on-failure` option.
10
+
3
11
  ## 1.6.1: 2020-04-28
4
12
 
5
13
  ### Improvements
@@ -79,6 +79,7 @@ module GroongaQueryLog
79
79
  mail_subject_on_failure: "Failure",
80
80
  mail_from: "groonga-query-log@#{Socket.gethostname}",
81
81
  mail_to: nil,
82
+ mail_only_on_failure: false,
82
83
  smtp_server: "localhost",
83
84
  smtp_auth_user: nil,
84
85
  smtp_auth_password: nil,
@@ -387,6 +388,11 @@ module GroongaQueryLog
387
388
  "(#{@notifier_options[:mail_subject_on_failure]})") do |subject|
388
389
  @notifier_options[:mail_subject_on_failure] = subject
389
390
  end
391
+ parser.on("--[no-]mail-only-on-failure",
392
+ "Send a notification e-mail only on failure",
393
+ "(#{@notifier_options[:mail_only_on_failure]})") do |boolean|
394
+ @notifier_options[:mail_only_on_failure] = boolean
395
+ end
390
396
  parser
391
397
  end
392
398
 
@@ -464,10 +470,13 @@ module GroongaQueryLog
464
470
  formatted = format_elapsed_time(elapsed_time)
465
471
  formatted << "The number of executed commands: #{n_executed_commands}\n"
466
472
  if success
467
- formatted << "Success\n"
473
+ formatted << "Success"
474
+ formatted << " but leaked" if n_leaked_objects > 0
468
475
  else
469
- formatted << "Failure\n"
476
+ formatted << "Failure"
477
+ formatted << " and leaked" if n_leaked_objects > 0
470
478
  end
479
+ formatted << "\n"
471
480
  unless n_leaked_objects.zero?
472
481
  formatted << "\nLeaked: #{n_leaked_objects}"
473
482
  end
@@ -612,12 +621,12 @@ module GroongaQueryLog
612
621
  input.close
613
622
  begin
614
623
  pid, status = Process.waitpid2(pid)
615
- filter_pid, filter_status = Process.waitpid2(filter_pid)
624
+ filter_pid, _filter_status = Process.waitpid2(filter_pid)
616
625
  rescue Interrupt
617
626
  Process.kill(:TERM, pid)
618
627
  Process.kill(:TERM, filter_pid)
619
628
  pid, status = Process.waitpid2(pid)
620
- filter_pid, filter_status = Process.waitpid2(filter_pid)
629
+ filter_pid, _filter_status = Process.waitpid2(filter_pid)
621
630
  end
622
631
  end
623
632
  else
@@ -897,6 +906,7 @@ module GroongaQueryLog
897
906
 
898
907
  def notify_started
899
908
  return unless @options[:mail_to]
909
+ return if @options[:mail_only_on_failure]
900
910
 
901
911
  subject = @options[:mail_subject_on_start]
902
912
  send_mail(subject, "")
@@ -907,6 +917,7 @@ module GroongaQueryLog
907
917
 
908
918
  if success
909
919
  subject = @options[:mail_subject_on_success]
920
+ return if @options[:mail_only_on_failure]
910
921
  else
911
922
  subject = @options[:mail_subject_on_failure]
912
923
  end
@@ -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.6.1"
18
+ VERSION = "1.6.2"
19
19
  end
@@ -217,6 +217,7 @@ QUIT
217
217
  :mail_to => "noreply@example.com",
218
218
  :mail_subject_on_success => "Success",
219
219
  :mail_subject_on_failure => "Failure",
220
+ :mail_only_on_failure => true,
220
221
  :path => fixture_path("mail-notifier/failure.log"),
221
222
  }
222
223
  notifier = MailNotifier.new(options)
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.6.1
4
+ version: 1.6.2
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-27 00:00:00.000000000 Z
11
+ date: 2020-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: charty