relishable 0.13 → 0.14
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/relish/s3_helper.rb +20 -0
- data/lib/relish.rb +2 -1
- metadata +3 -2
@@ -0,0 +1,20 @@
|
|
1
|
+
require "fog"
|
2
|
+
|
3
|
+
class Relish
|
4
|
+
class S3Helper
|
5
|
+
|
6
|
+
def initialize(aws_access_key, aws_secret_key, bucket_name)
|
7
|
+
@aws_access_key = aws_access_key
|
8
|
+
@aws_secret_key = aws_secret_key
|
9
|
+
@bucket_name = bucket_name
|
10
|
+
end
|
11
|
+
|
12
|
+
def db
|
13
|
+
@db ||= Fog::Storage::AWS.new(:aws_access_key_id => @aws_access_key, :aws_secret_access_key => @aws_secret_key)
|
14
|
+
end
|
15
|
+
|
16
|
+
def signed_url(name, expires)
|
17
|
+
db.get_object_https_url(@bucket_name, name, expires)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/relish.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relishable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.14'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-11-
|
13
|
+
date: 2012-11-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: fog
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/relish/dynamo_helper.rb
|
54
54
|
- lib/relish/encryption_helper.rb
|
55
55
|
- lib/relish/release.rb
|
56
|
+
- lib/relish/s3_helper.rb
|
56
57
|
- lib/relish.rb
|
57
58
|
- Gemfile
|
58
59
|
- Gemfile.lock
|