scribd_fu 2.0.4 → 2.0.5
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.
- data/lib/scribd_fu.rb +1 -0
- data/lib/scribd_fu/attachment_fu.rb +5 -1
- data/scribd_fu.gemspec +3 -3
- metadata +3 -3
data/lib/scribd_fu.rb
CHANGED
@@ -31,6 +31,7 @@ module ScribdFu
|
|
31
31
|
|
32
32
|
# RegExp that matches AWS S3 URLs
|
33
33
|
S3 = /^https?:\/\/s3.amazonaws.com/
|
34
|
+
CLOUD_FRONT = /^http:\/\/[A-Za-z0-9]*.cloudfront.net/
|
34
35
|
|
35
36
|
# Available parameters for the JS API
|
36
37
|
# http://www.scribd.com/publisher/api/api?method_name=Javascript+API
|
@@ -22,7 +22,11 @@ module ScribdFu
|
|
22
22
|
|
23
23
|
# Yields the correct path to the file, either the local filename or the S3 URL.
|
24
24
|
def file_path
|
25
|
-
public_filename =~ ScribdFu::S3
|
25
|
+
if public_filename =~ ScribdFu::S3 || public_filename =~ ScribdFu::CLOUD_FRONT
|
26
|
+
public_filename
|
27
|
+
else
|
28
|
+
"#{RAILS_ROOT}/public#{public_filename}"
|
29
|
+
end
|
26
30
|
end
|
27
31
|
end
|
28
32
|
|
data/scribd_fu.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "scribd_fu"
|
3
|
-
s.version = "2.0.
|
4
|
-
s.date = "2009-
|
3
|
+
s.version = "2.0.5"
|
4
|
+
s.date = "2009-11-21"
|
5
5
|
s.summary = "Quick and easy interactions with Scribd's iPaper service"
|
6
6
|
s.email = "matt@matt-darby.com"
|
7
7
|
s.homepage = "http://github.com/mdarby/scribd_fu/tree/master"
|
@@ -27,4 +27,4 @@ Gem::Specification.new do |s|
|
|
27
27
|
'spec/spec_helper.rb'
|
28
28
|
]
|
29
29
|
s.add_dependency 'rscribd'
|
30
|
-
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scribd_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Darby
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-21 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -44,7 +44,7 @@ files:
|
|
44
44
|
- spec/scribd_fu.yml
|
45
45
|
- spec/scribd_fu_spec.rb
|
46
46
|
- spec/spec_helper.rb
|
47
|
-
has_rdoc:
|
47
|
+
has_rdoc: false
|
48
48
|
homepage: http://github.com/mdarby/scribd_fu/tree/master
|
49
49
|
licenses: []
|
50
50
|
|