dragonfly_audio 1.0.0 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -1
- data/CHANGELOG.md +4 -0
- data/dragonfly_audio.gemspec +1 -1
- data/lib/dragonfly_audio/analysers/audio_properties.rb +2 -1
- data/lib/dragonfly_audio/processors/album_art.rb +2 -1
- data/lib/dragonfly_audio/processors/tag.rb +2 -1
- data/lib/dragonfly_audio/version.rb +1 -1
- metadata +6 -7
- data/Gemfile.lock +0 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88f421d47ecb18aa73430af51f11a85cea8402f94bea7fbbeba9dcea02d6543a
|
4
|
+
data.tar.gz: 857d5efb3230e903efdb188fc38ffbde14de3f4508da12377c531cdfe90ea77e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3be6872b3d2f9a5f18385fca99e3060d44f18a794acd5a2554b46eae74a29ad0a2348f759dd3abe99dd9dc506e615ee22ce8ed64e4b25610aa5a5d97283bbf6
|
7
|
+
data.tar.gz: cddcb0c70a54d15ad28a74a227f3dfc910f7faa6e72d32359a0ae078dc13e502ee27f288054e063bf6d79d70262510a34e97d37942946826671b892e4a03e4f6
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/dragonfly_audio.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'taglib-ruby'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
24
|
-
spec.add_development_dependency 'rake'
|
24
|
+
spec.add_development_dependency 'rake', '~> 10.4'
|
25
25
|
spec.add_development_dependency 'guard'
|
26
26
|
spec.add_development_dependency 'guard-minitest'
|
27
27
|
spec.add_development_dependency 'minitest'
|
@@ -9,7 +9,8 @@ module DragonflyAudio
|
|
9
9
|
AUDIO_PROPS = %w[length bitrate channels sample_rate].freeze
|
10
10
|
|
11
11
|
def call(content)
|
12
|
-
return {} unless
|
12
|
+
return {} unless content.ext
|
13
|
+
return {} unless SUPPORTED_FORMATS.include?(content.ext.downcase)
|
13
14
|
|
14
15
|
res = {}
|
15
16
|
|
@@ -7,7 +7,8 @@ module DragonflyAudio
|
|
7
7
|
module Processors
|
8
8
|
class AlbumArt
|
9
9
|
def call(content, album_art_file)
|
10
|
-
raise UnsupportedFormat unless
|
10
|
+
raise UnsupportedFormat unless content.ext
|
11
|
+
raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase)
|
11
12
|
# raise UnsupportedFormat unless content.mime_type == 'audio/mpeg'
|
12
13
|
|
13
14
|
tempfile = content.temp_object
|
@@ -8,7 +8,8 @@ module DragonflyAudio
|
|
8
8
|
PERMISSIBLE_PROPERTIES = Analysers::AudioProperties::TAGS
|
9
9
|
|
10
10
|
def call(content, properties)
|
11
|
-
raise UnsupportedFormat unless
|
11
|
+
raise UnsupportedFormat unless content.ext
|
12
|
+
raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase)
|
12
13
|
|
13
14
|
# stringify keys
|
14
15
|
properties = properties.each_with_object({}) { |(k, v), memo| memo[k.to_s] = v }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dragonfly_audio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dragonfly
|
@@ -57,16 +57,16 @@ dependencies:
|
|
57
57
|
name: rake
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- - "
|
60
|
+
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '10.4'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- - "
|
67
|
+
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '10.4'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: guard
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -135,7 +135,6 @@ files:
|
|
135
135
|
- ".travis.yml"
|
136
136
|
- CHANGELOG.md
|
137
137
|
- Gemfile
|
138
|
-
- Gemfile.lock
|
139
138
|
- Guardfile
|
140
139
|
- LICENSE.txt
|
141
140
|
- README.md
|
data/Gemfile.lock
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
dragonfly_audio (1.0.0)
|
5
|
-
dragonfly (~> 1.0)
|
6
|
-
taglib-ruby
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.5.2)
|
12
|
-
public_suffix (>= 2.0.2, < 4.0)
|
13
|
-
ansi (1.5.0)
|
14
|
-
builder (3.2.3)
|
15
|
-
coderay (1.1.0)
|
16
|
-
dragonfly (1.1.5)
|
17
|
-
addressable (~> 2.3)
|
18
|
-
multi_json (~> 1.0)
|
19
|
-
rack (>= 1.3)
|
20
|
-
ffi (1.9.10)
|
21
|
-
formatador (0.2.5)
|
22
|
-
guard (2.13.0)
|
23
|
-
formatador (>= 0.2.4)
|
24
|
-
listen (>= 2.7, <= 4.0)
|
25
|
-
lumberjack (~> 1.0)
|
26
|
-
nenv (~> 0.1)
|
27
|
-
notiffany (~> 0.0)
|
28
|
-
pry (>= 0.9.12)
|
29
|
-
shellany (~> 0.0)
|
30
|
-
thor (>= 0.18.1)
|
31
|
-
guard-compat (1.2.1)
|
32
|
-
guard-minitest (2.4.4)
|
33
|
-
guard-compat (~> 1.2)
|
34
|
-
minitest (>= 3.0)
|
35
|
-
listen (3.0.3)
|
36
|
-
rb-fsevent (>= 0.9.3)
|
37
|
-
rb-inotify (>= 0.9)
|
38
|
-
lumberjack (1.0.9)
|
39
|
-
method_source (0.8.2)
|
40
|
-
minitest (5.8.1)
|
41
|
-
minitest-reporters (1.2.0)
|
42
|
-
ansi
|
43
|
-
builder
|
44
|
-
minitest (>= 5.0)
|
45
|
-
ruby-progressbar
|
46
|
-
multi_json (1.13.1)
|
47
|
-
nenv (0.2.0)
|
48
|
-
notiffany (0.0.8)
|
49
|
-
nenv (~> 0.1)
|
50
|
-
shellany (~> 0.0)
|
51
|
-
pry (0.10.2)
|
52
|
-
coderay (~> 1.1.0)
|
53
|
-
method_source (~> 0.8.1)
|
54
|
-
slop (~> 3.4)
|
55
|
-
public_suffix (3.0.2)
|
56
|
-
rack (2.0.5)
|
57
|
-
rake (10.4.2)
|
58
|
-
rb-fsevent (0.9.6)
|
59
|
-
rb-inotify (0.9.5)
|
60
|
-
ffi (>= 0.5.0)
|
61
|
-
ruby-progressbar (1.9.0)
|
62
|
-
shellany (0.0.1)
|
63
|
-
slop (3.6.0)
|
64
|
-
taglib-ruby (0.7.1)
|
65
|
-
thor (0.19.1)
|
66
|
-
|
67
|
-
PLATFORMS
|
68
|
-
ruby
|
69
|
-
|
70
|
-
DEPENDENCIES
|
71
|
-
bundler (~> 1.6)
|
72
|
-
dragonfly_audio!
|
73
|
-
guard
|
74
|
-
guard-minitest
|
75
|
-
minitest
|
76
|
-
minitest-reporters
|
77
|
-
rake
|
78
|
-
|
79
|
-
BUNDLED WITH
|
80
|
-
1.16.1
|