acts-as-messageable 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -3,3 +3,8 @@ rvm:
3
3
  - 1.9.2
4
4
  - rbx
5
5
  - ree
6
+ gemfile:
7
+ - Gemfile
8
+ - gemfiles/Gemfile-3.0
9
+ - gemfiles/Gemfile-3.1
10
+ - gemfiles/Gemfile-3.2
data/Gemfile CHANGED
@@ -6,7 +6,7 @@ gem "ancestry", "~> 1.2.4"
6
6
  gem "railties", ">= 3.0.0"
7
7
 
8
8
  group :development do
9
- gem "rspec", "~> 2.7.0"
10
- gem "jeweler", "~> 1.6.0"
9
+ gem "rspec", "~> 2.8.0"
10
+ gem "jeweler", "~> 1.7.0"
11
11
  gem "sqlite3-ruby"
12
12
  end
data/README.md CHANGED
@@ -1,25 +1,31 @@
1
-
2
1
  ActsAsMessageable
3
2
  =================
4
3
 
5
4
  The Acts As Messageable allows communication between the models.
6
5
 
7
- [![Build Status](http://travis-ci.org/LTe/acts-as-messageable.png)](http://github.com/LTe/acts-as-messageable)
6
+ [![Build Status](https://secure.travis-ci.org/LTe/acts-as-messageable.png)](http://travis-ci.org/LTe/acts-as-messageable) [![Dependency Status](https://gemnasium.com/LTe/acts-as-messageable.png)](https://gemnasium.com/LTe/acts-as-messageable)
8
7
 
9
8
  Usage
10
9
  =====
11
10
 
12
11
  To use it, add it to your Gemfile:
13
12
 
14
- **Rails 3**
13
+ ### Rails 3
14
+
15
15
  ```ruby
16
16
  gem 'acts-as-messageable'
17
17
  ```
18
18
 
19
- **Rails 2**
19
+ ### Rails 2
20
+
20
21
  Use this [fork](http://github.com/openfirmware/acts-as-messageable)
21
22
  Thanks for [@openfirmware](http://github.com/openfirmware)
22
23
 
24
+ ```ruby
25
+ gem 'acts-as-messageable', :git => 'git://github.com/openfirmware/acts-as-messageable.git',
26
+ :branch => 'rails2.3.11_compatible'
27
+ ```
28
+
23
29
  Post instalation
24
30
  ================
25
31
 
@@ -83,13 +89,13 @@ class User < ActiveRecord::Base
83
89
  end
84
90
  ```
85
91
 
86
- ## Normal
92
+ ## With hash
87
93
 
88
94
  ```ruby
89
95
  @alice.send_message(@bob, { :body => "Hash body" })
90
96
  ```
91
97
 
92
- ## With hash
98
+ ## Normal
93
99
 
94
100
  ```ruby
95
101
  @alice.send_message(@bob, "body")
@@ -123,6 +129,12 @@ Conversation
123
129
  @message.reply("Re: Hello bob!", "I'm fine")
124
130
  ```
125
131
 
132
+ **Or with hash**
133
+
134
+ ```ruby
135
+ @message.reply(:topic => "Re: Hello bob!", :body => "I'm fine")
136
+ ```
137
+
126
138
  **Or in old style**
127
139
 
128
140
  ```ruby
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4
1
+ 0.4.5
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "acts-as-messageable"
8
- s.version = "0.4.4"
8
+ s.version = "0.4.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Piotr Nielacny"]
12
- s.date = "2012-01-04"
12
+ s.date = "2012-02-08"
13
13
  s.email = "piotr.nielacny@gmail.com"
14
14
  s.extra_rdoc_files = [
15
15
  "README.md"
@@ -23,6 +23,9 @@ Gem::Specification.new do |s|
23
23
  "Rakefile",
24
24
  "VERSION",
25
25
  "acts-as-messageable.gemspec",
26
+ "gemfiles/Gemfile-3.0",
27
+ "gemfiles/Gemfile-3.1",
28
+ "gemfiles/Gemfile-3.2",
26
29
  "lib/acts-as-messageable.rb",
27
30
  "lib/acts-as-messageable/acts-as-messageable.rb",
28
31
  "lib/acts-as-messageable/message.rb",
@@ -43,7 +46,7 @@ Gem::Specification.new do |s|
43
46
  ]
44
47
  s.homepage = "http://github.com/LTe/acts-as-messageable"
45
48
  s.require_paths = ["lib"]
46
- s.rubygems_version = "1.8.10"
49
+ s.rubygems_version = "1.8.15"
47
50
  s.summary = "Make user messageable!;-)"
48
51
 
49
52
  if s.respond_to? :specification_version then
@@ -54,16 +57,16 @@ Gem::Specification.new do |s|
54
57
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0"])
55
58
  s.add_runtime_dependency(%q<ancestry>, ["~> 1.2.4"])
56
59
  s.add_runtime_dependency(%q<railties>, [">= 3.0.0"])
57
- s.add_development_dependency(%q<rspec>, ["~> 2.7.0"])
58
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
60
+ s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
61
+ s.add_development_dependency(%q<jeweler>, ["~> 1.7.0"])
59
62
  s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
60
63
  else
61
64
  s.add_dependency(%q<activerecord>, [">= 3.0.0"])
62
65
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
63
66
  s.add_dependency(%q<ancestry>, ["~> 1.2.4"])
64
67
  s.add_dependency(%q<railties>, [">= 3.0.0"])
65
- s.add_dependency(%q<rspec>, ["~> 2.7.0"])
66
- s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
68
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
69
+ s.add_dependency(%q<jeweler>, ["~> 1.7.0"])
67
70
  s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
68
71
  end
69
72
  else
@@ -71,8 +74,8 @@ Gem::Specification.new do |s|
71
74
  s.add_dependency(%q<activesupport>, [">= 3.0.0"])
72
75
  s.add_dependency(%q<ancestry>, ["~> 1.2.4"])
73
76
  s.add_dependency(%q<railties>, [">= 3.0.0"])
74
- s.add_dependency(%q<rspec>, ["~> 2.7.0"])
75
- s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
77
+ s.add_dependency(%q<rspec>, ["~> 2.8.0"])
78
+ s.add_dependency(%q<jeweler>, ["~> 1.7.0"])
76
79
  s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
77
80
  end
78
81
  end
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path => File.expand_path('../..', __FILE__)
4
+ gem "activerecord", "~> 3.0.0"
5
+ gem "activesupport", "~> 3.0.0"
6
+ gem "railties", "~> 3.0.0"
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path => File.expand_path('../..', __FILE__)
4
+ gem "activerecord", "~> 3.1.0"
5
+ gem "activesupport", "~> 3.1.0"
6
+ gem "railties", "~> 3.1.0"
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec :path => File.expand_path('../..', __FILE__)
4
+ gem "activerecord", "~> 3.2.0"
5
+ gem "activesupport", "~> 3.2.0"
6
+ gem "railties", "~> 3.2.0"
@@ -21,7 +21,13 @@ module ActsAsMessageable
21
21
  :dependent => :nullify
22
22
 
23
23
  self.messages_class_name = (options[:class_name] || "ActsAsMessageable::Message").constantize
24
- self.messages_class_name.set_table_name(options[:table_name] || "messages")
24
+
25
+ if self.messages_class_name.respond_to?(:table_name=)
26
+ self.messages_class_name.table_name = (options[:table_name] || "messages")
27
+ else
28
+ self.messages_class_name.set_table_name(options[:table_name] || "messages")
29
+ ActiveSupport::Deprecation.warn("Calling set_table_name is deprecated. Please use `self.table_name = 'the_name'` instead.")
30
+ end
25
31
 
26
32
  if options[:required].is_a? Symbol
27
33
  self.messages_class_name.required = [options[:required]]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts-as-messageable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-04 00:00:00.000000000 Z
12
+ date: 2012-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &8607820 !ruby/object:Gem::Requirement
16
+ requirement: &32872620 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *8607820
24
+ version_requirements: *32872620
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activesupport
27
- requirement: &8606800 !ruby/object:Gem::Requirement
27
+ requirement: &32872120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *8606800
35
+ version_requirements: *32872120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: ancestry
38
- requirement: &8605940 !ruby/object:Gem::Requirement
38
+ requirement: &32871640 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 1.2.4
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *8605940
46
+ version_requirements: *32871640
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: railties
49
- requirement: &8604920 !ruby/object:Gem::Requirement
49
+ requirement: &32871100 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,32 +54,32 @@ dependencies:
54
54
  version: 3.0.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *8604920
57
+ version_requirements: *32871100
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
- requirement: &8604220 !ruby/object:Gem::Requirement
60
+ requirement: &32870560 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
64
64
  - !ruby/object:Gem::Version
65
- version: 2.7.0
65
+ version: 2.8.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *8604220
68
+ version_requirements: *32870560
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &8619760 !ruby/object:Gem::Requirement
71
+ requirement: &32869960 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
75
75
  - !ruby/object:Gem::Version
76
- version: 1.6.0
76
+ version: 1.7.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *8619760
79
+ version_requirements: *32869960
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sqlite3-ruby
82
- requirement: &8618740 !ruby/object:Gem::Requirement
82
+ requirement: &32869380 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *8618740
90
+ version_requirements: *32869380
91
91
  description:
92
92
  email: piotr.nielacny@gmail.com
93
93
  executables: []
@@ -103,6 +103,9 @@ files:
103
103
  - Rakefile
104
104
  - VERSION
105
105
  - acts-as-messageable.gemspec
106
+ - gemfiles/Gemfile-3.0
107
+ - gemfiles/Gemfile-3.1
108
+ - gemfiles/Gemfile-3.2
106
109
  - lib/acts-as-messageable.rb
107
110
  - lib/acts-as-messageable/acts-as-messageable.rb
108
111
  - lib/acts-as-messageable/message.rb
@@ -134,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
137
  version: '0'
135
138
  segments:
136
139
  - 0
137
- hash: -2807447506494176780
140
+ hash: -1660593036637960416
138
141
  required_rubygems_version: !ruby/object:Gem::Requirement
139
142
  none: false
140
143
  requirements:
@@ -143,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
146
  version: '0'
144
147
  requirements: []
145
148
  rubyforge_project:
146
- rubygems_version: 1.8.10
149
+ rubygems_version: 1.8.15
147
150
  signing_key:
148
151
  specification_version: 3
149
152
  summary: Make user messageable!;-)