heywatch 1.2.7 → 1.2.8
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.
- checksums.yaml +4 -4
- data/bin/heywatch +7 -7
- data/lib/heywatch.rb +4 -4
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c17fc5449cb72029b803d8a8fa3ddd92bea21735
|
|
4
|
+
data.tar.gz: 0acf4d7ed1e1cff75939cf0ed79c8b9e8ace35bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f6a044e0ba5ff5c0bed2b0a55058b6a1e8b52a7efa8227c72e055eff204f5972f0dc2c0fb08326dfedb9f6cf4b36a0f5d207349463b99f7fa97e91357c1abc80
|
|
7
|
+
data.tar.gz: 330dd4a59b356e4d8326fc77770868d3e350771d48d76e756ee7c3fb9544fd35a65e7d7002582aed2fd99834a0bf3e1598185263456064274298c10a18b3eb8f
|
data/bin/heywatch
CHANGED
|
@@ -92,7 +92,7 @@ begin
|
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
if ARGV.size == 1 and ARGV[0] == "account"
|
|
95
|
-
puts
|
|
95
|
+
puts MultiJson.dump(hw.account, :pretty => true)
|
|
96
96
|
exit
|
|
97
97
|
end
|
|
98
98
|
|
|
@@ -111,7 +111,7 @@ begin
|
|
|
111
111
|
if resource == "upload"
|
|
112
112
|
path = ARGV[1]
|
|
113
113
|
params = Hash[*ARGV[2..-1].map{|p| k,v = p.split("=") }.flatten]
|
|
114
|
-
puts
|
|
114
|
+
puts MultiJson.dump(hw.upload(path, params), :pretty => true)
|
|
115
115
|
exit
|
|
116
116
|
end
|
|
117
117
|
|
|
@@ -119,7 +119,7 @@ begin
|
|
|
119
119
|
params = Hash[*ARGV[1..-1].map{|p| k,v = p.split("=") }.flatten]
|
|
120
120
|
|
|
121
121
|
if resource == "account"
|
|
122
|
-
puts
|
|
122
|
+
puts MultiJson.dump(HeyWatch.register(params), :pretty => true)
|
|
123
123
|
else
|
|
124
124
|
if resource == "robot/job" # read from STDIN
|
|
125
125
|
params = $stdin.read
|
|
@@ -129,7 +129,7 @@ begin
|
|
|
129
129
|
if res.empty?
|
|
130
130
|
puts "ok"
|
|
131
131
|
else
|
|
132
|
-
puts
|
|
132
|
+
puts MultiJson.dump(res, :pretty => true)
|
|
133
133
|
end
|
|
134
134
|
end
|
|
135
135
|
exit
|
|
@@ -161,7 +161,7 @@ begin
|
|
|
161
161
|
exit
|
|
162
162
|
end
|
|
163
163
|
|
|
164
|
-
puts
|
|
164
|
+
puts MultiJson.dump(res, :pretty => true)
|
|
165
165
|
exit
|
|
166
166
|
end
|
|
167
167
|
|
|
@@ -187,10 +187,10 @@ begin
|
|
|
187
187
|
|
|
188
188
|
res = res[offset] if offset
|
|
189
189
|
|
|
190
|
-
puts
|
|
190
|
+
puts MultiJson.dump(res, :pretty => true)
|
|
191
191
|
exit
|
|
192
192
|
|
|
193
193
|
rescue => e
|
|
194
194
|
puts e
|
|
195
195
|
puts e.backtrace.join("\n") if ENV["DEBUG"]
|
|
196
|
-
end
|
|
196
|
+
end
|
data/lib/heywatch.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require "rest-client"
|
|
2
|
-
require "
|
|
2
|
+
require "multi_json"
|
|
3
3
|
require "uri"
|
|
4
4
|
|
|
5
5
|
class HeyWatch
|
|
@@ -7,7 +7,7 @@ class HeyWatch
|
|
|
7
7
|
class BadRequest < RuntimeError; end
|
|
8
8
|
|
|
9
9
|
URL = ENV["HEYWATCH_URL"] || "https://heywatch.com"
|
|
10
|
-
VERSION = "1.2.
|
|
10
|
+
VERSION = "1.2.8"
|
|
11
11
|
|
|
12
12
|
attr_reader :credits_left
|
|
13
13
|
|
|
@@ -156,7 +156,7 @@ class HeyWatch
|
|
|
156
156
|
end
|
|
157
157
|
|
|
158
158
|
if(res.headers[:content_type] =~ /json/ && !res.to_s.strip.empty?)
|
|
159
|
-
return
|
|
159
|
+
return MultiJson.decode(res)
|
|
160
160
|
end
|
|
161
161
|
|
|
162
162
|
return res.to_s.strip
|
|
@@ -190,4 +190,4 @@ class HeyWatch
|
|
|
190
190
|
@credits_left = gb.to_f
|
|
191
191
|
end
|
|
192
192
|
end
|
|
193
|
-
end
|
|
193
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: heywatch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bruno Celeste
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|
|
@@ -25,19 +25,19 @@ dependencies:
|
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: multi_json
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ~>
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '0'
|
|
33
|
+
version: '1.0'
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
|
-
- -
|
|
38
|
+
- - ~>
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '0'
|
|
40
|
+
version: '1.0'
|
|
41
41
|
description: Client Library for encoding Videos with HeyWatch, a Video Encoding Web
|
|
42
42
|
Service.
|
|
43
43
|
email: bruno@particle-s.com
|