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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bullet (4.1.5)
4
+ bullet (4.1.6)
5
5
  uniform_notifier (~> 1.0.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bullet (4.1.5)
4
+ bullet (4.1.6)
5
5
  uniform_notifier (~> 1.0.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bullet (4.1.5)
4
+ bullet (4.1.6)
5
5
  uniform_notifier (~> 1.0.0)
6
6
 
7
7
  GEM
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bullet (4.1.5)
4
+ bullet (4.1.6)
5
5
  uniform_notifier (~> 1.0.0)
6
6
 
7
7
  GEM
@@ -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
- ruby-growl gem has an issue about md5 in ruby 1.9, if you use growl and ruby 1.9, check this gist http://gist.github.com/300184
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
@@ -59,7 +59,7 @@ module Bullet
59
59
  def bullet_logger=(active)
60
60
  if active
61
61
  bullet_log_file = File.open('log/bullet.log', 'a+')
62
- bullet_log_file.sync
62
+ bullet_log_file.sync = true
63
63
  UniformNotifier.customized_logger = bullet_log_file
64
64
  end
65
65
  end
@@ -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)
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Bullet
3
- VERSION = "4.1.5"
3
+ VERSION = "4.1.6"
4
4
  end
@@ -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.5
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-07-24 00:00:00.000000000 Z
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: &70299719166880 !ruby/object:Gem::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: *70299719166880
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: 938107111431995273
155
+ hash: 1116007460163165065
156
156
  required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  none: false
158
158
  requirements: