active_public_resources 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbbec7a8766492daa8e9975dfa8033cf22936348
|
4
|
+
data.tar.gz: bc647bf66fc5e299c87f94d843f8f046d9da1c69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: baa11d8f3a694013b11db6a572e83fcd6522427dc8191416aef414eee2852ad6bb998e0fb33bb8f4e5c04fec8f55bd0642f514d60e4832e3e66bb52715e0824c
|
7
|
+
data.tar.gz: dc8cf7025d196f1c58377f5b65637a91ae6d285761deb8c2f205cf34c84f88fbdd2802eb27014d912581a45d321123f211d9bec0f742f5106a658bc692afbb6a
|
@@ -3,7 +3,7 @@ require 'net/https'
|
|
3
3
|
module ActivePublicResources
|
4
4
|
module Drivers
|
5
5
|
class Quizlet < Driver
|
6
|
-
|
6
|
+
|
7
7
|
DRIVER_NAME = "quizlet"
|
8
8
|
|
9
9
|
def initialize(config_options={})
|
@@ -61,7 +61,7 @@ module ActivePublicResources
|
|
61
61
|
quiz.created_date = Time.at(data['created_date']).utc.to_date
|
62
62
|
quiz.has_images = data['has_images']
|
63
63
|
quiz.subjects = data['subjects']
|
64
|
-
|
64
|
+
|
65
65
|
# Return Types
|
66
66
|
|
67
67
|
quiz.return_types << APR::ReturnTypes::Url.new(
|
@@ -73,23 +73,15 @@ module ActivePublicResources
|
|
73
73
|
)
|
74
74
|
|
75
75
|
# See http://quizlet.com/help/can-i-embed-quizlet-on-my-website
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
:remote_id => quiz.id,
|
86
|
-
:url => "https://quizlet.com/#{quiz.id}/#{k}/embedv2",
|
87
|
-
:text => v,
|
88
|
-
:title => quiz.title,
|
89
|
-
:width => "100%",
|
90
|
-
:height => 410
|
91
|
-
)
|
92
|
-
end
|
76
|
+
quiz.return_types << APR::ReturnTypes::Iframe.new(
|
77
|
+
:driver => DRIVER_NAME,
|
78
|
+
:remote_id => quiz.id,
|
79
|
+
:url => "https://quizlet.com/#{quiz.id}/flashcards/embedv2",
|
80
|
+
:text => "Flashcards",
|
81
|
+
:title => quiz.title,
|
82
|
+
:width => "100%",
|
83
|
+
:height => 410
|
84
|
+
)
|
93
85
|
|
94
86
|
quiz
|
95
87
|
end
|
@@ -37,15 +37,7 @@ describe APR::Drivers::Quizlet do
|
|
37
37
|
|
38
38
|
quiz.return_types[0].driver.should eq(APR::Drivers::Quizlet::DRIVER_NAME)
|
39
39
|
quiz.return_types[0].remote_id.should eq(23752218)
|
40
|
-
quiz.return_types.
|
41
|
-
"http://quizlet.com/23752218/dogs-flash-cards/",
|
42
|
-
"https://quizlet.com/23752218/flashcards/embedv2",
|
43
|
-
"https://quizlet.com/23752218/learn/embedv2",
|
44
|
-
"https://quizlet.com/23752218/scatter/embedv2",
|
45
|
-
"https://quizlet.com/23752218/speller/embedv2",
|
46
|
-
"https://quizlet.com/23752218/test/embedv2",
|
47
|
-
"https://quizlet.com/23752218/spacerace/embedv2"
|
48
|
-
])
|
40
|
+
quiz.return_types[0].url.should eq("http://quizlet.com/23752218/dogs-flash-cards/")
|
49
41
|
end
|
50
42
|
end
|
51
43
|
|