qoobaa-d2s3 0.1.1 → 0.1.2
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/VERSION +1 -1
- data/d2s3.gemspec +2 -1
- data/lib/d2s3/view_helpers.rb +3 -3
- data/qoobaa-d2s3-0.1.1.gem +0 -0
- metadata +2 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/d2s3.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{d2s3}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Matthew Williams", "Jakub Kuźma"]
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"lib/d2s3/configuration.rb",
|
27
27
|
"lib/d2s3/signature.rb",
|
28
28
|
"lib/d2s3/view_helpers.rb",
|
29
|
+
"qoobaa-d2s3-0.1.1.gem",
|
29
30
|
"test/signature_test.rb",
|
30
31
|
"test/test_helper.rb"
|
31
32
|
]
|
data/lib/d2s3/view_helpers.rb
CHANGED
@@ -5,8 +5,8 @@ module D2S3
|
|
5
5
|
include D2S3::Signature
|
6
6
|
|
7
7
|
def s3_upload_form_tag(options = {})
|
8
|
-
bucket = configuration.bucket
|
9
|
-
access_key_id = configuration.access_key_id
|
8
|
+
bucket = D2S3.configuration.bucket
|
9
|
+
access_key_id = D2S3.configuration.access_key_id
|
10
10
|
protocol = options[:protocol] || "http"
|
11
11
|
key = options[:key] || ''
|
12
12
|
redirect = options[:redirect] || '/'
|
@@ -30,7 +30,7 @@ module D2S3
|
|
30
30
|
]
|
31
31
|
})).gsub(/\n|\r/, '')
|
32
32
|
|
33
|
-
signature = b64_hmac_sha1(D2S3
|
33
|
+
signature = b64_hmac_sha1(D2S3.configuration.secret_access_key, policy)
|
34
34
|
out = ""
|
35
35
|
out << %(
|
36
36
|
<form action="#{protocol}://#{bucket}.s3.amazonaws.com/" method="post" enctype="multipart/form-data" id="#{options[:form][:id]}" class="#{options[:form][:class]}" style="#{options[:form][:style]}">
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qoobaa-d2s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Williams
|
@@ -37,6 +37,7 @@ files:
|
|
37
37
|
- lib/d2s3/configuration.rb
|
38
38
|
- lib/d2s3/signature.rb
|
39
39
|
- lib/d2s3/view_helpers.rb
|
40
|
+
- qoobaa-d2s3-0.1.1.gem
|
40
41
|
- test/signature_test.rb
|
41
42
|
- test/test_helper.rb
|
42
43
|
has_rdoc: false
|