meibo 0.17.0 → 0.19.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: a5350e34b1f267f232e20b8551f5b34b24977191b4806d081f66934e816ef6a2
4
- data.tar.gz: 71e84fe449b9b64a78cf53b605633eacc9e0a56ebefe80d844e36741b2a760fe
3
+ metadata.gz: 3b5967a6a13b9ae7ec1ace668e159531e6ca967679a29af410f1b3d13738f29a
4
+ data.tar.gz: 72309e837445042116d58a33075a3b2f10f106123ba27bfb94e521b63634df00
5
5
  SHA512:
6
- metadata.gz: 40950b59e99e11e1925afbb8474d5b09b7812619348a216a55639ea960a0fa5cff4c584850395cc5180b0057f65ed02439adeae5d9570b9837037a1cfe04e038
7
- data.tar.gz: 8fbf1f6b72c2939c0a8ac9cf39fb1094eca8838b09f8024ce4fe4b31d8845c72402d2c871e21eaccf5c4ca615e796fcd7bab41e517061e5edc437e152f5a10b9
6
+ metadata.gz: 21bcf8e4b9fda5ad2f590d54a88366f0f550fd3e3076d59e0b277efcb995c40f4fccd81371c7f4591ceee3cf1834c46529293139ffcf0d5da3df32b01638fa29
7
+ data.tar.gz: 721a249ea2d81bd720d3447bb1341c973e02817ddf1d233818184560a304c337a57abc069f8b7624262d9277e40e5a7256143f2d34dee2a630eee0eb758b78a2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- meibo (0.17.0)
4
+ meibo (0.19.0)
5
5
  csv (>= 3.1.4)
6
6
  rubyzip
7
7
  zeitwerk
@@ -16,7 +16,7 @@ GEM
16
16
  tzinfo (~> 2.0)
17
17
  ast (2.4.2)
18
18
  concurrent-ruby (1.1.10)
19
- csv (3.2.5)
19
+ csv (3.2.6)
20
20
  debug (1.6.3)
21
21
  irb (>= 1.3.6)
22
22
  reline (>= 0.3.1)
data/lib/meibo/roster.rb CHANGED
@@ -18,6 +18,14 @@ module Meibo
18
18
  end
19
19
  end
20
20
 
21
+ def open(io_or_path, **opts)
22
+ m = io_or_path.kind_of?(IO) ? :from_buffer : :from_file
23
+ roster = public_send(m, io_or_path, **opts)
24
+ return roster unless block_given?
25
+
26
+ Meibo.with_roster(roster) { yield roster }
27
+ end
28
+
21
29
  private
22
30
 
23
31
  def read_data(reader, profile)
@@ -118,7 +126,7 @@ module Meibo
118
126
  end
119
127
 
120
128
  def write_to_file(path)
121
- Zip::File.open(path) do |zipfile|
129
+ Zip::File.open(path, Zip::File::CREATE) do |zipfile|
122
130
  write(zipfile)
123
131
  end
124
132
  end
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.17.0"
4
+ VERSION = "0.19.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.17.0
4
+ version: 0.19.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-06 00:00:00.000000000 Z
11
+ date: 2022-12-12 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.17.0/CHANGELOG.md
143
+ changelog_uri: https://github.com/hanachin/meibo/blob/meibo/v0.19.0/CHANGELOG.md
144
144
  rubygems_mfa_required: 'true'
145
145
  post_install_message:
146
146
  rdoc_options: []