heywatch 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/heywatch.rb +3 -5
  2. metadata +3 -3
@@ -6,7 +6,7 @@ class HeyWatch
6
6
  class BadRequest < RuntimeError; end
7
7
 
8
8
  URL = ENV["HEYWATCH_URL"] || "https://heywatch.com"
9
- VERSION = "1.1.1"
9
+ VERSION = "1.2.1"
10
10
 
11
11
  attr_reader :credits_left
12
12
 
@@ -89,9 +89,7 @@ class HeyWatch
89
89
  raise InvalidResource, "Can't retrieve '#{resource}'"
90
90
  end
91
91
 
92
- req("/#{resource}/#{id}.bin", :head) do |res, req|
93
- return res.headers[:location]
94
- end
92
+ info(resource, id)["url"]
95
93
  end
96
94
 
97
95
  # Generate thumbnails in the foreground or background via :async => true
@@ -175,7 +173,7 @@ class HeyWatch
175
173
 
176
174
  def singularize_resource_in_path(path)
177
175
  s_path = path.split("/")
178
- if s_path[1][-1..-1] == "s"
176
+ if s_path[1] != "hls" && s_path[1][-1..-1] == "s"
179
177
  s_path[1] = s_path[1].slice(0..-2)
180
178
  end
181
179
  return s_path.join("/")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 0
9
- version: 1.2.0
8
+ - 1
9
+ version: 1.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Bruno Celeste
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-11-08 00:00:00 +01:00
17
+ date: 2013-02-12 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency