rupeepeethree 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/Gemfile +1 -0
- data/Gemfile.lock +7 -1
- data/README.md +6 -7
- data/lib/rupeepeethree/tagger.rb +5 -0
- data/lib/rupeepeethree/version.rb +1 -1
- data/rupeepeethree.gemspec +5 -4
- data/spec/fixtures/test.mp3 +0 -0
- data/spec/rupeepeethree/tagger_spec.rb +18 -0
- metadata +26 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d164bd529a6b29dfbc38ab9dbfc5e15d2a8d235
|
4
|
+
data.tar.gz: 227a2a280b026a882561df31f364a117322674ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 844a23a9d778c6eff31f2bf13f468376a80e86d31fff9eea010fdf495334909bda9771ef337f9e0c58009a67fdb83b6d000dd32f7a1c222f548b392460fede1b
|
7
|
+
data.tar.gz: ff1e33dadbbcbd44b218518af59ecc42926ce516c07d36ed9d94ca6a709e8cfee0da493e1ce4dfbbd5b1968522b8c58d82fa78840a104e3b278fe7ed796f342e
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --format FruityFormatter
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -9,6 +9,8 @@ GEM
|
|
9
9
|
cocaine (0.5.1)
|
10
10
|
climate_control (>= 0.0.3, < 1.0)
|
11
11
|
diff-lcs (1.2.1)
|
12
|
+
fruity_formatter (0.0.1)
|
13
|
+
rspec
|
12
14
|
i18n (0.6.4)
|
13
15
|
mime-types (1.21)
|
14
16
|
multi_json (1.6.1)
|
@@ -21,7 +23,7 @@ GEM
|
|
21
23
|
rspec-expectations (2.13.0)
|
22
24
|
diff-lcs (>= 1.1.3, < 2.0)
|
23
25
|
rspec-mocks (2.13.0)
|
24
|
-
taglib-ruby (0.
|
26
|
+
taglib-ruby (0.7.0)
|
25
27
|
trollop (1.16.2)
|
26
28
|
|
27
29
|
PLATFORMS
|
@@ -29,8 +31,12 @@ PLATFORMS
|
|
29
31
|
|
30
32
|
DEPENDENCIES
|
31
33
|
cocaine
|
34
|
+
fruity_formatter
|
32
35
|
mime-types
|
33
36
|
rake
|
34
37
|
rspec
|
35
38
|
taglib-ruby
|
36
39
|
trollop
|
40
|
+
|
41
|
+
BUNDLED WITH
|
42
|
+
1.10.6
|
data/README.md
CHANGED
@@ -2,14 +2,13 @@
|
|
2
2
|
|
3
3
|
http://github.com/datafruits/rupeepeethree
|
4
4
|
|
5
|
-
|
5
|
+
[](https://rubygems.org/gems/rupeepeethree)
|
6
|
+
[](http://travis-ci.org/datafruits/rupeepeethree)
|
7
|
+
[](https://codeclimate.com/github/datafruits/rupeepeethree)
|
8
|
+
|
6
9
|
|
7
|
-
|
10
|
+
## DESCRIPTION:
|
8
11
|
|
9
|
-
░█▀▄░█▀█░▀▀█
|
10
|
-
░█▀▄░█▀▀░░▀▄
|
11
|
-
░▀░▀░▀░░░▀▀░
|
12
|
-
┣¨キ┣¨キ
|
13
12
|
You thought your mp3s were cool. Turns out you were wrong. Your mp3s have no tags. You must tag them!
|
14
13
|
|
15
14
|
a simple library and command line utility wrapper around ruby-taglib
|
@@ -19,7 +18,7 @@ a simple library and command line utility wrapper around ruby-taglib
|
|
19
18
|
* a dumb name
|
20
19
|
* probably works
|
21
20
|
* has tests
|
22
|
-
* easier to change the album art than eyeD3
|
21
|
+
* easier to change the album art than eyeD3
|
23
22
|
|
24
23
|
## SYNOPSIS:
|
25
24
|
|
data/lib/rupeepeethree/tagger.rb
CHANGED
@@ -3,7 +3,9 @@ require 'mime/types'
|
|
3
3
|
|
4
4
|
module Rupeepeethree
|
5
5
|
class Tagger
|
6
|
+
class FileNotFound < StandardError; end
|
6
7
|
def self.tag(mp3,tags)
|
8
|
+
raise FileNotFound if !File.exist? mp3
|
7
9
|
TagLib::MPEG::File.open(mp3) do |f|
|
8
10
|
t = f.id3v2_tag || TagLib::ID3v2::Tag.new
|
9
11
|
if tags[:title]
|
@@ -39,6 +41,7 @@ module Rupeepeethree
|
|
39
41
|
end
|
40
42
|
|
41
43
|
def self.tags(mp3)
|
44
|
+
raise FileNotFound if !File.exist? mp3
|
42
45
|
hash = {}
|
43
46
|
TagLib::MPEG::File.open(mp3) do |f|
|
44
47
|
t = f.id3v2_tag
|
@@ -54,12 +57,14 @@ module Rupeepeethree
|
|
54
57
|
|
55
58
|
# clear all tags
|
56
59
|
def self.clear(mp3)
|
60
|
+
raise FileNotFound if !File.exist? mp3
|
57
61
|
TagLib::MPEG::File.open(mp3) do |f|
|
58
62
|
f.strip
|
59
63
|
end
|
60
64
|
end
|
61
65
|
|
62
66
|
def self.print_tags(mp3)
|
67
|
+
raise FileNotFound if !File.exist? mp3
|
63
68
|
result = ""
|
64
69
|
TagLib::MPEG::File.open(mp3) do |f|
|
65
70
|
t = f.id3v2_tag
|
data/rupeepeethree.gemspec
CHANGED
@@ -11,8 +11,9 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Tony Miller"]
|
13
13
|
s.date = "2013-03-14"
|
14
|
-
s.description = "tag your mp3 files. a command line wrapper around taglib-ruby."
|
14
|
+
s.description = "tag your mp3 files. a command line wrapper and library around taglib-ruby."
|
15
15
|
s.email = ["mcfiredrill@gmail.com"]
|
16
|
+
s.bindir = 'bin'
|
16
17
|
s.executables = ["rp3"]
|
17
18
|
s.extra_rdoc_files = ["History.txt", "Manifest.txt"]
|
18
19
|
s.files = `git ls-files`.split("\n")
|
@@ -25,9 +26,9 @@ Gem::Specification.new do |s|
|
|
25
26
|
s.rubygems_version = "1.8.25"
|
26
27
|
s.summary = "tag your mp3 files"
|
27
28
|
|
28
|
-
s.add_dependency 'taglib-ruby'
|
29
|
-
s.add_dependency 'trollop'
|
30
|
-
s.add_dependency 'mime-types'
|
29
|
+
s.add_dependency 'taglib-ruby', '~> 0.7.0'
|
30
|
+
s.add_dependency 'trollop', '~> 2.0'
|
31
|
+
s.add_dependency 'mime-types', '>= 1.16'
|
31
32
|
|
32
33
|
if s.respond_to? :specification_version then
|
33
34
|
s.specification_version = 3
|
data/spec/fixtures/test.mp3
CHANGED
Binary file
|
@@ -44,4 +44,22 @@ describe Rupeepeethree::Tagger do
|
|
44
44
|
result.should match(/year: 0\n/)
|
45
45
|
result.should_not match(/image:/)
|
46
46
|
end
|
47
|
+
|
48
|
+
it 'blows up if the mp3 file is not found' do
|
49
|
+
expect do
|
50
|
+
Rupeepeethree::Tagger.tags('not a file')
|
51
|
+
end.to raise_exception(Rupeepeethree::Tagger::FileNotFound)
|
52
|
+
|
53
|
+
expect do
|
54
|
+
Rupeepeethree::Tagger.tag('not a file', {})
|
55
|
+
end.to raise_exception(Rupeepeethree::Tagger::FileNotFound)
|
56
|
+
|
57
|
+
expect do
|
58
|
+
Rupeepeethree::Tagger.clear('not a file')
|
59
|
+
end.to raise_exception(Rupeepeethree::Tagger::FileNotFound)
|
60
|
+
|
61
|
+
expect do
|
62
|
+
Rupeepeethree::Tagger.print_tags('not a file')
|
63
|
+
end.to raise_exception(Rupeepeethree::Tagger::FileNotFound)
|
64
|
+
end
|
47
65
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rupeepeethree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Miller
|
@@ -14,73 +14,73 @@ dependencies:
|
|
14
14
|
name: taglib-ruby
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 0.7.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 0.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: trollop
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: mime-types
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1.16'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1.16'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rdoc
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '3.10'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.10'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: hoe
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - ~>
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '3.5'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - ~>
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '3.5'
|
83
|
-
description: tag your mp3 files. a command line wrapper around taglib-ruby.
|
83
|
+
description: tag your mp3 files. a command line wrapper and library around taglib-ruby.
|
84
84
|
email:
|
85
85
|
- mcfiredrill@gmail.com
|
86
86
|
executables:
|
@@ -90,8 +90,9 @@ extra_rdoc_files:
|
|
90
90
|
- History.txt
|
91
91
|
- Manifest.txt
|
92
92
|
files:
|
93
|
-
- .gitignore
|
94
|
-
- .
|
93
|
+
- ".gitignore"
|
94
|
+
- ".rspec"
|
95
|
+
- ".travis.yml"
|
95
96
|
- Gemfile
|
96
97
|
- Gemfile.lock
|
97
98
|
- History.txt
|
@@ -113,23 +114,23 @@ licenses:
|
|
113
114
|
metadata: {}
|
114
115
|
post_install_message:
|
115
116
|
rdoc_options:
|
116
|
-
- --main
|
117
|
+
- "--main"
|
117
118
|
- README.md
|
118
119
|
require_paths:
|
119
120
|
- lib
|
120
121
|
required_ruby_version: !ruby/object:Gem::Requirement
|
121
122
|
requirements:
|
122
|
-
- -
|
123
|
+
- - ">="
|
123
124
|
- !ruby/object:Gem::Version
|
124
125
|
version: '0'
|
125
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
127
|
requirements:
|
127
|
-
- -
|
128
|
+
- - ">="
|
128
129
|
- !ruby/object:Gem::Version
|
129
130
|
version: '0'
|
130
131
|
requirements: []
|
131
132
|
rubyforge_project: rupeepeethree
|
132
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.5.1
|
133
134
|
signing_key:
|
134
135
|
specification_version: 3
|
135
136
|
summary: tag your mp3 files
|
@@ -138,3 +139,4 @@ test_files:
|
|
138
139
|
- spec/fixtures/test.mp3
|
139
140
|
- spec/rupeepeethree/tagger_spec.rb
|
140
141
|
- spec/rupeepeethree_spec.rb
|
142
|
+
has_rdoc:
|