grover 1.2.1 → 1.2.2

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
  SHA256:
3
- metadata.gz: c1123f5ad0b72c13278999e8898b76407182df98c27e63061b5cbeeb8618b590
4
- data.tar.gz: 49f20ea08de4248f4e5b28f7a8437831ae2cd25c0135b86cfbf51cb75c7bd26f
3
+ metadata.gz: fa11dd4c983b7d122791e035286bc18f9fdda40561f0102547b801aa4718013c
4
+ data.tar.gz: 77fb1776461acc88789f1405e4c3135b9857971116880239671f3302d4df0505
5
5
  SHA512:
6
- metadata.gz: 985f49e244a7cfcc269b2240327f8da6639419a1343ced83cf119a0c5061cb04f2611d6672183ebd779b1f00f281db3a81aa7b6a1872ad49acfe89c5be75c2ed
7
- data.tar.gz: 34eb183e68ab09b523acecb65e60be51131e518a54a6d0d6ea00ab70c2229070c842caf5326fd789d22ab0b990109b57fa742c1ff70bdf0b3ae6af6d2bf8ede1
6
+ metadata.gz: d0e3ae26db5e6934bdb257c465001ac46f15404e201c1d5a431e96f03c36c4b27b1e10920337e0f67d4d012da55d9c651868b0497f20832ae191bb42eba29243
7
+ data.tar.gz: 5b9baa164d1fdb46b8a71dec29d68471622e9bd829742fee6975c19f2d2fc5b8a51b1f120f8ccebe7ee9ccfc1f38ed291881cb00998b7b72a90ae41bb0bd23d3
@@ -40,9 +40,9 @@ class Grover
40
40
 
41
41
  private
42
42
 
43
- PDF_REGEX = /\.pdf$/i.freeze
44
- PNG_REGEX = /\.png$/i.freeze
45
- JPEG_REGEX = /\.jpe?g$/i.freeze
43
+ PDF_REGEX = /\.pdf$/i
44
+ PNG_REGEX = /\.png$/i
45
+ JPEG_REGEX = /\.jpe?g$/i
46
46
 
47
47
  attr_reader :pdf_request, :png_request, :jpeg_request
48
48
 
@@ -85,7 +85,7 @@ class Grover
85
85
  end
86
86
 
87
87
  def html_content?(headers)
88
- headers['Content-Type'] =~ %r{text/html|application/xhtml\+xml}
88
+ headers['content-type'] =~ %r{text/html|application/xhtml\+xml}
89
89
  end
90
90
 
91
91
  def update_response(response, headers)
@@ -155,11 +155,11 @@ class Grover
155
155
 
156
156
  def assign_headers(headers, body, content_type)
157
157
  # Do not cache results
158
- headers.delete 'ETag'
159
- headers.delete 'Cache-Control'
158
+ headers.delete 'etag'
159
+ headers.delete 'cache-control'
160
160
 
161
- headers['Content-Length'] = (body.respond_to?(:bytesize) ? body.bytesize : body.size).to_s
162
- headers['Content-Type'] = content_type
161
+ headers['content-length'] = (body.respond_to?(:bytesize) ? body.bytesize : body.size).to_s
162
+ headers['content-type'] = content_type
163
163
  end
164
164
 
165
165
  def configure_env_for_grover_request(env)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class Grover
4
- VERSION = '1.2.1'
4
+ VERSION = '1.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grover
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Bromwich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-11-26 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -59,10 +59,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
59
  requirements:
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 2.7.0
62
+ version: 3.0.0
63
63
  - - "<"
64
64
  - !ruby/object:Gem::Version
65
- version: 3.4.0
65
+ version: 3.5.0
66
66
  required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
68
  - - ">="