refinerycms-vimeo-videos 0.1.9.rc1 → 0.1.9.rc2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/controllers/admin/vimeo_account_controller.rb +2 -2
- data/app/controllers/admin/vimeo_videos_controller.rb +1 -1
- data/app/models/vimeo_embed_cache.rb +4 -4
- data/app/models/vimeo_meta_cache.rb +1 -1
- data/lib/refinerycms-vimeo-videos/version.rb +1 -1
- data/lib/refinerycms-vimeo-videos.rb +2 -1
- metadata +5 -5
@@ -8,7 +8,7 @@ module Admin
|
|
8
8
|
if not authorized? and ready_to_authorize?
|
9
9
|
|
10
10
|
# begin authorization process
|
11
|
-
base = Vimeo::Advanced::Base.new(
|
11
|
+
base = ::Vimeo::Advanced::Base.new(
|
12
12
|
account[:consumer_key],
|
13
13
|
account[:consumer_secret])
|
14
14
|
request_token = base.get_request_token
|
@@ -34,7 +34,7 @@ module Admin
|
|
34
34
|
def callback
|
35
35
|
|
36
36
|
# vimeo will redirect us here upon successful authorization
|
37
|
-
base = Vimeo::Advanced::Base.new(
|
37
|
+
base = ::Vimeo::Advanced::Base.new(
|
38
38
|
account[:consumer_key],
|
39
39
|
account[:consumer_secret])
|
40
40
|
access_token = base.get_access_token(params[:oauth_token], session[:oauth_secret], params[:oauth_verifier])
|
@@ -22,7 +22,7 @@ class VimeoEmbedCache < ActiveRecord::Base
|
|
22
22
|
geometry =~ FIXED_GEOMETRY ?
|
23
23
|
static_embed_code(vid, geometry).html_safe : raise(ArgumentError, "Must use fixed geometry string for static embeds (e.g. 100x240)")
|
24
24
|
else
|
25
|
-
find_or_create_by_vid_and_configuration(vid, :configuration => YAML.dump(configuration)).code.html_safe
|
25
|
+
find_or_create_by_vid_and_configuration(vid, :configuration => ::YAML.dump(configuration)).code.html_safe
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
@@ -34,7 +34,7 @@ class VimeoEmbedCache < ActiveRecord::Base
|
|
34
34
|
FIXED_WIDTH_GEOMETRY = /^(\d+)$/ # e.g. '300'
|
35
35
|
FIXED_HEIGHT_GEOMETRY = /^x(\d+)$/ # e.g. 'x200'
|
36
36
|
FIXED_GEOMETRY = /^(\d+)x(\d+)$/ # e.g. '300x200'
|
37
|
-
VIMEO_GEOMETRY = Regexp.union FIXED_GEOMETRY, FIXED_HEIGHT_GEOMETRY, FIXED_WIDTH_GEOMETRY
|
37
|
+
VIMEO_GEOMETRY = ::Regexp.union FIXED_GEOMETRY, FIXED_HEIGHT_GEOMETRY, FIXED_WIDTH_GEOMETRY
|
38
38
|
|
39
39
|
def self.geometry_hash geometry
|
40
40
|
case geometry
|
@@ -58,9 +58,9 @@ class VimeoEmbedCache < ActiveRecord::Base
|
|
58
58
|
def cache force = false
|
59
59
|
if self.code.blank? or force
|
60
60
|
# Escape vimeo url and request oembed code
|
61
|
-
url = CGI::escape("http://vimeo.com/#{self.vid}")
|
61
|
+
url = ::CGI::escape("http://vimeo.com/#{self.vid}")
|
62
62
|
|
63
|
-
response = HTTParty.get "http://vimeo.com/api/oembed.xml?url=#{url}&#{self.configuration.to_query}"
|
63
|
+
response = ::HTTParty.get "http://vimeo.com/api/oembed.xml?url=#{url}&#{self.configuration.to_query}"
|
64
64
|
self.code = response["oembed"]["html"]
|
65
65
|
end
|
66
66
|
end
|
@@ -30,7 +30,7 @@ class VimeoMetaCache < ActiveRecord::Base
|
|
30
30
|
def cache force = false, images = false
|
31
31
|
if !self.title? or !self.image_id? or !self.description? or force
|
32
32
|
|
33
|
-
video_info_request = Vimeo::Advanced::Video.new(
|
33
|
+
video_info_request = ::Vimeo::Advanced::Video.new(
|
34
34
|
account[:consumer_key],
|
35
35
|
account[:consumer_secret],
|
36
36
|
:token => account[:token],
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'vimeo'
|
1
2
|
require 'refinerycms-vimeo-videos/version'
|
2
3
|
|
3
4
|
module Refinery
|
@@ -27,6 +28,6 @@ require 'refinerycms-vimeo-videos/active_record.rb'
|
|
27
28
|
|
28
29
|
module ActiveRecord
|
29
30
|
class Base
|
30
|
-
extend Refinery::VimeoVideos::ActiveRecord
|
31
|
+
extend ::Refinery::VimeoVideos::ActiveRecord
|
31
32
|
end
|
32
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-vimeo-videos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.9.
|
4
|
+
version: 0.1.9.rc2
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-06-30 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: vimeo
|
16
|
-
requirement: &
|
16
|
+
requirement: &2160421960 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.3.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2160421960
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: fakeweb
|
27
|
-
requirement: &
|
27
|
+
requirement: &2160421440 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: 1.2.6
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2160421440
|
36
36
|
description: Ruby on Rails Vimeo Videos engine for Refinery CMS
|
37
37
|
email: mail@bitflut.com
|
38
38
|
executables: []
|