scorched 1.0.2 → 1.0.3

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: 867ade7529bcd2c1aef6c5ae9ec3898078f1aedc65e190d29fd03781f7fbaabb
4
- data.tar.gz: 7275bd4b007d91441a06cd2a90e58fac6e49ea598fa146964fb074cc03af2f37
3
+ metadata.gz: ca89aa0414bd6f8f6ac42afd5fb7816198b4a9bdbf6b008cd32dbd5dcac89c7e
4
+ data.tar.gz: 34b43e1c6975f32954c52aeaccb21ebd797b31abd5adeaeb2430dd0cdf5ae848
5
5
  SHA512:
6
- metadata.gz: 0a0b3feb7e16e82571277ec4c97f8555b268013cbb8172e464a3d30fd4639e66c3ff817b9f165e5f4a2b4ef7b1470d28aaad4568dda1bad4cb56c390bf4a9cce
7
- data.tar.gz: 9dbfa1171f29c6037c173ece4f584a828c073671896c2f6b40dcc49dd37269ac5ad096909ec4d77bfdb88b212c0d4278c39206d370a30fc37aa9a836c77a73dc
6
+ metadata.gz: 752e607e45d78a21de7acaca053cca0d5f2b0b3b73f485c72a9c4779302c982fbf56496b248132ff7b4a895f2d50da2cfb579b7e6f7a7a008a4e5dd189eb4b8d
7
+ data.tar.gz: a0680f3c093aff1b1de0e612f3bffb052e1fdb3d4d39b54b8838a2ae295a26bb65fabe7263d4dd3239ea5687014ed772fd5d9a10f0886260f27a9d435d4179d4
data/CHANGES.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ### v1.0.3
5
+ * Fixed issue where routes with a `media_type` condition were prioritised over those without for HTTP requests accepting "*/*"
4
6
  ### v1.0.2
5
7
  * Now requiring CGI instead of URI library as per v1.0.1 deprecation fixes.
6
8
  ### v1.0.1
data/Gemfile CHANGED
@@ -1,2 +1,2 @@
1
1
  source 'https://rubygems.org'
2
- gemspec
2
+ gemspec
@@ -377,7 +377,8 @@ module Scorched
377
377
  priority = m.mapping[:priority] || 0
378
378
  media_type_rank = [*m.mapping[:conditions][:media_type]].map { |type|
379
379
  env['scorched.accept'][:accept].rank(type, true)
380
- }.max || 0
380
+ }.max
381
+ media_type_rank ||= env['scorched.accept'][:accept].rank('*/*', true) || 0 # Default to "*/*" if no media type condition specified.
381
382
  order = -idx
382
383
  [priority, media_type_rank, order]
383
384
  end.reverse
@@ -1,3 +1,3 @@
1
1
  module Scorched
2
- VERSION = '1.0.2'
2
+ VERSION = '1.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorched
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Wardrop
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-27 00:00:00.000000000 Z
11
+ date: 2023-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -175,7 +175,7 @@ homepage: http://scorchedrb.com
175
175
  licenses:
176
176
  - MIT
177
177
  metadata: {}
178
- post_install_message:
178
+ post_install_message:
179
179
  rdoc_options: []
180
180
  require_paths:
181
181
  - lib
@@ -190,8 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubygems_version: 3.1.2
194
- signing_key:
193
+ rubygems_version: 3.3.7
194
+ signing_key:
195
195
  specification_version: 4
196
196
  summary: Light-weight, DRY as a desert, web framework for Ruby
197
197
  test_files: