bullet 5.4.0 → 5.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/bullet.rb +2 -2
- data/lib/bullet/dependency.rb +4 -0
- data/lib/bullet/version.rb +1 -1
- data/spec/bullet_spec.rb +2 -8
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5470d4ec1cc862d90317ccc9f48af3c624929991
|
|
4
|
+
data.tar.gz: 0b3b471d1542e53d2842a521e699740c9f03feb7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f37623de381c346b4eeb7e930c5db1f1a30bd820752b209be9d00d3aa277f547cc57844d484d549770e7a8a4aa0160c9ae1d1ef3071ebba05678e4d424db00db
|
|
7
|
+
data.tar.gz: 2b88a23b0949f8a285f1d73582a4e81f6eb7a99c8d5dd527b2509c317dd007e7195c9e5e8a03cfcadc9b0d992912fc8c6f8b831ae709934983e9668cbbaa59c7
|
data/CHANGELOG.md
CHANGED
data/lib/bullet.rb
CHANGED
|
@@ -222,9 +222,9 @@ module Bullet
|
|
|
222
222
|
|
|
223
223
|
def build_request_uri(env)
|
|
224
224
|
if env['QUERY_STRING'].present?
|
|
225
|
-
"#{env['PATH_INFO']}?#{env['QUERY_STRING']}"
|
|
225
|
+
"#{env['REQUEST_METHOD']} #{env['PATH_INFO']}?#{env['QUERY_STRING']}"
|
|
226
226
|
else
|
|
227
|
-
env['PATH_INFO']
|
|
227
|
+
"#{env['REQUEST_METHOD']} #{env['PATH_INFO']}"
|
|
228
228
|
end
|
|
229
229
|
end
|
|
230
230
|
end
|
data/lib/bullet/dependency.rb
CHANGED
|
@@ -28,6 +28,8 @@ module Bullet
|
|
|
28
28
|
'active_record5'
|
|
29
29
|
elsif active_record51?
|
|
30
30
|
'active_record5'
|
|
31
|
+
else
|
|
32
|
+
raise "Bullet does not support active_record #{::ActiveRecord::VERSION} yet"
|
|
31
33
|
end
|
|
32
34
|
end
|
|
33
35
|
end
|
|
@@ -42,6 +44,8 @@ module Bullet
|
|
|
42
44
|
'mongoid4x'
|
|
43
45
|
elsif mongoid5x?
|
|
44
46
|
'mongoid5x'
|
|
47
|
+
else
|
|
48
|
+
raise "Bullet does not support mongoid #{::Mongoid::VERSION} yet"
|
|
45
49
|
end
|
|
46
50
|
end
|
|
47
51
|
end
|
data/lib/bullet/version.rb
CHANGED
data/spec/bullet_spec.rb
CHANGED
|
@@ -103,16 +103,10 @@ describe Bullet, focused: true do
|
|
|
103
103
|
allow(notification).to receive(:notify_out_of_channel)
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
-
context 'when called with no args' do
|
|
107
|
-
it 'should notification.url is nil' do
|
|
108
|
-
expect(notification).to receive(:url=).with(nil)
|
|
109
|
-
Bullet.perform_out_of_channel_notifications
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
|
|
113
106
|
context 'when called with Rack environment hash' do
|
|
114
107
|
let(:env) {
|
|
115
108
|
{
|
|
109
|
+
'REQUEST_METHOD' => 'GET',
|
|
116
110
|
'PATH_INFO' => '/path',
|
|
117
111
|
'QUERY_STRING' => 'foo=bar',
|
|
118
112
|
}
|
|
@@ -122,7 +116,7 @@ describe Bullet, focused: true do
|
|
|
122
116
|
before { env['REQUEST_URI'] = nil }
|
|
123
117
|
|
|
124
118
|
it 'should notification.url is built' do
|
|
125
|
-
expect(notification).to receive(:url=).with('/path?foo=bar')
|
|
119
|
+
expect(notification).to receive(:url=).with('GET /path?foo=bar')
|
|
126
120
|
Bullet.perform_out_of_channel_notifications(env)
|
|
127
121
|
end
|
|
128
122
|
end
|
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: 5.4.
|
|
4
|
+
version: 5.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Huang
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-09-
|
|
11
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|