apiotics 0.1.74 → 0.1.75
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 +4 -4
- data/lib/apiotics/server.rb +12 -0
- data/lib/apiotics/version.rb +1 -1
- 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: ab4be27a340d9bc47d778dc61a421e431020a4ab
|
|
4
|
+
data.tar.gz: 22c37df713198f6e6a828ba79685978e3447f39a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 378828ba8f6b5b522b0ab5aba46f6e4dcd15a9e45b31c0a339ea483a83642a3eb2955f7005b4448d090ce244ef3d047992c803f2d745dfb37734712349bf5f07
|
|
7
|
+
data.tar.gz: 1ff0ca64d58accc8d26684ecff2c79dd0c38fe73732ea3300be420c39bf5056b46bee16099aff17a89312d4783f0ecc27912a636cde6d2cbe1f68e6d76aae8bb
|
data/lib/apiotics/server.rb
CHANGED
|
@@ -9,6 +9,10 @@ require 'json'
|
|
|
9
9
|
module Apiotics
|
|
10
10
|
class Server
|
|
11
11
|
def initialize
|
|
12
|
+
hive_public_key = ApioticsSetting.find_by(key: "hive_public_key")
|
|
13
|
+
if hive_public_key.value != Apiotics.configuration.public_key
|
|
14
|
+
Server.clear_db_settings
|
|
15
|
+
end
|
|
12
16
|
@error_msg = nil
|
|
13
17
|
server_details = Server.lookup
|
|
14
18
|
rgs = ApioticsSetting.find_by(key: "server")
|
|
@@ -231,6 +235,14 @@ module Apiotics
|
|
|
231
235
|
return ca_cert
|
|
232
236
|
end
|
|
233
237
|
|
|
238
|
+
def clear_db_settings
|
|
239
|
+
ApioticsSetting.destroy_all
|
|
240
|
+
hive_public_key = ApioticsSetting.new
|
|
241
|
+
hive_public_key.key = "hive_public_key"
|
|
242
|
+
hive_public_key.value = Apiotics.configuration.public_key
|
|
243
|
+
hive_public_key.save
|
|
244
|
+
end
|
|
245
|
+
|
|
234
246
|
def do_at_exit
|
|
235
247
|
end
|
|
236
248
|
|
data/lib/apiotics/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apiotics
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.75
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- MicroArx Corporation
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|