carrierwave-base64 2.3.0 → 2.3.1

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: 6cf760a50a5b061dd501f3ef738c93e11deef874
4
- data.tar.gz: b934e247e3419fbc7adcbaf7bb66d2f15a1442e0
3
+ metadata.gz: 4ba9627c59b10b98da78db790ba30abe072d1b13
4
+ data.tar.gz: 2cb5b80c78da40fa90cfecdb3fd855d094a16d27
5
5
  SHA512:
6
- metadata.gz: c5e14194c1a0b7e76d32c708de7f46c675bdb9f2cd642f6cc2d75956e9c1ea71d9a4e8f7251e29ab978fb2571ccf26fb63bf50b658a16bb0e255aeadc2f85309
7
- data.tar.gz: cda44171485b7081c9b005ac372a1a88b0a8cdf7dc0a8fb92392593532353ea1818205f060ec6c379b6614ad70df43e26a4329de21624d769574c189e6295124
6
+ metadata.gz: dd2198278a4f3594bbf9a3b33acebce05eb732f07bbab8a661e5cbc2a6d4c38474d49da6359c03c055ab11503cff3ec065fb29a400bbe238cc5c952aa7ed4f43
7
+ data.tar.gz: 2a1e980f0980a861e59a05ef72820c2c9ae12c892fc205af58fb2c5737c5ab452fd727dec7e791edc26642a5b85409057e2a258284711f8c8db3242f3c29c1e6
data/README.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/carrierwave-base64.svg)](http://badge.fury.io/rb/carrierwave-base64)
4
4
  [![Build Status](https://travis-ci.org/lebedev-yury/carrierwave-base64.svg?branch=master)](https://travis-ci.org/lebedev-yury/carrierwave-base64)
5
+ [![Code Climate](https://codeclimate.com/github/lebedev-yury/carrierwave-base64/badges/gpa.svg)](https://codeclimate.com/github/lebedev-yury/carrierwave-base64)
5
6
 
6
7
  Upload files encoded as base64 to carrierwave.
7
8
 
@@ -35,14 +36,12 @@ Now you can also upload files by passing an encoded base64 string to the attribu
35
36
 
36
37
  ## Setting the file name
37
38
 
38
- To set the file name for the uploaded files, use the `:file_name` option:
39
+ To set the file name for the uploaded files, use the `:file_name` option (without extention):
39
40
 
40
41
  ```ruby
41
42
  mount_base64_uploader :image, ImageUploader, file_name: 'userpic'
42
43
  ```
43
44
 
44
- This value will be used, when naming stored files. Extention will be taked from the base64 content-type spec.
45
-
46
45
  ## Data format
47
46
 
48
47
  The string with the encoded data, should be prefixed with Data URI scheme format:
@@ -7,8 +7,8 @@ module Carrierwave
7
7
  define_method "#{attribute}=" do |data|
8
8
  send "#{attribute}_will_change!" if data.present?
9
9
 
10
- super(data) unless data.is_a?(String) &&
11
- data.strip.start_with?('data')
10
+ return super(data) unless data.is_a?(String) &&
11
+ data.strip.start_with?('data')
12
12
 
13
13
  super(Carrierwave::Base64::Base64StringIO.new(
14
14
  data.strip, options[:file_name] || 'file'
@@ -1,5 +1,5 @@
1
1
  module Carrierwave
2
2
  module Base64
3
- VERSION = '2.3.0'.freeze
3
+ VERSION = '2.3.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-base64
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Lebedev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-18 00:00:00.000000000 Z
11
+ date: 2016-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave