effective_obfuscation 1.0.1 → 1.0.2
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d43a53ccd8e5d0645f62ed5b8df5d4da301434a3
|
|
4
|
+
data.tar.gz: 9d9c12550c41bd82d747a82efd6a4d86e0253640
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 496fa9503d2ac0c4a517a3b4c3df291cf1e37139b26197b38941308d06ed7b7f9f5c4fbd97a43ee1588cfec1ec5fba268f6a8b7dd235e240ad02e10571aa8426
|
|
7
|
+
data.tar.gz: c652710e11f213c12c15d0b7782abb45662c96b4698ac4f767fa14b03b103984b937360a89669631b5d6659b46cdb32da1db34991314a903d9818ea40c85a824
|
|
@@ -74,11 +74,8 @@ module ActsAsObfuscated
|
|
|
74
74
|
return original
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
else
|
|
80
|
-
obfuscated_id = original.to_s
|
|
81
|
-
end
|
|
77
|
+
# Remove any non-digit formatting characters, and only consider the first 10 digits
|
|
78
|
+
obfuscated_id = original.to_s.delete('^0-9').first(10)
|
|
82
79
|
|
|
83
80
|
# 2147483647 is PostgreSQL's Integer Max Value. If we return a value higher than this, we get weird DB errors
|
|
84
81
|
revealed = [EffectiveObfuscation.show(obfuscated_id, acts_as_obfuscated_opts[:spin]).to_i, 2147483647].min
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_obfuscation
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|