hive-stalker 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/hive-stalker.gemspec +1 -1
- data/lib/hive_stalker/steam_id.rb +7 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c5e80a8cd50b6af6a8b3d6f62c016c354dda620
|
4
|
+
data.tar.gz: fa6b23f7b415d94fa1609a2b3c3ac3252e0323c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eb7762168a29e55a8eec2b6032195a5af0a073e918c485708fcf93cb4a28bf5790257dcf6e62bcfbc8ee942804dff1370897908943afb0cd9838c7322786f7df
|
7
|
+
data.tar.gz: cbd17affbe4ed6a68b2f21b67763d8b6b6a53e9cf75b7b67d242fc746022f8987f17cdb350559d6acfd53fc31ee7c916302afb16b9d716c87aa056d86d9658f5
|
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.1.3] - 2016-12-25
|
23
|
+
|
24
|
+
### Fixed
|
25
|
+
|
26
|
+
- HiveStalker::SteamID.from_string did not support account IDs with less than
|
27
|
+
eight digits.
|
28
|
+
|
29
|
+
|
22
30
|
## [0.1.2] - 2016-12-25
|
23
31
|
|
24
32
|
### Changed
|
data/hive-stalker.gemspec
CHANGED
@@ -6,7 +6,8 @@ module HiveStalker
|
|
6
6
|
PATTERN_STEAM_ID = /^STEAM_0:([0-9]):([0-9]+)$/
|
7
7
|
PATTERN_STEAM_ID_3 = /^U:([0-9]{1,2}):([0-9]+)$/
|
8
8
|
PATTERN_STEAM_ID_64 = /^765([0-9]+)$/
|
9
|
-
|
9
|
+
# Not sure what its valid range is - exists with at least 7 and 8 numbers.
|
10
|
+
PATTERN_ACCOUNT_ID = /^[0-9]+$/
|
10
11
|
|
11
12
|
# Convert Steam ID into account ID suitable for API calls.
|
12
13
|
# @param s [String] Steam ID, either of:
|
@@ -22,10 +23,6 @@ module HiveStalker
|
|
22
23
|
s = s.to_s
|
23
24
|
|
24
25
|
# https://developer.valvesoftware.com/wiki/SteamID#Format
|
25
|
-
PATTERN_ACCOUNT_ID.match(s) do |m|
|
26
|
-
return s.to_i
|
27
|
-
end
|
28
|
-
|
29
26
|
PATTERN_STEAM_ID.match(s) do |m|
|
30
27
|
return m[1].to_i + m[2].to_i * 2
|
31
28
|
end
|
@@ -38,6 +35,11 @@ module HiveStalker
|
|
38
35
|
return m[1].to_i - STEAM_ID_64_OFFSET
|
39
36
|
end
|
40
37
|
|
38
|
+
# Matching this one last, as not to catch an ID 64 on accident.
|
39
|
+
PATTERN_ACCOUNT_ID.match(s) do |m|
|
40
|
+
return s.to_i
|
41
|
+
end
|
42
|
+
|
41
43
|
# If we get until here, we did not match any regex.
|
42
44
|
raise ArgumentError, "#{ s.inspect } is not a supported SteamID."
|
43
45
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hive-stalker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Senn
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|