bullet 4.1.5 → 4.1.6
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/Gemfile.lock +1 -1
- data/Gemfile.rails-2.3.14.lock +1 -1
- data/Gemfile.rails-3.0.13.lock +1 -1
- data/Gemfile.rails-3.1.5.lock +1 -1
- data/README.textile +11 -33
- data/lib/bullet.rb +1 -1
- data/lib/bullet/rack.rb +1 -1
- data/lib/bullet/version.rb +1 -1
- data/spec/bullet/rack_spec.rb +6 -0
- metadata +5 -5
data/Gemfile.lock
CHANGED
data/Gemfile.rails-2.3.14.lock
CHANGED
data/Gemfile.rails-3.0.13.lock
CHANGED
data/Gemfile.rails-3.1.5.lock
CHANGED
data/README.textile
CHANGED
@@ -12,6 +12,15 @@ The Bullet gem now supports **activerecord** 2.1, 2.2, 2.3, 3.0, 3.1, 3.2 and **
|
|
12
12
|
|
13
13
|
****************************************************************************
|
14
14
|
|
15
|
+
h2. External Introduction
|
16
|
+
|
17
|
+
* "http://railscasts.com/episodes/372-bullet":http://railscasts.com/episodes/372-bullet
|
18
|
+
* "http://ruby5.envylabs.com/episodes/9-episode-8-september-8-2009":http://ruby5.envylabs.com/episodes/9-episode-8-september-8-2009
|
19
|
+
* "http://railslab.newrelic.com/2009/10/23/episode-19-on-the-edge-part-1":http://railslab.newrelic.com/2009/10/23/episode-19-on-the-edge-part-1
|
20
|
+
* "http://weblog.rubyonrails.org/2009/10/22/community-highlights":http://weblog.rubyonrails.org/2009/10/22/community-highlights
|
21
|
+
|
22
|
+
****************************************************************************
|
23
|
+
|
15
24
|
h2. Install
|
16
25
|
|
17
26
|
You can install it as a gem:
|
@@ -92,32 +101,9 @@ These two lines are notifications that unused eager loadings have been encounter
|
|
92
101
|
|
93
102
|
****************************************************************************
|
94
103
|
|
95
|
-
h2. Growl Support
|
96
|
-
|
97
|
-
To get Growl support up-and-running for Bullet, follow the steps below:
|
98
|
-
* Install the ruby-growl gem: <code>gem install ruby-growl</code>
|
99
|
-
* Open the Growl preference pane in Systems Preferences
|
100
|
-
* Click the "Network" tab
|
101
|
-
* Make sure both "Listen for incoming notifications" and "Allow remote application registration" are checked. *Note*: If you set a password, you will need to set <code>Bullet.growl = { :password => 'growl password' }</code> in the config file.
|
102
|
-
* Restart Growl ("General" tab -> Stop Growl -> Start Growl)
|
103
|
-
* Boot up your application. Bullet will automatically send a Growl notification when Growl is turned on. If you do not see it when your application loads, make sure it is enabled in your initializer and double-check the steps above.
|
104
|
-
|
105
|
-
****************************************************************************
|
106
|
-
|
107
|
-
h2. Ruby 1.9 issue
|
104
|
+
h2. Growl and XMPP/Jabber Support
|
108
105
|
|
109
|
-
|
110
|
-
|
111
|
-
****************************************************************************
|
112
|
-
|
113
|
-
h2. XMPP/Jabber Support
|
114
|
-
|
115
|
-
To get XMPP support up-and-running for Bullet, follow the steps below:
|
116
|
-
* Install the xmpp4r gem: <code>sudo gem install xmpp4r</code>
|
117
|
-
* Make both the bullet and the receipient account add each other as contacts.
|
118
|
-
This will require you to manually log into both accounts, add each other
|
119
|
-
as contact and confirm each others contact request.
|
120
|
-
* Boot up your application. Bullet will automatically send an XMPP notification when XMPP is turned on.
|
106
|
+
see "https://github.com/flyerhzm/uniform_notifier":https://github.com/flyerhzm/uniform_notifier
|
121
107
|
|
122
108
|
****************************************************************************
|
123
109
|
|
@@ -160,14 +146,6 @@ Don't forget enabling bullet in test environment.
|
|
160
146
|
|
161
147
|
****************************************************************************
|
162
148
|
|
163
|
-
h2. Links
|
164
|
-
|
165
|
-
* "http://weblog.rubyonrails.org/2009/10/22/community-highlights":http://weblog.rubyonrails.org/2009/10/22/community-highlights
|
166
|
-
* "http://ruby5.envylabs.com/episodes/9-episode-8-september-8-2009":http://ruby5.envylabs.com/episodes/9-episode-8-september-8-2009
|
167
|
-
* "http://railslab.newrelic.com/2009/10/23/episode-19-on-the-edge-part-1":http://railslab.newrelic.com/2009/10/23/episode-19-on-the-edge-part-1
|
168
|
-
|
169
|
-
****************************************************************************
|
170
|
-
|
171
149
|
h2. Contributors
|
172
150
|
|
173
151
|
"https://github.com/flyerhzm/bullet/contributors":https://github.com/flyerhzm/bullet/contributors
|
data/lib/bullet.rb
CHANGED
data/lib/bullet/rack.rb
CHANGED
@@ -37,7 +37,7 @@ module Bullet
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def html_request?(headers, response)
|
40
|
-
headers['Content-Type'] && headers['Content-Type'].include?('text/html') && response.body.include?("<html
|
40
|
+
headers['Content-Type'] && headers['Content-Type'].include?('text/html') && response.body.include?("<html")
|
41
41
|
end
|
42
42
|
|
43
43
|
def no_browser_cache(headers)
|
data/lib/bullet/version.rb
CHANGED
data/spec/bullet/rack_spec.rb
CHANGED
@@ -22,6 +22,12 @@ module Bullet
|
|
22
22
|
middleware.should be_html_request(headers, response)
|
23
23
|
end
|
24
24
|
|
25
|
+
it "should be true if Content-Type is text/html and http body contains html tag with attributes" do
|
26
|
+
headers = {"Content-Type" => "text/html"}
|
27
|
+
response = stub(:body => "<html attr='hello'><head></head><body></body></html>")
|
28
|
+
middleware.should be_html_request(headers, response)
|
29
|
+
end
|
30
|
+
|
25
31
|
it "should be false if there is no Content-Type header" do
|
26
32
|
headers = {}
|
27
33
|
response = stub(:body => "<html><head></head><body></body></html>")
|
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.1.
|
4
|
+
version: 4.1.6
|
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-08-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: uniform_notifier
|
16
|
-
requirement: &
|
16
|
+
requirement: &70273215166900 !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: *70273215166900
|
25
25
|
description: A rails plugin to kill N+1 queries and unused eager loading.
|
26
26
|
email:
|
27
27
|
- flyerhzm@gmail.com
|
@@ -152,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
segments:
|
154
154
|
- 0
|
155
|
-
hash:
|
155
|
+
hash: 1116007460163165065
|
156
156
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
157
|
none: false
|
158
158
|
requirements:
|