bustle 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,8 @@ module Bustle
7
7
 
8
8
  class << self
9
9
  def add(publisher, data = {})
10
+ data = data.dup
11
+
10
12
  if resource = data.delete(:resource)
11
13
  data[:resource_class] = resource.class.name
12
14
  data[:resource_id] = resource.id
@@ -1,3 +1,3 @@
1
1
  module Bustle
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -10,18 +10,23 @@ module Bustle
10
10
  let(:subscriber2) { Subscribers.add user }
11
11
 
12
12
  it "creates an activity" do
13
- Activities.add publisher, {
13
+ data = {
14
14
  :action => 'show',
15
15
  :resource => comment,
16
16
  :data => 'hello world'
17
17
  }
18
18
 
19
+ data2 = data.dup
20
+
21
+ Activities.add publisher, data
22
+
19
23
  activity = Activity.to_adapter.get(1)
20
24
  activity.resource_class.should == 'Bustle::Dummy::Comment'
21
25
  activity.resource_id.should == 101
22
26
  activity.action.should == 'show'
23
27
  activity.data.should == 'hello world'
24
28
  activity.publisher_id.should == publisher.id
29
+ data.should == data2
25
30
  end
26
31
 
27
32
  context "multiple activities" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bustle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-09 00:00:00.000000000 Z
12
+ date: 2012-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -241,7 +241,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
241
  version: '0'
242
242
  segments:
243
243
  - 0
244
- hash: -2805379074770357705
244
+ hash: 2823484573028081008
245
245
  required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  none: false
247
247
  requirements:
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
250
  version: '0'
251
251
  segments:
252
252
  - 0
253
- hash: -2805379074770357705
253
+ hash: 2823484573028081008
254
254
  requirements: []
255
255
  rubyforge_project:
256
256
  rubygems_version: 1.8.24