ruby-audioinfo 0.5.2 → 0.5.4

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: aec0895758262f7e4085718f31d82a387a96ed14
4
- data.tar.gz: fd0ca9dfe6414d3650d4baff02d9ef5b796f183b
2
+ SHA256:
3
+ metadata.gz: b256c5022fe62915d11bd43fa0cafeb3614903e26b20e46905b83c209ab7af0e
4
+ data.tar.gz: 2f93f159c9acc9e19d17401b697172a9a95b30e63843c9283846fd7ab9c1527e
5
5
  SHA512:
6
- metadata.gz: efef64490a703cabef5ccf25947aefb2234988c96467bc70b6c5d56401793a295e6f1e08047e50f17699bf9c9ba4bdf28a023b1764d53ded9c5877c8bcc900a3
7
- data.tar.gz: 2e53255583bd6552466e13f4cda45bd3394c150255937600b5215b39318e419d7b4ee72bee200e984028f11e5fec29763500a8004712c421e21e6ad43e0e22fb
6
+ metadata.gz: d44d229a4b38d7346458a0615ca2fe25543e002395f5d0b3e5b43feaba97058c1a2adc8e91966492bc3c0bf4070c70b74adf0038c089e8e23a531012e2a8cb07
7
+ data.tar.gz: 3725e8f79bc843c5ccfe6c7ed0f86fcbfd9aac129f5134ea58992a9af92a4b3ffbc90cb957862cccfa88ca70fcc917c78e8336597291ba0ac118e27db83882da
@@ -0,0 +1,53 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ master ]
13
+ pull_request:
14
+ branches: [ master ]
15
+
16
+ jobs:
17
+ test:
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ os: [ubuntu-latest]
22
+ ruby: [2.5, 2.6, 2.7, 3.0, jruby, truffleruby]
23
+ runs-on: ${{ matrix.os }}
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ # uses: ruby/setup-ruby@v1
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.ruby }}
33
+ bundler-cache: true
34
+ - name: Install dependencies
35
+ run: sudo apt install ffmpeg
36
+ - name: Install Gems
37
+ run: bundle install
38
+ - name: Run tests
39
+ run: bundle exec rake test
40
+
41
+ rubocop:
42
+ runs-on: ubuntu-latest
43
+ steps:
44
+ - uses: actions/checkout@v2
45
+ - name: Set up Ruby
46
+ uses: ruby/setup-ruby@v1
47
+ with:
48
+ ruby-version: 2.5
49
+ bundler-cache: true
50
+ - name: Install Gems
51
+ run: bundle install
52
+ - name: Run tests
53
+ run: bundle exec rubocop
@@ -0,0 +1 @@
1
+ coverage
@@ -0,0 +1,10 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ require: rubocop-minitest
4
+
5
+ AllCops:
6
+ NewCops: enable
7
+ TargetRubyVersion: 2.5
8
+
9
+ Layout/HashAlignment:
10
+ Enabled: false
@@ -0,0 +1,116 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2020-12-30 04:27:41 UTC using RuboCop version 1.7.0.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ # Configuration parameters: AllowSafeAssignment.
11
+ Lint/AssignmentInCondition:
12
+ Exclude:
13
+ - 'lib/audioinfo.rb'
14
+ - 'lib/audioinfo/album.rb'
15
+
16
+ # Offense count: 1
17
+ Lint/RescueException:
18
+ Exclude:
19
+ - 'lib/audioinfo.rb'
20
+
21
+ # Offense count: 1
22
+ Lint/ShadowedException:
23
+ Exclude:
24
+ - 'lib/audioinfo.rb'
25
+
26
+ # Offense count: 2
27
+ Lint/ShadowingOuterLocalVariable:
28
+ Exclude:
29
+ - 'lib/audioinfo.rb'
30
+
31
+ # Offense count: 1
32
+ # Configuration parameters: AllowComments.
33
+ Lint/SuppressedException:
34
+ Exclude:
35
+ - 'lib/audioinfo.rb'
36
+
37
+ # Offense count: 5
38
+ Lint/UselessAssignment:
39
+ Exclude:
40
+ - 'lib/audioinfo.rb'
41
+ - 'lib/audioinfo/mpcinfo.rb'
42
+
43
+ # Offense count: 7
44
+ # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
45
+ Metrics/AbcSize:
46
+ Max: 177
47
+
48
+ # Offense count: 2
49
+ # Configuration parameters: CountComments, CountAsOne.
50
+ Metrics/ClassLength:
51
+ Max: 322
52
+
53
+ # Offense count: 4
54
+ # Configuration parameters: IgnoredMethods.
55
+ Metrics/CyclomaticComplexity:
56
+ Max: 28
57
+
58
+ # Offense count: 8
59
+ # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
60
+ Metrics/MethodLength:
61
+ Max: 116
62
+
63
+ # Offense count: 4
64
+ # Configuration parameters: IgnoredMethods.
65
+ Metrics/PerceivedComplexity:
66
+ Max: 23
67
+
68
+ # Offense count: 6
69
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
70
+ # AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
71
+ Naming/MethodParameterName:
72
+ Exclude:
73
+ - 'lib/audioinfo.rb'
74
+ - 'lib/audioinfo/mpcinfo.rb'
75
+
76
+ # Offense count: 1
77
+ # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
78
+ # NamePrefix: is_, has_, have_
79
+ # ForbiddenPrefixes: is_, has_, have_
80
+ # AllowedMethods: is_a?
81
+ # MethodDefinitionMacros: define_method, define_singleton_method
82
+ Naming/PredicateName:
83
+ Exclude:
84
+ - 'spec/**/*'
85
+ - 'lib/audioinfo.rb'
86
+
87
+ # Offense count: 4
88
+ Style/Documentation:
89
+ Exclude:
90
+ - 'spec/**/*'
91
+ - 'test/**/*'
92
+ - 'lib/audioinfo.rb'
93
+ - 'lib/audioinfo/album.rb'
94
+ - 'lib/audioinfo/case_insensitive_hash.rb'
95
+ - 'lib/audioinfo/mpcinfo.rb'
96
+
97
+ # Offense count: 4
98
+ # Configuration parameters: MaxUnannotatedPlaceholdersAllowed.
99
+ # SupportedStyles: annotated, template, unannotated
100
+ Style/FormatStringToken:
101
+ EnforcedStyle: unannotated
102
+
103
+ # Offense count: 8
104
+ # Configuration parameters: MinBodyLength.
105
+ Style/GuardClause:
106
+ Exclude:
107
+ - 'lib/audioinfo.rb'
108
+ - 'lib/audioinfo/album.rb'
109
+ - 'lib/audioinfo/mpcinfo.rb'
110
+
111
+ # Offense count: 1
112
+ # Configuration parameters: AllowedMethods.
113
+ # AllowedMethods: respond_to_missing?
114
+ Style/OptionalBooleanParameter:
115
+ Exclude:
116
+ - 'lib/audioinfo/album.rb'
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at guillaume.pierronnet@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
6
+
7
+ gem 'codecov', require: false
8
+ gem 'minitest', '~> 5.0'
9
+ gem 'minitest-rg', '~> 5.2'
10
+ gem 'rake', '~> 13.0'
11
+ gem 'rubocop', '~> 1.7.0'
12
+ gem 'rubocop-minitest', '~> 0.10.2'
@@ -0,0 +1,76 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ruby-audioinfo (0.5.4)
5
+ apetag (>= 1.1.4)
6
+ flacinfo-rb (>= 0.4)
7
+ moumar-wmainfo-rb (>= 0.7)
8
+ mp4info (>= 1.7.3)
9
+ ruby-mp3info (>= 0.8)
10
+ ruby-ogginfo (>= 0.6.13)
11
+ wavefile (~> 0.6.0)
12
+
13
+ GEM
14
+ remote: https://rubygems.org/
15
+ specs:
16
+ apetag (1.1.5)
17
+ cicphash (>= 1.0.0)
18
+ ast (2.4.1)
19
+ cicphash (1.1.0)
20
+ codecov (0.2.15)
21
+ simplecov (>= 0.15, < 0.21)
22
+ docile (1.3.4)
23
+ flacinfo-rb (1.0)
24
+ minitest (5.14.2)
25
+ minitest-rg (5.2.0)
26
+ minitest (~> 5.0)
27
+ moumar-wmainfo-rb (0.8)
28
+ mp4info (1.7.3)
29
+ parallel (1.20.1)
30
+ parser (3.0.0.0)
31
+ ast (~> 2.4.1)
32
+ rainbow (3.0.0)
33
+ rake (13.0.3)
34
+ regexp_parser (2.0.3)
35
+ rexml (3.2.4)
36
+ rubocop (1.7.0)
37
+ parallel (~> 1.10)
38
+ parser (>= 2.7.1.5)
39
+ rainbow (>= 2.2.2, < 4.0)
40
+ regexp_parser (>= 1.8, < 3.0)
41
+ rexml
42
+ rubocop-ast (>= 1.2.0, < 2.0)
43
+ ruby-progressbar (~> 1.7)
44
+ unicode-display_width (>= 1.4.0, < 2.0)
45
+ rubocop-ast (1.3.0)
46
+ parser (>= 2.7.1.5)
47
+ rubocop-minitest (0.10.2)
48
+ rubocop (>= 0.87, < 2.0)
49
+ ruby-mp3info (0.8.10)
50
+ ruby-ogginfo (0.7.2)
51
+ ruby-progressbar (1.10.1)
52
+ simplecov (0.20.0)
53
+ docile (~> 1.1)
54
+ simplecov-html (~> 0.11)
55
+ simplecov_json_formatter (~> 0.1)
56
+ simplecov-html (0.12.3)
57
+ simplecov_json_formatter (0.1.2)
58
+ unicode-display_width (1.7.0)
59
+ wavefile (0.6.0)
60
+
61
+ PLATFORMS
62
+ universal-java-1.8
63
+ x86_64-darwin-20
64
+ x86_64-linux
65
+
66
+ DEPENDENCIES
67
+ codecov
68
+ minitest (~> 5.0)
69
+ minitest-rg (~> 5.2)
70
+ rake (~> 13.0)
71
+ rubocop (~> 1.7.0)
72
+ rubocop-minitest (~> 0.10.2)
73
+ ruby-audioinfo!
74
+
75
+ BUNDLED WITH
76
+ 2.2.3
@@ -1,3 +1,11 @@
1
+ === 0.5.4
2
+ * Rescue StandardError instead of Exception
3
+
4
+ === 0.5.3 / 2016-03-
5
+
6
+ * added format parameter
7
+ * fix wavefile gem version to `~> 0.6.0`
8
+
1
9
  === 0.5.2 / 2016-01-05
2
10
 
3
11
  * fixed length computation for .wav files (thanks to Iwanaga)
@@ -25,7 +33,7 @@
25
33
  === 0.3 / 2013-03-26
26
34
 
27
35
  * correctly computes bitrate on .flac files
28
- * string encoding fixes on .flac files
36
+ * string encoding fixes on .flac files
29
37
  * write support on .flac with "metaflac" binary
30
38
  * case insensitive wrapper to flacinfo's tags hash
31
39
  * uses "ffmpeg" binary for writing tags on not natively supported format
@@ -54,7 +62,7 @@
54
62
 
55
63
  === 0.1.5 / 2009-03-29
56
64
 
57
- * flac parsing more robust
65
+ * flac parsing more robust
58
66
  * musicbrainz_infos support for flac
59
67
  * quick fixes in mpcinfo for id3v2 tag parsing
60
68
 
@@ -0,0 +1,56 @@
1
+ # ruby-audioinfo
2
+
3
+ Glues together various audio ruby libraries and presents a unified API to the developer.
4
+ Currently, supported formats are: mp3, ogg, mpc, ape, wma, flac, aac, mp4, m4a.
5
+
6
+ Does not depend on any gems with native extensions for portability.
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'ruby-audioinfo', require: 'audioinfo'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle install
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install ruby-audioinfo
23
+
24
+ ## Usage
25
+
26
+ ```
27
+ AudioInfo.open("audio_file.one_of_supported_extensions") do |info|
28
+ info.artist # or info["artist"]
29
+ info.title # or info["title"]
30
+ info.length # playing time of the file
31
+ info.bitrate # average bitrate
32
+ info.to_h # { "artist" => "artist", "title" => "title", etc... }
33
+ end
34
+ ```
35
+
36
+ ## FEATURES/PROBLEMS:
37
+
38
+ * beta write support for mp3 and ogg tags (other to be written)
39
+ * support for MusicBrainz tags
40
+ * AudioInfo::Album class included, which gives an unified way to manage an album in a given directory.
41
+
42
+ ## Dependencies
43
+
44
+ * [ruby-mp3info](https://github.com/moumar/ruby-mp3info)
45
+ * [ruby-ogginfo](https://github.com/moumar/ruby-ogginfo)
46
+ * [MP4Info](https://github.com/arbarlow/ruby-mp4info)
47
+ * [flacinfo-rb](https://github.com/DarrenKirby/flacinfo-rb)
48
+ * [wmainfo-rb](https://github.com/moumar/wmainfo-rb)
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/moumar/ruby-audioinfo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/moumar/ruby-audioinfo/blob/master/CODE_OF_CONDUCT.md).
53
+
54
+ ## License
55
+
56
+ GPL-3.0