acts-as-messageable 0.4.10 → 0.4.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rspec +1 -1
- data/.travis.yml +16 -14
- data/Appraisals +30 -27
- data/Gemfile +10 -10
- data/Gemfile.lock +124 -98
- data/README.md +4 -5
- data/Rakefile +8 -10
- data/VERSION +1 -1
- data/acts-as-messageable.gemspec +45 -43
- data/gemfiles/rails_3.2.gemfile +7 -7
- data/gemfiles/rails_3.2.gemfile.lock +153 -0
- data/gemfiles/rails_4.2.11.gemfile +16 -0
- data/gemfiles/rails_4.2.11.gemfile.lock +157 -0
- data/gemfiles/rails_5.2.gemfile +16 -0
- data/gemfiles/rails_5.2.gemfile.lock +155 -0
- data/gemfiles/rails_6.0.gemfile +16 -0
- data/gemfiles/rails_6.0.gemfile.lock +155 -0
- data/lib/acts-as-messageable/message.rb +13 -13
- data/lib/acts-as-messageable/model.rb +46 -46
- data/lib/acts-as-messageable/rails4.rb +1 -3
- data/lib/acts-as-messageable/railtie.rb +0 -1
- data/lib/acts-as-messageable/relation.rb +4 -4
- data/lib/acts-as-messageable/scopes.rb +21 -20
- data/lib/generators/acts-as-messageable/migration/migration_generator.rb +12 -4
- data/spec/acts-as-messageable_spec.rb +155 -160
- data/spec/custom-class_spec.rb +19 -20
- data/spec/custom-required_spec.rb +27 -27
- data/spec/group-messages_spec.rb +17 -19
- data/spec/spec_helper.rb +22 -22
- data/spec/support/admin.rb +3 -3
- data/spec/support/send_message.rb +1 -1
- metadata +23 -21
- data/gemfiles/rails_3.0.gemfile +0 -16
- data/gemfiles/rails_3.1.gemfile +0 -16
- data/gemfiles/rails_4.0.gemfile +0 -16
- data/gemfiles/rails_4.1.gemfile +0 -16
- data/gemfiles/rails_4.1_ProtectedAttributes.gemfile +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d39bb2cad41112507fe75f034c4eb8f959e91e5183cc6418ab30c2f6064f0431
|
4
|
+
data.tar.gz: eeea6d6202f01f845737538938ebfaa1ae7f1874685a1490aa4d3540f838cabf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 843a163ea94ab5efe825bbbb91838d805e058efcaa23a7ff2e3880b35e500fd3e9d9fc9f04426cd030b71eff1d7914412226ec6f3af9811b7ba13d40a0fb08d8
|
7
|
+
data.tar.gz: 870d81738c5d3804c23641a6188a0baa9d4f1c2615a9fca31f8f4859e7b1297d6ab661c846272115211f0f42bd4f44ac51089cee212899063b38151e8c33f76a
|
data/.rspec
CHANGED
@@ -1 +1 @@
|
|
1
|
-
-fd -color
|
1
|
+
-fd -color
|
data/.travis.yml
CHANGED
@@ -1,17 +1,19 @@
|
|
1
|
-
rvm:
|
2
|
-
- 1.9.3
|
3
|
-
- 2.0.0
|
4
|
-
- 2.1.0
|
5
|
-
- ruby-head
|
6
|
-
- rbx
|
7
|
-
gemfile:
|
8
|
-
- gemfiles/rails_3.0.gemfile
|
9
|
-
- gemfiles/rails_3.1.gemfile
|
10
|
-
- gemfiles/rails_3.2.gemfile
|
11
|
-
- gemfiles/rails_4.0.gemfile
|
12
|
-
- gemfiles/rails_4.1.gemfile
|
13
|
-
- gemfiles/rails_4.1_ProtectedAttributes.gemfile
|
14
1
|
matrix:
|
15
2
|
allow_failures:
|
16
3
|
- rvm: ruby-head
|
17
|
-
|
4
|
+
include:
|
5
|
+
- rvm: 2.3.8
|
6
|
+
gemfile: gemfiles/rails_3.2.gemfile
|
7
|
+
- rvm: 2.3.8
|
8
|
+
gemfile: gemfiles/rails_4.2.11.gemfile
|
9
|
+
- rvm: 2.6.3
|
10
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
11
|
+
- rvm: 2.6.3
|
12
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
13
|
+
- rvm: ruby-head
|
14
|
+
gemfile: gemfiles/rails_5.2.gemfile
|
15
|
+
- rvm: ruby-head
|
16
|
+
gemfile: gemfiles/rails_6.0.gemfile
|
17
|
+
before_install:
|
18
|
+
- gem update --system
|
19
|
+
- gem install bundler
|
data/Appraisals
CHANGED
@@ -1,36 +1,39 @@
|
|
1
|
-
appraise "rails-3.
|
2
|
-
gem "activerecord", "~> 3.
|
3
|
-
gem "activesupport", "~> 3.
|
4
|
-
gem "railties", "~> 3.
|
5
|
-
end
|
1
|
+
appraise "rails-3.2" do
|
2
|
+
gem "activerecord", "~> 3.2.22"
|
3
|
+
gem "activesupport", "~> 3.2.22"
|
4
|
+
gem "railties", "~> 3.2.22"
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
gem "railties", "~> 3.1.0"
|
6
|
+
group :development do
|
7
|
+
gem 'sqlite3', '~> 1.3.6'
|
8
|
+
end
|
11
9
|
end
|
12
10
|
|
13
|
-
appraise "rails-
|
14
|
-
gem "activerecord", "~>
|
15
|
-
gem "activesupport", "~>
|
16
|
-
gem "railties", "~>
|
17
|
-
end
|
11
|
+
appraise "rails-4.2.11" do
|
12
|
+
gem "activerecord", "~> 4.2.11"
|
13
|
+
gem "activesupport", "~> 4.2.11"
|
14
|
+
gem "railties", "~> 4.2.11"
|
18
15
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
gem "railties", "~> 4.0.0"
|
16
|
+
group :development do
|
17
|
+
gem 'sqlite3', '~> 1.3.6'
|
18
|
+
end
|
23
19
|
end
|
24
20
|
|
25
|
-
appraise
|
26
|
-
gem
|
27
|
-
gem
|
28
|
-
gem
|
21
|
+
appraise 'rails-5.2' do
|
22
|
+
gem 'activerecord', '~> 5.2.0'
|
23
|
+
gem 'activesupport', '~> 5.2.0'
|
24
|
+
gem 'railties', '~> 5.2.0'
|
25
|
+
|
26
|
+
group :development do
|
27
|
+
gem 'sqlite3', '~> 1.3.6'
|
28
|
+
end
|
29
29
|
end
|
30
30
|
|
31
|
-
appraise
|
32
|
-
gem
|
33
|
-
gem
|
34
|
-
gem
|
35
|
-
|
31
|
+
appraise 'rails-6.0' do
|
32
|
+
gem 'activerecord', '~> 6.0.0.rc1'
|
33
|
+
gem 'activesupport', '~> 6.0.0.rc1'
|
34
|
+
gem 'railties', '~> 6.0.0.rc1'
|
35
|
+
|
36
|
+
group :development do
|
37
|
+
gem 'sqlite3', '~> 1.4.0'
|
38
|
+
end
|
36
39
|
end
|
data/Gemfile
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
source
|
1
|
+
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem
|
4
|
-
gem
|
5
|
-
gem
|
6
|
-
gem
|
3
|
+
gem 'activerecord', '>= 3.0.0'
|
4
|
+
gem 'activesupport', '>= 3.0.0'
|
5
|
+
gem 'ancestry', '>= 1.3.0'
|
6
|
+
gem 'railties', '>= 3.0.0'
|
7
7
|
|
8
8
|
group :development do
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
9
|
+
gem 'appraisal'
|
10
|
+
gem 'coveralls', require: false
|
11
|
+
gem 'jeweler'
|
12
|
+
gem 'rspec'
|
13
|
+
gem 'sqlite3'
|
14
14
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,117 +1,140 @@
|
|
1
1
|
GEM
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionpack (
|
5
|
-
actionview (=
|
6
|
-
activesupport (=
|
7
|
-
rack (~>
|
8
|
-
rack-test (
|
9
|
-
|
10
|
-
|
4
|
+
actionpack (5.2.3)
|
5
|
+
actionview (= 5.2.3)
|
6
|
+
activesupport (= 5.2.3)
|
7
|
+
rack (~> 2.0)
|
8
|
+
rack-test (>= 0.6.3)
|
9
|
+
rails-dom-testing (~> 2.0)
|
10
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
11
|
+
actionview (5.2.3)
|
12
|
+
activesupport (= 5.2.3)
|
11
13
|
builder (~> 3.1)
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
14
|
+
erubi (~> 1.4)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
17
|
+
activemodel (5.2.3)
|
18
|
+
activesupport (= 5.2.3)
|
19
|
+
activerecord (5.2.3)
|
20
|
+
activemodel (= 5.2.3)
|
21
|
+
activesupport (= 5.2.3)
|
22
|
+
arel (>= 9.0)
|
23
|
+
activesupport (5.2.3)
|
24
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
25
|
+
i18n (>= 0.7, < 2)
|
23
26
|
minitest (~> 5.1)
|
24
|
-
thread_safe (~> 0.1)
|
25
27
|
tzinfo (~> 1.1)
|
26
|
-
addressable (2.
|
27
|
-
ancestry (
|
28
|
-
activerecord (>= 3.
|
29
|
-
appraisal (
|
28
|
+
addressable (2.4.0)
|
29
|
+
ancestry (3.0.6)
|
30
|
+
activerecord (>= 3.2.0)
|
31
|
+
appraisal (2.2.0)
|
30
32
|
bundler
|
31
33
|
rake
|
32
34
|
thor (>= 0.14.0)
|
33
|
-
arel (
|
34
|
-
builder (3.2.
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
simplecov (
|
39
|
-
term-ansicolor
|
40
|
-
thor
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
35
|
+
arel (9.0.0)
|
36
|
+
builder (3.2.3)
|
37
|
+
concurrent-ruby (1.1.5)
|
38
|
+
coveralls (0.8.23)
|
39
|
+
json (>= 1.8, < 3)
|
40
|
+
simplecov (~> 0.16.1)
|
41
|
+
term-ansicolor (~> 1.3)
|
42
|
+
thor (>= 0.19.4, < 2.0)
|
43
|
+
tins (~> 1.6)
|
44
|
+
crass (1.0.4)
|
45
|
+
descendants_tracker (0.0.4)
|
46
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
47
|
+
diff-lcs (1.3)
|
48
|
+
docile (1.3.1)
|
49
|
+
erubi (1.8.0)
|
50
|
+
faraday (0.9.2)
|
51
|
+
multipart-post (>= 1.2, < 3)
|
52
|
+
git (1.5.0)
|
53
|
+
github_api (0.16.0)
|
54
|
+
addressable (~> 2.4.0)
|
55
|
+
descendants_tracker (~> 0.0.4)
|
56
|
+
faraday (~> 0.8, < 0.10)
|
57
|
+
hashie (>= 3.4)
|
58
|
+
mime-types (>= 1.16, < 3.0)
|
59
|
+
oauth2 (~> 1.0)
|
60
|
+
hashie (3.6.0)
|
61
|
+
highline (2.0.2)
|
62
|
+
i18n (1.6.0)
|
63
|
+
concurrent-ruby (~> 1.0)
|
64
|
+
jeweler (2.3.9)
|
58
65
|
builder
|
59
|
-
bundler
|
66
|
+
bundler
|
60
67
|
git (>= 1.2.5)
|
61
|
-
github_api (
|
68
|
+
github_api (~> 0.16.0)
|
62
69
|
highline (>= 1.6.15)
|
63
|
-
nokogiri (
|
70
|
+
nokogiri (>= 1.5.10)
|
71
|
+
psych
|
64
72
|
rake
|
65
73
|
rdoc
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
74
|
+
semver2
|
75
|
+
json (2.2.0)
|
76
|
+
jwt (2.2.1)
|
77
|
+
loofah (2.2.3)
|
78
|
+
crass (~> 1.0.2)
|
79
|
+
nokogiri (>= 1.5.9)
|
80
|
+
method_source (0.9.2)
|
81
|
+
mime-types (2.99.3)
|
82
|
+
mini_portile2 (2.4.0)
|
83
|
+
minitest (5.11.3)
|
84
|
+
multi_json (1.13.1)
|
85
|
+
multi_xml (0.6.0)
|
86
|
+
multipart-post (2.1.1)
|
87
|
+
nokogiri (1.10.3)
|
88
|
+
mini_portile2 (~> 2.4.0)
|
89
|
+
oauth2 (1.4.1)
|
90
|
+
faraday (>= 0.8, < 0.16.0)
|
91
|
+
jwt (>= 1.0, < 3.0)
|
78
92
|
multi_json (~> 1.3)
|
79
93
|
multi_xml (~> 0.5)
|
80
|
-
rack (
|
81
|
-
|
82
|
-
rack
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
activesupport (
|
94
|
+
rack (>= 1.2, < 3)
|
95
|
+
psych (3.1.0)
|
96
|
+
rack (2.0.7)
|
97
|
+
rack-test (1.1.0)
|
98
|
+
rack (>= 1.0, < 3)
|
99
|
+
rails-dom-testing (2.0.3)
|
100
|
+
activesupport (>= 4.2.0)
|
101
|
+
nokogiri (>= 1.6)
|
102
|
+
rails-html-sanitizer (1.0.4)
|
103
|
+
loofah (~> 2.2, >= 2.2.2)
|
104
|
+
railties (5.2.3)
|
105
|
+
actionpack (= 5.2.3)
|
106
|
+
activesupport (= 5.2.3)
|
107
|
+
method_source
|
87
108
|
rake (>= 0.8.7)
|
88
|
-
thor (>= 0.
|
89
|
-
rake (
|
90
|
-
rdoc (
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
rspec (
|
96
|
-
rspec-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
rspec-
|
101
|
-
diff-lcs (>= 1.
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
109
|
+
thor (>= 0.19.0, < 2.0)
|
110
|
+
rake (12.3.2)
|
111
|
+
rdoc (6.1.1)
|
112
|
+
rspec (3.8.0)
|
113
|
+
rspec-core (~> 3.8.0)
|
114
|
+
rspec-expectations (~> 3.8.0)
|
115
|
+
rspec-mocks (~> 3.8.0)
|
116
|
+
rspec-core (3.8.0)
|
117
|
+
rspec-support (~> 3.8.0)
|
118
|
+
rspec-expectations (3.8.3)
|
119
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
120
|
+
rspec-support (~> 3.8.0)
|
121
|
+
rspec-mocks (3.8.0)
|
122
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
123
|
+
rspec-support (~> 3.8.0)
|
124
|
+
rspec-support (3.8.0)
|
125
|
+
semver2 (3.4.2)
|
126
|
+
simplecov (0.16.1)
|
127
|
+
docile (~> 1.1)
|
128
|
+
json (>= 1.8, < 3)
|
129
|
+
simplecov-html (~> 0.10.0)
|
130
|
+
simplecov-html (0.10.2)
|
131
|
+
sqlite3 (1.4.1)
|
132
|
+
term-ansicolor (1.7.1)
|
110
133
|
tins (~> 1.0)
|
111
|
-
thor (0.
|
112
|
-
thread_safe (0.3.
|
113
|
-
tins (1.
|
114
|
-
tzinfo (1.2.
|
134
|
+
thor (0.20.3)
|
135
|
+
thread_safe (0.3.6)
|
136
|
+
tins (1.20.3)
|
137
|
+
tzinfo (1.2.5)
|
115
138
|
thread_safe (~> 0.1)
|
116
139
|
|
117
140
|
PLATFORMS
|
@@ -123,7 +146,10 @@ DEPENDENCIES
|
|
123
146
|
ancestry (>= 1.3.0)
|
124
147
|
appraisal
|
125
148
|
coveralls
|
126
|
-
jeweler
|
149
|
+
jeweler
|
127
150
|
railties (>= 3.0.0)
|
128
|
-
rspec
|
151
|
+
rspec
|
129
152
|
sqlite3
|
153
|
+
|
154
|
+
BUNDLED WITH
|
155
|
+
2.0.1
|
data/README.md
CHANGED
@@ -4,7 +4,6 @@ ActsAsMessageable
|
|
4
4
|
The Acts As Messageable allows communication between the models.
|
5
5
|
|
6
6
|
[![Build Status](https://secure.travis-ci.org/LTe/acts-as-messageable.png)](http://travis-ci.org/LTe/acts-as-messageable)
|
7
|
-
[![Dependency Status](https://gemnasium.com/LTe/acts-as-messageable.png)](https://gemnasium.com/LTe/acts-as-messageable)
|
8
7
|
[![Code Climate](https://codeclimate.com/github/LTe/acts-as-messageable.png)](https://codeclimate.com/github/LTe/acts-as-messageable)
|
9
8
|
[![Coverage Status](https://coveralls.io/repos/LTe/acts-as-messageable/badge.png?branch=master)](https://coveralls.io/r/LTe/acts-as-messageable?branch=master)
|
10
9
|
[![Gem Version](https://badge.fury.io/rb/acts-as-messageable.png)](http://badge.fury.io/rb/acts-as-messageable)
|
@@ -14,7 +13,7 @@ Usage
|
|
14
13
|
|
15
14
|
To use it, add it to your Gemfile:
|
16
15
|
|
17
|
-
### Rails 3
|
16
|
+
### Rails >= 3
|
18
17
|
|
19
18
|
```ruby
|
20
19
|
gem 'acts-as-messageable'
|
@@ -26,7 +25,7 @@ Use this [fork](http://github.com/openfirmware/acts-as-messageable)
|
|
26
25
|
Thanks for [@openfirmware](http://github.com/openfirmware)
|
27
26
|
|
28
27
|
```ruby
|
29
|
-
gem 'acts-as-messageable', :git => 'git://github.com/openfirmware/acts-as-messageable.git',
|
28
|
+
gem 'acts-as-messageable', :git => 'git://github.com/openfirmware/acts-as-messageable.git',
|
30
29
|
:branch => 'rails2.3.11_compatible'
|
31
30
|
```
|
32
31
|
|
@@ -205,7 +204,7 @@ You can search text from messages and get the records where match exist. For exa
|
|
205
204
|
### Search text from messages
|
206
205
|
|
207
206
|
```ruby
|
208
|
-
records = @alice.messages.search("Search me") @alice
|
207
|
+
records = @alice.messages.search("Search me") @alice search text "Search me" from all messages
|
209
208
|
```
|
210
209
|
|
211
210
|
### Inbox
|
@@ -231,7 +230,7 @@ records = @alice.messages.search("Search me") @alice seach text "Search me" fro
|
|
231
230
|
==========
|
232
231
|
|
233
232
|
```ruby
|
234
|
-
@alice.messages.are_from(@bob) # all message
|
233
|
+
@alice.messages.are_from(@bob) # all message from @bob
|
235
234
|
@alice.messages.are_to(@bob) # all message to @bob
|
236
235
|
@alice.messages.with_id(@id_of_message) # message with id id_of_message
|
237
236
|
@alice.messages.readed # all readed @alice messages
|
data/Rakefile
CHANGED
@@ -1,23 +1,21 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
1
|
require 'rubygems'
|
4
2
|
require 'bundler'
|
5
3
|
begin
|
6
4
|
Bundler.setup(:default, :development)
|
7
5
|
rescue Bundler::BundlerError => e
|
8
|
-
|
9
|
-
|
6
|
+
warn e.message
|
7
|
+
warn 'Run `bundle install` to install missing gems'
|
10
8
|
exit e.status_code
|
11
9
|
end
|
12
10
|
require 'rake'
|
13
11
|
|
14
12
|
require 'jeweler'
|
15
13
|
Jeweler::Tasks.new do |gem|
|
16
|
-
gem.name =
|
17
|
-
gem.email =
|
18
|
-
gem.summary =
|
19
|
-
gem.homepage =
|
20
|
-
gem.authors = [
|
14
|
+
gem.name = 'acts-as-messageable'
|
15
|
+
gem.email = 'piotr.nielacny@gmail.com'
|
16
|
+
gem.summary = 'Make user messageable!;-)'
|
17
|
+
gem.homepage = 'http://github.com/LTe/acts-as-messageable'
|
18
|
+
gem.authors = ['Piotr Nielacny']
|
21
19
|
# dependencies defined in Gemfile
|
22
20
|
end
|
23
21
|
Jeweler::RubygemsDotOrgTasks.new
|
@@ -29,4 +27,4 @@ RSpec::Core::RakeTask.new(:spec) do |spec|
|
|
29
27
|
spec.pattern = FileList['spec/**/*_spec.rb']
|
30
28
|
end
|
31
29
|
|
32
|
-
task :
|
30
|
+
task default: :spec
|