carrierwave-datamapper 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,11 @@ module CarrierWave
28
28
  _mounter(:#{column}).remove = value
29
29
  attribute_set(:#{column}, '') if _mounter(:#{column}).remove?
30
30
  end
31
+
32
+ def #{column}=(value)
33
+ attribute_set(:#{column}, value)
34
+ super(value)
35
+ end
31
36
  RUBY
32
37
  end
33
38
 
@@ -1,5 +1,5 @@
1
1
  module Carrierwave
2
2
  module Datamapper
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -94,6 +94,14 @@ describe CarrierWave::DataMapper do
94
94
  @event.image.should be_blank
95
95
  end
96
96
 
97
+ context "with a saved resource" do
98
+ it "should mark the resource as dirty" do
99
+ @event.image = stub_file('test.jpeg')
100
+ @event.save
101
+ @event.image = stub_file('test.jpeg')
102
+ @event.dirty?.should be(true)
103
+ end
104
+ end
97
105
  end
98
106
 
99
107
  describe '#save' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-datamapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
5
- prerelease: false
4
+ hash: 25
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonas Nicklas
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-05-18 00:00:00 -04:00
19
+ date: 2011-05-19 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements: []
159
159
 
160
160
  rubyforge_project: carrierwave-datamapper
161
- rubygems_version: 1.3.7
161
+ rubygems_version: 1.4.2
162
162
  signing_key:
163
163
  specification_version: 3
164
164
  summary: Datamapper support for CarrierWave