qoobaa-s3_upload_form 0.2.1 → 0.2.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/lib/s3_upload_form/helpers.rb +4 -4
- data/s3_upload_form.gemspec +2 -2
- data/test/test_helper.rb +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -12,9 +12,9 @@ module S3UploadForm
|
|
12
12
|
redirect = options.delete(:redirect) || "/"
|
13
13
|
acl = options.delete(:acl) || "public-read"
|
14
14
|
expiration_date = (options.delete(:expiration_date) || 10.hours).from_now.strftime("%Y-%m-%dT%H:%M:%S.000Z")
|
15
|
-
filesize = options.delete(:filesize) ||
|
16
|
-
|
17
|
-
submit = options.delete(:
|
15
|
+
filesize = options.delete(:filesize) || (1..1.megabyte)
|
16
|
+
filesize_range = filesize.kind_of?(Fixnum) ? 1..filesize : filesize
|
17
|
+
submit = options.delete(:submit) || submit_tag(I18n.t("button.upload", :default => "Upload"))
|
18
18
|
|
19
19
|
policy_document = <<-eos
|
20
20
|
{
|
@@ -25,7 +25,7 @@ module S3UploadForm
|
|
25
25
|
["starts-with", "$key", "#{key}"],
|
26
26
|
{"acl": "#{acl}"},
|
27
27
|
{"success_action_redirect": "#{redirect}"},
|
28
|
-
["content-length-range", #{
|
28
|
+
["content-length-range", #{filesize_range.first}, #{filesize_range.last}]
|
29
29
|
]
|
30
30
|
}
|
31
31
|
eos
|
data/s3_upload_form.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{s3_upload_form}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jakub Kuźma"]
|
9
|
-
s.date = %q{2009-06-
|
9
|
+
s.date = %q{2009-06-17}
|
10
10
|
s.email = %q{qoobaa@gmail.com}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qoobaa-s3_upload_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Jakub Ku\xC5\xBAma"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-17 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|