textrepo 0.5.1 → 0.5.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
  SHA256:
3
- metadata.gz: b504229bd3ea2416e0a85cb8903fe0903b6f045a8a2549857a2b1b296f35e32a
4
- data.tar.gz: baaf7776505e0c430d9c540d88e78847eebc406612b5f9c2cb11ba20c5f3371d
3
+ metadata.gz: c33d87733a93d357237cf217161c5d56c37e9b48d4f9a52b9a59ec8a945f6377
4
+ data.tar.gz: 2c8969d2ee93dfb1f6b84e49be43eb81630e63341ad77da2fbed3c59be465b78
5
5
  SHA512:
6
- metadata.gz: cb90a5d324536e0c2ba8f87c93923ba19bae2c835f31445f9d0f3701110f37598f44a638b496ac992dab30ea03f82643591ea807623a93bd0afdfa52505595ac
7
- data.tar.gz: 1affcd1ff8cce4b3374610791ba733d5d5c8fd1d8b90adb5030725752c84c0f671d4ee9b6ca7f4539ebc2171baf1d2c92b9eb530dc84eed14d477df98729154e
6
+ metadata.gz: 711e6b19e280887f6558ecd62e39abf6146efbafe817ad9db329dd33c9fdd0e4b5d5feef4c8a246872c748142daee96518030ab378c2756dd1eb66ca40dbbade
7
+ data.tar.gz: 3b129941b8df7f41540a5088357bd562a11c3567635e8e26002a2a4222850b89a58d1147d0b3305b17835f0e720b86bf3a8b4ea0dccbfb01d098d00962bbe42d
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
7
7
  ## [Unreleased]
8
8
  Nothing to record here.
9
9
 
10
+ ## [0.5.2] - 2020-11-03
11
+ ### Changed
12
+ - Fix issue #34:
13
+ - fix FileSystemRepository#entries to accept "yyyymo" pattern as a
14
+ Timestamp pattern.
15
+ - Fix issue #33: fix typo in the doc for FileSystemRepository.new.
16
+ - Fix issue #31: unfriendly error message of Timestamp.parse_s.
17
+
10
18
  ## [0.5.1] - 2020-11-02
11
19
  ### Changed
12
20
  - Fix issue #28.
@@ -67,9 +67,10 @@ module Textrepo
67
67
  # were not defined in `conf`.
68
68
  #
69
69
  # Be careful to set `:searcher_options`, it must be to specify the
70
- # searcher behavior equivalent to `grep` with "-inR". The default
71
- # value for the searcher options is defined for BSD grep (default
72
- # grep on macOS), GNU grep, and ripgrep (aka rg). They are:
70
+ # searcher behavior equivalent to `grep` with "-inRE". The
71
+ # default values for the searcher options is defined for BSD grep
72
+ # (default grep on macOS), GNU grep, and ripgrep (aka rg). They
73
+ # are:
73
74
  #
74
75
  # "grep" => ["-i", "-n", "-R", "-E"]
75
76
  # "egrep" => ["-i", "-n", "-R"]
@@ -77,7 +78,7 @@ module Textrepo
77
78
  # "gegrep" => ["-i", "-n", "-R"]
78
79
  # "rg" => ["-S", "-n", "--no-heading", "--color", "never"]
79
80
  #
80
- # If use those 3 searchers, it is not recommended to set
81
+ # If use those searchers, it is not recommended to set
81
82
  # `:searcher_options`. The default value works well in
82
83
  # `textrepo`.
83
84
  #
@@ -186,7 +187,7 @@ module Textrepo
186
187
  if exist?(stamp)
187
188
  results << stamp
188
189
  end
189
- when 0, "yyyymoddhhmiss".size, "yyyymodd".size
190
+ when 0, "yyyymoddhhmiss".size, "yyyymodd".size, "yyyymo".size
190
191
  results += find_entries(stamp_pattern)
191
192
  when 4 # "yyyy" or "modd"
192
193
  pat = nil
@@ -97,8 +97,15 @@ module Textrepo
97
97
  begin
98
98
  ye, mo, da, ho, mi, se, sfx = split_stamp(stamp_str).map(&:to_i)
99
99
  Timestamp.new(Time.new(ye, mo, da, ho, mi, se), sfx)
100
- rescue InvalidTimestampStringError, ArgumentError => _
101
- raise InvalidTimestampStringError, stamp_str
100
+ rescue InvalidTimestampStringError, ArgumentError => e
101
+ emsg = if stamp_str.nil?
102
+ "(nil)"
103
+ elsif stamp_str.empty?
104
+ "(empty string)"
105
+ else
106
+ stamp_str
107
+ end
108
+ raise InvalidTimestampStringError, emsg
102
109
  end
103
110
  end
104
111
 
@@ -1,3 +1,3 @@
1
1
  module Textrepo
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textrepo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - mnbi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-02 00:00:00.000000000 Z
11
+ date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler