bullet 4.0.0 → 4.1.1
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.
- data/.gitignore +1 -0
- data/.travis.yml +4 -2
- data/Gemfile +2 -3
- data/Gemfile.lock +36 -39
- data/Gemfile.rails-2.3.14.lock +1 -1
- data/{Gemfile.rails-3.0.12 → Gemfile.rails-3.0.13} +1 -1
- data/{Gemfile.rails-3.0.12.lock → Gemfile.rails-3.0.13.lock} +27 -27
- data/{Gemfile.rails-3.1.4 → Gemfile.rails-3.1.5} +2 -2
- data/{Gemfile.rails-3.1.4.lock → Gemfile.rails-3.1.5.lock} +34 -34
- data/lib/bullet/action_controller2.rb +5 -4
- data/lib/bullet/dependency.rb +83 -0
- data/lib/bullet/{mongoid.rb → mongoid24.rb} +11 -13
- data/lib/bullet/mongoid3.rb +53 -0
- data/lib/bullet/rack.rb +7 -5
- data/lib/bullet/version.rb +1 -1
- data/lib/bullet.rb +12 -17
- data/spec/bullet/ext/object_spec.rb +1 -4
- data/spec/integration/association_spec.rb +1 -1
- data/spec/integration/counter_spec.rb +1 -1
- data/spec/integration/mongoid/association_spec.rb +174 -199
- data/spec/integration/rails2/association_spec.rb +1 -1
- data/spec/integration/rails2/counter_spec.rb +2 -2
- data/spec/models/post.rb +3 -1
- data/spec/spec_helper.rb +26 -22
- data/spec/support/mongo_seed.rb +10 -2
- data/test.sh +4 -0
- metadata +14 -11
data/spec/support/mongo_seed.rb
CHANGED
|
@@ -29,11 +29,19 @@ module Support
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def setup_db
|
|
32
|
-
Mongoid
|
|
32
|
+
if Mongoid::VERSION =~ /\A2\.4/
|
|
33
|
+
Mongoid.configure do |config|
|
|
34
|
+
config.master = Mongo::Connection.new.db("bullet")
|
|
35
|
+
end
|
|
36
|
+
elsif Mongoid::VERSION =~ /\A3/
|
|
37
|
+
Mongoid.configure do |config|
|
|
38
|
+
config.connect_to("bullet")
|
|
39
|
+
end
|
|
40
|
+
end
|
|
33
41
|
end
|
|
34
42
|
|
|
35
43
|
def teardown_db
|
|
36
|
-
Mongoid.
|
|
44
|
+
Mongoid.purge!
|
|
37
45
|
end
|
|
38
46
|
|
|
39
47
|
extend self
|
data/test.sh
ADDED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bullet
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.1.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-
|
|
12
|
+
date: 2012-06-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: uniform_notifier
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &70259190750800 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
@@ -21,7 +21,7 @@ dependencies:
|
|
|
21
21
|
version: 1.0.0
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *70259190750800
|
|
25
25
|
description: A rails plugin to kill N+1 queries and unused eager loading.
|
|
26
26
|
email:
|
|
27
27
|
- flyerhzm@gmail.com
|
|
@@ -38,10 +38,10 @@ files:
|
|
|
38
38
|
- Gemfile.lock
|
|
39
39
|
- Gemfile.rails-2.3.14
|
|
40
40
|
- Gemfile.rails-2.3.14.lock
|
|
41
|
-
- Gemfile.rails-3.0.
|
|
42
|
-
- Gemfile.rails-3.0.
|
|
43
|
-
- Gemfile.rails-3.1.
|
|
44
|
-
- Gemfile.rails-3.1.
|
|
41
|
+
- Gemfile.rails-3.0.13
|
|
42
|
+
- Gemfile.rails-3.0.13.lock
|
|
43
|
+
- Gemfile.rails-3.1.5
|
|
44
|
+
- Gemfile.rails-3.1.5.lock
|
|
45
45
|
- Guardfile
|
|
46
46
|
- Hacking.textile
|
|
47
47
|
- MIT-LICENSE
|
|
@@ -54,6 +54,7 @@ files:
|
|
|
54
54
|
- lib/bullet/active_record2.rb
|
|
55
55
|
- lib/bullet/active_record3.rb
|
|
56
56
|
- lib/bullet/active_record31.rb
|
|
57
|
+
- lib/bullet/dependency.rb
|
|
57
58
|
- lib/bullet/detector.rb
|
|
58
59
|
- lib/bullet/detector/association.rb
|
|
59
60
|
- lib/bullet/detector/base.rb
|
|
@@ -62,7 +63,8 @@ files:
|
|
|
62
63
|
- lib/bullet/detector/unused_eager_association.rb
|
|
63
64
|
- lib/bullet/ext/object.rb
|
|
64
65
|
- lib/bullet/ext/string.rb
|
|
65
|
-
- lib/bullet/
|
|
66
|
+
- lib/bullet/mongoid24.rb
|
|
67
|
+
- lib/bullet/mongoid3.rb
|
|
66
68
|
- lib/bullet/notification.rb
|
|
67
69
|
- lib/bullet/notification/base.rb
|
|
68
70
|
- lib/bullet/notification/counter_cache.rb
|
|
@@ -135,6 +137,7 @@ files:
|
|
|
135
137
|
- spec/support/sqlite_seed.rb
|
|
136
138
|
- tasks/bullet_tasks.rake
|
|
137
139
|
- test.result
|
|
140
|
+
- test.sh
|
|
138
141
|
homepage: http://github.com/flyerhzm/bullet
|
|
139
142
|
licenses: []
|
|
140
143
|
post_install_message:
|
|
@@ -149,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
149
152
|
version: '0'
|
|
150
153
|
segments:
|
|
151
154
|
- 0
|
|
152
|
-
hash:
|
|
155
|
+
hash: 3239988902273692039
|
|
153
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
154
157
|
none: false
|
|
155
158
|
requirements:
|
|
@@ -158,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
158
161
|
version: 1.3.6
|
|
159
162
|
requirements: []
|
|
160
163
|
rubyforge_project:
|
|
161
|
-
rubygems_version: 1.8.
|
|
164
|
+
rubygems_version: 1.8.17
|
|
162
165
|
signing_key:
|
|
163
166
|
specification_version: 3
|
|
164
167
|
summary: A rails plugin to kill N+1 queries and unused eager loading.
|