binascii 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/binascii/base64.rb +2 -1
- data/lib/binascii/version.rb +1 -1
- data/spec/base64_spec.rb +24 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 16bf16d0e2998067e88943c9d4ecafa20154f34a1418a0986d7b88710743447d
|
4
|
+
data.tar.gz: 5b67c17bf48d3878653dd7837ca84379272a312f483de9524c4b968762715b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99e887a56ac928a86add1c2c33aab53091994a28de28196c388d015eeb67f691b62480a02de3268202935908716d0b7e3299d1392c114f46011b6f9c79515431
|
7
|
+
data.tar.gz: 9b443b8d7bf27e5483c46b8e6be8f95e13cea1ca3891f08f9b31dd5bffcf6aa570f4d066a1d361ef83d7bb8bd034bd3ab9c5650c099c271e82b4dd0b89b93df3
|
data/CHANGELOG.md
CHANGED
data/lib/binascii/base64.rb
CHANGED
data/lib/binascii/version.rb
CHANGED
data/spec/base64_spec.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Binascii do
|
4
|
+
describe '#a2b_base64' do
|
5
|
+
it 'decodes correctly' do
|
6
|
+
expect(described_class.a2b_base64("Zm9vYmFyYmF6\n")).to eq('foobarbaz')
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
describe '#b2a_base64' do
|
11
|
+
it 'encodes correctly' do
|
12
|
+
expect(described_class.b2a_base64('foobarbaz')).to eq("Zm9vYmFyYmF6\n")
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'does not include line breaks' do
|
16
|
+
str = 'The majestic green albatross flitters in the moonlight'
|
17
|
+
expect(described_class.b2a_base64(str).strip).to_not include("\n")
|
18
|
+
end
|
19
|
+
|
20
|
+
it 'does not include a trailing newline if requested' do
|
21
|
+
expect(described_class.b2a_base64('foobarbaz', newline: false)).to eq('Zm9vYmFyYmF6')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binascii
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A Ruby version of Python's binascii module
|
14
14
|
email:
|
@@ -31,6 +31,7 @@ files:
|
|
31
31
|
- lib/binascii/utils.rb
|
32
32
|
- lib/binascii/uu.rb
|
33
33
|
- lib/binascii/version.rb
|
34
|
+
- spec/base64_spec.rb
|
34
35
|
- spec/crc32_spec.rb
|
35
36
|
- spec/hex_spec.rb
|
36
37
|
- spec/hqx_spec.rb
|
@@ -56,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
56
57
|
- !ruby/object:Gem::Version
|
57
58
|
version: '0'
|
58
59
|
requirements: []
|
59
|
-
|
60
|
-
rubygems_version: 2.7.6
|
60
|
+
rubygems_version: 3.0.4
|
61
61
|
signing_key:
|
62
62
|
specification_version: 4
|
63
63
|
summary: A Ruby version of Python's binascii module
|