http-accept 1.1.1 → 1.1.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
  SHA1:
3
- metadata.gz: 954845d60bf94eee8063d94cd3e848d9fa551464
4
- data.tar.gz: 7a82a3455fdd4a2dd6de9fcc973750aa3be5cd12
3
+ metadata.gz: 3a7f746dc94e3b5c11723e592682f5a8cd7059ee
4
+ data.tar.gz: c96d725eddaf783346e22794a8fd2d0b35b1a23b
5
5
  SHA512:
6
- metadata.gz: 5746efff959b201d04f83725d00c103c71f9a5dad69b33d7ee765b8b23f68b947fb9d61aac11faa08d25ac857280fb131d7595a38d5a74dce73bcf853f58aaee
7
- data.tar.gz: 4cd56d9c300498ad2ddaa6534fa011b955a395f5632c9162f533ddaa2f27923a8d0901dd96ded80013c75269d3862218205c7eda9a43fec8b63b280cbdee24ae
6
+ metadata.gz: a7747cc2209e7a651ef8f78fe96571929b930ac0f4274b8df11ce373673f06be47b9ed5f1955dd33c58d83b91fe4c3a95288b803a0601de5a3d198f0b7358c34
7
+ data.tar.gz: c69414ed28b553888a5912ccd59d86eb32f3cbebbfc355b2aa5c51084fb62bfca807db60bad584d548d22c150f1899f5a631c8518d6cefe00b003cbe4a3e974c
@@ -88,7 +88,7 @@ module HTTP
88
88
  yield self.new(scanner[:locale], scanner[:q])
89
89
 
90
90
  # Are there more?
91
- return unless scanner.scan(/\s*,\s*/)
91
+ break unless scanner.scan(/\s*,\s*/)
92
92
  end
93
93
 
94
94
  raise ParseError.new("Could not parse entire string!") unless scanner.eos?
@@ -100,19 +100,18 @@ module HTTP
100
100
  while scanner.scan(PARAMETER)
101
101
  key = scanner[:key]
102
102
 
103
+ # If the regular expression PARAMETER matched, it must be one of these two:
103
104
  if value = scanner[:value]
104
105
  parameters[key] = value
105
106
  elsif quoted_value = scanner[:quoted_value]
106
107
  parameters[key] = QuotedString.unquote(quoted_value, normalize_whitespace)
107
- else
108
- raise ParseError.new("Could not parse parameter!")
109
108
  end
110
109
  end
111
110
 
112
111
  yield self.new(mime_type, parameters)
113
112
 
114
113
  # Are there more?
115
- return unless scanner.scan(/\s*,\s*/)
114
+ break unless scanner.scan(/\s*,\s*/)
116
115
  end
117
116
 
118
117
  raise ParseError.new("Could not parse entire string!") unless scanner.eos?
@@ -20,6 +20,6 @@
20
20
 
21
21
  module HTTP
22
22
  module Accept
23
- VERSION = "1.1.1"
23
+ VERSION = "1.1.2"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http-accept
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  requirements: []
95
95
  rubyforge_project:
96
- rubygems_version: 2.5.1
96
+ rubygems_version: 2.4.8
97
97
  signing_key:
98
98
  specification_version: 4
99
99
  summary: Parse Accept and Accept-Language HTTP headers.