discid 1.4.0 → 1.4.1

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
- SHA1:
3
- metadata.gz: e54ccf0358d9377e073c158bc10c972410446882
4
- data.tar.gz: a29145b466deb26a8830d537cb5471a346fc51bd
2
+ SHA256:
3
+ metadata.gz: 0c1f99777183d8decf97ffb214d424300ae1546f72d30e0a9fe3891e24b66882
4
+ data.tar.gz: 65cc1ffde114bcd7860697ac081d266f434d294a86094a0f26efdd418096f1dc
5
5
  SHA512:
6
- metadata.gz: 0dfed6d0c5d3e631ee3333f02cb86e7b46239b9eb48a9211b5fc4b7952b0a27bac01f42eb548b973b8fef9c89295a3123343c4dba0479814ff1d6f1e566759f1
7
- data.tar.gz: 0ca29384229a241332b53d19613583bc5c95bb80ae51a95154b8612d7e71ed72652a89f1bb701acf09d0c61c97c49e0ada88fd01cfbfdefd280855c2e79b31e1
6
+ metadata.gz: 6ccdebac904df0839af7ce5ad36d130e7c00d36324fabf72e64bdebf686bdb7a290c82d520dcd909b4b83295cc8ea0389540b66086b06e2f3a39646d277d70c1
7
+ data.tar.gz: 6fe953875c071bd33973596c4bc9e18c1313a58df2273e4b929ca628e0923f79b93efa8bbf1c7fb26067278cf2f46588a3c2754a72b3f0febfb311b860725aa5
data/CHANGES.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.1 (2021-09-23)
4
+ * Fix Ruby 3 compatibility if {DiscId.tracks} gets called with a block
5
+
3
6
  ## 1.4.0 (2019-05-06)
4
7
  * Fixed {DiscId.put} handling of first_track being > 1
5
8
  * Added {DiscId.parse} to parse a TOC string
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Ruby bindings for MusicBrainz libdiscid
2
- [![Build Status](https://travis-ci.org/phw/ruby-discid.svg?branch=master)](https://travis-ci.org/phw/ruby-discid)
3
- [![Code Climate](https://codeclimate.com/github/phw/ruby-discid.png)](https://codeclimate.com/github/phw/ruby-discid)
4
- [![Code Climate](https://codeclimate.com/github/phw/ruby-discid/coverage.png)](https://codeclimate.com/github/phw/ruby-discid)
5
2
  [![Gem Version](https://badge.fury.io/rb/discid.svg)](http://badge.fury.io/rb/discid)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/50e356f4260a127af75b/maintainability)](https://codeclimate.com/github/phw/ruby-discid/maintainability)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/50e356f4260a127af75b/test_coverage)](https://codeclimate.com/github/phw/ruby-discid/test_coverage)
6
5
 
7
6
  ## About
8
7
  ruby-discid provides Ruby bindings for the MusicBrainz DiscID library [libdiscid](http://musicbrainz.org/doc/libdiscid).
@@ -112,7 +111,7 @@ Please report any issues on the
112
111
  [issue tracker](https://github.com/phw/ruby-discid/issues).
113
112
 
114
113
  ## License
115
- ruby-discid Copyright (c) 2007-2019 by Philipp Wolfer <ph.wolfer@gmail.com>
114
+ ruby-discid Copyright (c) 2007-2021 by Philipp Wolfer <ph.wolfer@gmail.com>
116
115
 
117
116
  ruby-discid is free software: you can redistribute it and/or modify
118
117
  it under the terms of the GNU Lesser General Public License as published by
data/lib/discid/disc.rb CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2013-2014 Philipp Wolfer
1
+ # Copyright (C) 2013-2014, 2021 Philipp Wolfer
2
2
  #
3
3
  # This program is free software: you can redistribute it and/or modify
4
4
  # it under the terms of the GNU Lesser General Public License as published by
@@ -197,12 +197,12 @@ module DiscId
197
197
  # instead iterates over the block calling the block with one argument.
198
198
  # @yieldreturn [nil]
199
199
  # @return [Array<Track>] Array of {Track} objects.
200
- def tracks
200
+ def tracks(&block)
201
201
  if @read
202
202
  read_tracks if @tracks.nil?
203
203
 
204
- if block_given?
205
- @tracks.each(&Proc.new)
204
+ if block
205
+ @tracks.each(&block)
206
206
  return nil
207
207
  else
208
208
  return @tracks
@@ -16,5 +16,5 @@
16
16
  #
17
17
  module DiscId
18
18
  # The version of ruby-discid.
19
- VERSION = "1.4.0"
19
+ VERSION = "1.4.1"
20
20
  end
data/test/test_discid.rb CHANGED
@@ -63,6 +63,7 @@ class TestDiscId < Test::Unit::TestCase
63
63
  disc = DiscId.put(3, @fiction_sectors,
64
64
  [150, 18901, 39738, 59557, 79152, 100126,
65
65
  124833, 147278, 166336, 182560])
66
+ assert_equal "ByBKvJM1hBL7XtvsPyYtIjlX0Bw-", disc.id
66
67
  assert_equal 3, disc.first_track_number
67
68
  assert_equal 12, disc.last_track_number
68
69
  assert_equal 10, disc.tracks.size
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Wolfer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-06 00:00:00.000000000 Z
11
+ date: 2021-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -158,8 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  version: 1.3.6
159
159
  requirements:
160
160
  - libdiscid >= 0.1.0
161
- rubyforge_project:
162
- rubygems_version: 2.6.14.4
161
+ rubygems_version: 3.0.3.1
163
162
  signing_key:
164
163
  specification_version: 4
165
164
  summary: Ruby bindings for libdiscid