unread 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +25 -9
- data/Appraisals +34 -0
- data/MIT-LICENSE +1 -1
- data/README.md +2 -2
- data/bin/console +3 -0
- data/gemfiles/rails_3_0.gemfile +8 -0
- data/gemfiles/rails_3_1.gemfile +8 -0
- data/gemfiles/rails_3_2.gemfile +8 -0
- data/gemfiles/rails_4_0.gemfile +8 -0
- data/gemfiles/rails_4_1.gemfile +8 -0
- data/gemfiles/rails_4_2.gemfile +8 -0
- data/gemfiles/rails_5_0.gemfile +8 -0
- data/lib/generators/unread/migration/templates/migration.rb +3 -3
- data/lib/unread/garbage_collector.rb +6 -6
- data/lib/unread/readable.rb +10 -8
- data/lib/unread/readable_scopes.rb +13 -13
- data/lib/unread/reader.rb +4 -3
- data/lib/unread/reader_scopes.rb +12 -11
- data/lib/unread/version.rb +1 -1
- data/spec/app/models/customer.rb +2 -0
- data/spec/app/models/document.rb +4 -0
- data/spec/app/models/email.rb +0 -5
- data/spec/app/models/sti_reader.rb +0 -3
- data/spec/spec_helper.rb +4 -2
- data/spec/support/spec_migration.rb +4 -4
- data/unread.gemspec +4 -3
- metadata +36 -16
- data/ci/Gemfile-rails-3-0 +0 -11
- data/ci/Gemfile-rails-3-1 +0 -11
- data/ci/Gemfile-rails-3-2 +0 -11
- data/ci/Gemfile-rails-4-0 +0 -11
- data/ci/Gemfile-rails-4-1 +0 -11
- data/ci/Gemfile-rails-4-2 +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6fd28e32229a3de0142f496c6babbecdb6cf033
|
4
|
+
data.tar.gz: ae6d49a71e954a1ae63e7525a48897507cb5bd10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be6ec8146d08426dfc114ccbc8fd8508c09cd6486712cb2bbc7657c21020b88d7150e573b76b0b2a51c320b54d508f64900021d7d2f2fe377a17a067ac78ebec
|
7
|
+
data.tar.gz: 770925b2bb33debb69dbbd56455f6aee01f5601adc1cba9e92033c441897944d523d66252469564053accf549cad562821741df9666446f67b065bf0f589d847
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,16 +1,32 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
3
|
- 1.9.3
|
4
|
-
- 2.0
|
5
|
-
- 2.1
|
6
|
-
- 2.2
|
4
|
+
- 2.0.0
|
5
|
+
- 2.1.8
|
6
|
+
- 2.2.4
|
7
|
+
- 2.3.0
|
7
8
|
gemfile:
|
8
|
-
-
|
9
|
-
-
|
10
|
-
-
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
9
|
+
- gemfiles/rails_5_0.gemfile
|
10
|
+
- gemfiles/rails_4_2.gemfile
|
11
|
+
- gemfiles/rails_4_1.gemfile
|
12
|
+
- gemfiles/rails_4_0.gemfile
|
13
|
+
- gemfiles/rails_3_2.gemfile
|
14
|
+
- gemfiles/rails_3_1.gemfile
|
15
|
+
- gemfiles/rails_3_0.gemfile
|
16
|
+
matrix:
|
17
|
+
exclude:
|
18
|
+
- rvm: 1.9.3
|
19
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
20
|
+
- rvm: 2.0.0
|
21
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
22
|
+
- rvm: 2.1.8
|
23
|
+
gemfile: gemfiles/rails_5_0.gemfile
|
24
|
+
- rvm: 2.3.0
|
25
|
+
gemfile: gemfiles/rails_3_0.gemfile
|
26
|
+
- rvm: 2.3.0
|
27
|
+
gemfile: gemfiles/rails_3_1.gemfile
|
28
|
+
- rvm: 2.3.0
|
29
|
+
gemfile: gemfiles/rails_3_2.gemfile
|
14
30
|
before_install: gem update bundler
|
15
31
|
sudo: false
|
16
32
|
env:
|
data/Appraisals
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
appraise "rails-5-0" do
|
2
|
+
gem "activerecord", "5.0.0.beta3"
|
3
|
+
gem 'mysql2', '>= 0.3.18', '< 0.5'
|
4
|
+
end
|
5
|
+
|
6
|
+
appraise "rails-4-2" do
|
7
|
+
gem "activerecord", "~> 4.2.5"
|
8
|
+
gem 'mysql2', '>= 0.3.13', '< 0.5'
|
9
|
+
end
|
10
|
+
|
11
|
+
appraise "rails-4-1" do
|
12
|
+
gem "activerecord", "~> 4.1.14"
|
13
|
+
gem "mysql2", '~> 0.3.13'
|
14
|
+
end
|
15
|
+
|
16
|
+
appraise "rails-4-0" do
|
17
|
+
gem "activerecord", "~> 4.0.13"
|
18
|
+
gem "mysql2", '~> 0.3.10'
|
19
|
+
end
|
20
|
+
|
21
|
+
appraise "rails-3-2" do
|
22
|
+
gem "activerecord", "~> 3.2.22"
|
23
|
+
gem 'mysql2', '~> 0.3.10'
|
24
|
+
end
|
25
|
+
|
26
|
+
appraise "rails-3-1" do
|
27
|
+
gem "activerecord", "~> 3.1.12"
|
28
|
+
gem 'mysql2', '~> 0.3.10'
|
29
|
+
end
|
30
|
+
|
31
|
+
appraise "rails-3-0" do
|
32
|
+
gem "activerecord", "~> 3.0.20"
|
33
|
+
gem "activerecord-mysql2-adapter"
|
34
|
+
end
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -20,7 +20,7 @@ Ruby gem to manage read/unread status of ActiveRecord objects - and it's fast.
|
|
20
20
|
## Requirements
|
21
21
|
|
22
22
|
* Ruby 1.9.3 or newer
|
23
|
-
* Rails 3
|
23
|
+
* Rails 3.0 or newer (including Rails 4.x and Rails 5.0)
|
24
24
|
* MySQL, PostgreSQL or SQLite
|
25
25
|
* Needs a timestamp field in your models (like created_at or updated_at) with a database index on it
|
26
26
|
|
@@ -189,4 +189,4 @@ AND messages.created_at > '2010-10-20 08:50:00'
|
|
189
189
|
Hint: You should add a database index on `messages.created_at`.
|
190
190
|
|
191
191
|
|
192
|
-
Copyright (c) 2010-
|
192
|
+
Copyright (c) 2010-2016 [Georg Ledermann](http://www.georg-ledermann.de) and [contributors](https://github.com/ledermann/unread/graphs/contributors), released under the MIT license
|
data/bin/console
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
class UnreadMigration < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
|
-
create_table
|
3
|
+
create_table ReadMark, force: true do |t|
|
4
4
|
t.references :readable, polymorphic: { null: false }
|
5
5
|
t.references :reader, polymorphic: { null: false }
|
6
6
|
t.datetime :timestamp
|
7
7
|
end
|
8
8
|
|
9
|
-
add_index
|
9
|
+
add_index ReadMark, [:reader_id, :reader_type, :readable_type, :readable_id], name: 'read_marks_reader_readable_index'
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.down
|
13
|
-
drop_table
|
13
|
+
drop_table ReadMark
|
14
14
|
end
|
15
15
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Unread
|
2
2
|
class GarbageCollector
|
3
3
|
def initialize(readable_class)
|
4
|
-
@readable_class = readable_class
|
4
|
+
@readable_class = readable_class.readable_parent
|
5
5
|
end
|
6
6
|
attr_reader :readable_class
|
7
7
|
|
@@ -29,23 +29,23 @@ module Unread
|
|
29
29
|
reader_class.
|
30
30
|
reader_scope.
|
31
31
|
joins(:read_marks).
|
32
|
-
where(
|
33
|
-
group("
|
34
|
-
having(
|
32
|
+
where(ReadMark.table_name => { :readable_type => readable_class.name }).
|
33
|
+
group("#{ReadMark.quoted_table_name}.reader_type, #{ReadMark.quoted_table_name}.reader_id, #{reader_class.quoted_table_name}.#{reader_class.quoted_primary_key}").
|
34
|
+
having("COUNT(#{ReadMark.quoted_table_name}.id) > 1")
|
35
35
|
end
|
36
36
|
|
37
37
|
def update_read_marks_for_user(reader, timestamp)
|
38
38
|
ReadMark.transaction do
|
39
39
|
# Delete markers OLDER than the given timestamp
|
40
40
|
reader.read_marks.
|
41
|
-
where(:readable_type => readable_class.
|
41
|
+
where(:readable_type => readable_class.name).
|
42
42
|
single.
|
43
43
|
older_than(timestamp).
|
44
44
|
delete_all
|
45
45
|
|
46
46
|
# Change the global timestamp for this reader
|
47
47
|
rm = reader.read_mark_global(readable_class) || reader.read_marks.build
|
48
|
-
rm.readable_type = readable_class.
|
48
|
+
rm.readable_type = readable_class.name
|
49
49
|
rm.timestamp = timestamp - 1.second
|
50
50
|
rm.save!
|
51
51
|
end
|
data/lib/unread/readable.rb
CHANGED
@@ -50,6 +50,14 @@ module Unread
|
|
50
50
|
self
|
51
51
|
end
|
52
52
|
|
53
|
+
def readable_parent
|
54
|
+
current_klass = self
|
55
|
+
while(ReadMark.readable_classes.include?(current_klass.superclass)) do
|
56
|
+
current_klass = current_klass.superclass
|
57
|
+
end
|
58
|
+
current_klass
|
59
|
+
end
|
60
|
+
|
53
61
|
def cleanup_read_marks!
|
54
62
|
assert_reader_class
|
55
63
|
Unread::GarbageCollector.new(self).run!
|
@@ -59,14 +67,8 @@ module Unread
|
|
59
67
|
assert_reader(reader)
|
60
68
|
|
61
69
|
ReadMark.transaction do
|
62
|
-
|
63
|
-
|
64
|
-
ReadMark.create! do |rm|
|
65
|
-
rm.readable_type = self.base_class.name
|
66
|
-
rm.reader_id = reader.id
|
67
|
-
rm.reader_type = reader.class.base_class.name
|
68
|
-
rm.timestamp = Time.current
|
69
|
-
end
|
70
|
+
reader.read_marks.where(:readable_type => self.readable_parent.name).delete_all
|
71
|
+
reader.read_marks.create! :readable_type => self.readable_parent.name, :timestamp => Time.current
|
70
72
|
end
|
71
73
|
|
72
74
|
reader.forget_memoized_read_mark_global
|
@@ -4,22 +4,22 @@ module Unread
|
|
4
4
|
def join_read_marks(reader)
|
5
5
|
assert_reader(reader)
|
6
6
|
|
7
|
-
joins "LEFT JOIN
|
8
|
-
ON
|
9
|
-
AND
|
10
|
-
AND
|
11
|
-
AND
|
12
|
-
AND
|
7
|
+
joins "LEFT JOIN #{ReadMark.quoted_table_name}
|
8
|
+
ON #{ReadMark.quoted_table_name}.readable_type = '#{readable_parent.name}'
|
9
|
+
AND #{ReadMark.quoted_table_name}.readable_id = #{quoted_table_name}.#{quoted_primary_key}
|
10
|
+
AND #{ReadMark.quoted_table_name}.reader_id = #{quote_bound_value(reader.id)}
|
11
|
+
AND #{ReadMark.quoted_table_name}.reader_type = #{quote_bound_value(reader.class.base_class.name)}
|
12
|
+
AND #{ReadMark.quoted_table_name}.timestamp >= #{quoted_table_name}.#{connection.quote_column_name(readable_options[:on])}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def unread_by(reader)
|
16
16
|
result = join_read_marks(reader)
|
17
17
|
|
18
18
|
if global_time_stamp = reader.read_mark_global(self).try(:timestamp)
|
19
|
-
result.where("
|
19
|
+
result.where("#{ReadMark.quoted_table_name}.id IS NULL
|
20
20
|
AND #{quoted_table_name}.#{connection.quote_column_name(readable_options[:on])} > ?", global_time_stamp)
|
21
21
|
else
|
22
|
-
result.where(
|
22
|
+
result.where("#{ReadMark.quoted_table_name}.id IS NULL")
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -27,18 +27,18 @@ module Unread
|
|
27
27
|
result = join_read_marks(reader)
|
28
28
|
|
29
29
|
if global_time_stamp = reader.read_mark_global(self).try(:timestamp)
|
30
|
-
result.where("
|
30
|
+
result.where("#{ReadMark.quoted_table_name}.id IS NOT NULL
|
31
31
|
OR #{quoted_table_name}.#{connection.quote_column_name(readable_options[:on])} <= ?", global_time_stamp)
|
32
32
|
else
|
33
|
-
result.where(
|
33
|
+
result.where("#{ReadMark.quoted_table_name}.id IS NOT NULL")
|
34
34
|
end
|
35
35
|
end
|
36
36
|
|
37
37
|
def with_read_marks_for(reader)
|
38
38
|
join_read_marks(reader).select("#{quoted_table_name}.*,
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
#{ReadMark.quoted_table_name}.id AS read_mark_id,
|
40
|
+
#{quote_bound_value(reader.class.base_class.name)} AS read_mark_reader_type,
|
41
|
+
#{quote_bound_value(reader.id)} AS read_mark_reader_id")
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
data/lib/unread/reader.rb
CHANGED
@@ -15,7 +15,8 @@ module Unread
|
|
15
15
|
module InstanceMethods
|
16
16
|
def read_mark_global(klass)
|
17
17
|
@read_mark_global ||= {}
|
18
|
-
|
18
|
+
readable_klass = klass.readable_parent
|
19
|
+
@read_mark_global[readable_klass] ||= read_marks.where(:readable_type => readable_klass.name).global.first
|
19
20
|
end
|
20
21
|
|
21
22
|
def forget_memoized_read_mark_global
|
@@ -32,9 +33,9 @@ module Unread
|
|
32
33
|
end
|
33
34
|
|
34
35
|
private
|
35
|
-
|
36
|
+
|
36
37
|
def read_mark_id_belongs_to?(readable)
|
37
|
-
self.read_mark_readable_type == readable.class.
|
38
|
+
self.read_mark_readable_type == readable.class.name &&
|
38
39
|
(self.read_mark_readable_id.nil? || self.read_mark_readable_id.to_i == readable.id)
|
39
40
|
end
|
40
41
|
|
data/lib/unread/reader_scopes.rb
CHANGED
@@ -10,27 +10,28 @@ module Unread
|
|
10
10
|
def join_read_marks(readable)
|
11
11
|
assert_readable(readable)
|
12
12
|
|
13
|
-
joins "LEFT JOIN
|
14
|
-
ON
|
15
|
-
AND (
|
16
|
-
AND
|
17
|
-
AND
|
18
|
-
AND
|
13
|
+
joins "LEFT JOIN #{ReadMark.quoted_table_name}
|
14
|
+
ON #{ReadMark.quoted_table_name}.readable_type = '#{readable.class.readable_parent.name}'
|
15
|
+
AND (#{ReadMark.quoted_table_name}.readable_id = #{readable.id} OR #{ReadMark.quoted_table_name}.readable_id IS NULL)
|
16
|
+
AND #{ReadMark.quoted_table_name}.reader_id = #{quoted_table_name}.#{quoted_primary_key}
|
17
|
+
AND #{ReadMark.quoted_table_name}.reader_type = '#{connection.quote_string base_class.name}'
|
18
|
+
AND #{ReadMark.quoted_table_name}.timestamp >= '#{connection.quoted_date readable.send(readable.class.readable_options[:on])}'"
|
19
19
|
end
|
20
20
|
|
21
21
|
def have_not_read(readable)
|
22
|
-
join_read_marks(readable).where(
|
22
|
+
join_read_marks(readable).where("#{ReadMark.quoted_table_name}.id IS NULL")
|
23
23
|
end
|
24
24
|
|
25
25
|
def have_read(readable)
|
26
|
-
join_read_marks(readable).where(
|
26
|
+
join_read_marks(readable).where("#{ReadMark.quoted_table_name}.id IS NOT NULL")
|
27
27
|
end
|
28
28
|
|
29
29
|
def with_read_marks_for(readable)
|
30
|
-
join_read_marks(readable).select("#{quoted_table_name}.*,
|
31
|
-
|
30
|
+
join_read_marks(readable).select("#{quoted_table_name}.*,
|
31
|
+
#{ReadMark.quoted_table_name}.id AS read_mark_id,
|
32
|
+
'#{readable.class.name}' AS read_mark_readable_type,
|
32
33
|
#{readable.id} AS read_mark_readable_id")
|
33
34
|
end
|
34
35
|
end
|
35
36
|
end
|
36
|
-
end
|
37
|
+
end
|
data/lib/unread/version.rb
CHANGED
data/spec/app/models/email.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require 'simplecov'
|
2
2
|
require 'coveralls'
|
3
3
|
|
4
|
-
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
4
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
5
5
|
SimpleCov::Formatter::HTMLFormatter,
|
6
6
|
Coveralls::SimpleCov::Formatter
|
7
|
-
]
|
7
|
+
])
|
8
8
|
SimpleCov.start do
|
9
9
|
add_filter '/spec/'
|
10
10
|
end
|
@@ -15,7 +15,9 @@ require 'generators/unread/migration/templates/migration.rb'
|
|
15
15
|
|
16
16
|
require 'app/models/reader'
|
17
17
|
require 'app/models/different_reader'
|
18
|
+
require 'app/models/customer'
|
18
19
|
require 'app/models/sti_reader'
|
20
|
+
require 'app/models/document'
|
19
21
|
require 'app/models/email'
|
20
22
|
|
21
23
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
@@ -1,18 +1,18 @@
|
|
1
1
|
class SpecMigration < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
|
-
create_table
|
3
|
+
create_table Reader, :primary_key => 'number', :force => true do |t|
|
4
4
|
t.string :name
|
5
5
|
end
|
6
6
|
|
7
|
-
create_table
|
7
|
+
create_table DifferentReader, :primary_key => 'number', :force => true do |t|
|
8
8
|
t.string :name
|
9
9
|
end
|
10
10
|
|
11
|
-
create_table
|
11
|
+
create_table Customer, :force => true do |t|
|
12
12
|
t.string :type
|
13
13
|
end
|
14
14
|
|
15
|
-
create_table
|
15
|
+
create_table Document, :primary_key => 'uid', :force => true do |t|
|
16
16
|
t.string :type
|
17
17
|
t.string :subject
|
18
18
|
t.text :content
|
data/unread.gemspec
CHANGED
@@ -25,9 +25,10 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_development_dependency 'rake'
|
26
26
|
s.add_development_dependency 'timecop'
|
27
27
|
s.add_development_dependency 'sqlite3'
|
28
|
-
s.add_development_dependency 'mysql2'
|
28
|
+
s.add_development_dependency 'mysql2'
|
29
29
|
s.add_development_dependency 'pg'
|
30
30
|
s.add_development_dependency 'rspec'
|
31
|
-
s.add_development_dependency 'simplecov'
|
32
|
-
s.add_development_dependency 'coveralls'
|
31
|
+
s.add_development_dependency 'simplecov', '~> 0.11.0'
|
32
|
+
s.add_development_dependency 'coveralls'
|
33
|
+
s.add_development_dependency 'appraisal'
|
33
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unread
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Georg Ledermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: mysql2
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: pg
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -110,6 +110,20 @@ dependencies:
|
|
110
110
|
version: '0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: simplecov
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.11.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.11.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: coveralls
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
@@ -123,19 +137,19 @@ dependencies:
|
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
140
|
+
name: appraisal
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0
|
145
|
+
version: '0'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - ">="
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0
|
152
|
+
version: '0'
|
139
153
|
description: 'This gem creates a scope for unread objects and adds methods to mark
|
140
154
|
objects as read '
|
141
155
|
email:
|
@@ -147,18 +161,20 @@ extra_rdoc_files: []
|
|
147
161
|
files:
|
148
162
|
- ".gitignore"
|
149
163
|
- ".travis.yml"
|
164
|
+
- Appraisals
|
150
165
|
- Gemfile
|
151
166
|
- MIT-LICENSE
|
152
167
|
- README.md
|
153
168
|
- Rakefile
|
154
169
|
- UPGRADE.md
|
155
170
|
- bin/console
|
156
|
-
-
|
157
|
-
-
|
158
|
-
-
|
159
|
-
-
|
160
|
-
-
|
161
|
-
-
|
171
|
+
- gemfiles/rails_3_0.gemfile
|
172
|
+
- gemfiles/rails_3_1.gemfile
|
173
|
+
- gemfiles/rails_3_2.gemfile
|
174
|
+
- gemfiles/rails_4_0.gemfile
|
175
|
+
- gemfiles/rails_4_1.gemfile
|
176
|
+
- gemfiles/rails_4_2.gemfile
|
177
|
+
- gemfiles/rails_5_0.gemfile
|
162
178
|
- lib/generators/unread/migration/migration_generator.rb
|
163
179
|
- lib/generators/unread/migration/templates/migration.rb
|
164
180
|
- lib/generators/unread/polymorphic_reader_migration/polymorphic_reader_migration_generator.rb
|
@@ -172,7 +188,9 @@ files:
|
|
172
188
|
- lib/unread/reader.rb
|
173
189
|
- lib/unread/reader_scopes.rb
|
174
190
|
- lib/unread/version.rb
|
191
|
+
- spec/app/models/customer.rb
|
175
192
|
- spec/app/models/different_reader.rb
|
193
|
+
- spec/app/models/document.rb
|
176
194
|
- spec/app/models/email.rb
|
177
195
|
- spec/app/models/reader.rb
|
178
196
|
- spec/app/models/sti_reader.rb
|
@@ -209,12 +227,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
227
|
version: '0'
|
210
228
|
requirements: []
|
211
229
|
rubyforge_project: unread
|
212
|
-
rubygems_version: 2.
|
230
|
+
rubygems_version: 2.6.2
|
213
231
|
signing_key:
|
214
232
|
specification_version: 4
|
215
233
|
summary: Manages read/unread status of ActiveRecord objects
|
216
234
|
test_files:
|
235
|
+
- spec/app/models/customer.rb
|
217
236
|
- spec/app/models/different_reader.rb
|
237
|
+
- spec/app/models/document.rb
|
218
238
|
- spec/app/models/email.rb
|
219
239
|
- spec/app/models/reader.rb
|
220
240
|
- spec/app/models/sti_reader.rb
|
data/ci/Gemfile-rails-3-0
DELETED
data/ci/Gemfile-rails-3-1
DELETED
data/ci/Gemfile-rails-3-2
DELETED
data/ci/Gemfile-rails-4-0
DELETED
data/ci/Gemfile-rails-4-1
DELETED