mongoid-direct-s3-upload 0.1.6 → 0.1.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0f5257521dd37b8f982d950cc72dd81747b272e
4
- data.tar.gz: e4a36565fcea6eecbeecd0a4a499808724caaee3
3
+ metadata.gz: 50c9aea51d4400499e5e9821d645f8bf8e24ff0b
4
+ data.tar.gz: c4ff1159cb3eecd4939de40bc875bbdea3e5af1b
5
5
  SHA512:
6
- metadata.gz: b41893d56774c2145bd92c23e613c0b1d62dcc5dc75c377ab3fdd2324337a89f1df28c0114300d3a4a3a9b5770ed24527ec1cffbfb04bc8ae6de10253db18049
7
- data.tar.gz: e092f2a5172c9965fada7b835192b1955fb936a055e4fb57acf1ff81ef21290c5cc3fd6c01c202aa5f88e6016346dd3b7217a4b1c29633778586e9c56e90ec83
6
+ metadata.gz: 8bf2ef89eeced718ee2dae0e34ce73f1a2cfed839d339f55672698a6d248fc776a51ca4a4d3c5d84d7e5aff59f004b2fa9ab00c1cc943e859b633c054c8de2b1
7
+ data.tar.gz: 7919d83cf4d3a16c2a4b488224ec81fef3a53a8ac29067a7623c0d3eb68925a69bf448833dc8165f8f582738d5f8ff850a457167acfa722a96b04699f7b1817b
@@ -63,6 +63,11 @@ module S3Relay
63
63
  "http://epartrade.s3-website-us-west-1.amazonaws.com/500x500/#{file_full_s3_key}"
64
64
  end
65
65
 
66
+ def public_url_with_size size
67
+ file_full_s3_key = public_url.split('amazonaws.com/')[1]
68
+ "http://epartrade.s3-website-us-west-1.amazonaws.com/#{size}/#{file_full_s3_key}"
69
+ end
70
+
66
71
  def private_url
67
72
  S3Relay::PrivateUrl.new(uuid, filename).generate
68
73
  end
@@ -1,3 +1,3 @@
1
1
  module S3Relay
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-direct-s3-upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - hartator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-02 00:00:00.000000000 Z
11
+ date: 2017-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coffee-rails
@@ -285,72 +285,72 @@ specification_version: 4
285
285
  summary: Rails and Mongoid simplest helpers possible to directly upload file to S3
286
286
  without hitting the server.
287
287
  test_files:
288
- - test/controllers/s3_relay/uploads_controller_test.rb
289
- - test/dummy/app/assets/config/manifest.js
290
- - test/dummy/app/assets/javascripts/application.js
291
- - test/dummy/app/assets/javascripts/cable.js
292
- - test/dummy/app/assets/stylesheets/application.css
293
- - test/dummy/app/channels/application_cable/channel.rb
294
- - test/dummy/app/channels/application_cable/connection.rb
295
- - test/dummy/app/controllers/application_controller.rb
296
- - test/dummy/app/helpers/application_helper.rb
297
- - test/dummy/app/jobs/application_job.rb
298
288
  - test/dummy/app/mailers/application_mailer.rb
299
- - test/dummy/app/models/application_record.rb
300
289
  - test/dummy/app/models/product.rb
290
+ - test/dummy/app/models/application_record.rb
291
+ - test/dummy/app/jobs/application_job.rb
292
+ - test/dummy/app/controllers/application_controller.rb
301
293
  - test/dummy/app/views/layouts/application.html.erb
302
294
  - test/dummy/app/views/layouts/mailer.html.erb
303
295
  - test/dummy/app/views/layouts/mailer.text.erb
304
- - test/dummy/bin/bundle
305
- - test/dummy/bin/rails
296
+ - test/dummy/app/assets/config/manifest.js
297
+ - test/dummy/app/assets/javascripts/cable.js
298
+ - test/dummy/app/assets/javascripts/application.js
299
+ - test/dummy/app/assets/stylesheets/application.css
300
+ - test/dummy/app/helpers/application_helper.rb
301
+ - test/dummy/app/channels/application_cable/connection.rb
302
+ - test/dummy/app/channels/application_cable/channel.rb
303
+ - test/dummy/test/application_system_test_case.rb
304
+ - test/dummy/test/test_helper.rb
305
+ - test/dummy/bin/update
306
306
  - test/dummy/bin/rake
307
307
  - test/dummy/bin/setup
308
- - test/dummy/bin/spring
309
- - test/dummy/bin/update
308
+ - test/dummy/bin/bundle
310
309
  - test/dummy/bin/yarn
311
- - test/dummy/config/application.rb
312
- - test/dummy/config/boot.rb
310
+ - test/dummy/bin/spring
311
+ - test/dummy/bin/rails
312
+ - test/dummy/config/secrets.yml
313
+ - test/dummy/config/routes.rb
314
+ - test/dummy/config/locales/en.yml
313
315
  - test/dummy/config/cable.yml
314
- - test/dummy/config/database.yml
315
- - test/dummy/config/environment.rb
316
- - test/dummy/config/environments/development.rb
317
316
  - test/dummy/config/environments/production.rb
317
+ - test/dummy/config/environments/development.rb
318
318
  - test/dummy/config/environments/test.rb
319
+ - test/dummy/config/spring.rb
320
+ - test/dummy/config/environment.rb
321
+ - test/dummy/config/application.rb
322
+ - test/dummy/config/puma.rb
323
+ - test/dummy/config/database.yml
324
+ - test/dummy/config/boot.rb
319
325
  - test/dummy/config/initializers/application_controller_renderer.rb
320
- - test/dummy/config/initializers/assets.rb
321
326
  - test/dummy/config/initializers/backtrace_silencers.rb
322
- - test/dummy/config/initializers/cookies_serializer.rb
323
- - test/dummy/config/initializers/filter_parameter_logging.rb
324
- - test/dummy/config/initializers/inflections.rb
325
327
  - test/dummy/config/initializers/mime_types.rb
328
+ - test/dummy/config/initializers/filter_parameter_logging.rb
326
329
  - test/dummy/config/initializers/wrap_parameters.rb
327
- - test/dummy/config/locales/en.yml
328
- - test/dummy/config/puma.rb
329
- - test/dummy/config/routes.rb
330
- - test/dummy/config/secrets.yml
331
- - test/dummy/config/spring.rb
330
+ - test/dummy/config/initializers/assets.rb
331
+ - test/dummy/config/initializers/cookies_serializer.rb
332
+ - test/dummy/config/initializers/inflections.rb
332
333
  - test/dummy/config.ru
333
- - test/dummy/db/migrate/20141021002149_create_products.rb
334
- - test/dummy/db/schema.rb
335
- - test/dummy/db/seeds.rb
336
- - test/dummy/package.json
337
- - test/dummy/public/404.html
334
+ - test/dummy/README.md
335
+ - test/dummy/Rakefile
336
+ - test/dummy/public/favicon.ico
338
337
  - test/dummy/public/422.html
338
+ - test/dummy/public/apple-touch-icon.png
339
339
  - test/dummy/public/500.html
340
+ - test/dummy/public/404.html
340
341
  - test/dummy/public/apple-touch-icon-precomposed.png
341
- - test/dummy/public/apple-touch-icon.png
342
- - test/dummy/public/favicon.ico
343
342
  - test/dummy/public/robots.txt
344
- - test/dummy/Rakefile
345
- - test/dummy/README.md
346
- - test/dummy/test/application_system_test_case.rb
347
- - test/dummy/test/test_helper.rb
348
- - test/factories/products.rb
349
- - test/factories/uploads.rb
350
- - test/helpers/s3_relay/uploads_helper_test.rb
351
- - test/lib/s3_relay/model_test.rb
352
- - test/lib/s3_relay/private_url_test.rb
353
- - test/lib/s3_relay/upload_presigner_test.rb
343
+ - test/dummy/package.json
344
+ - test/dummy/db/schema.rb
345
+ - test/dummy/db/seeds.rb
346
+ - test/dummy/db/migrate/20141021002149_create_products.rb
354
347
  - test/models/s3_relay/upload_test.rb
355
348
  - test/support/database_cleaner.rb
349
+ - test/factories/uploads.rb
350
+ - test/factories/products.rb
351
+ - test/lib/s3_relay/upload_presigner_test.rb
352
+ - test/lib/s3_relay/private_url_test.rb
353
+ - test/lib/s3_relay/model_test.rb
356
354
  - test/test_helper.rb
355
+ - test/controllers/s3_relay/uploads_controller_test.rb
356
+ - test/helpers/s3_relay/uploads_helper_test.rb