bullet 4.11.0 → 4.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  class Category < ActiveRecord::Base
2
- has_many :posts
2
+ has_many :posts, inverse_of: :category
3
3
  has_many :entries
4
4
 
5
5
  has_many :submissions
data/spec/models/post.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  class Post < ActiveRecord::Base
2
2
  extend Bullet::Dependency
3
3
 
4
- belongs_to :category
4
+ belongs_to :category, inverse_of: :posts
5
5
  belongs_to :writer
6
6
  has_many :comments, inverse_of: :post
7
7
 
data/spec/spec_helper.rb CHANGED
@@ -65,7 +65,7 @@ if active_record?
65
65
  end
66
66
  end
67
67
 
68
- if ENV["LOG"]
68
+ if ENV["BULLET_LOG"]
69
69
  require 'logger'
70
70
  ActiveRecord::Base.logger = Logger.new(STDOUT)
71
71
  end
@@ -96,7 +96,7 @@ if mongoid?
96
96
  end
97
97
  end
98
98
 
99
- if ENV["LOG"]
99
+ if ENV["BULLET_LOG"]
100
100
  Mongoid.logger = Logger.new(STDOUT)
101
101
  Moped.logger = Logger.new(STDOUT)
102
102
  end
@@ -33,7 +33,7 @@ module Bullet
33
33
 
34
34
  # returns true if a given object has a specific association
35
35
  def creating_object_association_for?(object, association)
36
- object_associations[object.bullet_ar_key].present? && object_associations[object.bullet_ar_key].include?(association)
36
+ object_associations[object.bullet_key].present? && object_associations[object.bullet_key].include?(association)
37
37
  end
38
38
 
39
39
  # returns true if a given class includes the specific unpreloaded association
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.11.0
4
+ version: 4.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-24 00:00:00.000000000 Z
11
+ date: 2014-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -16,26 +16,26 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 3.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: uniform_notifier
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.6.0
41
41
  description: help to kill N+1 queries and unused eager loading.