cuesnap 1.2.4 → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -0
- data/lib/cuesnap/cli.rb +2 -0
- data/lib/cuesnap/splitter.rb +8 -0
- data/lib/cuesnap/version.rb +1 -1
- metadata +18 -2
data/README.md
CHANGED
data/lib/cuesnap/cli.rb
CHANGED
data/lib/cuesnap/splitter.rb
CHANGED
@@ -6,6 +6,11 @@ module CueSnap
|
|
6
6
|
class FileNotFound < StandardError; end
|
7
7
|
class MP3FileNotFound < FileNotFound; end
|
8
8
|
class CueFileNotFound < FileNotFound; end
|
9
|
+
class CueFileTooLarge < StandardError
|
10
|
+
def message
|
11
|
+
'Only cue files less than 1MB are allowed.'
|
12
|
+
end
|
13
|
+
end
|
9
14
|
|
10
15
|
class Splitter
|
11
16
|
attr_reader :mp3_file, :cue_file, :output_folder, :options
|
@@ -33,6 +38,9 @@ module CueSnap
|
|
33
38
|
|
34
39
|
raise CueSnap::CueFileNotFound, @cue_file unless File.exists? @cue_file
|
35
40
|
|
41
|
+
# If cue file is larger than 1MB, raise an error.
|
42
|
+
raise CueSnap::CueFileTooLarge if (File.size(@cue_file).to_f / 2**20) > 1
|
43
|
+
|
36
44
|
@options = Hashie::Mash.new options
|
37
45
|
@output_folder = @options.output_folder
|
38
46
|
@output_folder ||= mp3_filename
|
data/lib/cuesnap/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cuesnap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubycue
|
@@ -107,6 +107,22 @@ dependencies:
|
|
107
107
|
- - ~>
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: 0.5.0
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rb-fsevent
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.9.1
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ~>
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: 0.9.1
|
110
126
|
description: A Ruby wrapper around mp3splt that makes splitting mp3s with a cue file
|
111
127
|
super simple.
|
112
128
|
email:
|