mpeghelper 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -41,7 +41,7 @@ Essentially there are 3 (soon to be 4) methods, theres are...
41
41
 
42
42
  song = MpegHelper.mp4_to_mp3('1.m4a', '1.mp3', '192') input, output, bitrate
43
43
 
44
- song = MpegHelper.mp3('1.mp3', '2.mp3', '192', 'extracted-cover.jpg', [[50,50], [100,100], [200,200]]) input, output, bitrate, covername, sizes(an array of [width, height] arrays)
44
+ song = MpegHelper.mp4_to_mp3_artwork_output('1.mp3', '2.mp3', '192', 'extracted-cover.jpg', [[50,50], [100,100], [200,200]]) input, output, bitrate, covername, sizes(an array of [width, height] arrays)
45
45
 
46
46
  = Coming Soon
47
47
 
data/lib/mpeghelper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'mp3info'
2
2
  require 'mp4info'
3
- require 'rmagick'
3
+ require 'RMagick'
4
4
 
5
5
  class MpegHelper
6
6
 
data/mpeghelper.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{mpeghelper}
8
- s.version = "1.2.0"
8
+ s.version = "1.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alex Barlow"]
12
- s.date = %q{2009-10-01}
12
+ s.date = %q{2009-10-04}
13
13
  s.description = %q{RubyGem for converting, editing and striping mp3's and mp4's}
14
14
  s.email = %q{alexbarlowis@me.com}
15
15
  s.extra_rdoc_files = [
@@ -1,7 +1,81 @@
1
1
  require 'test_helper'
2
2
 
3
+ # => To do these tests you need three files, for obvious copyright reasons, Ill let you use your own!
4
+ # => You need;
5
+ # 1, 192kbps MP3(with artwork) -- 2, 320 kpbs MP3(with artwork) -- 3, 128KPBS or above MP4(with artwork)
6
+ #
7
+ #
8
+
3
9
  class MpeghelperTest < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
10
+
11
+ def test_mp3_192_handling
12
+
13
+ puts "Testing MP3 192 Handling(Should do nothing)...\n"
14
+
15
+ song = MpegHelper.mp3("1.mp3", "1.mp3", '192')
16
+
17
+ assert true
18
+
19
+ puts "MP3 192 Handling is fine!\n"
20
+
21
+ end
22
+
23
+ =begin
24
+ test "MP3 320 Handling" do
25
+
26
+ puts "Testing MP3 320 Handling(Should transform to 192)...\n"
27
+
28
+ FileUtils.cp "#{RAILS_ROOT}/test/fixtures/files/ahighermp3test.mp3", "#{$extracted}/ahighermp3test.mp3"
29
+
30
+ @mpeg = MpegHelper.mp3("ahighermp3test.mp3")
31
+
32
+ FileUtils.remove_file "#{$music}/#{@mpeg}.mp3"
33
+
34
+ assert true
35
+
36
+ puts "MP3 320 Handling is fine!\n"
37
+
38
+ end
39
+
40
+
41
+ test "MP4 Handling" do
42
+
43
+ puts "Testing MP4 Handling(Should make a 192 mp3)...\n"
44
+
45
+ FileUtils.cp "#{RAILS_ROOT}/test/fixtures/files/anmp4test.m4a", "#{$extracted}/anmp4test.m4a"
46
+
47
+ @mpeg = MpegHelper.mp4("anmp4test.m4a")
48
+
49
+ FileUtils.remove_file "#{$music}/#{@mpeg}.mp3"
50
+
51
+ FileUtils.remove_file "#{$covers}/original/#{@mpeg}.jpg"
52
+ FileUtils.remove_file "#{$covers}/medium/#{@mpeg}.jpg"
53
+ FileUtils.remove_file "#{$covers}/small/#{@mpeg}.jpg"
54
+
55
+ assert true
56
+
57
+ puts "MP4 Handling is fine!\n"
58
+
59
+ end
60
+
61
+ test "MP4 With Artwork Handling" do
62
+
63
+ puts "Testing MP4 Handling With Artwork...\n"
64
+
65
+ FileUtils.cp "#{RAILS_ROOT}/test/fixtures/files/anmp4test.m4a", "#{$extracted}/anmp4test.m4a"
66
+
67
+ @mpeg = MpegHelper.mp4("anmp4test.m4a")
68
+
69
+ FileUtils.remove_file "#{$music}/#{@mpeg}.mp3"
70
+
71
+ FileUtils.remove_file "#{$covers}/original/#{@mpeg}.jpg"
72
+ FileUtils.remove_file "#{$covers}/medium/#{@mpeg}.jpg"
73
+ FileUtils.remove_file "#{$covers}/small/#{@mpeg}.jpg"
74
+
75
+ assert true
76
+
77
+ puts "MP4 Handling is fine!\n"
78
+
79
+ =end
80
+
7
81
  end
data/test/test_helper.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'rubygems'
2
2
  require 'test/unit'
3
- require 'shoulda'
4
3
 
5
4
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
5
  $LOAD_PATH.unshift(File.dirname(__FILE__))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mpeghelper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Barlow
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-01 00:00:00 +01:00
12
+ date: 2009-10-04 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15