s3_swf_upload 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/Gemfile +12 -2
- data/Gemfile.lock +81 -0
- data/{MIT-LICENSE → LICENSE.txt} +1 -1
- data/README.textile +6 -2
- data/Rakefile +47 -10
- data/VERSION +1 -0
- data/flex_src/src/com/elctech/S3UploadRequest.as +1 -1
- data/flex_src/src/com/nathancolgate/s3_swf_upload/S3Signature.as +9 -8
- data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.swf +0 -0
- data/lib/s3_swf_upload/railties/generators/uploader/templates/s3_uploads_controller.rb +33 -31
- data/lib/s3_swf_upload/s3_config.rb +1 -1
- data/lib/s3_swf_upload/view_helpers.rb +5 -3
- data/s3_swf_upload.gemspec +80 -20
- data/test/helper.rb +51 -0
- data/test/test_s3_swf_upload.rb +7 -0
- metadata +111 -57
- data/.gitignore +0 -6
- data/CHANGELOG +0 -26
- data/Manifest +0 -34
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Mjc2MWRhY2U5NTJlNWY0M2Y3N2I2NzU5N2FlNzczOWIwNWRmMzBjMA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ODMxZTYxYmNkZGNhNzFiMTBlNDE5ZTQxNDI0MjkyMDVkNTFhODI5OA==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjZiMjY2YmU5ZDUzNGZhODYxZDU5MmM3MjA2NzQ3ZDc0MjNmY2QzNzAxZDE4
|
10
|
+
NmJmYjI1NGI1MGY4NjdlOTUzN2E0YWJlNzI2Yjg2MTJlNDViZWQ1MmU5MzE3
|
11
|
+
NGJmNjQ4MGQxMjk2NDU0ZTc5ZWQ4ZGEwZmMwMmY2YTY0MGRhNTE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YjJkMDAxODE0YjA3MGU5ZmQxNzU4MzJmMjEwYzVjNjk0ODNhNGM2NzgzYWJm
|
14
|
+
NzBiMzc0Njc2NTMwYzc5ODNmYmEwZGMxMzJmODQzNjdlZjU0YjBjMDliNzZh
|
15
|
+
NGU4OGIwNjgxMjRhYWVmYmM5M2JjNGUwOWI0ZTUwZmI3ODdkYWY=
|
data/Gemfile
CHANGED
@@ -1,4 +1,14 @@
|
|
1
1
|
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
2
5
|
|
3
|
-
#
|
4
|
-
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
group :development do
|
9
|
+
gem "shoulda", ">= 0"
|
10
|
+
gem "rdoc", "~> 3.12"
|
11
|
+
gem "bundler", "~> 1.0"
|
12
|
+
gem "jeweler", "~> 2.0.1"
|
13
|
+
gem "simplecov", ">= 0"
|
14
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
activesupport (4.0.2)
|
5
|
+
i18n (~> 0.6, >= 0.6.4)
|
6
|
+
minitest (~> 4.2)
|
7
|
+
multi_json (~> 1.3)
|
8
|
+
thread_safe (~> 0.1)
|
9
|
+
tzinfo (~> 0.3.37)
|
10
|
+
addressable (2.3.5)
|
11
|
+
atomic (1.1.14)
|
12
|
+
builder (3.2.2)
|
13
|
+
descendants_tracker (0.0.3)
|
14
|
+
docile (1.1.3)
|
15
|
+
faraday (0.9.0)
|
16
|
+
multipart-post (>= 1.2, < 3)
|
17
|
+
git (1.2.6)
|
18
|
+
github_api (0.11.2)
|
19
|
+
addressable (~> 2.3)
|
20
|
+
descendants_tracker (~> 0.0.1)
|
21
|
+
faraday (~> 0.8, < 0.10)
|
22
|
+
hashie (>= 1.2)
|
23
|
+
multi_json (>= 1.7.5, < 2.0)
|
24
|
+
nokogiri (~> 1.6.0)
|
25
|
+
oauth2
|
26
|
+
hashie (2.0.5)
|
27
|
+
highline (1.6.20)
|
28
|
+
i18n (0.6.9)
|
29
|
+
jeweler (2.0.1)
|
30
|
+
builder
|
31
|
+
bundler (>= 1.0)
|
32
|
+
git (>= 1.2.5)
|
33
|
+
github_api
|
34
|
+
highline (>= 1.6.15)
|
35
|
+
nokogiri (>= 1.5.10)
|
36
|
+
rake
|
37
|
+
rdoc
|
38
|
+
json (1.8.1)
|
39
|
+
jwt (0.1.11)
|
40
|
+
multi_json (>= 1.5)
|
41
|
+
mini_portile (0.5.2)
|
42
|
+
minitest (4.7.5)
|
43
|
+
multi_json (1.8.4)
|
44
|
+
multi_xml (0.5.5)
|
45
|
+
multipart-post (2.0.0)
|
46
|
+
nokogiri (1.6.1)
|
47
|
+
mini_portile (~> 0.5.0)
|
48
|
+
oauth2 (0.9.3)
|
49
|
+
faraday (>= 0.8, < 0.10)
|
50
|
+
jwt (~> 0.1.8)
|
51
|
+
multi_json (~> 1.3)
|
52
|
+
multi_xml (~> 0.5)
|
53
|
+
rack (~> 1.2)
|
54
|
+
rack (1.5.2)
|
55
|
+
rake (10.1.1)
|
56
|
+
rdoc (3.12.2)
|
57
|
+
json (~> 1.4)
|
58
|
+
shoulda (3.5.0)
|
59
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
60
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
61
|
+
shoulda-context (1.1.6)
|
62
|
+
shoulda-matchers (2.5.0)
|
63
|
+
activesupport (>= 3.0.0)
|
64
|
+
simplecov (0.8.2)
|
65
|
+
docile (~> 1.1.0)
|
66
|
+
multi_json
|
67
|
+
simplecov-html (~> 0.8.0)
|
68
|
+
simplecov-html (0.8.0)
|
69
|
+
thread_safe (0.1.3)
|
70
|
+
atomic
|
71
|
+
tzinfo (0.3.38)
|
72
|
+
|
73
|
+
PLATFORMS
|
74
|
+
ruby
|
75
|
+
|
76
|
+
DEPENDENCIES
|
77
|
+
bundler (~> 1.0)
|
78
|
+
jeweler (~> 2.0.1)
|
79
|
+
rdoc (~> 3.12)
|
80
|
+
shoulda
|
81
|
+
simplecov
|
data/{MIT-LICENSE → LICENSE.txt}
RENAMED
data/README.textile
CHANGED
@@ -18,6 +18,10 @@ h2. Usage
|
|
18
18
|
|
19
19
|
1. Edit <code>Gemfile</code> and add this as a gem
|
20
20
|
|
21
|
+
<pre><code>gem 's3_swf_upload'</code></pre>
|
22
|
+
|
23
|
+
Or:
|
24
|
+
|
21
25
|
<pre><code>gem 's3_swf_upload', :git => 'git://github.com/nathancolgate/s3-swf-upload-plugin'
|
22
26
|
</code></pre>
|
23
27
|
|
@@ -40,11 +44,11 @@ If you are using Rails 3.1, you will need to move the generated s3_upload.js fro
|
|
40
44
|
|
41
45
|
There used to be a rake task for this, but it was removed so that there would be no dependency of aws/s3.
|
42
46
|
|
43
|
-
6. Upload the "crossdomain.xml file":https://github.com/nathancolgate/s3-swf-upload-plugin/blob/master/lib/s3_swf_upload/railties/tasks/crossdomain.xml
|
47
|
+
6. Upload the "crossdomain.xml file":https://github.com/nathancolgate/s3-swf-upload-plugin/blob/master/lib/s3_swf_upload/railties/tasks/crossdomain.xml to the root of your S3 Bucket.
|
44
48
|
|
45
49
|
There used to be a rake task for this, but it was removed so that there would be no dependency of aws/s3.
|
46
50
|
|
47
|
-
Make sure the file is in the root and is publicly readable.
|
51
|
+
Make sure the file is in the root of your bucket and is publicly readable.
|
48
52
|
|
49
53
|
7. Note: you no longer need to edit <code>app/controller/s3_uploads_controller.rb</code>
|
50
54
|
|
data/Rakefile
CHANGED
@@ -1,14 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
1
4
|
require 'bundler'
|
2
|
-
|
3
|
-
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
4
13
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "s3_swf_upload"
|
18
|
+
gem.homepage = "http://github.com/nathancolgate/s3-swf-upload-plugin"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior.}
|
21
|
+
gem.description = %Q{Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior.}
|
22
|
+
gem.email = "nathan@brandnewbox.com"
|
23
|
+
gem.authors = ["Nathan Colgate"]
|
24
|
+
# dependencies defined in Gemfile
|
13
25
|
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
14
27
|
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['test'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "s3_swf_upload #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.3.3
|
@@ -185,7 +185,7 @@ package com.elctech {
|
|
185
185
|
postVariables.AWSAccessKeyId = _accessKeyId;
|
186
186
|
postVariables.signature = _options.signature;
|
187
187
|
postVariables["Content-Type"] = _options.ContentType;
|
188
|
-
postVariables["Content-Disposition"] =
|
188
|
+
postVariables["Content-Disposition"] = _options.ContentDisposition;
|
189
189
|
postVariables.policy = _options.policy;
|
190
190
|
|
191
191
|
/**
|
@@ -73,14 +73,15 @@ package com.nathancolgate.s3_swf_upload {
|
|
73
73
|
var xml:XML = new XML(loader.data);
|
74
74
|
|
75
75
|
// create the s3 options object
|
76
|
-
upload_options.policy
|
77
|
-
upload_options.signature
|
78
|
-
upload_options.bucket
|
79
|
-
upload_options.AWSAccessKeyId
|
80
|
-
upload_options.acl
|
81
|
-
upload_options.Expires
|
82
|
-
upload_options.Secure
|
83
|
-
|
76
|
+
upload_options.policy = xml.policy;
|
77
|
+
upload_options.signature = xml.signature;
|
78
|
+
upload_options.bucket = xml.bucket;
|
79
|
+
upload_options.AWSAccessKeyId = xml.accesskeyid;
|
80
|
+
upload_options.acl = xml.acl;
|
81
|
+
upload_options.Expires = xml.expirationdate;
|
82
|
+
upload_options.Secure = xml.https;
|
83
|
+
upload_options.ContentDisposition = xml.contentDisposition;
|
84
|
+
upload_options.newKey = xml.newKey; //NOTE that we stop caring about the specified prefix if we have a newkey.
|
84
85
|
|
85
86
|
if (xml.errorMessage != "") {
|
86
87
|
ExternalInterface.call(S3Uploader.s3_swf_obj+'.onSignatureXMLError',toJavascript(_file),xml.errorMessage);
|
Binary file
|
@@ -9,43 +9,45 @@ class S3UploadsController < ApplicationController
|
|
9
9
|
include S3SwfUpload::Signature
|
10
10
|
|
11
11
|
def index
|
12
|
-
bucket
|
13
|
-
access_key_id
|
14
|
-
acl
|
15
|
-
secret_key
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
12
|
+
bucket = S3SwfUpload::S3Config.bucket
|
13
|
+
access_key_id = S3SwfUpload::S3Config.access_key_id
|
14
|
+
acl = S3SwfUpload::S3Config.acl
|
15
|
+
secret_key = S3SwfUpload::S3Config.secret_access_key
|
16
|
+
max_file_size = S3SwfUpload::S3Config.max_file_size
|
17
|
+
key = params[:key]
|
18
|
+
content_type = params[:content_type]
|
19
|
+
content_disposition = 'attachment'
|
20
|
+
https = 'false'
|
21
|
+
error_message = ''
|
22
|
+
expiration_date = 1.hours.from_now.utc.strftime('%Y-%m-%dT%H:%M:%S.000Z')
|
22
23
|
policy = Base64.encode64(
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
}
|
35
|
-
|
24
|
+
{'expiration' => expiration_date,
|
25
|
+
'conditions' => [
|
26
|
+
{'bucket' => bucket},
|
27
|
+
{'key'=> key},
|
28
|
+
{'acl'=> acl},
|
29
|
+
{'Content-Type'=> content_type},
|
30
|
+
{'Content-Disposition'=> content_disposition},
|
31
|
+
['content-length-range', 1, max_file_size],
|
32
|
+
['starts-with', '$Filename', ''],
|
33
|
+
['eq', '$success_action_status', '201']
|
34
|
+
]
|
35
|
+
}.to_json).gsub(/\n|\r/, '')
|
36
|
+
|
36
37
|
signature = b64_hmac_sha1(secret_key, policy)
|
37
38
|
|
38
39
|
respond_to do |format|
|
39
40
|
format.xml {
|
40
41
|
render :xml => {
|
41
|
-
:policy
|
42
|
-
:signature
|
43
|
-
:bucket
|
44
|
-
:accesskeyid
|
45
|
-
:acl
|
46
|
-
:expirationdate
|
47
|
-
:https
|
48
|
-
:
|
42
|
+
:policy => policy,
|
43
|
+
:signature => signature,
|
44
|
+
:bucket => bucket,
|
45
|
+
:accesskeyid => access_key_id,
|
46
|
+
:acl => acl,
|
47
|
+
:expirationdate => expiration_date,
|
48
|
+
:https => https,
|
49
|
+
:contentDisposition => content_disposition,
|
50
|
+
:errorMessage => error_message.to_s
|
49
51
|
}.to_xml
|
50
52
|
}
|
51
53
|
end
|
@@ -21,7 +21,7 @@ module S3SwfUpload
|
|
21
21
|
@@access_key_id = config['access_key_id'] || ENV['AWS_ACCESS_KEY_ID']
|
22
22
|
@@secret_access_key = config['secret_access_key'] || ENV['AWS_SECRET_ACCESS_KEY']
|
23
23
|
@@bucket = config['bucket']
|
24
|
-
@@max_file_size = config['max_file_size']
|
24
|
+
@@max_file_size = config['max_file_size'] || 5000000000
|
25
25
|
@@acl = config['acl'] || 'private'
|
26
26
|
|
27
27
|
|
@@ -51,9 +51,11 @@ module S3SwfUpload
|
|
51
51
|
|
52
52
|
out = ''
|
53
53
|
|
54
|
-
if
|
55
|
-
|
56
|
-
|
54
|
+
if Rails.version < '3.1.0'
|
55
|
+
if !@include_s3_upload
|
56
|
+
out << javascript_include_tag('s3_upload')
|
57
|
+
@include_s3_upload = true
|
58
|
+
end
|
57
59
|
end
|
58
60
|
|
59
61
|
out << "\n<script type=\"text/javascript\">\n"
|
data/s3_swf_upload.gemspec
CHANGED
@@ -1,29 +1,89 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
1
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: s3_swf_upload 0.3.3 ruby lib
|
2
6
|
|
3
7
|
Gem::Specification.new do |s|
|
4
|
-
s.name
|
5
|
-
s.
|
6
|
-
s.version = "0.3.2"
|
7
|
-
s.rubygems_version = "1.3.6"
|
8
|
-
s.date = "2010-11-16"
|
8
|
+
s.name = "s3_swf_upload"
|
9
|
+
s.version = "0.3.3"
|
9
10
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">=
|
11
|
-
s.authors
|
12
|
-
s.
|
13
|
-
s.
|
14
|
-
s.
|
15
|
-
s.
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
s.
|
20
|
-
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.authors = ["Nathan Colgate"]
|
13
|
+
s.date = "2014-02-18"
|
14
|
+
s.description = "Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior."
|
15
|
+
s.email = "nathan@brandnewbox.com"
|
16
|
+
s.extra_rdoc_files = [
|
17
|
+
"LICENSE.txt",
|
18
|
+
"README.textile"
|
19
|
+
]
|
20
|
+
s.files = [
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
23
|
+
"LICENSE.txt",
|
24
|
+
"README.textile",
|
25
|
+
"Rakefile",
|
26
|
+
"VERSION",
|
27
|
+
"flex_src/bin-release/flex-config.xml",
|
28
|
+
"flex_src/compile",
|
29
|
+
"flex_src/src/Globals.as",
|
30
|
+
"flex_src/src/S3Uploader.as",
|
31
|
+
"flex_src/src/com/adobe/net/MimeTypeMap.as",
|
32
|
+
"flex_src/src/com/elctech/S3UploadOptions.as",
|
33
|
+
"flex_src/src/com/elctech/S3UploadRequest.as",
|
34
|
+
"flex_src/src/com/nathancolgate/s3_swf_upload/BrowseButton.as",
|
35
|
+
"flex_src/src/com/nathancolgate/s3_swf_upload/S3Queue.as",
|
36
|
+
"flex_src/src/com/nathancolgate/s3_swf_upload/S3Signature.as",
|
37
|
+
"flex_src/src/com/nathancolgate/s3_swf_upload/S3Upload.as",
|
38
|
+
"lib/patch/integer.rb",
|
39
|
+
"lib/s3_swf_upload.rb",
|
40
|
+
"lib/s3_swf_upload/railtie.rb",
|
41
|
+
"lib/s3_swf_upload/railties/generators/s3_swf_upload.rb",
|
42
|
+
"lib/s3_swf_upload/railties/generators/uploader/USAGE",
|
43
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/amazon_s3.yml",
|
44
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/s3_down_button.gif",
|
45
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/s3_over_button.gif",
|
46
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/s3_up_button.gif",
|
47
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.js",
|
48
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.swf",
|
49
|
+
"lib/s3_swf_upload/railties/generators/uploader/templates/s3_uploads_controller.rb",
|
50
|
+
"lib/s3_swf_upload/railties/generators/uploader/uploader_generator.rb",
|
51
|
+
"lib/s3_swf_upload/railties/tasks/crossdomain.xml",
|
52
|
+
"lib/s3_swf_upload/s3_config.rb",
|
53
|
+
"lib/s3_swf_upload/signature.rb",
|
54
|
+
"lib/s3_swf_upload/view_helpers.rb",
|
55
|
+
"s3_swf_upload.gemspec",
|
56
|
+
"test/helper.rb",
|
57
|
+
"test/test_s3_swf_upload.rb"
|
58
|
+
]
|
59
|
+
s.homepage = "http://github.com/nathancolgate/s3-swf-upload-plugin"
|
60
|
+
s.licenses = ["MIT"]
|
21
61
|
s.require_paths = ["lib"]
|
62
|
+
s.rubygems_version = "2.1.11"
|
63
|
+
s.summary = "Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior."
|
22
64
|
|
23
|
-
if s.respond_to? :specification_version
|
24
|
-
|
25
|
-
s.specification_version = 3
|
65
|
+
if s.respond_to? :specification_version then
|
66
|
+
s.specification_version = 4
|
26
67
|
|
27
|
-
|
68
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
69
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
70
|
+
s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
|
71
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0"])
|
72
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
|
73
|
+
s.add_development_dependency(%q<simplecov>, [">= 0"])
|
74
|
+
else
|
75
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
76
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
77
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
78
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
79
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
80
|
+
end
|
81
|
+
else
|
82
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
83
|
+
s.add_dependency(%q<rdoc>, ["~> 3.12"])
|
84
|
+
s.add_dependency(%q<bundler>, ["~> 1.0"])
|
85
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
|
86
|
+
s.add_dependency(%q<simplecov>, [">= 0"])
|
28
87
|
end
|
29
88
|
end
|
89
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
|
17
|
+
gem.name = "s3_swf_upload"
|
18
|
+
gem.homepage = "http://github.com/nathancolgate/s3-swf-upload-plugin"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior.}
|
21
|
+
gem.description = %Q{Rails 3 gem that allows you to upload files directly to S3 from your application using flex for file management, css for presentation, and javascript for behavior.}
|
22
|
+
gem.email = "nathan@brandnewbox.com"
|
23
|
+
gem.authors = ["Nathan Colgate"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
desc "Code coverage detail"
|
36
|
+
task :simplecov do
|
37
|
+
ENV['COVERAGE'] = "true"
|
38
|
+
Rake::Task['test'].execute
|
39
|
+
end
|
40
|
+
|
41
|
+
task :default => :test
|
42
|
+
|
43
|
+
require 'rdoc/task'
|
44
|
+
Rake::RDocTask.new do |rdoc|
|
45
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
46
|
+
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "s3_swf_upload #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
51
|
+
end
|
metadata
CHANGED
@@ -1,39 +1,103 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_swf_upload
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
segments:
|
6
|
-
- 0
|
7
|
-
- 3
|
8
|
-
- 2
|
9
|
-
version: 0.3.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.3
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Nathan Colgate
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: shoulda
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ! '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ! '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rdoc
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: !binary |-
|
34
|
+
My4xMg==
|
35
|
+
type: :development
|
36
|
+
prerelease: false
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ~>
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: !binary |-
|
42
|
+
My4xMg==
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: bundler
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '1.0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '1.0'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: jeweler
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ~>
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 2.0.1
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ~>
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 2.0.1
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: simplecov
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ! '>='
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
description: Rails 3 gem that allows you to upload files directly to S3 from your
|
86
|
+
application using flex for file management, css for presentation, and javascript
|
87
|
+
for behavior.
|
22
88
|
email: nathan@brandnewbox.com
|
23
89
|
executables: []
|
24
|
-
|
25
90
|
extensions: []
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
files:
|
30
|
-
- .gitignore
|
31
|
-
- CHANGELOG
|
91
|
+
extra_rdoc_files:
|
92
|
+
- LICENSE.txt
|
93
|
+
- README.textile
|
94
|
+
files:
|
32
95
|
- Gemfile
|
33
|
-
-
|
34
|
-
-
|
96
|
+
- Gemfile.lock
|
97
|
+
- LICENSE.txt
|
35
98
|
- README.textile
|
36
99
|
- Rakefile
|
100
|
+
- VERSION
|
37
101
|
- flex_src/bin-release/flex-config.xml
|
38
102
|
- flex_src/compile
|
39
103
|
- flex_src/src/Globals.as
|
@@ -63,41 +127,31 @@ files:
|
|
63
127
|
- lib/s3_swf_upload/signature.rb
|
64
128
|
- lib/s3_swf_upload/view_helpers.rb
|
65
129
|
- s3_swf_upload.gemspec
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
130
|
+
- test/helper.rb
|
131
|
+
- test/test_s3_swf_upload.rb
|
132
|
+
homepage: http://github.com/nathancolgate/s3-swf-upload-plugin
|
133
|
+
licenses:
|
134
|
+
- MIT
|
135
|
+
metadata: {}
|
70
136
|
post_install_message:
|
71
|
-
rdoc_options:
|
72
|
-
|
73
|
-
- --inline-source
|
74
|
-
- --title
|
75
|
-
- S3_swf_upload
|
76
|
-
- --main
|
77
|
-
- README.textile
|
78
|
-
require_paths:
|
137
|
+
rdoc_options: []
|
138
|
+
require_paths:
|
79
139
|
- lib
|
80
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
-
requirements:
|
82
|
-
- -
|
83
|
-
- !ruby/object:Gem::Version
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
segments:
|
92
|
-
- 1
|
93
|
-
- 2
|
94
|
-
version: "1.2"
|
140
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ! '>='
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
145
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
95
150
|
requirements: []
|
96
|
-
|
97
|
-
|
98
|
-
rubygems_version: 1.3.6
|
151
|
+
rubyforge_project:
|
152
|
+
rubygems_version: 2.1.11
|
99
153
|
signing_key:
|
100
|
-
specification_version:
|
101
|
-
summary: Rails 3 gem that allows you to upload files directly to S3 from your application
|
154
|
+
specification_version: 4
|
155
|
+
summary: Rails 3 gem that allows you to upload files directly to S3 from your application
|
156
|
+
using flex for file management, css for presentation, and javascript for behavior.
|
102
157
|
test_files: []
|
103
|
-
|
data/.gitignore
DELETED
data/CHANGELOG
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
v0.3.1
|
2
|
-
|
3
|
-
* 2010-11-15
|
4
|
-
* Fixed by yixster: If the startUploading call is made after calling stopUploading, only the first file in the queue is successfully uploaded.
|
5
|
-
|
6
|
-
v0.3.0
|
7
|
-
|
8
|
-
* 2010-08-27
|
9
|
-
* Flash Player 10.1 did not allow ExternalInterface to pass a FileReference object to Javascript
|
10
|
-
So I added a toJavascript function that converts FileReference into simple Objects with only three attributes:
|
11
|
-
- name
|
12
|
-
- size
|
13
|
-
- type
|
14
|
-
* Also, S3Queue now has it's own toJavascript function. The queue that gets passed through to the Javascript now
|
15
|
-
has a much more meaningful attribute of 'files' instead of 'source'
|
16
|
-
|
17
|
-
v0.2.0
|
18
|
-
|
19
|
-
* 2010-05-27
|
20
|
-
* The flex application in this fork was completely re-written so that there are no flash or flex UI components.
|
21
|
-
The one exception to that is the browse button, which, for security purposes MUST be flash.
|
22
|
-
But even then, you get to pass the URLs for images to use for that button!
|
23
|
-
|
24
|
-
v0.1.0
|
25
|
-
|
26
|
-
* Created by people way smarter than I
|
data/Manifest
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
CHANGELOG
|
2
|
-
MIT-LICENSE
|
3
|
-
Manifest
|
4
|
-
README.textile
|
5
|
-
Rakefile
|
6
|
-
flex_src/bin-release/flex-config.xml
|
7
|
-
flex_src/compile
|
8
|
-
flex_src/src/Globals.as
|
9
|
-
flex_src/src/S3Uploader.as
|
10
|
-
flex_src/src/com/adobe/net/MimeTypeMap.as
|
11
|
-
flex_src/src/com/elctech/S3UploadOptions.as
|
12
|
-
flex_src/src/com/elctech/S3UploadRequest.as
|
13
|
-
flex_src/src/com/nathancolgate/s3_swf_upload/BrowseButton.as
|
14
|
-
flex_src/src/com/nathancolgate/s3_swf_upload/S3Queue.as
|
15
|
-
flex_src/src/com/nathancolgate/s3_swf_upload/S3Signature.as
|
16
|
-
flex_src/src/com/nathancolgate/s3_swf_upload/S3Upload.as
|
17
|
-
lib/patch/integer.rb
|
18
|
-
lib/s3_swf_upload.rb
|
19
|
-
lib/s3_swf_upload/railtie.rb
|
20
|
-
lib/s3_swf_upload/railties/generators/s3_swf_upload.rb
|
21
|
-
lib/s3_swf_upload/railties/generators/uploader/USAGE
|
22
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/amazon_s3.yml
|
23
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/s3_down_button.gif
|
24
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/s3_over_button.gif
|
25
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/s3_up_button.gif
|
26
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.js
|
27
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.swf
|
28
|
-
lib/s3_swf_upload/railties/generators/uploader/templates/s3_uploads_controller.rb
|
29
|
-
lib/s3_swf_upload/railties/generators/uploader/uploader_generator.rb
|
30
|
-
lib/s3_swf_upload/railties/tasks/crossdomain.xml
|
31
|
-
lib/s3_swf_upload/s3_config.rb
|
32
|
-
lib/s3_swf_upload/signature.rb
|
33
|
-
lib/s3_swf_upload/view_helpers.rb
|
34
|
-
s3_swf_upload.gemspec
|