lifesaver 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 9bc5ae6fa37c95384baa2d84547befd3c5a0282f
4
+ data.tar.gz: 2621e730f6b6c4fa8f7213873bd3db0ae124b7c9
5
+ SHA512:
6
+ metadata.gz: ba8c78edffbe3c973c12984e1ba427e98660100e4affc287bdcfec4cfda3fa51cb5ac0621895dfad6e10c70a320fbf74446ca3585c15de04b038a0c326403407
7
+ data.tar.gz: 582b6799eb17992424a312b32788c49d960ac8f1984029a05a3e8e5e93ee0a761629c2e07fbdd1a88f426e674e892c763f506fa524373a90d03857fbd871991c
data/.travis.yml CHANGED
@@ -2,6 +2,8 @@ language: ruby
2
2
  rvm:
3
3
  - 1.9.3
4
4
  - 2.0.0
5
+ - 2.1.0
6
+ - rbx
5
7
  services:
6
8
  - redis-server
7
9
  - elasticsearch
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v0.2.0
2
+
3
+ * Changed callbacks to use `after_commit`
4
+ * Notification only occurs after model has been successfully deleted
5
+
6
+
1
7
  ## v0.1.0
2
8
 
3
9
  * Added config
data/Gemfile CHANGED
@@ -9,4 +9,5 @@ end
9
9
 
10
10
  group :development, :test do
11
11
  gem 'pry', require: false
12
- end
12
+ end
13
+
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013 Paul Sorensen
1
+ Copyright (c) 2014 Paul Sorensen
2
2
 
3
3
  MIT License
4
4
 
data/lib/lifesaver.rb CHANGED
@@ -5,6 +5,7 @@ require 'lifesaver/serialized_model'
5
5
  require 'lifesaver/indexing/model_additions'
6
6
  require 'lifesaver/indexing/enqueuer'
7
7
  require 'lifesaver/indexing/indexer'
8
+ require 'lifesaver/notification/dependent_associations'
8
9
  require 'lifesaver/notification/notifiable_associations'
9
10
  require 'lifesaver/notification/model_additions'
10
11
  require 'lifesaver/notification/eager_loader'
@@ -43,5 +44,4 @@ module Lifesaver
43
44
  def configure
44
45
  yield config
45
46
  end
46
-
47
47
  end
@@ -4,7 +4,6 @@ module Lifesaver
4
4
  attr_accessor :notification_queue, :indexing_queue
5
5
 
6
6
  def initialize(options = {})
7
-
8
7
  @notification_queue = :lifesaver_notification
9
8
  @indexing_queue = :lifesaver_indexing
10
9
 
@@ -2,8 +2,8 @@ module Lifesaver
2
2
  module Indexing
3
3
  class Enqueuer
4
4
  def initialize(args)
5
- @model = args[:model]
6
- @operation = args[:operation]
5
+ @model = args.fetch(:model)
6
+ @operation = args.fetch(:operation)
7
7
  end
8
8
 
9
9
  def enqueue
@@ -2,9 +2,9 @@ module Lifesaver
2
2
  module Indexing
3
3
  class Indexer
4
4
  def initialize(args)
5
- @class_name = args[:class_name]
6
- @model_id = args[:model_id]
7
- @operation = args[:operation].to_sym
5
+ @class_name = args.fetch(:class_name)
6
+ @model_id = args.fetch(:model_id)
7
+ @operation = args.fetch(:operation).to_sym
8
8
  end
9
9
 
10
10
  def perform
@@ -3,18 +3,8 @@ module Lifesaver
3
3
  module ModelAdditions
4
4
  module ClassMethods
5
5
  def enqueues_indexing
6
- indexing_callbacks
7
- end
8
-
9
- private
10
-
11
- def indexing_callbacks(options = {})
12
- # after_commit?
13
- after_save do
14
- send :enqueue_indexing, options.merge(operation: :update)
15
- end
16
- after_destroy do
17
- send :enqueue_indexing, options.merge(operation: :destroy)
6
+ after_commit do
7
+ send :enqueue_indexing
18
8
  end
19
9
  end
20
10
  end
@@ -41,8 +31,8 @@ module Lifesaver
41
31
 
42
32
  private
43
33
 
44
- def enqueue_indexing(options)
45
- operation = options[:operation]
34
+ def enqueue_indexing
35
+ operation = destroyed? ? :destroy : :update
46
36
  Lifesaver::Indexing::Enqueuer.new(model: self,
47
37
  operation: operation).enqueue
48
38
  end
@@ -0,0 +1,25 @@
1
+ module Lifesaver
2
+ module Notification
3
+ class DependentAssociations
4
+ def initialize(klass)
5
+ @class = klass
6
+ end
7
+
8
+ def fetch
9
+ @dependent_associations ||= populate
10
+ end
11
+
12
+ private
13
+
14
+ def populate
15
+ dependent_associations = []
16
+ @class.reflect_on_all_associations.each do |association|
17
+ if association.options[:dependent].present?
18
+ dependent_associations << association.name.to_sym
19
+ end
20
+ end
21
+ dependent_associations
22
+ end
23
+ end
24
+ end
25
+ end
@@ -18,7 +18,6 @@ module Lifesaver
18
18
  def should_enqueue?
19
19
  !serialized_models.empty? && !Lifesaver.indexing_suppressed?
20
20
  end
21
-
22
21
  end
23
22
  end
24
23
  end
@@ -8,7 +8,6 @@ module Lifesaver
8
8
  end
9
9
 
10
10
  def initialize_models(serialized_models)
11
-
12
11
  serialized_models.each do |model_hash|
13
12
  model = Lifesaver::SerializedModel.new
14
13
  model.class_name = model_hash['class_name']
@@ -16,11 +16,11 @@ module Lifesaver
16
16
  private
17
17
 
18
18
  def notification_callbacks
19
- after_save do
20
- send :update_associations, :update
21
- end
22
19
  before_destroy do
23
- send :update_associations, :destroy
20
+ send :load_associations, :destroy
21
+ end
22
+ after_commit do
23
+ send :update_associations
24
24
  end
25
25
  end
26
26
  end
@@ -28,19 +28,23 @@ module Lifesaver
28
28
  def self.included(base)
29
29
  base.class_attribute :notifiable_associations
30
30
  base.notifiable_associations = NotifiableAssociations.new
31
+ base.delegate :notifiable_associations, to: :class
32
+ base.class_attribute :dependent_associations
33
+ base.dependent_associations = DependentAssociations.new(base)
34
+ base.delegate :dependent_associations, to: :class
31
35
  base.extend(ClassMethods)
32
36
  end
33
37
 
34
38
  def associations_to_notify
35
39
  models = []
36
- self.class.notifiable_associations.on_notify.each do |association|
40
+ notifiable_associations.on_notify.each do |association|
37
41
  models |= models_for_association(association)
38
42
  end
39
43
  models
40
44
  end
41
45
 
42
46
  def needs_to_notify?
43
- self.class.notifiable_associations.any_to_notify?
47
+ notifiable_associations.any_to_notify?
44
48
  end
45
49
 
46
50
  def models_for_association(assoc)
@@ -60,31 +64,26 @@ module Lifesaver
60
64
 
61
65
  private
62
66
 
63
- def update_associations(operation) models = []
64
- to_skip = operation == :destroy ? dependent_associations : []
65
- to_load = associations_to_load(:on_change, to_skip)
66
-
67
- models = []
68
- to_load.each { |key| models |= models_for_association(key) }
67
+ def update_associations
68
+ operation = destroyed? ? :destroy : :update
69
+ models = load_associations(operation)
69
70
  serialized_models = serialize_models(models)
70
71
  enqueue_worker(serialized_models)
72
+ @loaded_associations = nil
71
73
  end
72
74
 
73
- def associations_to_load(key, skip_associations)
74
- associations = self.class.notifiable_associations.public_send(key)
75
- skip_associations_map = {}
76
- skip_associations.each { |assoc| skip_associations_map[assoc] = true }
77
- associations.reject { |assoc| skip_associations_map[assoc] }
75
+ def load_associations(operation)
76
+ return @loaded_associations unless @loaded_associations.nil?
77
+ @loaded_associations = []
78
+ to_skip = operation == :destroy ? dependent_associations.fetch : []
79
+ to_load = associations_to_load(:on_change, to_skip)
80
+ to_load.each { |key| @loaded_associations |= models_for_association(key) }
81
+ @loaded_associations
78
82
  end
79
83
 
80
- def dependent_associations
81
- dependent_associations = []
82
- self.class.reflect_on_all_associations.each do |association|
83
- if association.options[:dependent].present?
84
- dependent_associations << association.name.to_sym
85
- end
86
- end
87
- dependent_associations
84
+ def associations_to_load(key, associations_to_skip)
85
+ associations = notifiable_associations.public_send(key)
86
+ associations - associations_to_skip
88
87
  end
89
88
 
90
89
  def serialize_models(models)
@@ -98,7 +97,6 @@ module Lifesaver
98
97
  def enqueue_worker(serialized_models)
99
98
  Lifesaver::Notification::Enqueuer.new(serialized_models).enqueue
100
99
  end
101
-
102
100
  end
103
101
  end
104
102
  end
@@ -1,3 +1,3 @@
1
1
  module Lifesaver
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
data/lifesaver.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Lifesaver::VERSION
9
9
  spec.authors = ["Paul Sorensen"]
10
10
  spec.email = ["paulnsorensen@gmail.com"]
11
- spec.description = %q{Indexes your ActiveRecord models in elasticsearch asynchronously by making use of tire and resque}
12
- spec.summary = %q{Indexes your ActiveRecord models in elasticsearch asynchronously by making use of tire and resque}
11
+ spec.description = %q{Asynchronously sends your ActiveRecord models for reindexing in elasticsearch by making use of tire and resque}
12
+ spec.summary = %q{Asynchronously sends your ActiveRecord models for reindexing in elasticsearch by making use of tire and resque}
13
13
  spec.homepage = ""
14
14
  spec.license = "MIT"
15
15
 
@@ -22,10 +22,16 @@ Gem::Specification.new do |spec|
22
22
  spec.add_development_dependency "bundler", "~> 1.3"
23
23
  spec.add_development_dependency "rake"
24
24
  spec.add_development_dependency "rspec"
25
- spec.add_development_dependency "activerecord"
26
25
  spec.add_development_dependency "sqlite3"
26
+ spec.add_development_dependency "database_cleaner"
27
27
  spec.add_runtime_dependency 'activerecord', '>= 3'
28
28
  spec.add_runtime_dependency 'tire', '~> 0.6.0'
29
29
  spec.add_runtime_dependency 'resque', '~> 1.25.0'
30
30
  spec.add_runtime_dependency 'resque-loner', '~> 1.2.1'
31
+
32
+ if RUBY_ENGINE == 'rbx'
33
+ spec.add_development_dependency 'racc'
34
+ spec.add_development_dependency 'rubysl', '~> 2.0'
35
+ spec.add_development_dependency 'json'
36
+ end
31
37
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  require 'pry'
2
- require 'coveralls'
3
- Coveralls.wear! if ENV['RUN_COVERALLS']
2
+ require 'database_cleaner'
3
+
4
+ if ENV['RUN_COVERALLS'] && RUBY_ENGINE != 'rbx'
5
+ require 'coveralls'
6
+ Coveralls.wear!
7
+ end
4
8
 
5
9
  require 'lifesaver'
6
10
 
@@ -20,10 +24,9 @@ RSpec.configure do |config|
20
24
  c.syntax = :expect
21
25
  end
22
26
 
23
- config.around do |example|
24
- ActiveRecord::Base.transaction do
25
- example.run
26
- fail ActiveRecord::Rollback
27
- end
27
+ DatabaseCleaner.strategy = :truncation
28
+
29
+ config.after(:each) do
30
+ DatabaseCleaner.clean
28
31
  end
29
32
  end
@@ -18,7 +18,7 @@ module ActiveModel::Validations
18
18
  self.valid?
19
19
  [errors[attribute]].flatten.compact
20
20
  end
21
- alias :error_on :errors_on
21
+ alias_method :error_on, :errors_on
22
22
  end
23
23
 
24
24
  # test models we'll use in each spec
@@ -5,7 +5,6 @@ ActiveSupport.on_load :active_record do
5
5
  include Lifesaver::Notification::ModelAdditions
6
6
  end
7
7
 
8
-
9
8
  class Author < ActiveRecord::Base
10
9
  has_many :authorships, dependent: :destroy
11
10
  has_many :posts, through: :authorships
@@ -5,15 +5,15 @@ describe Lifesaver::Indexing::Indexer do
5
5
  let(:index) { double('index', remove: nil, store: nil) }
6
6
  let(:index_name) { 'test-index-name' }
7
7
  before do
8
- Model.stub(:index_name).and_return(index_name)
9
- Tire.stub(:index).with(index_name).and_return(index)
8
+ allow(Model).to receive(:index_name).and_return(index_name)
9
+ allow(Tire).to receive(:index).with(index_name).and_return(index)
10
10
  end
11
11
 
12
12
  context 'when operation is update' do
13
13
  let(:model) { Model.new(1) }
14
14
  before do
15
- Model.stub(:exists?).with('1').and_return(true)
16
- Model.stub(:find).with('1').and_return(model)
15
+ allow(Model).to receive(:exists?).with('1').and_return(true)
16
+ allow(Model).to receive(:find).with('1').and_return(model)
17
17
  end
18
18
 
19
19
  it 'calls tire with the correct arguments' do
@@ -31,7 +31,7 @@ describe Lifesaver::Indexing::Indexer do
31
31
 
32
32
  context 'when operation is destroy' do
33
33
  before do
34
- Model.stub(:document_type).and_return('class')
34
+ allow(Model).to receive(:document_type).and_return('class')
35
35
  end
36
36
 
37
37
  it 'calls tire with the correct arguments' do
@@ -5,7 +5,7 @@ describe Lifesaver::Indexing::ModelAdditions do
5
5
 
6
6
  describe '.enqueues_indexing' do
7
7
  before do
8
- post.stub(:enqueue_indexing)
8
+ allow(post).to receive(:enqueue_indexing)
9
9
  end
10
10
 
11
11
  it 'calls enqueue_indexing on save' do
@@ -0,0 +1,19 @@
1
+ require 'spec_helper'
2
+
3
+ class DummyClass < ActiveRecord::Base
4
+ has_many :foo, dependent: :destroy
5
+ has_one :bar
6
+ belongs_to :baz, dependent: :delete
7
+ end
8
+
9
+ describe Lifesaver::Notification::DependentAssociations do
10
+ let(:dependent_associations) do
11
+ Lifesaver::Notification::DependentAssociations.new(DummyClass)
12
+ end
13
+
14
+ describe '#fetch' do
15
+ it 'returns association keys that are dependent' do
16
+ expect(dependent_associations.fetch).to eql([:foo, :baz])
17
+ end
18
+ end
19
+ end
@@ -34,7 +34,7 @@ describe Lifesaver::Notification::EagerLoader do
34
34
 
35
35
  describe '#load' do
36
36
  before do
37
- Post.stub(:load_with_notifiable_associations).and_return([])
37
+ allow(Post).to receive(:load_with_notifiable_associations).and_return([])
38
38
  eager_loader.add_model('Post', 34)
39
39
  eager_loader.add_model('Post', 38)
40
40
  end
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Lifesaver::Notification::Enqueuer do
4
4
  let(:models) { [Lifesaver::SerializedModel.new('TestClass', '3')] }
5
5
  let(:enqueuer) { Lifesaver::Notification::Enqueuer.new(models) }
6
- before { ::Resque.stub(:enqueue) }
6
+ before { allow(Resque).to receive(:enqueue) }
7
7
 
8
8
  describe '#enqueue' do
9
9
  context 'when indexing is not suppressed' do
@@ -5,7 +5,7 @@ describe Lifesaver::Notification::IndexingGraph do
5
5
 
6
6
  describe '#initalize_models' do
7
7
  it 'should load serialized models into the loader' do
8
- indexing_graph.stub(:add_model_to_loader)
8
+ allow(indexing_graph).to receive(:add_model_to_loader)
9
9
  serialized_models = []
10
10
  serialized_models << Lifesaver::SerializedModel.new('Post', 14)
11
11
 
@@ -18,13 +18,14 @@ describe Lifesaver::Notification::IndexingGraph do
18
18
  describe '#generate' do
19
19
  context 'when queue is empty' do
20
20
  before do
21
- indexing_graph.stub(:queue_full?).and_return(false)
21
+ allow(indexing_graph).to receive(:queue_full?).and_return(false)
22
22
  end
23
23
 
24
24
  context 'and loader is empty' do
25
25
  it 'exits and returns models_to_index' do
26
- indexing_graph.stub(:loader_full?).and_return(false)
27
- indexing_graph.stub(:models_to_index).and_return([Model.new(15)])
26
+ allow(indexing_graph).to receive(:loader_full?).and_return(false)
27
+ allow(indexing_graph).to receive(:models_to_index)
28
+ .and_return([Model.new(15)])
28
29
 
29
30
  expect(indexing_graph.generate).to eql([Model.new(15)])
30
31
  end
@@ -32,8 +33,9 @@ describe Lifesaver::Notification::IndexingGraph do
32
33
 
33
34
  context 'and loader is not empty' do
34
35
  it 'calls load_into_queue' do
35
- indexing_graph.stub(:loader_full?).and_return(true, false)
36
- indexing_graph.stub(:load_into_queue)
36
+ allow(indexing_graph).to receive(:loader_full?)
37
+ .and_return(true, false)
38
+ allow(indexing_graph).to receive(:load_into_queue)
37
39
 
38
40
  expect(indexing_graph).to receive(:load_into_queue)
39
41
 
@@ -44,25 +46,28 @@ describe Lifesaver::Notification::IndexingGraph do
44
46
 
45
47
  context 'when queue is not empty' do
46
48
  before do
47
- indexing_graph.stub(:queue_full?).and_return(true, false)
48
- indexing_graph.stub(:pop_model).and_return(Model.new(1))
49
- indexing_graph.stub(:add_unvisited_associations)
49
+ allow(indexing_graph).to receive(:queue_full?).and_return(true, false)
50
+ allow(indexing_graph).to receive(:pop_model).and_return(Model.new(1))
51
+ allow(indexing_graph).to receive(:add_unvisited_associations)
50
52
  end
51
53
 
52
54
  it 'adds model if should be indexed' do
53
- indexing_graph.stub(:model_should_be_indexed?).and_return(true)
55
+ allow(indexing_graph).to receive(:model_should_be_indexed?)
56
+ .and_return(true)
54
57
 
55
58
  expect(indexing_graph.generate).to eql([Model.new(1)])
56
59
  end
57
60
 
58
61
  it 'does not add a model if it should not be indexed' do
59
- indexing_graph.stub(:model_should_be_indexed?).and_return(false)
62
+ allow(indexing_graph).to receive(:model_should_be_indexed?)
63
+ .and_return(false)
60
64
 
61
65
  expect(indexing_graph.generate).to eql([])
62
66
  end
63
67
 
64
68
  it 'adds unvisited associations to the graph' do
65
- indexing_graph.stub(:model_should_be_indexed?).and_return(false)
69
+ allow(indexing_graph).to receive(:model_should_be_indexed?)
70
+ .and_return(false)
66
71
 
67
72
  expect(indexing_graph).to receive(:add_unvisited_associations)
68
73
 
@@ -13,7 +13,7 @@ describe Lifesaver::Notification::ModelAdditions do
13
13
 
14
14
  describe '.notifies_for_indexing' do
15
15
  before do
16
- post.stub(:update_associations)
16
+ allow(post).to receive(:update_associations)
17
17
  end
18
18
 
19
19
  it 'calls update_associations on save' do
metadata CHANGED
@@ -1,20 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lifesaver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Paul Sorensen
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-12-16 00:00:00.000000000 Z
11
+ date: 2014-01-30 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: bundler
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
17
  - - ~>
20
18
  - !ruby/object:Gem::Version
@@ -22,7 +20,6 @@ dependencies:
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
24
  - - ~>
28
25
  - !ruby/object:Gem::Version
@@ -30,87 +27,76 @@ dependencies:
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - '>='
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - '>='
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - '>='
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - '>='
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
- name: activerecord
56
+ name: sqlite3
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - '>='
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - '>='
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
- name: sqlite3
70
+ name: database_cleaner
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - '>='
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - '>='
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: activerecord
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - '>='
100
88
  - !ruby/object:Gem::Version
101
89
  version: '3'
102
90
  type: :runtime
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - '>='
108
95
  - !ruby/object:Gem::Version
109
96
  version: '3'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: tire
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
101
  - - ~>
116
102
  - !ruby/object:Gem::Version
@@ -118,7 +104,6 @@ dependencies:
118
104
  type: :runtime
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
108
  - - ~>
124
109
  - !ruby/object:Gem::Version
@@ -126,7 +111,6 @@ dependencies:
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: resque
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
115
  - - ~>
132
116
  - !ruby/object:Gem::Version
@@ -134,7 +118,6 @@ dependencies:
134
118
  type: :runtime
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
122
  - - ~>
140
123
  - !ruby/object:Gem::Version
@@ -142,7 +125,6 @@ dependencies:
142
125
  - !ruby/object:Gem::Dependency
143
126
  name: resque-loner
144
127
  requirement: !ruby/object:Gem::Requirement
145
- none: false
146
128
  requirements:
147
129
  - - ~>
148
130
  - !ruby/object:Gem::Version
@@ -150,13 +132,12 @@ dependencies:
150
132
  type: :runtime
151
133
  prerelease: false
152
134
  version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
135
  requirements:
155
136
  - - ~>
156
137
  - !ruby/object:Gem::Version
157
138
  version: 1.2.1
158
- description: Indexes your ActiveRecord models in elasticsearch asynchronously by making
159
- use of tire and resque
139
+ description: Asynchronously sends your ActiveRecord models for reindexing in elasticsearch
140
+ by making use of tire and resque
160
141
  email:
161
142
  - paulnsorensen@gmail.com
162
143
  executables: []
@@ -178,6 +159,7 @@ files:
178
159
  - lib/lifesaver/indexing/enqueuer.rb
179
160
  - lib/lifesaver/indexing/indexer.rb
180
161
  - lib/lifesaver/indexing/model_additions.rb
162
+ - lib/lifesaver/notification/dependent_associations.rb
181
163
  - lib/lifesaver/notification/eager_loader.rb
182
164
  - lib/lifesaver/notification/enqueuer.rb
183
165
  - lib/lifesaver/notification/indexing_graph.rb
@@ -197,6 +179,7 @@ files:
197
179
  - spec/unit/config_spec.rb
198
180
  - spec/unit/indexing/indexer_spec.rb
199
181
  - spec/unit/indexing/model_addtions_spec.rb
182
+ - spec/unit/notification/dependent_associations_spec.rb
200
183
  - spec/unit/notification/eager_loader_spec.rb
201
184
  - spec/unit/notification/enqueuer_spec.rb
202
185
  - spec/unit/notification/indexing_graph_spec.rb
@@ -206,32 +189,28 @@ files:
206
189
  homepage: ''
207
190
  licenses:
208
191
  - MIT
192
+ metadata: {}
209
193
  post_install_message:
210
194
  rdoc_options: []
211
195
  require_paths:
212
196
  - lib
213
197
  required_ruby_version: !ruby/object:Gem::Requirement
214
- none: false
215
198
  requirements:
216
- - - ! '>='
199
+ - - '>='
217
200
  - !ruby/object:Gem::Version
218
201
  version: '1.9'
219
202
  required_rubygems_version: !ruby/object:Gem::Requirement
220
- none: false
221
203
  requirements:
222
- - - ! '>='
204
+ - - '>='
223
205
  - !ruby/object:Gem::Version
224
206
  version: '0'
225
- segments:
226
- - 0
227
- hash: -3695998717918674218
228
207
  requirements: []
229
208
  rubyforge_project:
230
- rubygems_version: 1.8.25
209
+ rubygems_version: 2.2.0
231
210
  signing_key:
232
- specification_version: 3
233
- summary: Indexes your ActiveRecord models in elasticsearch asynchronously by making
234
- use of tire and resque
211
+ specification_version: 4
212
+ summary: Asynchronously sends your ActiveRecord models for reindexing in elasticsearch
213
+ by making use of tire and resque
235
214
  test_files:
236
215
  - spec/integration/lifesaver_spec.rb
237
216
  - spec/spec_helper.rb
@@ -241,6 +220,7 @@ test_files:
241
220
  - spec/unit/config_spec.rb
242
221
  - spec/unit/indexing/indexer_spec.rb
243
222
  - spec/unit/indexing/model_addtions_spec.rb
223
+ - spec/unit/notification/dependent_associations_spec.rb
244
224
  - spec/unit/notification/eager_loader_spec.rb
245
225
  - spec/unit/notification/enqueuer_spec.rb
246
226
  - spec/unit/notification/indexing_graph_spec.rb