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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 58f4f616944a1bfde9a34e4670788802f0ccd418
4
- data.tar.gz: 61aabed03705063018b28e1505f0f0b693e1109b
3
+ metadata.gz: 5470d4ec1cc862d90317ccc9f48af3c624929991
4
+ data.tar.gz: 0b3b471d1542e53d2842a521e699740c9f03feb7
5
5
  SHA512:
6
- metadata.gz: 4be86c6d80b67bec48ee84d491b3b92cd19f9b9ea6d6d9d7d973848f93801edf0165f9a7f8f9309d7feee84ed2da1d6f39170161da2d0b01fe8debf7724d6dc9
7
- data.tar.gz: b82c8e8207775a8e987e52fbbddb6d35350c591df288e1152ee2d55e8de9f257ca55f82bcac02c59807b3cffa76038c0373fc09ba42c36a45be059fc05fed7e8
6
+ metadata.gz: f37623de381c346b4eeb7e930c5db1f1a30bd820752b209be9d00d3aa277f547cc57844d484d549770e7a8a4aa0160c9ae1d1ef3071ebba05678e4d424db00db
7
+ data.tar.gz: 2b88a23b0949f8a285f1d73582a4e81f6eb7a99c8d5dd527b2509c317dd007e7195c9e5e8a03cfcadc9b0d992912fc8c6f8b831ae709934983e9668cbbaa59c7
@@ -1,5 +1,10 @@
1
1
  # Next Release
2
2
 
3
+ ## 5.4.1
4
+
5
+ * Display http request method #311
6
+ * Raise an error if bullet does not support AR or Mongoid
7
+
3
8
  ## 5.4.0 (10/09/2016)
4
9
 
5
10
  * Support rails 5.1
@@ -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
@@ -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
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Bullet
3
- VERSION = "5.4.0"
3
+ VERSION = "5.4.1"
4
4
  end
@@ -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.0
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-10 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport