s3_relay 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +209 -0
  4. data/Rakefile +31 -0
  5. data/app/assets/javascripts/s3_relay.coffee +112 -0
  6. data/app/assets/stylesheets/s3_relay.css +31 -0
  7. data/app/controllers/s3_relay/uploads_controller.rb +65 -0
  8. data/app/helpers/s3_relay/uploads_helper.rb +23 -0
  9. data/app/models/s3_relay/upload.rb +46 -0
  10. data/config/routes.rb +5 -0
  11. data/db/migrate/20141009000804_create_s3_relay_uploads.rb +19 -0
  12. data/lib/s3_relay.rb +4 -0
  13. data/lib/s3_relay/base.rb +35 -0
  14. data/lib/s3_relay/engine.rb +18 -0
  15. data/lib/s3_relay/model.rb +54 -0
  16. data/lib/s3_relay/private_url.rb +33 -0
  17. data/lib/s3_relay/s3_relay.rb +4 -0
  18. data/lib/s3_relay/upload_presigner.rb +60 -0
  19. data/lib/s3_relay/version.rb +3 -0
  20. data/test/controllers/s3_relay/uploads_controller_test.rb +138 -0
  21. data/test/dummy/README.rdoc +28 -0
  22. data/test/dummy/Rakefile +6 -0
  23. data/test/dummy/app/assets/javascripts/application.js +13 -0
  24. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  25. data/test/dummy/app/controllers/application_controller.rb +5 -0
  26. data/test/dummy/app/helpers/application_helper.rb +2 -0
  27. data/test/dummy/app/models/product.rb +6 -0
  28. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  29. data/test/dummy/bin/bundle +3 -0
  30. data/test/dummy/bin/rails +4 -0
  31. data/test/dummy/bin/rake +4 -0
  32. data/test/dummy/config.ru +4 -0
  33. data/test/dummy/config/application.rb +23 -0
  34. data/test/dummy/config/boot.rb +5 -0
  35. data/test/dummy/config/database.yml +22 -0
  36. data/test/dummy/config/environment.rb +5 -0
  37. data/test/dummy/config/environments/development.rb +37 -0
  38. data/test/dummy/config/environments/production.rb +78 -0
  39. data/test/dummy/config/environments/test.rb +39 -0
  40. data/test/dummy/config/initializers/assets.rb +8 -0
  41. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
  43. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  44. data/test/dummy/config/initializers/inflections.rb +16 -0
  45. data/test/dummy/config/initializers/mime_types.rb +4 -0
  46. data/test/dummy/config/initializers/session_store.rb +3 -0
  47. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/test/dummy/config/locales/en.yml +23 -0
  49. data/test/dummy/config/routes.rb +7 -0
  50. data/test/dummy/config/secrets.yml +22 -0
  51. data/test/dummy/db/migrate/20141021002149_create_products.rb +9 -0
  52. data/test/dummy/db/schema.rb +41 -0
  53. data/test/dummy/log/development.log +53 -0
  54. data/test/dummy/log/test.log +14631 -0
  55. data/test/dummy/public/404.html +67 -0
  56. data/test/dummy/public/422.html +67 -0
  57. data/test/dummy/public/500.html +66 -0
  58. data/test/dummy/public/favicon.ico +0 -0
  59. data/test/factories/products.rb +5 -0
  60. data/test/factories/uploads.rb +15 -0
  61. data/test/helpers/s3_relay/uploads_helper_test.rb +13 -0
  62. data/test/lib/s3_relay/model_test.rb +81 -0
  63. data/test/lib/s3_relay/private_url_test.rb +28 -0
  64. data/test/lib/s3_relay/upload_presigner_test.rb +38 -0
  65. data/test/models/s3_relay/upload_test.rb +128 -0
  66. data/test/support/database_cleaner.rb +14 -0
  67. data/test/test_helper.rb +28 -0
  68. metadata +302 -0
@@ -0,0 +1,14 @@
1
+ require "database_cleaner"
2
+
3
+ DatabaseCleaner.clean_with :truncation
4
+ DatabaseCleaner.strategy = :transaction
5
+
6
+ class MiniTest::Spec
7
+ before :each do
8
+ DatabaseCleaner.start
9
+ end
10
+
11
+ after :each do
12
+ DatabaseCleaner.clean
13
+ end
14
+ end
@@ -0,0 +1,28 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+
3
+ IS_RAKE_TASK = (!! ($0 =~ /rake/))
4
+
5
+ if IS_RAKE_TASK
6
+ require "simplecov"
7
+ SimpleCov.start "rails" do
8
+ add_filter "db"
9
+ add_filter "test"
10
+ add_filter "config"
11
+
12
+ add_group "Services", "app/services"
13
+ add_group "Uploaders", "app/services"
14
+ end
15
+ end
16
+
17
+ ENV["RAILS_ENV"] = "test"
18
+ require File.expand_path("../dummy/config/environment", __FILE__)
19
+
20
+ Dir[File.join("./test/factories/*.rb")].sort.each { |f| require f }
21
+
22
+ require "minitest/autorun"
23
+ require "rails/generators"
24
+ require "rails/test_help"
25
+ require "minitest/rails"
26
+ require "minitest/pride"
27
+
28
+ Dir[File.join("./test/support/*.rb")].sort.each { |f| require f }
metadata ADDED
@@ -0,0 +1,302 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: s3_relay
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Kenny Johnston
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-10-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: coffee-rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
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: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: guard-minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '2.3'
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: 2.3.2
51
+ type: :development
52
+ prerelease: false
53
+ version_requirements: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - "~>"
56
+ - !ruby/object:Gem::Version
57
+ version: '2.3'
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 2.3.2
61
+ - !ruby/object:Gem::Dependency
62
+ name: minitest-rails
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: '2.1'
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: 2.1.0
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '2.1'
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ version: 2.1.0
81
+ - !ruby/object:Gem::Dependency
82
+ name: mocha
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - "~>"
86
+ - !ruby/object:Gem::Version
87
+ version: '1.1'
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ version: 1.1.0
91
+ type: :development
92
+ prerelease: false
93
+ version_requirements: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "~>"
96
+ - !ruby/object:Gem::Version
97
+ version: '1.1'
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: 1.1.0
101
+ - !ruby/object:Gem::Dependency
102
+ name: pg
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - "~>"
106
+ - !ruby/object:Gem::Version
107
+ version: '0.17'
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: 0.17.1
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '0.17'
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: 0.17.1
121
+ - !ruby/object:Gem::Dependency
122
+ name: simplecov
123
+ requirement: !ruby/object:Gem::Requirement
124
+ requirements:
125
+ - - "~>"
126
+ - !ruby/object:Gem::Version
127
+ version: '0.9'
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: 0.9.1
131
+ type: :development
132
+ prerelease: false
133
+ version_requirements: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '0.9'
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ version: 0.9.1
141
+ - !ruby/object:Gem::Dependency
142
+ name: thor
143
+ requirement: !ruby/object:Gem::Requirement
144
+ requirements:
145
+ - - ">="
146
+ - !ruby/object:Gem::Version
147
+ version: '0'
148
+ type: :development
149
+ prerelease: false
150
+ version_requirements: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ version: '0'
155
+ description: |-
156
+ Enables direct file uploads to Amazon S3 and provides a flexible pattern for
157
+ your Rails app to asynchronously ingest the files.
158
+ email:
159
+ - kjohnston.ca@gmail.com
160
+ executables: []
161
+ extensions: []
162
+ extra_rdoc_files: []
163
+ files:
164
+ - MIT-LICENSE
165
+ - README.md
166
+ - Rakefile
167
+ - app/assets/javascripts/s3_relay.coffee
168
+ - app/assets/stylesheets/s3_relay.css
169
+ - app/controllers/s3_relay/uploads_controller.rb
170
+ - app/helpers/s3_relay/uploads_helper.rb
171
+ - app/models/s3_relay/upload.rb
172
+ - config/routes.rb
173
+ - db/migrate/20141009000804_create_s3_relay_uploads.rb
174
+ - lib/s3_relay.rb
175
+ - lib/s3_relay/base.rb
176
+ - lib/s3_relay/engine.rb
177
+ - lib/s3_relay/model.rb
178
+ - lib/s3_relay/private_url.rb
179
+ - lib/s3_relay/s3_relay.rb
180
+ - lib/s3_relay/upload_presigner.rb
181
+ - lib/s3_relay/version.rb
182
+ - test/controllers/s3_relay/uploads_controller_test.rb
183
+ - test/dummy/README.rdoc
184
+ - test/dummy/Rakefile
185
+ - test/dummy/app/assets/javascripts/application.js
186
+ - test/dummy/app/assets/stylesheets/application.css
187
+ - test/dummy/app/controllers/application_controller.rb
188
+ - test/dummy/app/helpers/application_helper.rb
189
+ - test/dummy/app/models/product.rb
190
+ - test/dummy/app/views/layouts/application.html.erb
191
+ - test/dummy/bin/bundle
192
+ - test/dummy/bin/rails
193
+ - test/dummy/bin/rake
194
+ - test/dummy/config.ru
195
+ - test/dummy/config/application.rb
196
+ - test/dummy/config/boot.rb
197
+ - test/dummy/config/database.yml
198
+ - test/dummy/config/environment.rb
199
+ - test/dummy/config/environments/development.rb
200
+ - test/dummy/config/environments/production.rb
201
+ - test/dummy/config/environments/test.rb
202
+ - test/dummy/config/initializers/assets.rb
203
+ - test/dummy/config/initializers/backtrace_silencers.rb
204
+ - test/dummy/config/initializers/cookies_serializer.rb
205
+ - test/dummy/config/initializers/filter_parameter_logging.rb
206
+ - test/dummy/config/initializers/inflections.rb
207
+ - test/dummy/config/initializers/mime_types.rb
208
+ - test/dummy/config/initializers/session_store.rb
209
+ - test/dummy/config/initializers/wrap_parameters.rb
210
+ - test/dummy/config/locales/en.yml
211
+ - test/dummy/config/routes.rb
212
+ - test/dummy/config/secrets.yml
213
+ - test/dummy/db/migrate/20141021002149_create_products.rb
214
+ - test/dummy/db/schema.rb
215
+ - test/dummy/log/development.log
216
+ - test/dummy/log/test.log
217
+ - test/dummy/public/404.html
218
+ - test/dummy/public/422.html
219
+ - test/dummy/public/500.html
220
+ - test/dummy/public/favicon.ico
221
+ - test/factories/products.rb
222
+ - test/factories/uploads.rb
223
+ - test/helpers/s3_relay/uploads_helper_test.rb
224
+ - test/lib/s3_relay/model_test.rb
225
+ - test/lib/s3_relay/private_url_test.rb
226
+ - test/lib/s3_relay/upload_presigner_test.rb
227
+ - test/models/s3_relay/upload_test.rb
228
+ - test/support/database_cleaner.rb
229
+ - test/test_helper.rb
230
+ homepage: http://github.com/kjohnston/s3_relay
231
+ licenses:
232
+ - MIT
233
+ metadata: {}
234
+ post_install_message:
235
+ rdoc_options: []
236
+ require_paths:
237
+ - lib
238
+ required_ruby_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ required_rubygems_version: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - ">="
246
+ - !ruby/object:Gem::Version
247
+ version: '0'
248
+ requirements: []
249
+ rubyforge_project:
250
+ rubygems_version: 2.2.2
251
+ signing_key:
252
+ specification_version: 4
253
+ summary: Direct uploads to S3 and ingestion by your Rails app.
254
+ test_files:
255
+ - test/controllers/s3_relay/uploads_controller_test.rb
256
+ - test/dummy/app/assets/javascripts/application.js
257
+ - test/dummy/app/assets/stylesheets/application.css
258
+ - test/dummy/app/controllers/application_controller.rb
259
+ - test/dummy/app/helpers/application_helper.rb
260
+ - test/dummy/app/models/product.rb
261
+ - test/dummy/app/views/layouts/application.html.erb
262
+ - test/dummy/bin/bundle
263
+ - test/dummy/bin/rails
264
+ - test/dummy/bin/rake
265
+ - test/dummy/config/application.rb
266
+ - test/dummy/config/boot.rb
267
+ - test/dummy/config/database.yml
268
+ - test/dummy/config/environment.rb
269
+ - test/dummy/config/environments/development.rb
270
+ - test/dummy/config/environments/production.rb
271
+ - test/dummy/config/environments/test.rb
272
+ - test/dummy/config/initializers/assets.rb
273
+ - test/dummy/config/initializers/backtrace_silencers.rb
274
+ - test/dummy/config/initializers/cookies_serializer.rb
275
+ - test/dummy/config/initializers/filter_parameter_logging.rb
276
+ - test/dummy/config/initializers/inflections.rb
277
+ - test/dummy/config/initializers/mime_types.rb
278
+ - test/dummy/config/initializers/session_store.rb
279
+ - test/dummy/config/initializers/wrap_parameters.rb
280
+ - test/dummy/config/locales/en.yml
281
+ - test/dummy/config/routes.rb
282
+ - test/dummy/config/secrets.yml
283
+ - test/dummy/config.ru
284
+ - test/dummy/db/migrate/20141021002149_create_products.rb
285
+ - test/dummy/db/schema.rb
286
+ - test/dummy/log/development.log
287
+ - test/dummy/log/test.log
288
+ - test/dummy/public/404.html
289
+ - test/dummy/public/422.html
290
+ - test/dummy/public/500.html
291
+ - test/dummy/public/favicon.ico
292
+ - test/dummy/Rakefile
293
+ - test/dummy/README.rdoc
294
+ - test/factories/products.rb
295
+ - test/factories/uploads.rb
296
+ - test/helpers/s3_relay/uploads_helper_test.rb
297
+ - test/lib/s3_relay/model_test.rb
298
+ - test/lib/s3_relay/private_url_test.rb
299
+ - test/lib/s3_relay/upload_presigner_test.rb
300
+ - test/models/s3_relay/upload_test.rb
301
+ - test/support/database_cleaner.rb
302
+ - test/test_helper.rb