active_metadata 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -54,6 +54,7 @@ Feature: Trigger alert on modify
54
54
  And should record the "new note!" in the old_value
55
55
  And should record the "" in the new_value
56
56
  And should record the "note_message" in the type
57
+ And should record the current_user_id in the created_by
57
58
 
58
59
  Scenario: receive a new alert in the inbox when a attachment of a field is created
59
60
  Given a watcher on the "name" field
@@ -88,3 +89,4 @@ Feature: Trigger alert on modify
88
89
  And should record the "" in the new_value
89
90
  And should record the "file.txt" in the old_value
90
91
  And should record the "attachment_message" in the type
92
+ And should record the current_user_id in the created_by
@@ -28,10 +28,10 @@ module ActiveMetadata::Persistence::Attachment
28
28
 
29
29
  def delete_attachment(id)
30
30
  a = ActiveMetadata::Attachment.find(id)
31
- filename = a.attach.original_filename
31
+ filename, created_by = a.attach.original_filename, a.created_by
32
32
  a.destroy
33
33
  reload_attachments_cache_for a.label
34
- self.send(:send_notification, a.label, filename, "", :attachment_message)
34
+ self.send(:send_notification, a.label, filename, "", :attachment_message, created_by)
35
35
  end
36
36
 
37
37
  def update_attachment(id, newfile, starred=nil)
@@ -49,10 +49,10 @@ module ActiveMetadata::Persistence::Note
49
49
 
50
50
  def delete_note(id)
51
51
  note = ActiveMetadata::Note.find(id)
52
- old_value = note.note
52
+ old_value, created_by = note.note, note.created_by
53
53
  note.destroy
54
54
  reload_notes_cache_for note.label
55
- self.send(:send_notification, note.label, old_value, "", :note_message)
55
+ self.send(:send_notification, note.label, old_value, "", :note_message, created_by)
56
56
  end
57
57
 
58
58
  def has_notes_for field
@@ -1,3 +1,3 @@
1
1
  module ActiveMetadata
2
- VERSION = "0.7.5"
2
+ VERSION = "0.7.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-21 00:00:00.000000000 Z
13
+ date: 2012-06-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -261,7 +261,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
261
261
  version: '0'
262
262
  segments:
263
263
  - 0
264
- hash: -2239752898165764505
264
+ hash: 1997960578253629340
265
265
  required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  none: false
267
267
  requirements:
@@ -270,7 +270,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
270
  version: '0'
271
271
  segments:
272
272
  - 0
273
- hash: -2239752898165764505
273
+ hash: 1997960578253629340
274
274
  requirements: []
275
275
  rubyforge_project: active_metadata
276
276
  rubygems_version: 1.8.19