steam-id2 0.4.4 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/CHANGELOG.md +8 -0
- data/lib/steam-id/parser.rb +21 -1
- data/steam-id2.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '07832e7aa943366907911352c65312e8df1becbcf55a4db0b4a19e79b69a9d64'
|
4
|
+
data.tar.gz: 2adb4ac5f8f9651c297cb95f717ce65efc99869b6f563172f6345836cd475981
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8c8420b42f2d6aebc4c7f560cb3cc150b599f17aa07875d289b93ea3cb47ad16a6d53813ecc34d6056839f2bf8d4241084147131f5076d0ee8044fc5d0fa25b
|
7
|
+
data.tar.gz: cbd6e13a7cc9046bcad010c89a27dc68ceb4bd6f445b8002465fddc79a73bd9580988693b60e9461a057e7861b74e7511ef833be2fd74888b2dfcf632c1fd5be
|
data/CHANGELOG.md
CHANGED
@@ -19,6 +19,14 @@ glance - what to expact from upgrading to a new version.
|
|
19
19
|
### Removed
|
20
20
|
|
21
21
|
|
22
|
+
## [0.4.5] - 2018-09-09
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
|
26
|
+
- Handle ID 64s exceeding allowed range, by adding/subtracting multiples of
|
27
|
+
range until fitting.
|
28
|
+
|
29
|
+
|
22
30
|
## [0.4.4] - 2018-03-25
|
23
31
|
|
24
32
|
### Fixed
|
data/lib/steam-id/parser.rb
CHANGED
@@ -96,7 +96,8 @@ module SteamID
|
|
96
96
|
end
|
97
97
|
|
98
98
|
PATTERN_STEAM_ID_64.match(id) do |m|
|
99
|
-
|
99
|
+
id = steam_id_64_to_account_id(m[1].to_i)
|
100
|
+
return SteamID.new(id)
|
100
101
|
end
|
101
102
|
|
102
103
|
# Matching this one last, as not to catch an ID 64 on accident.
|
@@ -150,5 +151,24 @@ module SteamID
|
|
150
151
|
from_steam_id(steam_id)
|
151
152
|
end
|
152
153
|
end
|
154
|
+
|
155
|
+
private
|
156
|
+
def steam_id_64_to_account_id(id_64)
|
157
|
+
account_id = id_64 - SteamID::ID_64_OFFSET
|
158
|
+
|
159
|
+
# Assuming the range to be [1, 2**32]. But in reality, who knows.
|
160
|
+
# /profiles/#{ ID_64_OFFSET } URL (as well as offsets of 2**32 thereof)
|
161
|
+
# currently redirect to one's signed-in profile, so seems to have some
|
162
|
+
# meta meaning.
|
163
|
+
while account_id < 1
|
164
|
+
account_id += 2**32
|
165
|
+
end
|
166
|
+
|
167
|
+
while account_id > 2**32
|
168
|
+
account_id -= 2**32
|
169
|
+
end
|
170
|
+
|
171
|
+
account_id
|
172
|
+
end
|
153
173
|
end
|
154
174
|
end
|
data/steam-id2.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steam-id2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Senn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: steam-condenser
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.7.3
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Convert Steam IDs
|