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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b42af3056d22efa6bd8f01efb9015ce13f4e2655
4
- data.tar.gz: 99e1e8ba04db00f7d29e40dfb5ac4370511d3fe5
3
+ metadata.gz: a6fd28e32229a3de0142f496c6babbecdb6cf033
4
+ data.tar.gz: ae6d49a71e954a1ae63e7525a48897507cb5bd10
5
5
  SHA512:
6
- metadata.gz: d4cd7ed7703aa74f878b8c3a93b2c5b083775b04735590db2431d745e2f68e271c7f3546cb8494de38c1969ad552894cc5a0e776a9303a63d6ed0d1bb1b796de
7
- data.tar.gz: 98263bf4a54954ce81777b2c6aefde0baee14938da8ecea81462bfa693c263a7862bc2ff5fbb9c14bb948916ff5febee9f303df1b3fa24c5cb660111c6b2e486
6
+ metadata.gz: be6ec8146d08426dfc114ccbc8fd8508c09cd6486712cb2bbc7657c21020b88d7150e573b76b0b2a51c320b54d508f64900021d7d2f2fe377a17a067ac78ebec
7
+ data.tar.gz: 770925b2bb33debb69dbbd56455f6aee01f5601adc1cba9e92033c441897944d523d66252469564053accf549cad562821741df9666446f67b065bf0f589d847
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  .bundle
3
3
  Gemfile.lock
4
+ gemfiles/*.lock
4
5
  pkg/*
5
6
  coverage/*
@@ -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
- - ci/Gemfile-rails-3-0
9
- - ci/Gemfile-rails-3-1
10
- - ci/Gemfile-rails-3-2
11
- - ci/Gemfile-rails-4-0
12
- - ci/Gemfile-rails-4-1
13
- - ci/Gemfile-rails-4-2
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:
@@ -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
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2010-2015 Georg Ledermann
3
+ Copyright (c) 2010-2016 Georg Ledermann
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
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 (including 3.0, 3.1, 3.2) and Rails 4. For use with Rails 2.3 there is a branch named "rails2"
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-2015 [Georg Ledermann](http://www.georg-ledermann.de) and [contributors](https://github.com/ledermann/unread/graphs/contributors), released under the MIT license
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
@@ -26,5 +26,8 @@ ActiveRecord::Migration.verbose = false
26
26
  UnreadMigration.up
27
27
  SpecMigration.up
28
28
 
29
+ ActiveRecord::Base.logger = Logger.new(STDOUT) if defined?(Logger)
30
+
29
31
  require 'irb'
32
+ require 'irb/completion'
30
33
  IRB.start
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 3.0.20"
6
+ gem "activerecord-mysql2-adapter"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 3.1.12"
6
+ gem "mysql2", "~> 0.3.10"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 3.2.22"
6
+ gem "mysql2", "~> 0.3.10"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.0.13"
6
+ gem "mysql2", "~> 0.3.10"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.1.14"
6
+ gem "mysql2", "~> 0.3.13"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "~> 4.2.5"
6
+ gem "mysql2", ">= 0.3.13", "< 0.5"
7
+
8
+ gemspec :path => "../"
@@ -0,0 +1,8 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "activerecord", "5.0.0.beta3"
6
+ gem "mysql2", ">= 0.3.18", "< 0.5"
7
+
8
+ gemspec :path => "../"
@@ -1,15 +1,15 @@
1
1
  class UnreadMigration < ActiveRecord::Migration
2
2
  def self.up
3
- create_table :read_marks, force: true do |t|
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 :read_marks, [:reader_id, :reader_type, :readable_type, :readable_id], name: 'read_marks_reader_readable_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 :read_marks
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(:read_marks => { :readable_type => readable_class.base_class.name }).
33
- group("read_marks.reader_type, read_marks.reader_id, #{reader_class.quoted_table_name}.#{reader_class.quoted_primary_key}").
34
- having('COUNT(read_marks.id) > 1')
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.base_class.name).
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.base_class.name
48
+ rm.readable_type = readable_class.name
49
49
  rm.timestamp = timestamp - 1.second
50
50
  rm.save!
51
51
  end
@@ -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
- ReadMark.delete_all :readable_type => self.base_class.name, :reader_id => reader.id, :reader_type => reader.class.base_class.name
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 read_marks
8
- ON read_marks.readable_type = '#{base_class.name}'
9
- AND read_marks.readable_id = #{quoted_table_name}.#{quoted_primary_key}
10
- AND read_marks.reader_id = #{quote_bound_value(reader.id)}
11
- AND read_marks.reader_type = #{quote_bound_value(reader.class.base_class.name)}
12
- AND read_marks.timestamp >= #{quoted_table_name}.#{connection.quote_column_name(readable_options[:on])}"
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("read_marks.id IS NULL
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('read_marks.id IS NULL')
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("read_marks.id IS NOT NULL
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('read_marks.id IS NOT NULL')
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
- read_marks.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")
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
@@ -15,7 +15,8 @@ module Unread
15
15
  module InstanceMethods
16
16
  def read_mark_global(klass)
17
17
  @read_mark_global ||= {}
18
- @read_mark_global[klass] ||= read_marks.where(:readable_type => klass.base_class.name).global.first
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.base_class.name &&
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
 
@@ -10,27 +10,28 @@ module Unread
10
10
  def join_read_marks(readable)
11
11
  assert_readable(readable)
12
12
 
13
- joins "LEFT JOIN read_marks
14
- ON read_marks.readable_type = '#{readable.class.base_class.name}'
15
- AND (read_marks.readable_id = #{readable.id} OR read_marks.readable_id IS NULL)
16
- AND read_marks.reader_id = #{quoted_table_name}.#{quoted_primary_key}
17
- AND read_marks.reader_type = '#{connection.quote_string base_class.name}'
18
- AND read_marks.timestamp >= '#{connection.quoted_date readable.send(readable.class.readable_options[:on])}'"
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('read_marks.id IS NULL')
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('read_marks.id IS NOT NULL')
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}.*, read_marks.id AS read_mark_id,
31
- '#{readable.class.base_class.name}' AS read_mark_readable_type,
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
@@ -1,3 +1,3 @@
1
1
  module Unread
2
- VERSION = '0.7.1'
2
+ VERSION = '0.8.0'
3
3
  end
@@ -0,0 +1,2 @@
1
+ class Customer < ActiveRecord::Base
2
+ end
@@ -0,0 +1,4 @@
1
+ class Document < ActiveRecord::Base
2
+ self.primary_key = 'uid'
3
+ acts_as_readable :on => :updated_at
4
+ end
@@ -1,7 +1,2 @@
1
- class Document < ActiveRecord::Base
2
- self.primary_key = 'uid'
3
- acts_as_readable :on => :updated_at
4
- end
5
-
6
1
  class Email < Document
7
2
  end
@@ -1,6 +1,3 @@
1
- class Customer < ActiveRecord::Base
2
- end
3
-
4
1
  class StiReader < Customer
5
2
  acts_as_reader
6
3
  end
@@ -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 :readers, :primary_key => 'number', :force => true do |t|
3
+ create_table Reader, :primary_key => 'number', :force => true do |t|
4
4
  t.string :name
5
5
  end
6
6
 
7
- create_table :different_readers, :primary_key => 'number', :force => true do |t|
7
+ create_table DifferentReader, :primary_key => 'number', :force => true do |t|
8
8
  t.string :name
9
9
  end
10
10
 
11
- create_table :customers, :force => true do |t|
11
+ create_table Customer, :force => true do |t|
12
12
  t.string :type
13
13
  end
14
14
 
15
- create_table :documents, :primary_key => 'uid', :force => true do |t|
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
@@ -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', '~> 0.3.13'
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', '>= 0.8.0'
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.7.1
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: 2015-11-06 00:00:00.000000000 Z
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.3.13
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.3.13
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: coveralls
140
+ name: appraisal
127
141
  requirement: !ruby/object:Gem::Requirement
128
142
  requirements:
129
143
  - - ">="
130
144
  - !ruby/object:Gem::Version
131
- version: 0.8.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.8.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
- - ci/Gemfile-rails-3-0
157
- - ci/Gemfile-rails-3-1
158
- - ci/Gemfile-rails-3-2
159
- - ci/Gemfile-rails-4-0
160
- - ci/Gemfile-rails-4-1
161
- - ci/Gemfile-rails-4-2
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.5.0
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
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~> 3.0.20'
4
- gem 'sqlite3'
5
- gem 'activerecord-mysql2-adapter'
6
- gem 'pg'
7
- gem 'timecop'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'simplecov'
11
- gem 'coveralls'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~> 3.1.12'
4
- gem 'sqlite3'
5
- gem 'mysql2', '~> 0.3.10'
6
- gem 'pg'
7
- gem 'timecop'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'simplecov'
11
- gem 'coveralls'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~> 3.2.17'
4
- gem 'sqlite3'
5
- gem 'mysql2', '~> 0.3.10'
6
- gem 'pg'
7
- gem 'timecop'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'simplecov'
11
- gem 'coveralls'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~> 4.0.4'
4
- gem 'sqlite3'
5
- gem 'mysql2', '~> 0.3.10'
6
- gem 'pg'
7
- gem 'timecop'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'simplecov'
11
- gem 'coveralls'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~> 4.1.0'
4
- gem 'sqlite3'
5
- gem 'mysql2', '~> 0.3.13'
6
- gem 'pg'
7
- gem 'timecop'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'simplecov'
11
- gem 'coveralls'
@@ -1,11 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'activerecord', '~> 4.2.0'
4
- gem 'sqlite3'
5
- gem 'mysql2', '~> 0.3.13'
6
- gem 'pg'
7
- gem 'timecop'
8
- gem 'rake'
9
- gem 'rspec'
10
- gem 'simplecov'
11
- gem 'coveralls'