activeadmin_jfu_upload 0.1.4 → 0.1.5

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: ca82149adea2d383b8ad383d28c423e21fb59102
4
- data.tar.gz: bc3aff2a1535e00a4c5f6a5b5ad4d33b42b78fda
3
+ metadata.gz: 6ed0960f1a3e3e097bdeb630128835d7df87582d
4
+ data.tar.gz: 9a1cf56ea4e403c8cefc1bab5694f952a1fa682f
5
5
  SHA512:
6
- metadata.gz: f98e70bd9749d7eb98fde0011587bc7600d130d87893eb228881afa8c18f92299feddc32b9d4c2c47782109560d99d5e36ba79440b69f8a0bcf63579539ccbda
7
- data.tar.gz: 2198662a2d129cc6593cfcbd61caeff65acb7863c9e4af2e88f7f5f6f4a9c3dc243e044c99fce91991e75cd32456958c0de1650374c342eb9ca83f55e02ed9f1
6
+ metadata.gz: 175df804b3b952933038fbdc0fa9189e79070dcf30406a85317d45ac7498ec4abfebc0d328c598976291b60533ca175761c68803d66dee077474e16fb5576221
7
+ data.tar.gz: f2e0c38b8f60cdc5e9bfd1036d3b48f2af8cc7b144ae3bb9ae7e17ee148e117ae16be17c81db64461f06cec3fcfb9e02df84a0ca847687a943abab107ba2687b
@@ -15,6 +15,7 @@ module ActiveAdmin
15
15
  else
16
16
  m = request.headers['CONTENT-RANGE'].match( /[^\s]+\s(\d+)-(\d+)\/(\d+)/ )
17
17
  if m
18
+ buffer = param.read
18
19
  pos = m[1].to_i
19
20
  if pos == 0
20
21
  # resource.update field => param
@@ -24,9 +25,9 @@ module ActiveAdmin
24
25
  resource.update_column field, YAML::dump( field_data )
25
26
  else
26
27
  field_data = YAML::load resource.read_attribute(field)
27
- # File.open( resource.try( field ).try( :path ), 'ab' ) { |f| f.write( param.read ) }
28
+ # File.open( resource.try( field ).try( :path ), 'ab' ) { |f| f.write( buffer ) }
28
29
  end
29
- File.open(field_data[:tempfile], 'ab') { |f| f.write(param.read) }
30
+ File.open(field_data[:tempfile], 'ab') { |f| f.write(buffer) }
30
31
  if ( m[2].to_i + 1 ) == m[3].to_i
31
32
  path = Pathname.new field_data[:tempfile]
32
33
  dst = path.dirname.join(field_data[:original_filename]).to_s
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module JfuUpload
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_jfu_upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-05 00:00:00.000000000 Z
11
+ date: 2018-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  version: '0'
65
65
  requirements: []
66
66
  rubyforge_project:
67
- rubygems_version: 2.6.14
67
+ rubygems_version: 2.6.13
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: jQuery-File-Upload for ActiveAdmin