audiothority 0.1.0

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.
@@ -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