cuesnap 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +11 -1
- data/lib/cuesnap/cli.rb +15 -0
- data/lib/cuesnap/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -59,6 +59,16 @@ _Tested on Mac OS X 10.7 (Lion)._
|
|
59
59
|
|
60
60
|
## Changelog
|
61
61
|
|
62
|
+
### 1.2.0
|
63
|
+
|
64
|
+
**Features**
|
65
|
+
|
66
|
+
* Now showing error when mp3splt is missing.
|
67
|
+
|
68
|
+
**Bug Fixes**
|
69
|
+
|
70
|
+
* Extra requires added for Ruby 1.8.7.
|
71
|
+
|
62
72
|
### 1.1.1
|
63
73
|
|
64
74
|
* Now properly escaping shell characters found in file names
|
@@ -66,7 +76,7 @@ _Tested on Mac OS X 10.7 (Lion)._
|
|
66
76
|
## Todo
|
67
77
|
|
68
78
|
1. Unicode Support _Fail test is already in_.
|
69
|
-
1. Error Message when mp3splt is missing.
|
79
|
+
1. -Error Message when mp3splt is missing. (Thanks goni)-
|
70
80
|
|
71
81
|
## Contributing
|
72
82
|
|
data/lib/cuesnap/cli.rb
CHANGED
@@ -10,6 +10,11 @@ module CueSnap
|
|
10
10
|
# no-numbers comes in false when it's set, I know, crazy.
|
11
11
|
options[:no_numbers] = !options[:'no-numbers'] if options.has_key?(:'no-numbers')
|
12
12
|
|
13
|
+
# Check if mp3splt is accessible else exit
|
14
|
+
if (!command_accessible?('mp3splt'))
|
15
|
+
exit_now! "I looked for mp3splt but couldn't find it. Perhaps you need to install it."
|
16
|
+
end
|
17
|
+
|
13
18
|
begin
|
14
19
|
splitter = CueSnap::Splitter.new(mp3_file, cue_file, options)
|
15
20
|
rescue FileNotFound => e
|
@@ -40,5 +45,15 @@ module CueSnap
|
|
40
45
|
def self.file_not_found(file)
|
41
46
|
help_now! "I looked for #{file}, but didn't find it."
|
42
47
|
end
|
48
|
+
|
49
|
+
def self.command_accessible?(cmd)
|
50
|
+
ENV['PATH'].split(':').each do |folder|
|
51
|
+
exists = File.exists?(folder + '/' + cmd)
|
52
|
+
exec = File.executable?(folder + '/' + cmd) if exists
|
53
|
+
return true if exec
|
54
|
+
end
|
55
|
+
return false;
|
56
|
+
end
|
57
|
+
|
43
58
|
end
|
44
59
|
end
|
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.
|
4
|
+
version: 1.2.0
|
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-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rubycue
|