dm_cloud 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.1
1
+ 0.1.2
data/dm_cloud.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "dm_cloud"
8
- s.version = "0.1.1"
8
+ s.version = "0.1.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeremy Mortelette"]
@@ -8,9 +8,9 @@ require 'digest/md5'
8
8
  module DmCloud
9
9
  class Streaming
10
10
  # Default URL to get embed content ou direct url
11
- DIRECT_STREAM = "[PROTOCOL]://cdn.dmcloud.net/route/[USER_ID]/[MEDIA_ID]/[ASSET_NAME].[ASSET_EXTENSION]"
12
- EMBED_STREAM = "[PROTOCOL]://api.dmcloud.net/embed/[USER_ID]/[MEDIA_ID]"
13
- EMBED_IFRAME = '<iframe width="[WIDTH]" height="[HEIGHT]" frameborder="0" scrolling="no" src="[EMBED_URL]"></iframe>'
11
+ DIRECT_STREAM = "[PROTOCOL]://cdn.dmcloud.net/route/[USER_ID]/[MEDIA_ID]/[ASSET_NAME].[ASSET_EXTENSION]".freeze
12
+ EMBED_STREAM = "[PROTOCOL]://api.dmcloud.net/embed/[USER_ID]/[MEDIA_ID]".freeze
13
+ EMBED_IFRAME = '<iframe width="[WIDTH]" height="[HEIGHT]" frameborder="0" scrolling="no" src="[EMBED_URL]"></iframe>'.freeze
14
14
 
15
15
  # Get embeded player
16
16
  # Params :
@@ -29,14 +29,14 @@ module DmCloud
29
29
  width = options[:width] ? options[:width].to_s : '848'
30
30
  height = options[:height] ? options[:height].to_s : '480'
31
31
 
32
- stream = EMBED_STREAM
32
+ stream = EMBED_STREAM.dup
33
33
  stream.gsub!('[PROTOCOL]', DmCloud.config[:protocol])
34
34
  stream.gsub!('[USER_ID]', DmCloud.config[:user_key])
35
35
  stream.gsub!('[MEDIA_ID]', media_id)
36
36
  signed_url = DmCloud::Signing.sign(stream)
37
37
  signed_url = stream + "?auth=#{signed_url}"
38
38
 
39
- frame = EMBED_IFRAME
39
+ frame = EMBED_IFRAME.dup
40
40
  frame.gsub!('[WIDTH]', width)
41
41
  frame.gsub!('[HEIGHT]', height)
42
42
  frame.gsub!('[EMBED_URL]', signed_url)
@@ -57,7 +57,7 @@ module DmCloud
57
57
  raise StandardError, "missing :asset_name in params" unless asset_name
58
58
  asset_extension = asset_name.split('_').first unless asset_extension
59
59
 
60
- stream = DIRECT_STREAM
60
+ stream = DIRECT_STREAM.dup
61
61
  stream.gsub!('[PROTOCOL]', DmCloud.config[:protocol])
62
62
  stream.gsub!('[USER_ID]', DmCloud.config[:user_key])
63
63
  stream.gsub!('[MEDIA_ID]', media_id)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -168,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  segments:
170
170
  - 0
171
- hash: 963216337890652206
171
+ hash: 70467423529784663
172
172
  required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  none: false
174
174
  requirements: