mailboxer 0.10.0 → 0.10.1

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: 5c2e21ceea4cdf3d6933952a7039b9739409f830
4
- data.tar.gz: f9316933c047181976de3d7eb332a888e70fb8a1
3
+ metadata.gz: b75e4674f36049f58d692746092d286f776e345d
4
+ data.tar.gz: b050be17fc293c2e10080f224d0613ccc8909196
5
5
  SHA512:
6
- metadata.gz: 0f4bf22b86ab916878fb334a2392c116936de021233b827683291640ba08455b9b48d50423b39fb4a8a3901488bf70998c75932ae0bcd0951242457531ca973e
7
- data.tar.gz: 00cc3ce48cf43ec9e6fc1b1443e31d014df3f97460f7a0854f42219fa6219cf925fbc2fbbfb951588ae5c9bf3cad9964296518f358be13a9d6ae5a3eaebb3e0d
6
+ metadata.gz: 7192237a5405c6ea024790fdd6ad5c4c3a851c871e40fbd6025b5770db0f77977387d4158b52b8614d0b58e5cd3729f9a7a310ada2557200067887d9a008de1b
7
+ data.tar.gz: 69ee9d1a2206f89142fc32b0c679faeb54e09b3044a5a832db94c998db01746c244e819cf27fd0516005e9da991babd7496d20dd0962d5fc816feb5782cd6b54
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Mailboxer 0.9.x [![](https://secure.travis-ci.org/ging/mailboxer.png)](http://travis-ci.org/ging/mailboxer) [![](https://gemnasium.com/ging/mailboxer.png)](https://gemnasium.com/ging/mailboxer)
1
+ # Mailboxer 0.10.x [![](https://secure.travis-ci.org/ging/mailboxer.png)](http://travis-ci.org/ging/mailboxer) [![](https://gemnasium.com/ging/mailboxer.png)](https://gemnasium.com/ging/mailboxer)
2
2
 
3
3
  This project is based on the need of a private message system for [ging
4
4
  / social\_stream](https://github.com/ging/social_stream). Instead of creating our core message system heavily
@@ -11,8 +11,8 @@ module Mailboxer
11
11
 
12
12
  initializer "mailboxer.models.messageable" do
13
13
  ActiveSupport.on_load(:active_record) do
14
- include Mailboxer::Models::Messageable
14
+ extend Mailboxer::Models::Messageable::ActiveRecord
15
15
  end
16
16
  end
17
17
  end
18
- end
18
+ end
@@ -1,20 +1,21 @@
1
1
  module Mailboxer
2
2
  module Models
3
3
  module Messageable
4
- def self.included(mod)
5
- mod.extend(ClassMethods)
6
- end
4
+ extend ActiveSupport::Concern
7
5
 
8
- module ClassMethods
6
+ module ActiveRecord
9
7
  #Converts the model into messageable allowing it to interchange messages and
10
8
  #receive notifications
11
9
  def acts_as_messageable
12
- has_many :messages, :as => :sender
13
- has_many :receipts, :order => 'created_at DESC', :dependent => :destroy, :as => :receiver
14
-
10
+ include Messageable
15
11
  end
16
12
  end
17
13
 
14
+ included do
15
+ has_many :messages, :as => :sender
16
+ has_many :receipts, :order => 'created_at DESC', :dependent => :destroy, :as => :receiver
17
+ end
18
+
18
19
  unless defined?(Mailboxer.name_method)
19
20
  # Returning any kind of identification you want for the model
20
21
  define_method Mailboxer.name_method do
data/mailboxer.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "mailboxer"
3
- s.version = "0.10.0"
3
+ s.version = "0.10.1"
4
4
  s.authors = ["Eduardo Casanova Cuesta"]
5
5
  s.summary = "Messaging system for rails apps."
6
6
  s.description = "A Rails engine that allows any model to act as messageable, adding the ability to exchange messages " +
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailboxer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Casanova Cuesta