audiothority 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.md +30 -0
- data/bin/audiothorian +8 -0
- data/lib/audiothority.rb +18 -0
- data/lib/audiothority/change.rb +68 -0
- data/lib/audiothority/cli.rb +82 -0
- data/lib/audiothority/crawler.rb +30 -0
- data/lib/audiothority/custodian.rb +26 -0
- data/lib/audiothority/enforcer.rb +60 -0
- data/lib/audiothority/extract.rb +30 -0
- data/lib/audiothority/inspector.rb +31 -0
- data/lib/audiothority/society.rb +18 -0
- data/lib/audiothority/summary.rb +32 -0
- data/lib/audiothority/tracker.rb +17 -0
- data/lib/audiothority/validation.rb +33 -0
- data/lib/audiothority/validators.rb +15 -0
- data/lib/audiothority/validators/album.rb +11 -0
- data/lib/audiothority/validators/artist.rb +11 -0
- data/lib/audiothority/validators/track.rb +16 -0
- data/lib/audiothority/validators/unique.rb +22 -0
- data/lib/audiothority/validators/year.rb +11 -0
- data/lib/audiothority/version.rb +5 -0
- data/spec/audiothority/crawler_spec.rb +62 -0
- data/spec/audiothority/custodian_spec.rb +62 -0
- data/spec/audiothority/extract_spec.rb +126 -0
- data/spec/audiothority/inspector_spec.rb +72 -0
- data/spec/audiothority/society_spec.rb +27 -0
- data/spec/audiothority/tracker_spec.rb +34 -0
- data/spec/audiothority/validators_spec.rb +134 -0
- data/spec/integration/enforce_integration_spec.rb +91 -0
- data/spec/integration/scan_integration_spec.rb +95 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/support/cli_setup.rb +47 -0
- data/spec/support/interactive.rb +30 -0
- metadata +119 -0
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'tempfile'
|
4
|
+
|
5
|
+
|
6
|
+
module InteractiveSupport
|
7
|
+
def interactive(input, &block)
|
8
|
+
actual_stdin = $stdin
|
9
|
+
new_stdin = Tempfile.new('audiothority-stdin')
|
10
|
+
new_stdin.puts(input.shift) until input.empty?
|
11
|
+
new_stdin.rewind
|
12
|
+
$stdin.reopen(new_stdin)
|
13
|
+
block.call
|
14
|
+
ensure
|
15
|
+
$stdin.reopen(actual_stdin)
|
16
|
+
new_stdin.close
|
17
|
+
new_stdin.unlink
|
18
|
+
end
|
19
|
+
|
20
|
+
def tags_from(dir)
|
21
|
+
file_refs = Dir[%(#{dir}/*)].map { |p| TagLib::FileRef.new(p) }
|
22
|
+
yield file_refs.map(&:tag)
|
23
|
+
ensure
|
24
|
+
file_refs.each(&:close) if file_refs
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
RSpec.configure do |config|
|
29
|
+
config.include(InteractiveSupport)
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: audiothority
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mathias Söderberg
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: taglib-ruby
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.19'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.19'
|
41
|
+
description: Small utility for finding inconsistencies among audio files organized
|
42
|
+
in "album" directories
|
43
|
+
email: mths@sdrbrg.se
|
44
|
+
executables:
|
45
|
+
- audiothorian
|
46
|
+
extensions: []
|
47
|
+
extra_rdoc_files: []
|
48
|
+
files:
|
49
|
+
- LICENSE
|
50
|
+
- README.md
|
51
|
+
- bin/audiothorian
|
52
|
+
- lib/audiothority.rb
|
53
|
+
- lib/audiothority/change.rb
|
54
|
+
- lib/audiothority/cli.rb
|
55
|
+
- lib/audiothority/crawler.rb
|
56
|
+
- lib/audiothority/custodian.rb
|
57
|
+
- lib/audiothority/enforcer.rb
|
58
|
+
- lib/audiothority/extract.rb
|
59
|
+
- lib/audiothority/inspector.rb
|
60
|
+
- lib/audiothority/society.rb
|
61
|
+
- lib/audiothority/summary.rb
|
62
|
+
- lib/audiothority/tracker.rb
|
63
|
+
- lib/audiothority/validation.rb
|
64
|
+
- lib/audiothority/validators.rb
|
65
|
+
- lib/audiothority/validators/album.rb
|
66
|
+
- lib/audiothority/validators/artist.rb
|
67
|
+
- lib/audiothority/validators/track.rb
|
68
|
+
- lib/audiothority/validators/unique.rb
|
69
|
+
- lib/audiothority/validators/year.rb
|
70
|
+
- lib/audiothority/version.rb
|
71
|
+
- spec/audiothority/crawler_spec.rb
|
72
|
+
- spec/audiothority/custodian_spec.rb
|
73
|
+
- spec/audiothority/extract_spec.rb
|
74
|
+
- spec/audiothority/inspector_spec.rb
|
75
|
+
- spec/audiothority/society_spec.rb
|
76
|
+
- spec/audiothority/tracker_spec.rb
|
77
|
+
- spec/audiothority/validators_spec.rb
|
78
|
+
- spec/integration/enforce_integration_spec.rb
|
79
|
+
- spec/integration/scan_integration_spec.rb
|
80
|
+
- spec/spec_helper.rb
|
81
|
+
- spec/support/cli_setup.rb
|
82
|
+
- spec/support/interactive.rb
|
83
|
+
homepage: https://github.com/mthssdrbrg/audiothority
|
84
|
+
licenses:
|
85
|
+
- MIT
|
86
|
+
metadata: {}
|
87
|
+
post_install_message:
|
88
|
+
rdoc_options: []
|
89
|
+
require_paths:
|
90
|
+
- lib
|
91
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 1.9.3
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
requirements: []
|
102
|
+
rubyforge_project:
|
103
|
+
rubygems_version: 2.2.2
|
104
|
+
signing_key:
|
105
|
+
specification_version: 4
|
106
|
+
summary: Find and organize inconsistencies in your music collection
|
107
|
+
test_files:
|
108
|
+
- spec/audiothority/crawler_spec.rb
|
109
|
+
- spec/audiothority/custodian_spec.rb
|
110
|
+
- spec/audiothority/extract_spec.rb
|
111
|
+
- spec/audiothority/inspector_spec.rb
|
112
|
+
- spec/audiothority/society_spec.rb
|
113
|
+
- spec/audiothority/tracker_spec.rb
|
114
|
+
- spec/audiothority/validators_spec.rb
|
115
|
+
- spec/integration/enforce_integration_spec.rb
|
116
|
+
- spec/integration/scan_integration_spec.rb
|
117
|
+
- spec/spec_helper.rb
|
118
|
+
- spec/support/cli_setup.rb
|
119
|
+
- spec/support/interactive.rb
|