cuesnap 1.0.1 → 1.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.
- data/README.md +3 -4
- data/bin/cuesnap +2 -0
- data/lib/cuesnap/cli.rb +2 -1
- data/lib/cuesnap/splitter.rb +13 -1
- data/lib/cuesnap/version.rb +1 -1
- metadata +18 -2
data/README.md
CHANGED
@@ -10,13 +10,13 @@ _Tested on Mac OS X 10.7 (Lion)._
|
|
10
10
|
|
11
11
|
**Prerequisites**
|
12
12
|
|
13
|
-
1. [
|
14
|
-
|
13
|
+
1. [Mac OS X](http://store.apple.com)
|
14
|
+
1. [Ruby 1.8.7 or Greater](http://ruby-lang.org/) _Comes pre-installed in OS X_
|
15
15
|
|
16
16
|
**Okay, let's go**
|
17
17
|
|
18
18
|
1. `brew install mp3splt` _Install the mp3 clipping lbrary, it does the heavy-lifting._
|
19
|
-
1. `gem install cuesnap` _The cuesnap command will now be available._
|
19
|
+
1. `sudo gem install cuesnap` _The cuesnap command will now be available._
|
20
20
|
1. `cuesnap phattrack.mp3 phattrack.cue` _*snap -- zzrgt -- crack*_
|
21
21
|
1. `open phattrack` _Gaze into the eyes of your slim mp3 files_
|
22
22
|
|
@@ -60,7 +60,6 @@ _Tested on Mac OS X 10.7 (Lion)._
|
|
60
60
|
|
61
61
|
1. Unicode Support _Fail test is already in_.
|
62
62
|
2. Error Message when mp3splt is missing.
|
63
|
-
3. Lower requirements to Ruby 1.8.7 (OS X built-in Ruby).
|
64
63
|
|
65
64
|
## Contributing
|
66
65
|
|
data/bin/cuesnap
CHANGED
data/lib/cuesnap/cli.rb
CHANGED
data/lib/cuesnap/splitter.rb
CHANGED
@@ -33,7 +33,19 @@ module CueSnap
|
|
33
33
|
# Returns nothing.
|
34
34
|
def parse_cue_file
|
35
35
|
file_contents = File.read @cue_file
|
36
|
-
|
36
|
+
|
37
|
+
# Try to fix unicode problems
|
38
|
+
# use iconv if on Ruby 1.8
|
39
|
+
# From: bit.ly/bGmrCnCOPY
|
40
|
+
require 'iconv' unless String.method_defined?(:encode)
|
41
|
+
if String.method_defined?(:encode)
|
42
|
+
file_contents.encode!('UTF-16', 'UTF-8', :invalid => :replace, :replace => '')
|
43
|
+
file_contents.encode!('UTF-8', 'UTF-16')
|
44
|
+
else
|
45
|
+
ic = Iconv.new('UTF-8', 'UTF-8//IGNORE')
|
46
|
+
file_contents = ic.iconv(file_contents)
|
47
|
+
end
|
48
|
+
|
37
49
|
@cuesheet = RubyCue::Cuesheet.new file_contents
|
38
50
|
@cuesheet.parse!
|
39
51
|
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.0
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 1.2.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: open4
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ~>
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.3.0
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.3.0
|
62
78
|
- !ruby/object:Gem::Dependency
|
63
79
|
name: minitest
|
64
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -119,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
119
135
|
requirements:
|
120
136
|
- - ! '>='
|
121
137
|
- !ruby/object:Gem::Version
|
122
|
-
version: 1.
|
138
|
+
version: 1.8.6
|
123
139
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
124
140
|
none: false
|
125
141
|
requirements:
|