dragonfly_audio 0.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +18 -0
- data/README.md +62 -0
- data/lib/dragonfly_audio.rb +4 -2
- data/lib/dragonfly_audio/analysers/audio_properties.rb +10 -29
- data/lib/dragonfly_audio/plugin.rb +11 -43
- data/lib/dragonfly_audio/processors/album_art.rb +31 -0
- data/lib/dragonfly_audio/processors/tag.rb +30 -0
- data/lib/dragonfly_audio/version.rb +1 -1
- metadata +21 -31
- data/.gitignore +0 -1
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -70
- data/Guardfile +0 -8
- data/LICENSE.txt +0 -22
- data/Rakefile +0 -9
- data/dragonfly_audio.gemspec +0 -29
- data/samples/BroadmoorSirenTest.mp3 +0 -0
- data/test/dragonfly_audio/plugin_test.rb +0 -18
- data/test/test_helper.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7358381b3e93d63f3fcab85483e44f0b05bc0fb6557aa1f47f944e2b092a6f11
|
4
|
+
data.tar.gz: 9e16191e41135220edfb04acf272ff5ca13380bfe5ae354237e44b14c86014b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4974325e79c595e391e37fa6ed59756cb01ee684fae7d0ae7b18741cb584988ba3e754c3d795ab310bd784b2ecfb64e0dfd9ff47950141fced5ffd8d65a95ba8
|
7
|
+
data.tar.gz: 1db36d1b74d56dc8bb1453544c28ad3bab6ce80d08a90d69523c958c510f6c00af4ef7a1e372a525fa54bd4722d2461b639263a54037ddc35ce052cb40951f56
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## 1.0.3
|
4
|
+
|
5
|
+
- locked `taglib-ruby` to `~> 0.7.1` – [@asgerb](https://github.com/asgerb).
|
6
|
+
|
7
|
+
## 1.0.2
|
8
|
+
|
9
|
+
- improved `SUPPORTED_FORMATS` matching that ignores case
|
10
|
+
|
11
|
+
## 1.0.0
|
12
|
+
|
13
|
+
- add `SUPPORTED_FORMATS` and and raise errors when not matching
|
14
|
+
- add more thorough tests for supported formats
|
15
|
+
|
16
|
+
## 0.0.3
|
17
|
+
|
18
|
+
- `AlbumArt` processor (courtesy of @asgerb)
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Dragonfly Audio
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/tomasc/dragonfly_audio.svg)](https://travis-ci.org/tomasc/dragonfly_audio) [![Gem Version](https://badge.fury.io/rb/dragonfly_audio.svg)](http://badge.fury.io/rb/dragonfly_audio) [![Coverage Status](https://img.shields.io/coveralls/tomasc/dragonfly_audio.svg)](https://coveralls.io/r/tomasc/mongoid_recurring)
|
4
|
+
|
3
5
|
Wraps common audio-related tasks into [Dragonfly](http://markevans.github.io/dragonfly) analysers and processors.
|
4
6
|
|
5
7
|
## Installation
|
@@ -18,6 +20,8 @@ Or install it yourself as:
|
|
18
20
|
|
19
21
|
## Dependencies
|
20
22
|
|
23
|
+
This gem uses [taglib-ruby](https://github.com/robinst/taglib-ruby) to read and write meta data and properties of audio files.
|
24
|
+
|
21
25
|
## Usage
|
22
26
|
|
23
27
|
Add the `:audio` plugin to your Dragonfly config block:
|
@@ -28,10 +32,68 @@ Dragonfly.app.configure do
|
|
28
32
|
end
|
29
33
|
```
|
30
34
|
|
35
|
+
## Supported Formats
|
36
|
+
|
37
|
+
List of supported formats is available as:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
DragonflyAudio::SUPPORTED_FORMATS # => ["aif", "aiff", …]
|
41
|
+
```
|
42
|
+
|
31
43
|
## Analysers
|
32
44
|
|
45
|
+
### audio_properties
|
46
|
+
|
47
|
+
Reads properties and tags of an audio file:
|
48
|
+
|
49
|
+
```ruby
|
50
|
+
audio.audio_properties
|
51
|
+
|
52
|
+
# => {
|
53
|
+
# title: 'The Ship Was Sailing',
|
54
|
+
# artist: 'Vito Ricci',
|
55
|
+
# album: 'Music From Memory',
|
56
|
+
# year: '1985',
|
57
|
+
# track: 7
|
58
|
+
# genre: 'Ambient',
|
59
|
+
# comment: 'This Music was originally composed for "The Memory Theatre of Gulio Camillo" by Matthew Maguire. A Creation production premiered at La Mama Spring 1985 thanks to Bonnie for not laughing to Justin for laughing to Jon Gordron for electronic bondage produced by Jonathan Mann for Pangea Productions recorded 8/85 at Chiens Interdits Studio in a big cover production by Ann Rower cover design by Paul Leone * all compositions by Vito Ricci * play it loud',
|
60
|
+
# length: 345,
|
61
|
+
# bitrate: 192,
|
62
|
+
# channels: 2,
|
63
|
+
# sample_rate: 44_100
|
64
|
+
# }
|
65
|
+
```
|
66
|
+
|
33
67
|
## Processors
|
34
68
|
|
69
|
+
### tag
|
70
|
+
|
71
|
+
Sets the file's meta information:
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
audio.tag(artist: 'Ariel Kalma', album: 'Le Temps Des Moissons', track: 'Bakafrika')
|
75
|
+
```
|
76
|
+
|
77
|
+
Permissible properties:
|
78
|
+
* album
|
79
|
+
* artist
|
80
|
+
* comment
|
81
|
+
* genre
|
82
|
+
* tag
|
83
|
+
* title
|
84
|
+
* track
|
85
|
+
* year
|
86
|
+
|
87
|
+
### album_art
|
88
|
+
|
89
|
+
Sets the file's album art:
|
90
|
+
|
91
|
+
```ruby
|
92
|
+
audio.album_art('path_to_file')
|
93
|
+
```
|
94
|
+
|
95
|
+
Note that this only works for mp3 files.
|
96
|
+
|
35
97
|
## Contributing
|
36
98
|
|
37
99
|
1. Fork it ( https://github.com/tomasc/dragonfly_audio/fork )
|
data/lib/dragonfly_audio.rb
CHANGED
@@ -2,6 +2,8 @@ require 'dragonfly'
|
|
2
2
|
require 'dragonfly_audio/plugin'
|
3
3
|
require 'dragonfly_audio/version'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
module DragonflyAudio
|
6
|
+
class UnsupportedFormat < RuntimeError; end
|
7
|
+
|
8
|
+
SUPPORTED_FORMATS = %w[aif aiff fla flac m4a mp4 mp4a mp4s mp3 mpga oga ogg ogx wav].freeze
|
7
9
|
end
|
@@ -5,42 +5,23 @@ require 'taglib'
|
|
5
5
|
module DragonflyAudio
|
6
6
|
module Analysers
|
7
7
|
class AudioProperties
|
8
|
+
TAGS = %w[title artist album year track genre comment].freeze
|
9
|
+
AUDIO_PROPS = %w[length bitrate channels sample_rate].freeze
|
8
10
|
|
9
|
-
def call
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
private # =============================================================
|
11
|
+
def call(content)
|
12
|
+
return {} unless content.ext
|
13
|
+
return {} unless SUPPORTED_FORMATS.include?(content.ext.downcase)
|
14
14
|
|
15
|
-
def taglib_fileref temp_object
|
16
15
|
res = {}
|
17
|
-
TagLib::FileRef.open(temp_object.path) do |fileref|
|
18
|
-
unless fileref.null?
|
19
|
-
|
20
|
-
# TODO: simplify me!
|
21
|
-
tag = fileref.tag
|
22
|
-
res.merge! title: tag.title
|
23
|
-
res.merge! artist: tag.artist
|
24
|
-
res.merge! album: tag.album
|
25
|
-
res.merge! year: tag.year
|
26
|
-
res.merge! tag: tag.year
|
27
|
-
res.merge! track: tag.track
|
28
|
-
res.merge! genre: tag.genre
|
29
|
-
res.merge! comment: tag.comment
|
30
16
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
res.merge! sample_rate: prop.sample_rate
|
36
|
-
|
37
|
-
# prop.merge! %w(title artist album year track genre comment).inject({}) { |res, att| { att => fileref.tag.send(att) } }
|
38
|
-
# prop.merge! length: fileref.audio_properties.length
|
39
|
-
end
|
17
|
+
TagLib::FileRef.open(content.path) do |fileref|
|
18
|
+
return if fileref.null?
|
19
|
+
TAGS.each { |n| res[n] = fileref.tag.send(n) }
|
20
|
+
AUDIO_PROPS.each { |n| res[n] = fileref.audio_properties.send(n) }
|
40
21
|
end
|
22
|
+
|
41
23
|
res
|
42
24
|
end
|
43
|
-
|
44
25
|
end
|
45
26
|
end
|
46
27
|
end
|
@@ -1,56 +1,24 @@
|
|
1
1
|
require 'dragonfly_audio/analysers/audio_properties'
|
2
2
|
|
3
|
+
require 'dragonfly_audio/processors/tag'
|
4
|
+
require 'dragonfly_audio/processors/album_art'
|
5
|
+
|
3
6
|
module DragonflyAudio
|
4
7
|
class Plugin
|
8
|
+
def call(app, options = {})
|
9
|
+
app.add_analyser :audio_properties, Analysers::AudioProperties.new
|
5
10
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
app.add_analyser :title do |content|
|
10
|
-
content.analyse(:audio_properties)[:title]
|
11
|
-
end
|
12
|
-
|
13
|
-
app.add_analyser :artist do |content|
|
14
|
-
content.analyse(:audio_properties)[:artist]
|
15
|
-
end
|
16
|
-
|
17
|
-
app.add_analyser :album do |content|
|
18
|
-
content.analyse(:audio_properties)[:album]
|
19
|
-
end
|
20
|
-
|
21
|
-
app.add_analyser :year do |content|
|
22
|
-
content.analyse(:audio_properties)[:year]
|
23
|
-
end
|
24
|
-
|
25
|
-
app.add_analyser :track do |content|
|
26
|
-
content.analyse(:audio_properties)[:track]
|
11
|
+
Analysers::AudioProperties::TAGS.each do |name|
|
12
|
+
app.add_analyser(name) { |c| c.analyse(:audio_properties)[name] }
|
27
13
|
end
|
28
14
|
|
29
|
-
|
30
|
-
|
15
|
+
Analysers::AudioProperties::AUDIO_PROPS.each do |name|
|
16
|
+
app.add_analyser(name) { |c| c.analyse(:audio_properties)[name] }
|
31
17
|
end
|
32
18
|
|
33
|
-
app.
|
34
|
-
|
35
|
-
end
|
36
|
-
|
37
|
-
app.add_analyser :length do |content|
|
38
|
-
content.analyse(:audio_properties)[:length]
|
39
|
-
end
|
40
|
-
|
41
|
-
app.add_analyser :bitrate do |content|
|
42
|
-
content.analyse(:audio_properties)[:bitrate]
|
43
|
-
end
|
44
|
-
|
45
|
-
app.add_analyser :channels do |content|
|
46
|
-
content.analyse(:audio_properties)[:channels]
|
47
|
-
end
|
48
|
-
|
49
|
-
app.add_analyser :sample_rate do |content|
|
50
|
-
content.analyse(:audio_properties)[:sample_rate]
|
51
|
-
end
|
19
|
+
app.add_processor :tag, Processors::Tag.new
|
20
|
+
app.add_processor :album_art, Processors::AlbumArt.new
|
52
21
|
end
|
53
|
-
|
54
22
|
end
|
55
23
|
end
|
56
24
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'taglib'
|
2
|
+
require 'rack'
|
3
|
+
|
4
|
+
# IMPORTANT: See http://robinst.github.io/taglib-ruby/
|
5
|
+
|
6
|
+
module DragonflyAudio
|
7
|
+
module Processors
|
8
|
+
class AlbumArt
|
9
|
+
def call(content, album_art_file)
|
10
|
+
raise UnsupportedFormat unless content.ext
|
11
|
+
raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase)
|
12
|
+
# raise UnsupportedFormat unless content.mime_type == 'audio/mpeg'
|
13
|
+
|
14
|
+
tempfile = content.temp_object
|
15
|
+
|
16
|
+
TagLib::MPEG::File.open(tempfile.path) do |file|
|
17
|
+
tag = file.id3v2_tag
|
18
|
+
album_art = TagLib::ID3v2::AttachedPictureFrame.new
|
19
|
+
album_art.mime_type = Rack::Mime.mime_type(File.extname(album_art_file))
|
20
|
+
album_art.description = "Cover"
|
21
|
+
album_art.type = TagLib::ID3v2::AttachedPictureFrame::FrontCover
|
22
|
+
album_art.picture = File.open(album_art_file, 'rb') { |f| f.read }
|
23
|
+
tag.add_frame(album_art)
|
24
|
+
file.save
|
25
|
+
end
|
26
|
+
|
27
|
+
content.update(tempfile)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'taglib'
|
2
|
+
|
3
|
+
# IMPORTANT: See http://robinst.github.io/taglib-ruby/
|
4
|
+
|
5
|
+
module DragonflyAudio
|
6
|
+
module Processors
|
7
|
+
class Tag
|
8
|
+
PERMISSIBLE_PROPERTIES = Analysers::AudioProperties::TAGS
|
9
|
+
|
10
|
+
def call(content, properties)
|
11
|
+
raise UnsupportedFormat unless content.ext
|
12
|
+
raise UnsupportedFormat unless SUPPORTED_FORMATS.include?(content.ext.downcase)
|
13
|
+
|
14
|
+
# stringify keys
|
15
|
+
properties = properties.each_with_object({}) { |(k, v), memo| memo[k.to_s] = v }
|
16
|
+
properties = properties.select { |key, _| PERMISSIBLE_PROPERTIES.include?(key) }
|
17
|
+
|
18
|
+
tempfile = Dragonfly::TempObject.new(content.tempfile)
|
19
|
+
|
20
|
+
TagLib::FileRef.open(tempfile.path) do |file|
|
21
|
+
return if file.null?
|
22
|
+
properties.each { |k, v| file.tag.send("#{k}=", v) }
|
23
|
+
file.save
|
24
|
+
end
|
25
|
+
|
26
|
+
content.update(tempfile)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
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:
|
4
|
+
version: 1.0.3
|
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:
|
12
|
+
date: 2020-06-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dragonfly
|
@@ -29,46 +29,46 @@ dependencies:
|
|
29
29
|
name: taglib-ruby
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - "
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version:
|
34
|
+
version: 0.7.1
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - "
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version:
|
41
|
+
version: 0.7.1
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: bundler
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '2.0'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '2.0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
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
|
-
name:
|
71
|
+
name: guard
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - ">="
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
name: guard
|
85
|
+
name: guard-minitest
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - ">="
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: minitest
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
102
|
- - ">="
|
@@ -110,7 +110,7 @@ dependencies:
|
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name: minitest
|
113
|
+
name: minitest-reporters
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - ">="
|
@@ -131,21 +131,14 @@ executables: []
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
-
-
|
135
|
-
- Gemfile
|
136
|
-
- Gemfile.lock
|
137
|
-
- Guardfile
|
138
|
-
- LICENSE.txt
|
134
|
+
- CHANGELOG.md
|
139
135
|
- README.md
|
140
|
-
- Rakefile
|
141
|
-
- dragonfly_audio.gemspec
|
142
136
|
- lib/dragonfly_audio.rb
|
143
137
|
- lib/dragonfly_audio/analysers/audio_properties.rb
|
144
138
|
- lib/dragonfly_audio/plugin.rb
|
139
|
+
- lib/dragonfly_audio/processors/album_art.rb
|
140
|
+
- lib/dragonfly_audio/processors/tag.rb
|
145
141
|
- lib/dragonfly_audio/version.rb
|
146
|
-
- samples/BroadmoorSirenTest.mp3
|
147
|
-
- test/dragonfly_audio/plugin_test.rb
|
148
|
-
- test/test_helper.rb
|
149
142
|
homepage: https://github.com/tomasc/dragonfly_audio
|
150
143
|
licenses:
|
151
144
|
- MIT
|
@@ -165,11 +158,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
158
|
- !ruby/object:Gem::Version
|
166
159
|
version: '0'
|
167
160
|
requirements: []
|
168
|
-
|
169
|
-
rubygems_version: 2.4.8
|
161
|
+
rubygems_version: 3.1.2
|
170
162
|
signing_key:
|
171
163
|
specification_version: 4
|
172
164
|
summary: Wraps common audio-related tasks into Dragonfly analysers and processors.
|
173
|
-
test_files:
|
174
|
-
- test/dragonfly_audio/plugin_test.rb
|
175
|
-
- test/test_helper.rb
|
165
|
+
test_files: []
|
data/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
.DS_Store
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
dragonfly_audio (0.0.1)
|
5
|
-
dragonfly (~> 1.0)
|
6
|
-
taglib-ruby
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: https://rubygems.org/
|
10
|
-
specs:
|
11
|
-
addressable (2.3.8)
|
12
|
-
coderay (1.1.0)
|
13
|
-
dragonfly (1.0.12)
|
14
|
-
addressable (~> 2.3)
|
15
|
-
multi_json (~> 1.0)
|
16
|
-
rack (>= 1.3.0)
|
17
|
-
ffi (1.9.10)
|
18
|
-
formatador (0.2.5)
|
19
|
-
guard (2.13.0)
|
20
|
-
formatador (>= 0.2.4)
|
21
|
-
listen (>= 2.7, <= 4.0)
|
22
|
-
lumberjack (~> 1.0)
|
23
|
-
nenv (~> 0.1)
|
24
|
-
notiffany (~> 0.0)
|
25
|
-
pry (>= 0.9.12)
|
26
|
-
shellany (~> 0.0)
|
27
|
-
thor (>= 0.18.1)
|
28
|
-
guard-compat (1.2.1)
|
29
|
-
guard-minitest (2.4.4)
|
30
|
-
guard-compat (~> 1.2)
|
31
|
-
minitest (>= 3.0)
|
32
|
-
listen (3.0.3)
|
33
|
-
rb-fsevent (>= 0.9.3)
|
34
|
-
rb-inotify (>= 0.9)
|
35
|
-
lumberjack (1.0.9)
|
36
|
-
method_source (0.8.2)
|
37
|
-
mini_portile (0.6.2)
|
38
|
-
minitest (5.8.1)
|
39
|
-
multi_json (1.11.2)
|
40
|
-
nenv (0.2.0)
|
41
|
-
nokogiri (1.6.6.2)
|
42
|
-
mini_portile (~> 0.6.0)
|
43
|
-
notiffany (0.0.8)
|
44
|
-
nenv (~> 0.1)
|
45
|
-
shellany (~> 0.0)
|
46
|
-
pry (0.10.2)
|
47
|
-
coderay (~> 1.1.0)
|
48
|
-
method_source (~> 0.8.1)
|
49
|
-
slop (~> 3.4)
|
50
|
-
rack (1.6.4)
|
51
|
-
rake (10.4.2)
|
52
|
-
rb-fsevent (0.9.6)
|
53
|
-
rb-inotify (0.9.5)
|
54
|
-
ffi (>= 0.5.0)
|
55
|
-
shellany (0.0.1)
|
56
|
-
slop (3.6.0)
|
57
|
-
taglib-ruby (0.7.0)
|
58
|
-
thor (0.19.1)
|
59
|
-
|
60
|
-
PLATFORMS
|
61
|
-
ruby
|
62
|
-
|
63
|
-
DEPENDENCIES
|
64
|
-
bundler (~> 1.6)
|
65
|
-
dragonfly_audio!
|
66
|
-
guard
|
67
|
-
guard-minitest
|
68
|
-
minitest
|
69
|
-
nokogiri
|
70
|
-
rake
|
data/Guardfile
DELETED
data/LICENSE.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
Copyright (c) 2014 Tomas Celizna
|
2
|
-
|
3
|
-
MIT License
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
DELETED
data/dragonfly_audio.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'dragonfly_audio/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "dragonfly_audio"
|
8
|
-
spec.version = DragonflyAudio::VERSION
|
9
|
-
spec.authors = ["Tomas Celizna", "Asger Behncke Jacobsen"]
|
10
|
-
spec.email = ["tomas.celizna@gmail.com", "asger@8kilo.com"]
|
11
|
-
spec.summary = %q{Wraps common audio-related tasks into Dragonfly analysers and processors.}
|
12
|
-
spec.homepage = "https://github.com/tomasc/dragonfly_audio"
|
13
|
-
spec.license = "MIT"
|
14
|
-
|
15
|
-
spec.files = `git ls-files -z`.split("\x0")
|
16
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
-
spec.require_paths = ["lib"]
|
19
|
-
|
20
|
-
spec.add_dependency "dragonfly", "~> 1.0"
|
21
|
-
spec.add_dependency "taglib-ruby"
|
22
|
-
|
23
|
-
spec.add_development_dependency "bundler", "~> 1.6"
|
24
|
-
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "nokogiri"
|
26
|
-
spec.add_development_dependency "guard"
|
27
|
-
spec.add_development_dependency "guard-minitest"
|
28
|
-
spec.add_development_dependency "minitest"
|
29
|
-
end
|
Binary file
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module DragonflyAudio
|
4
|
-
describe Plugin do
|
5
|
-
|
6
|
-
let(:app) { test_app.configure_with(:audio) }
|
7
|
-
let(:audio) { app.fetch_file(SAMPLES_DIR.join('BroadmoorSirenTest.mp3')) }
|
8
|
-
|
9
|
-
# ---------------------------------------------------------------------
|
10
|
-
|
11
|
-
describe 'analysers' do
|
12
|
-
it 'adds #audio_properties' do
|
13
|
-
audio.must_respond_to :audio_properties
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require 'bundler/setup'
|
2
|
-
|
3
|
-
require 'minitest'
|
4
|
-
require 'minitest/autorun'
|
5
|
-
require 'minitest/spec'
|
6
|
-
|
7
|
-
require 'dragonfly'
|
8
|
-
require 'dragonfly_audio'
|
9
|
-
|
10
|
-
# ---------------------------------------------------------------------
|
11
|
-
|
12
|
-
SAMPLES_DIR = Pathname.new(File.expand_path('../../samples', __FILE__))
|
13
|
-
|
14
|
-
# ---------------------------------------------------------------------
|
15
|
-
|
16
|
-
def test_app name=nil
|
17
|
-
app = Dragonfly::App.instance(name)
|
18
|
-
app.datastore = Dragonfly::MemoryDataStore.new
|
19
|
-
app.secret = "test secret"
|
20
|
-
app
|
21
|
-
end
|