jxl-muq 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README.markdown +1 -1
  2. data/lib/muq.rb +6 -1
  3. data/muq.gemspec +1 -1
  4. metadata +2 -2
data/README.markdown CHANGED
@@ -17,7 +17,7 @@ Upload every mp3 in the current directory to Larry's existing account.
17
17
  Upload mp3s and set banner, caption and color.
18
18
 
19
19
  ### Download examples
20
- `muq dn hiphop` or `mux dn http://hiphop.muxtape.com/`
20
+ `muq dn hiphop` or `muq dn http://hiphop.muxtape.com/`
21
21
  Download a single tape.
22
22
 
23
23
  `muq dn hip,hop,rap,rnb`
data/lib/muq.rb CHANGED
@@ -58,7 +58,7 @@ class Muq
58
58
  # check if the queue is within the limits
59
59
  def check_queue(queue)
60
60
  amount = queue.size
61
- raise TooManyFiles, "Too many files. (#{amount})" unless amount < 12
61
+ raise TooManyFiles, "Too many files. (#{amount})" unless amount <= 12
62
62
  queue.each do |file|
63
63
  raise FileTooLarge, "#{File.basename(file)} is too large." unless filesize_ok?(file)
64
64
  end
@@ -121,6 +121,7 @@ class Muq
121
121
  @c.http_post(Curl::PostField.file('file', file))
122
122
  @c.multipart_form_post = false
123
123
  raise InvalidUpload, "Can't handle encoding." unless valid_upload?
124
+ raise AmazonTrouble, "Couldn't upload to S3." unless s3_ok?
124
125
  end
125
126
 
126
127
  # file download
@@ -243,6 +244,10 @@ class Muq
243
244
  cant_find(/Try it one more time, if it fails again/)
244
245
  end
245
246
 
247
+ def s3_ok?
248
+ cant_find(/[cC]ouldn.t upload to S3/)
249
+ end
250
+
246
251
  # random-fu
247
252
  def rnd_size(from=1, to=10)
248
253
  (from + rand * to).floor
data/muq.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "muq"
3
- s.version = "0.0.2"
3
+ s.version = "0.0.3"
4
4
  s.summary = "Muxtape.com CLI"
5
5
  s.description = "Command line interface for Muxtape."
6
6
  s.author = "Ron Damen"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jxl-muq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Damen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-04-28 00:00:00 -07:00
12
+ date: 2008-04-29 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency