s3ff 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 804b22add6dbaad3b44df45846e522113b9c848e
4
- data.tar.gz: 290fe54e2b6ede4b2d914af03534eb019945b442
3
+ metadata.gz: 7ab82d0c43f5bc28968c06a40939bc3883f454ed
4
+ data.tar.gz: 72956174b49ff57a0a014ae50d38f1edcc8a7890
5
5
  SHA512:
6
- metadata.gz: 1263f70cfdb4dd17e6284aebbc8d8cc9d588ba3d422f4b15c044ea7dc1503246becdfbbfb09e70ff7aa75bb74ab4e6e151e5f58ec4aed4484cbe10455264d393
7
- data.tar.gz: 51cf9eb3149442474c227fcd93042152462cc9c46aaa4ccb8b84c890a0455f57e61a155a8b8fb373feabcab519e75612d1140cde4e20c2d1c3a56e92536e2428
6
+ metadata.gz: df29ec657a8a95edd62172ec8d25d49f79e780e2eeeda20b55f971e6405f95ea2caeecb76d8c7a66603b09a3ee8f0c92e1315ba24208f6ad318e1b49b57829e4
7
+ data.tar.gz: 7ef2682ad8158cc7424d2cdc0ce40a82ef7dc0d4f9b73dde233893aa2c006a2c13c7d3b9ebd9fb6b28dccfddee545c6e8470dd7c67032c351916ca9fc27d8534
data/README.md CHANGED
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
 
24
24
  ### 1. Configure s3_file_field
25
25
 
26
- add a config like `sample/config_s3_file_field.rb` into your Rails `config/initializers/` directory
26
+ add a config like [sample/config_s3_file_field.rb](https://github.com/jollygoodcode/s3ff/blob/master/sample/config_s3_file_field.rb) into your Rails `config/initializers/` directory
27
27
 
28
28
  ### 2. Add javascript
29
29
 
@@ -111,12 +111,11 @@ class User < ActiveRecord::Base
111
111
  # s3ff changes
112
112
 
113
113
  def avatar_direct_url=(value)
114
- self.avatar =
115
- ActionDispatch::Http::UploadedFile.new(
116
- tempfile: open(value),
117
- filename: File.basename(value),
118
- ).tap do |upload|
119
- upload.content_type = Paperclip::ContentTypeDetector.new(upload.path).detect
114
+ open(value, ssl_verify_mode: OpenSSL::SSL::VERIFY_NONE) do |file|
115
+ self.attributes = {
116
+ avatar: file,
117
+ avatar_file_name: File.basename(value),
118
+ }
120
119
  end
121
120
  end
122
121
  end
@@ -124,7 +123,7 @@ end
124
123
 
125
124
  #### CAVEAT
126
125
 
127
- It isn't ideal to handle your attachment processing synchronously during the web request. For usage with `Sidekiq` or `DelayedJob`, look at the reference code in `sample/user.*.rb`
126
+ It is not ideal to handle your attachment processing synchronously inside the web request. For usage with `Sidekiq` or `DelayedJob`, look at the reference code in [sample/user.*.rb](https://github.com/jollygoodcode/s3ff/tree/master/sample)
128
127
 
129
128
 
130
129
  ## Contributing
@@ -24,6 +24,10 @@ $(function() {
24
24
  };
25
25
 
26
26
  var s3ff_handlers = {
27
+ drop: function(e, data) {
28
+ if (that[0] != e.originalEvent.target) return e.preventDefault();
29
+ if (! multi) label.children('.s3ff_section').remove();
30
+ },
27
31
  change: function(e, data) {
28
32
  if (! multi) label.children('.s3ff_section').remove();
29
33
  },
data/lib/s3ff/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module S3FF
2
- VERSION = '0.9.2'
2
+ VERSION = '0.9.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: s3ff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chew Choon Keat
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-28 00:00:00.000000000 Z
11
+ date: 2014-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: s3_file_field