promiscuous 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,15 @@ class Promiscuous::Publisher::Mock
17
17
  attr_accessor :id, :new_record
18
18
  end
19
19
  attr_accessor *attributes
20
+
21
+ associations = attributes.map { |attr| $1 if attr =~ /^(.*)_id$/ }.compact
22
+ associations.each do |attr|
23
+ attr_accessor attr
24
+ define_method("#{attr}=") do |value|
25
+ instance_variable_set("@#{attr}", value)
26
+ instance_variable_set("@#{attr}_id", value.id)
27
+ end
28
+ end
20
29
  end
21
30
 
22
31
  def self.class_name
@@ -1,3 +1,3 @@
1
1
  module Promiscuous
2
- VERSION = '0.8.6'
2
+ VERSION = '0.8.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promiscuous
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.6
4
+ version: 0.8.7
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-09-12 00:00:00.000000000 Z
13
+ date: 2012-09-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -84,58 +84,58 @@ executables: []
84
84
  extensions: []
85
85
  extra_rdoc_files: []
86
86
  files:
87
- - lib/promiscuous/version.rb
88
- - lib/promiscuous/common.rb
89
- - lib/promiscuous/publisher/lint.rb
87
+ - lib/promiscuous/amqp/bunny.rb
88
+ - lib/promiscuous/amqp/null.rb
89
+ - lib/promiscuous/amqp/rubyamqp.rb
90
+ - lib/promiscuous/publisher/envelope.rb
91
+ - lib/promiscuous/publisher/mongoid/embedded.rb
92
+ - lib/promiscuous/publisher/active_record.rb
93
+ - lib/promiscuous/publisher/amqp.rb
90
94
  - lib/promiscuous/publisher/attributes.rb
91
- - lib/promiscuous/publisher/class.rb
92
- - lib/promiscuous/publisher/mongoid.rb
93
- - lib/promiscuous/publisher/lint/attributes.rb
94
- - lib/promiscuous/publisher/lint/class.rb
95
+ - lib/promiscuous/publisher/base.rb
96
+ - lib/promiscuous/publisher/lint.rb
95
97
  - lib/promiscuous/publisher/lint/amqp.rb
98
+ - lib/promiscuous/publisher/lint/attributes.rb
96
99
  - lib/promiscuous/publisher/lint/base.rb
100
+ - lib/promiscuous/publisher/lint/class.rb
97
101
  - lib/promiscuous/publisher/lint/polymorphic.rb
98
- - lib/promiscuous/publisher/mongoid/embedded.rb
99
- - lib/promiscuous/publisher/active_record.rb
102
+ - lib/promiscuous/publisher/mongoid.rb
103
+ - lib/promiscuous/publisher/polymorphic.rb
100
104
  - lib/promiscuous/publisher/model.rb
101
- - lib/promiscuous/publisher/envelope.rb
105
+ - lib/promiscuous/publisher/class.rb
102
106
  - lib/promiscuous/publisher/mock.rb
103
- - lib/promiscuous/publisher/amqp.rb
104
- - lib/promiscuous/publisher/base.rb
105
- - lib/promiscuous/publisher/polymorphic.rb
106
- - lib/promiscuous/amqp/null.rb
107
- - lib/promiscuous/amqp/rubyamqp.rb
108
- - lib/promiscuous/amqp/bunny.rb
109
- - lib/promiscuous/publisher.rb
110
- - lib/promiscuous/subscriber/lint.rb
111
- - lib/promiscuous/subscriber/attributes.rb
112
- - lib/promiscuous/subscriber/class.rb
113
- - lib/promiscuous/subscriber/mongoid.rb
107
+ - lib/promiscuous/railtie/replicate.rake
108
+ - lib/promiscuous/subscriber/envelope.rb
114
109
  - lib/promiscuous/subscriber/error.rb
115
- - lib/promiscuous/subscriber/lint/attributes.rb
116
- - lib/promiscuous/subscriber/lint/class.rb
110
+ - lib/promiscuous/subscriber/mongoid/embedded.rb
111
+ - lib/promiscuous/subscriber/active_record.rb
112
+ - lib/promiscuous/subscriber/amqp.rb
113
+ - lib/promiscuous/subscriber/attributes.rb
114
+ - lib/promiscuous/subscriber/lint.rb
117
115
  - lib/promiscuous/subscriber/lint/amqp.rb
118
116
  - lib/promiscuous/subscriber/lint/base.rb
117
+ - lib/promiscuous/subscriber/lint/class.rb
119
118
  - lib/promiscuous/subscriber/lint/polymorphic.rb
120
- - lib/promiscuous/subscriber/mongoid/embedded.rb
121
- - lib/promiscuous/subscriber/active_record.rb
119
+ - lib/promiscuous/subscriber/lint/attributes.rb
120
+ - lib/promiscuous/subscriber/base.rb
121
+ - lib/promiscuous/subscriber/mongoid.rb
122
122
  - lib/promiscuous/subscriber/upsert.rb
123
123
  - lib/promiscuous/subscriber/model.rb
124
- - lib/promiscuous/subscriber/envelope.rb
125
- - lib/promiscuous/subscriber/amqp.rb
126
- - lib/promiscuous/subscriber/base.rb
124
+ - lib/promiscuous/subscriber/class.rb
127
125
  - lib/promiscuous/subscriber/polymorphic.rb
126
+ - lib/promiscuous/config.rb
127
+ - lib/promiscuous/amqp.rb
128
128
  - lib/promiscuous/common/lint.rb
129
- - lib/promiscuous/common/class_helpers.rb
130
- - lib/promiscuous/common/options.rb
131
129
  - lib/promiscuous/common/lint/base.rb
132
- - lib/promiscuous/worker.rb
133
- - lib/promiscuous/railtie/replicate.rake
134
- - lib/promiscuous/railtie.rb
130
+ - lib/promiscuous/common/options.rb
131
+ - lib/promiscuous/common/class_helpers.rb
135
132
  - lib/promiscuous/loader.rb
136
- - lib/promiscuous/amqp.rb
137
- - lib/promiscuous/config.rb
133
+ - lib/promiscuous/publisher.rb
134
+ - lib/promiscuous/railtie.rb
138
135
  - lib/promiscuous/subscriber.rb
136
+ - lib/promiscuous/worker.rb
137
+ - lib/promiscuous/common.rb
138
+ - lib/promiscuous/version.rb
139
139
  - lib/promiscuous.rb
140
140
  - README.md
141
141
  homepage: http://github.com/crowdtap/promiscuous