zygote 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zygote/util.rb +4 -0
- data/lib/zygote/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5da572255c8f3768a97646e6b4cf772b6fb8e653
|
4
|
+
data.tar.gz: 5de021e0f50760a12ca78b852c3ac283ae065d2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52028c16b801b7243644ea0f03e6f693d6815008fc9f5c030a2fa3e36bae94668c61d4e7ef4454cf0db8651f00801db6a6339f970314f8ec22b5343fe3d723f0
|
7
|
+
data.tar.gz: 837c22b806e7470048497debb7a68397f33aba3bbb6cafba843a4ddccaf0a9c1a75e81fc60c6373d4a1e82bac9d055f5820070689b54a3504c31aca3f166f11f
|
data/lib/zygote/util.rb
CHANGED
@@ -34,6 +34,10 @@ def encode64(content)
|
|
34
34
|
Base64.encode64(JSON.pretty_generate(content)).gsub(/\n|=/, '')
|
35
35
|
end
|
36
36
|
|
37
|
+
def decode64(content)
|
38
|
+
JSON.load(Base64.decode64(content))
|
39
|
+
end
|
40
|
+
|
37
41
|
def my_ip
|
38
42
|
Socket.ip_address_list.find { |x| x.ipv4? && !x.ipv4_loopback? }.ip_address
|
39
43
|
end
|
data/lib/zygote/version.rb
CHANGED