pwned 2.0.1 → 2.0.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: b7e2d94dbe8ca81e5e0d8024cb614d2039a4b8cbd835a805131a9d98c8215327
4
- data.tar.gz: 73d6a46ff19e904ba94590de3526709183e43956152d048352263c0b4a0246c3
3
+ metadata.gz: 1a4cfc835ea737e4c8f06f0abc5681f36321d94cb0224a1628ba3bbc46276d68
4
+ data.tar.gz: 2c48c27b0e9308431fe7c47d00d74318e55f2bff60456d8222fc108b7915318c
5
5
  SHA512:
6
- metadata.gz: 9fc9f07b450fddcc3dff391640bbce98589de8779254d470413111d5198b50ace2c71264f7dd6f81c06caec4262a7be360bb5b6e2dd9699262be72fa0905726f
7
- data.tar.gz: f03aec89ab299234ef7823097c4ffd943576019381249aaf097c38e74651ad5b4da1a66136320257729a9442b8a6c68a516b71fae3c2c12c9431ac56c90162c5
6
+ metadata.gz: 5aaa679b1268b7e2eaa17bebab180a071c286080965602cd50d0e2c1f5b6b92b58c970fbf12e5678c10d4570907632b4346a345ea904820370505f205b7d51d6
7
+ data.tar.gz: cf95e423abffe290bf3de0bfe6c1dff7da73eb8c6c0b574ca97ab63ad82d27a417caa35136cccf3dd4407437b8e00f77421144ad50487b5d8a8502438fa660cb
@@ -1,6 +1,14 @@
1
1
  # Changelog for `Pwned`
2
2
 
3
- ## Ongoing [☰](https://github.com/philnash/pwned/compare/v2.0.1...master)
3
+ ## Ongoing [☰](https://github.com/philnash/pwned/compare/v2.0.2...master)
4
+
5
+ ## 2.0.2 (May 20, 2020) [☰](https://github.com/philnash/pwned/compare/v2.0.1...v2.0.2)
6
+
7
+ - Minor fix
8
+
9
+ - It was found to be possible for reading the lines body of a response to
10
+ result in a `nil` which caused trouble with string concatenation. This
11
+ avoids that scenario. Fixes #18, thanks [@flori](https://github.com/flori).
4
12
 
5
13
  ## 2.0.1 (January 14, 2019) [☰](https://github.com/philnash/pwned/compare/v2.0.0...v2.0.1)
6
14
 
@@ -149,11 +149,14 @@ module Pwned
149
149
 
150
150
  response.read_body do |chunk|
151
151
  chunk_lines = (last_line + chunk).lines
152
- # This could end with half a line, so save it for next time
153
- last_line = chunk_lines.pop
152
+ # This could end with half a line, so save it for next time. If
153
+ # chunk_lines is empty, pop returns nil, so this also ensures last_line
154
+ # is always a string.
155
+ last_line = chunk_lines.pop || ''
154
156
  chunk_lines.each(&block)
155
157
  end
156
- yield last_line
158
+
159
+ yield last_line unless last_line.empty?
157
160
  end
158
161
 
159
162
  end
@@ -3,5 +3,5 @@
3
3
  module Pwned
4
4
  ##
5
5
  # The current version of the +pwned+ gem.
6
- VERSION = "2.0.1"
6
+ VERSION = "2.0.2"
7
7
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = ["pwned"]
29
29
 
30
30
  spec.add_development_dependency "bundler", ">= 1.16", "< 3.0"
31
- spec.add_development_dependency "rake", "~> 10.0"
31
+ spec.add_development_dependency "rake", "~> 13.0"
32
32
  spec.add_development_dependency "rspec", "~> 3.0"
33
33
  spec.add_development_dependency "webmock", "~> 3.3"
34
34
  spec.add_development_dependency "yard", "~> 0.9.12"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pwned
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Phil Nash
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-13 00:00:00.000000000 Z
11
+ date: 2020-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -36,14 +36,14 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '10.0'
39
+ version: '13.0'
40
40
  type: :development
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '10.0'
46
+ version: '13.0'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -158,8 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  - !ruby/object:Gem::Version
159
159
  version: '0'
160
160
  requirements: []
161
- rubyforge_project:
162
- rubygems_version: 2.7.6
161
+ rubygems_version: 3.0.3
163
162
  signing_key:
164
163
  specification_version: 4
165
164
  summary: Tools to use the Pwned Passwords API.