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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17a5552c98592630886d4acb067c52b0a33653e70ffbd0142371fba98226effa
4
- data.tar.gz: 2e469efa5870480edc30235a10a0bc80e13e57d0a5defd6a3bfea5f8fc7e9d7a
3
+ metadata.gz: 88f421d47ecb18aa73430af51f11a85cea8402f94bea7fbbeba9dcea02d6543a
4
+ data.tar.gz: 857d5efb3230e903efdb188fc38ffbde14de3f4508da12377c531cdfe90ea77e
5
5
  SHA512:
6
- metadata.gz: 8be5fc0f587ecadd4e3593699b18388824852f25bce06677e6e65c81065a59579bc1eaf9d34b2814d2dde3a4ec08b9da71020845a96513f9f91061ad01ee6019
7
- data.tar.gz: 8aa38d5d282294eacfb3550ab51bad5f3369f96859c24aa839596034911f951da887968c4e585f83fe945d4b5b328f5c3f910a0e953bcbab99bbea7ab4595f59
6
+ metadata.gz: f3be6872b3d2f9a5f18385fca99e3060d44f18a794acd5a2554b46eae74a29ad0a2348f759dd3abe99dd9dc506e615ee22ce8ed64e4b25610aa5a5d97283bbf6
7
+ data.tar.gz: cddcb0c70a54d15ad28a74a227f3dfc910f7faa6e72d32359a0ae078dc13e502ee27f288054e063bf6d79d70262510a34e97d37942946826671b892e4a03e4f6
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .DS_Store
2
- pkg
2
+ pkg
3
+ Gemfile.lock
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 1.0.2
4
+
5
+ * improved `SUPPORTED_FORMATS` matching that ignores case
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  * add `SUPPORTED_FORMATS` and and raise errors when not matching
@@ -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 SUPPORTED_FORMATS.include?(content.ext)
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 SUPPORTED_FORMATS.include?(content.ext)
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 SUPPORTED_FORMATS.include?(content.ext)
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 }
@@ -1,3 +1,3 @@
1
1
  module DragonflyAudio
2
- VERSION = '1.0.0'.freeze
2
+ VERSION = '1.0.2'.freeze
3
3
  end
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.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-07-14 00:00:00.000000000 Z
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: '0'
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: '0'
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
@@ -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