ruby-changes:65040
From: Nobuyoshi <ko1@a...>
Date: Mon, 25 Jan 2021 18:34:42 +0900 (JST)
Subject: [ruby-changes:65040] 19e6d27126 (master): [ruby/rdoc] Support iso-strict format in git-log
https://git.ruby-lang.org/ruby.git/commit/?id=19e6d27126 From 19e6d271266eca5925e66fc8ec39b251a2fa6bcd Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 24 Jan 2021 16:20:34 +0900 Subject: [ruby/rdoc] Support iso-strict format in git-log https://github.com/ruby/rdoc/commit/2a6c22da63 --- lib/rdoc/parser/changelog.rb | 6 +++--- test/rdoc/test_rdoc_parser_changelog.rb | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/rdoc/parser/changelog.rb b/lib/rdoc/parser/changelog.rb index 2512349..9245d49 100644 --- a/lib/rdoc/parser/changelog.rb +++ b/lib/rdoc/parser/changelog.rb @@ -118,11 +118,11 @@ class RDoc::Parser::ChangeLog < RDoc::Parser https://github.com/ruby/ruby/blob/trunk/lib/rdoc/parser/changelog.rb#L118 def parse_date(date) case date - when /\A\s*(\d+)-(\d+)-(\d+)(?: (\d+):(\d+):(\d+) *([-+]\d\d)(\d\d))?\b/ + when /\A\s*(\d+)-(\d+)-(\d+)(?:[ T](\d+):(\d+):(\d+) *([-+]\d\d):?(\d\d))?\b/ Time.new($1, $2, $3, $4, $5, $6, ("#{$7}:#{$8}" if $7)) - when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d)(\d\d))\b/ + when /\A\s*\w{3}, +(\d+) (\w{3}) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/ Time.new($3, $2, $1, $4, $5, $6, ("#{$7}:#{$8}" if $7)) - when /\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d)(\d\d))\b/ + when /\A\s*\w{3} (\w{3}) +(\d+) (\d+) (\d+):(\d+):(\d+) *(?:([-+]\d\d):?(\d\d))\b/ Time.new($3, $1, $2, $4, $5, $6, ("#{$7}:#{$8}" if $7)) when /\A\s*\w{3} (\w{3}) +(\d+) (\d+):(\d+):(\d+) (\d+)\b/ Time.new($6, $1, $2, $3, $4, $5) diff --git a/test/rdoc/test_rdoc_parser_changelog.rb b/test/rdoc/test_rdoc_parser_changelog.rb index 1476cf5..6584840 100644 --- a/test/rdoc/test_rdoc_parser_changelog.rb +++ b/test/rdoc/test_rdoc_parser_changelog.rb @@ -343,6 +343,12 @@ Date: Sat, 23 Jan 2021 06:01:39 +0900 https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_parser_changelog.rb#L343 * 2021-01-23 [ci skip] +commit\ a3efbda7128ef20b55505b32d1608ea48f80af4a +Author: git <svn-admin@r...> +Date: 2021-01-22T02:49:39+09:00 + + * 2021-01-22 [ci skip] + commit\ 709bed2afaee50e2ce803f87bf1ee8291bea41e3 Author: git <svn-admin@r...> Date: 2021-01-21 01:03:52 +0900 @@ -394,6 +400,11 @@ ChangeLog https://github.com/ruby/ruby/blob/trunk/test/rdoc/test_rdoc_parser_changelog.rb#L400 log_entry(nil, 'db7d0b89f6eca66cc7eb', 'git', 'svn-admin@r...', 'Sat, 23 Jan 2021 06:01:39 +0900', [list(:BULLET, item(nil, para('2021-01-23 [ci skip]')))]), + head(2, '2021-01-22'), + blank_line, + log_entry(nil, 'a3efbda7128ef20b5550', + 'git', 'svn-admin@r...', '2021-01-22T02:49:39+09:00', + [list(:BULLET, item(nil, para('2021-01-22 [ci skip]')))]), head(2, '2021-01-21'), blank_line, log_entry(nil, '709bed2afaee50e2ce80', -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/