flac2mp3 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/History.txt +7 -2
- data/lib/flac2mp3.rb +39 -37
- data/lib/flac2mp3/version.rb +1 -1
- data/spec/flac2mp3_command_spec.rb +20 -20
- data/spec/flac2mp3_spec.rb +161 -161
- data/spec/metaflac2mp3_command_spec.rb +7 -7
- metadata +84 -103
- data/Manifest.txt +0 -22
- data/README.txt +0 -60
- data/Rakefile +0 -4
- data/config/hoe.rb +0 -80
- data/config/requirements.rb +0 -17
- data/log/debug.log +0 -0
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/setup.rb +0 -1585
- data/tasks/deployment.rake +0 -34
- data/tasks/environment.rake +0 -7
- data/tasks/website.rake +0 -9
@@ -8,34 +8,34 @@ describe 'metaflac2mp3 command' do
|
|
8
8
|
rescue SystemExit
|
9
9
|
end
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
before do
|
13
13
|
Flac2mp3.stub!(:convert_metadata)
|
14
|
-
|
14
|
+
|
15
15
|
[:ARGV, :OPTIONS, :MANDATORY_OPTIONS].each do |const|
|
16
16
|
Object.send(:remove_const, const) if Object.const_defined?(const)
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
@infile = 'blah.flac'
|
20
20
|
@outfile = 'something.mp3'
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
it 'should exist' do
|
24
24
|
lambda { run_command(@infile, @outfile) }.should.not.raise(Errno::ENOENT)
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
it 'should require two filenames' do
|
28
28
|
self.should.receive(:puts) do |output|
|
29
29
|
output.should.match(/usage.+filename/i)
|
30
30
|
end
|
31
31
|
run_command(@infile)
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
it 'should pass the filenames to Flac2mp3 for metadata conversion' do
|
35
35
|
Flac2mp3.should.receive(:convert_metadata).with(@infile, @outfile)
|
36
36
|
run_command(@infile, @outfile)
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
it 'should not attempt to convert any files' do
|
40
40
|
Flac2mp3.should.receive(:convert).never
|
41
41
|
run_command(@infile, @outfile)
|
metadata
CHANGED
@@ -1,130 +1,111 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: flac2mp3
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Yossef Mendelssohn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
dependencies:
|
15
|
-
- !ruby/object:Gem::Dependency
|
16
|
-
name: flacinfo-rb
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: "0.4"
|
24
|
-
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: ruby-mp3info
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 0.5.1
|
34
|
-
version:
|
35
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-04-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
36
14
|
name: bacon
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.1.0
|
37
20
|
type: :development
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
43
26
|
version: 1.1.0
|
44
|
-
|
45
|
-
- !ruby/object:Gem::Dependency
|
27
|
+
- !ruby/object:Gem::Dependency
|
46
28
|
name: facon
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.0
|
47
34
|
type: :development
|
48
|
-
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
-
requirements:
|
51
|
-
- -
|
52
|
-
- !ruby/object:Gem::Version
|
53
|
-
version: 0.
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.5.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: flacinfo-rb
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.4'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.4'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: ruby-mp3info
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.5.1
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.5.1
|
69
|
+
description: A simple converter for FLAC to MP3.
|
70
|
+
email:
|
71
|
+
- ymendel@pobox.com
|
72
|
+
executables:
|
68
73
|
- flac2mp3
|
69
74
|
- metaflac2mp3
|
70
75
|
extensions: []
|
71
|
-
|
72
|
-
|
73
|
-
- History.txt
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
74
78
|
- License.txt
|
75
|
-
- Manifest.txt
|
76
|
-
- README.txt
|
77
|
-
files:
|
78
79
|
- History.txt
|
79
|
-
- License.txt
|
80
|
-
- Manifest.txt
|
81
|
-
- README.txt
|
82
|
-
- Rakefile
|
83
|
-
- bin/flac2mp3
|
84
|
-
- bin/metaflac2mp3
|
85
|
-
- config/hoe.rb
|
86
|
-
- config/requirements.rb
|
87
|
-
- lib/flac2mp3.rb
|
88
80
|
- lib/flac2mp3/version.rb
|
89
|
-
-
|
90
|
-
- script/destroy
|
91
|
-
- script/generate
|
92
|
-
- setup.rb
|
81
|
+
- lib/flac2mp3.rb
|
93
82
|
- spec/flac2mp3_command_spec.rb
|
94
83
|
- spec/flac2mp3_spec.rb
|
95
84
|
- spec/metaflac2mp3_command_spec.rb
|
96
85
|
- spec/spec_helper.rb
|
97
|
-
-
|
98
|
-
-
|
99
|
-
|
100
|
-
has_rdoc: true
|
101
|
-
homepage: http://yomendel.rubyforge.org
|
86
|
+
- bin/flac2mp3
|
87
|
+
- bin/metaflac2mp3
|
88
|
+
homepage: http://github.com/ymendel/one_inch_punch/
|
102
89
|
licenses: []
|
103
|
-
|
90
|
+
metadata: {}
|
104
91
|
post_install_message:
|
105
|
-
rdoc_options:
|
106
|
-
|
107
|
-
- README.txt
|
108
|
-
require_paths:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
109
94
|
- lib
|
110
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
-
requirements:
|
112
|
-
- -
|
113
|
-
- !ruby/object:Gem::Version
|
114
|
-
version:
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
version: "0"
|
121
|
-
version:
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
122
105
|
requirements: []
|
123
|
-
|
124
|
-
|
125
|
-
rubygems_version: 1.3.5
|
106
|
+
rubyforge_project:
|
107
|
+
rubygems_version: 2.0.3
|
126
108
|
signing_key:
|
127
|
-
specification_version:
|
128
|
-
summary:
|
109
|
+
specification_version: 4
|
110
|
+
summary: convert FLAC to MP3
|
129
111
|
test_files: []
|
130
|
-
|
data/Manifest.txt
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
History.txt
|
2
|
-
License.txt
|
3
|
-
Manifest.txt
|
4
|
-
README.txt
|
5
|
-
Rakefile
|
6
|
-
bin/flac2mp3
|
7
|
-
bin/metaflac2mp3
|
8
|
-
config/hoe.rb
|
9
|
-
config/requirements.rb
|
10
|
-
lib/flac2mp3.rb
|
11
|
-
lib/flac2mp3/version.rb
|
12
|
-
log/debug.log
|
13
|
-
script/destroy
|
14
|
-
script/generate
|
15
|
-
setup.rb
|
16
|
-
spec/flac2mp3_command_spec.rb
|
17
|
-
spec/flac2mp3_spec.rb
|
18
|
-
spec/metaflac2mp3_command_spec.rb
|
19
|
-
spec/spec_helper.rb
|
20
|
-
tasks/deployment.rake
|
21
|
-
tasks/environment.rake
|
22
|
-
tasks/website.rake
|
data/README.txt
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
= flac2mp3
|
2
|
-
|
3
|
-
== DESCRIPTION:
|
4
|
-
|
5
|
-
flac2mp3 is meant to, as the name implies, convert FLAC files to MP3 files
|
6
|
-
|
7
|
-
== FEATURES/PROBLEMS:
|
8
|
-
|
9
|
-
* Will convert a file from FLAC to MP3 format, natch.
|
10
|
-
* Not *only* is the song data converted, but so is the metadata!
|
11
|
-
* Options:
|
12
|
-
* silent running
|
13
|
-
* delete the FLAC after conversion
|
14
|
-
* MP3 encoding (defaults to --preset standard)
|
15
|
-
* Reads options from YAML config file, ~/.flac2mp3
|
16
|
-
|
17
|
-
Currently operates on one file at a time. To convert more, try something like
|
18
|
-
|
19
|
-
for f in *.flac; do flac2mp3 "$f"; done
|
20
|
-
|
21
|
-
or
|
22
|
-
|
23
|
-
find . -name '*.flac' -exec flac2mp3 {} \;
|
24
|
-
|
25
|
-
If neither of those commands will work for you, try using a different OS.
|
26
|
-
|
27
|
-
== SYNOPSIS:
|
28
|
-
|
29
|
-
$ flac2mp3 flac_filename
|
30
|
-
$ flac2mp3 flac_filename --silent
|
31
|
-
$ flac2mp3 --meta flac_filename mp3_filename
|
32
|
-
(or)
|
33
|
-
$ metaflac2mp3 flac_filename mp3_filename
|
34
|
-
|
35
|
-
or, if you insist
|
36
|
-
|
37
|
-
require 'flac2mp3'
|
38
|
-
|
39
|
-
Flac2mp3.convert(flac_filename)
|
40
|
-
Flac2mp3.convert(flac_filename, :silent => true)
|
41
|
-
Flac2mp3.convert_metadata(flac_filename, mp3_filename)
|
42
|
-
|
43
|
-
|
44
|
-
== REQUIREMENTS:
|
45
|
-
|
46
|
-
* flac, the binary
|
47
|
-
* lame, the binary
|
48
|
-
* flacinfo-rb, the gem
|
49
|
-
* ruby-mp3info, the gem
|
50
|
-
* ruby, the interpreter
|
51
|
-
|
52
|
-
== INSTALL:
|
53
|
-
|
54
|
-
* gem install flac2mp3
|
55
|
-
|
56
|
-
== THANKS:
|
57
|
-
|
58
|
-
* Rich Lafferty, for turning me on to the wonderful idea of keeping everything in FLAC format
|
59
|
-
* Apple, for having a bunch of little-i, capital-letter products that don't like FLAC format
|
60
|
-
* Robin Bowes, for flac2mp3.pl, which annoyed me enough to get me to write this
|
data/Rakefile
DELETED
data/config/hoe.rb
DELETED
@@ -1,80 +0,0 @@
|
|
1
|
-
require 'flac2mp3/version'
|
2
|
-
|
3
|
-
AUTHOR = 'Yossef Mendelssohn' # can also be an array of Authors
|
4
|
-
EMAIL = 'ymendel@pobox.com'
|
5
|
-
DESCRIPTION = 'converter for FLAC to MP3'
|
6
|
-
GEM_NAME = 'flac2mp3' # what ppl will type to install your gem
|
7
|
-
RUBYFORGE_PROJECT = 'yomendel' # The unix name for your project
|
8
|
-
HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
|
9
|
-
DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
|
10
|
-
EXTRA_DEPENDENCIES = [
|
11
|
-
['flacinfo-rb', '>= 0.4'],
|
12
|
-
['ruby-mp3info', '>= 0.5.1']
|
13
|
-
] # An array of rubygem dependencies [name, version]
|
14
|
-
EXTRA_DEV_DEPENDENCIES = [
|
15
|
-
['bacon', '>= 1.1.0'],
|
16
|
-
['facon', '>= 0.4.1']
|
17
|
-
] # An array of rubygem dependencies [name, version]
|
18
|
-
|
19
|
-
@config_file = "~/.rubyforge/user-config.yml"
|
20
|
-
@config = nil
|
21
|
-
RUBYFORGE_USERNAME = "unknown"
|
22
|
-
def rubyforge_username
|
23
|
-
unless @config
|
24
|
-
begin
|
25
|
-
@config = YAML.load(File.read(File.expand_path(@config_file)))
|
26
|
-
rescue
|
27
|
-
puts <<-EOS
|
28
|
-
ERROR: No rubyforge config file found: #{@config_file}
|
29
|
-
Run 'rubyforge setup' to prepare your env for access to Rubyforge
|
30
|
-
- See http://newgem.rubyforge.org/rubyforge.html for more details
|
31
|
-
EOS
|
32
|
-
exit
|
33
|
-
end
|
34
|
-
end
|
35
|
-
RUBYFORGE_USERNAME.replace @config["username"]
|
36
|
-
end
|
37
|
-
|
38
|
-
|
39
|
-
REV = nil
|
40
|
-
# UNCOMMENT IF REQUIRED:
|
41
|
-
# REV = `svn info`.each {|line| if line =~ /^Revision:/ then k,v = line.split(': '); break v.chomp; else next; end} rescue nil
|
42
|
-
VERS = Flac2mp3::VERSION::STRING + (REV ? ".#{REV}" : "")
|
43
|
-
RDOC_OPTS = ['--quiet', '--title', 'flac2mp3 documentation',
|
44
|
-
"--opname", "index.html",
|
45
|
-
"--line-numbers",
|
46
|
-
"--main", "README",
|
47
|
-
"--inline-source"]
|
48
|
-
|
49
|
-
class Hoe
|
50
|
-
def extra_deps
|
51
|
-
@extra_deps.reject! { |x| Array(x).first == 'hoe' }
|
52
|
-
@extra_deps
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
# Generate all the Rake tasks
|
57
|
-
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
58
|
-
hoe = Hoe.new(GEM_NAME, VERS) do |p|
|
59
|
-
p.author = AUTHOR
|
60
|
-
p.description = DESCRIPTION
|
61
|
-
p.email = EMAIL
|
62
|
-
p.summary = DESCRIPTION
|
63
|
-
p.url = HOMEPATH
|
64
|
-
p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
|
65
|
-
p.test_globs = ["test/**/test_*.rb"]
|
66
|
-
p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
|
67
|
-
|
68
|
-
# == Optional
|
69
|
-
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
70
|
-
p.extra_deps = EXTRA_DEPENDENCIES
|
71
|
-
p.extra_dev_deps = EXTRA_DEV_DEPENDENCIES
|
72
|
-
|
73
|
-
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
|
74
|
-
|
75
|
-
end
|
76
|
-
|
77
|
-
CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
|
78
|
-
PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
|
79
|
-
hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
|
80
|
-
hoe.rsync_args = '-av --delete --ignore-errors'
|
data/config/requirements.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'fileutils'
|
2
|
-
include FileUtils
|
3
|
-
|
4
|
-
require 'rubygems'
|
5
|
-
%w[rake hoe newgem rubigen].each do |req_gem|
|
6
|
-
begin
|
7
|
-
require req_gem
|
8
|
-
rescue LoadError
|
9
|
-
puts "This Rakefile requires the '#{req_gem}' RubyGem."
|
10
|
-
puts "Installation: gem install #{req_gem} -y"
|
11
|
-
exit
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
$:.unshift(File.join(File.dirname(__FILE__), %w[.. lib]))
|
16
|
-
|
17
|
-
require 'flac2mp3'
|
data/log/debug.log
DELETED
File without changes
|