sbsm 1.5.4 → 1.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d571577c95ff6d71831c663d7472e277db43caa
4
- data.tar.gz: a48912ed3413eb301e44a4c77fdc25d93cccadff
3
+ metadata.gz: 2eda12c46b1116c92dfe97027a53565f71715cd3
4
+ data.tar.gz: 709c375fec68690bbabffebe91886f34f1b61503
5
5
  SHA512:
6
- metadata.gz: 10b3360d408d609c1400d0ffd038960b0507489e8bd5b66ec76275e4eaad82b1643fbd4f0e97c8008169a528699205d2125c5ca8a9dd3bb29191e69fc0f2c7ba
7
- data.tar.gz: 628c2b1c6e2f25afe69fe6d839c434febf1a6f3ecee33690b6b3386e7881c484b1d16529d4385927a70afbc126d85a42ace5365c0484e2e680f4807a674038f2
6
+ metadata.gz: 5086f2d5dc29a833ecc655695deac70c6373aa0363a5fc82ae9b7e9fe1dbaa9a121f700d36d5bb152a217cf6a949c6844114fb18cb7fe2fe0a3afc2f4221cf6d
7
+ data.tar.gz: 3be17e83ef6c00f6a1b192000848fdeae6d95ce294aa13ab28df53ba223208fcf073484b696ea5dca320d8697408b3ac14b1868db8bd0ea916206b8919c69771
@@ -1,4 +1,8 @@
1
- === 1.5.3 / 11.07.2017
1
+ === 1.5.5 / 12.07.2017
2
+
3
+ * Do not return body if HEAD is requested
4
+
5
+ === 1.5.4 / 11.07.2017
2
6
 
3
7
  * Avoid nil error when rack_request is nil
4
8
 
@@ -138,7 +138,7 @@ module SBSM
138
138
  return [404, {}, []]
139
139
  end
140
140
  else
141
- response.write res
141
+ response.write res unless request.request_method.eql?('HEAD')
142
142
  response.headers['Content-Type'] ||= 'text/html; charset=utf-8'
143
143
  response.headers.merge!(session.http_headers)
144
144
  end
@@ -152,8 +152,7 @@ module SBSM
152
152
  :path => "/",
153
153
  :expires => (Time.now + (60 * 60 * 24 * 365 * 10))})
154
154
  response.set_cookie(SESSION_ID, { :value => session_id, :path => '/' , :expires => (Time.now + (60 * 60 * 24 * 365 * 10)) })
155
- request = nil
156
- session.rack_request = nil
155
+ # bad idea to reset rack_request if we need more page
157
156
  @@last_session = session
158
157
  if response.headers['Set-Cookie'].to_s.index(session_id)
159
158
  SBSM.debug "finish session_id.1 #{session_id}: matches response.headers['Set-Cookie'] #{response.headers['Set-Cookie']}"
@@ -1,3 +1,3 @@
1
1
  module SBSM
2
- VERSION = '1.5.4'
2
+ VERSION = '1.5.5'
3
3
  end
@@ -49,6 +49,12 @@ class AppVariantTest < Minitest::Test
49
49
  assert_match ABOUT_HTML_CONTENT, last_response.body
50
50
  assert_equal(first_session_id, second_session_id)
51
51
  end
52
+ def test_request_head
53
+ head '/fr/page/about'
54
+ assert last_response.ok?
55
+ assert last_response.body.empty?
56
+ assert last_response.headers.keys.index('Content-Type')
57
+ end
52
58
  end
53
59
 
54
60
  class AppTestSimple < Minitest::Test
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sbsm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.4
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Masaomi Hatakeyama, Zeno R.R. Davatz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-11 00:00:00.000000000 Z
11
+ date: 2017-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack