base45_lite 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/base45_lite.rb +2 -2
  3. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1910b7a1ffbeac3439e25a8a31272cf52ef1e9036c6429ea7e789f522018c417
4
- data.tar.gz: 31dcc6f11dfc98a4e2b327d06f9f35dc63c72ba1e1f0cbed01d84c80735726bb
3
+ metadata.gz: 103d388e3c84ba667a88e5c39dcc6e0fdd1822dc5a0204227c0b48b6001d3d98
4
+ data.tar.gz: c7e0015b559bef067ca7283af4560a4684898b21fd502cc8ea3f0088e70d45a5
5
5
  SHA512:
6
- metadata.gz: 207781b24d294bd4805826a029e39e498efeee3d7ebb2e9c0a72bb62469ed525fe8b00a3b276b43b020d09c3b845f280585a3e8da174a25da2e3ead078cbc8dd
7
- data.tar.gz: 9803f051edb2daad7491c008bda25e0c6361909e347719d70f4d43a6e3a5ac1f02126bc07456f5975ed7740eb678e7c03dfb48629b3051d8cbeffa8a3433f4f4
6
+ metadata.gz: 55c2d4eb7c249172a7727f0d3fc5ea9e50b6e74a985aded41a644e67c87973441918c8b7c4e8bcd42774ae74cf78e48f18db34533b450a88fcf49a07b2ec49ad
7
+ data.tar.gz: 98fdecf9b3a06e9bda66b2f24bdfa4348378e30cd2b7e00ac9782b032589e5e1ebe5daadab8a7a3f0fa929b608416930206ceae6a64e4e01f2db247385e5507b
data/lib/base45_lite.rb CHANGED
@@ -50,12 +50,12 @@ module Base45Lite
50
50
  _, d = i.divmod(45)
51
51
  sequence.push(c, d)
52
52
  end
53
- sequence.map!{ MAPPING[_1] }.join
53
+ sequence.map!{ |n| MAPPING[n] }.join
54
54
  end
55
55
 
56
56
  def self.decode(input)
57
57
  input
58
- .chars.map! { REVERSE_MAPPING[_1] || raise(InvalidCharacterError) }
58
+ .chars.map! { |c| REVERSE_MAPPING[c] || raise(InvalidCharacterError) }
59
59
  .each_slice(3).map do |slice|
60
60
  c, d, e = slice
61
61
  raise ForbiddenLengthError if d.nil?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: base45_lite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weihang Jian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-02 00:00:00.000000000 Z
11
+ date: 2023-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -58,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: 2.6.0
61
+ version: 2.3.0
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
63
  requirements:
64
64
  - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: '0'
67
67
  requirements: []
68
- rubygems_version: 3.3.7
68
+ rubygems_version: 3.4.5
69
69
  signing_key:
70
70
  specification_version: 4
71
71
  summary: Base45 encoder/decoder