meibo 0.19.0 → 0.20.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: 3b5967a6a13b9ae7ec1ace668e159531e6ca967679a29af410f1b3d13738f29a
4
- data.tar.gz: 72309e837445042116d58a33075a3b2f10f106123ba27bfb94e521b63634df00
3
+ metadata.gz: dc0e6ff7941064a1b88f274b279de43425b975e2c05c746a074d8a7608be5d74
4
+ data.tar.gz: 2ce52a6e624ea7cf0d83a46474c3f467a3d2994caf374cd80196a43ea6410e2f
5
5
  SHA512:
6
- metadata.gz: 21bcf8e4b9fda5ad2f590d54a88366f0f550fd3e3076d59e0b277efcb995c40f4fccd81371c7f4591ceee3cf1834c46529293139ffcf0d5da3df32b01638fa29
7
- data.tar.gz: 721a249ea2d81bd720d3447bb1341c973e02817ddf1d233818184560a304c337a57abc069f8b7624262d9277e40e5a7256143f2d34dee2a630eee0eb758b78a2
6
+ metadata.gz: b5c1fd5fa4c0cd95512d72053baa4561c9a9a8e8f610eeb22b99b792976acbb288396aa84492635658604931b2c3fb189b36373c6d7736e9a52b37153697fba2
7
+ data.tar.gz: 63e1b1e294ac266ae94689f474e719ca246e71fb7559324f1b647af1ba6abc2fda1c515294bf076f41c6400acc0d7457e9f053834d2efbf2e4c17de1cf81a167
data/.rubocop_todo.yml CHANGED
@@ -34,7 +34,7 @@ Metrics/BlockLength:
34
34
  # Offense count: 4
35
35
  # Configuration parameters: CountComments, CountAsOne.
36
36
  Metrics/ClassLength:
37
- Max: 156
37
+ Max: 162
38
38
 
39
39
  # Offense count: 1
40
40
  # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meibo (0.19.0)
4
+ meibo (0.20.0)
5
5
  csv (>= 3.1.4)
6
6
  rubyzip
7
7
  zeitwerk
@@ -53,7 +53,7 @@ module Meibo
53
53
  end
54
54
 
55
55
  def where(**conditions)
56
- group_cache[conditions.keys.sort][conditions.values]
56
+ group_cache[conditions.keys.sort][conditions.values] || empty_set
57
57
  end
58
58
 
59
59
  private
@@ -77,5 +77,9 @@ module Meibo
77
77
  def new(data)
78
78
  self.class.new(data, roster: roster)
79
79
  end
80
+
81
+ def empty_set
82
+ @empty_set ||= new([])
83
+ end
80
84
  end
81
85
  end
data/lib/meibo/roster.rb CHANGED
@@ -19,7 +19,7 @@ module Meibo
19
19
  end
20
20
 
21
21
  def open(io_or_path, **opts)
22
- m = io_or_path.kind_of?(IO) ? :from_buffer : :from_file
22
+ m = io_or_path.is_a?(IO) ? :from_buffer : :from_file
23
23
  roster = public_send(m, io_or_path, **opts)
24
24
  return roster unless block_given?
25
25
 
data/lib/meibo/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Meibo
4
- VERSION = "0.19.0"
4
+ VERSION = "0.20.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meibo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seiei Miyagi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-12 00:00:00.000000000 Z
11
+ date: 2023-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: csv
@@ -140,7 +140,7 @@ metadata:
140
140
  allowed_push_host: https://rubygems.org/
141
141
  homepage_uri: https://github.com/hanachin/meibo
142
142
  source_code_uri: https://github.com/hanachin/meibo
143
- changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.19.0/CHANGELOG.md
143
+ changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.20.0/CHANGELOG.md
144
144
  rubygems_mfa_required: 'true'
145
145
  post_install_message:
146
146
  rdoc_options: []