carrierwave-base64 1.8 → 1.9

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: 1517462a6a0337f3574fc8a21056414d8ae0e2eb
4
- data.tar.gz: 00fcd1f2e2e188a4c3c2cd875df82b88313e66cf
3
+ metadata.gz: 667d430a78607af7c4c389f29b57efc591bf0d1f
4
+ data.tar.gz: 1ada94bc31e6632db7f035d09ca05d9151209c8c
5
5
  SHA512:
6
- metadata.gz: e1f822760c828b6dba04de2514a294814ca42e8db25dccbf665a38fe3e8dde0f76d7e3c09b48c4a09ae7961720d51a9ba06fe92fb51504be33e1df3fbf25b2a7
7
- data.tar.gz: 81bf03e4c862d900cfa5e47d6d6769bcbbe2927a1fa8b9319ab75d1e8c98548cf8396f92301c677ce8c61502725de767e9e139afc36f4c8c0ca9ca0a0774b1f4
6
+ metadata.gz: eb34c349e9d3d2f965a7748465cc70a8819dd1351fa1bf083fc0deea9d18e90b9d5111202f214aa3895e912d9e9e273868ca01a5fb11ec91741c4fad876f1c0f
7
+ data.tar.gz: ef10caaf6e4f3a912589167a6918ddb25c444fa99c811c7fde5e79e048d1611b808ecb7d689cf7ef0590759df08a1c7e9073ac51bfb8188ce58590f0ca28d783
@@ -7,6 +7,7 @@ module Carrierwave
7
7
  define_method "#{attribute}=" do |data|
8
8
  if data.present? && data.is_a?(String) && data.strip.start_with?("data")
9
9
  super(Carrierwave::Base64::Base64StringIO.new(data.strip))
10
+ send "#{attribute}_will_change!"
10
11
  else
11
12
  super(data)
12
13
  end
@@ -1,5 +1,5 @@
1
1
  module Carrierwave
2
2
  module Base64
3
- VERSION = "1.8"
3
+ VERSION = "1.9"
4
4
  end
5
5
  end
@@ -28,5 +28,10 @@ RSpec.describe Carrierwave::Base64::Adapter do
28
28
  subject.reload
29
29
  expect(subject.image.current_path).to eq file_path("../uploads", "file.jpg")
30
30
  end
31
+
32
+ it "marks the attribute as changed" do
33
+ subject.image = File.read(file_path("fixtures", "base64_image.fixture")).strip
34
+ expect(subject.changed?).to be_truthy
35
+ end
31
36
  end
32
37
  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: '1.8'
4
+ version: '1.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yury Lebedev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: carrierwave