streamio-cli 0.6.0 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.7.0 2012-11-23
2
+
3
+ * Added automatic retry to download timeouts
4
+ * Improved error / success messages
5
+
1
6
  ## 0.6.0 2012-11-07
2
7
 
3
8
  * Fix writing to binary file on Windows
data/README.md CHANGED
@@ -4,7 +4,7 @@ A gem for interacting with Streamio through the command line.
4
4
 
5
5
  ## Installation
6
6
 
7
- gem install streamio-exporter
7
+ gem install streamio-cli
8
8
 
9
9
  ## Usage
10
10
 
@@ -1,5 +1,5 @@
1
1
  module Streamio
2
2
  module CLI
3
- VERSION = "0.6.0"
3
+ VERSION = "0.7.0"
4
4
  end
5
5
  end
data/lib/streamio-cli.rb CHANGED
@@ -19,6 +19,11 @@ module Streamio::CLI
19
19
  configure_streamio_gem
20
20
  download_videos
21
21
  download_audios
22
+ puts "\nAll files successfully downloaded!"
23
+ rescue RestClient::Unauthorized
24
+ puts "[ERROR]"
25
+ puts "Wrong username or password, please double check that the credentials provided are the same as on your API page on streamio.com."
26
+ exit
22
27
  rescue SocketError
23
28
  puts "[ERROR]"
24
29
  puts "Could not connect to the internet, please check your connection and try again."
@@ -121,10 +126,14 @@ module Streamio::CLI
121
126
  end
122
127
  end
123
128
  end
124
- rescue SlowDownloadError
129
+ rescue SlowDownloadError, Timeout::Error => e
125
130
  http.finish if http.started?
126
131
  progress_bar.stop
127
- puts " Slow download detected - retrying!"
132
+ if e.class == SlowDownloadError
133
+ puts " Slow download detected - retrying!"
134
+ else
135
+ puts " Download timed out - retrying!"
136
+ end
128
137
  retry
129
138
  end
130
139
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: streamio-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.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-11-07 00:00:00.000000000 Z
12
+ date: 2012-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: streamio
@@ -103,7 +103,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  segments:
105
105
  - 0
106
- hash: -4078630850951257756
106
+ hash: -597989074970866084
107
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  none: false
109
109
  requirements:
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  segments:
114
114
  - 0
115
- hash: -4078630850951257756
115
+ hash: -597989074970866084
116
116
  requirements: []
117
117
  rubyforge_project:
118
118
  rubygems_version: 1.8.24