apiotics 0.1.124 → 0.1.125
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apiotics/parse.rb +30 -3
- data/lib/apiotics/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f339868158af532938572df17068726ac665b53
|
4
|
+
data.tar.gz: 0adcb9511005aee0c073467bfa21c794ace2729d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cac9cf099a6a315fd37c0fcdfbbcf7a0c1a7a538975d87f5f93744fbca19c8d97d9ada36e354a3b27b0f90cb0de79bda464f0318efe9c5994c394553284ac93
|
7
|
+
data.tar.gz: 0f36c77694ce849ec34513e162fe64684a9178cebadb9985d508d81710be35d3cd549dd4569dace983bbaa77ac373d866b70465896ea83356bb577f8a42674ee
|
data/lib/apiotics/parse.rb
CHANGED
@@ -6,15 +6,42 @@ module Apiotics
|
|
6
6
|
class Parse
|
7
7
|
|
8
8
|
def self.message(string)
|
9
|
-
|
9
|
+
return_json = Hash.new
|
10
|
+
begin
|
11
|
+
return_json = JSON.parse(string)
|
12
|
+
rescue
|
13
|
+
return_json = {
|
14
|
+
"error": "message could not be parsed"
|
15
|
+
}
|
16
|
+
puts return_json
|
17
|
+
end
|
18
|
+
return_json
|
10
19
|
end
|
11
20
|
|
12
21
|
def self.config(string)
|
13
|
-
|
22
|
+
return_json = Hash.new
|
23
|
+
begin
|
24
|
+
return_json = JSON.parse(string)
|
25
|
+
rescue
|
26
|
+
return_json = {
|
27
|
+
"error": "message could not be parsed"
|
28
|
+
}
|
29
|
+
puts return_json
|
30
|
+
end
|
31
|
+
return_json
|
14
32
|
end
|
15
33
|
|
16
34
|
def self.portal(string)
|
17
|
-
|
35
|
+
return_json = Hash.new
|
36
|
+
begin
|
37
|
+
return_json = JSON.parse(string)
|
38
|
+
rescue
|
39
|
+
return_json = {
|
40
|
+
"error": "message could not be parsed"
|
41
|
+
}
|
42
|
+
puts return_json
|
43
|
+
end
|
44
|
+
return_json
|
18
45
|
end
|
19
46
|
end
|
20
47
|
end
|
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.125
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MicroArx Corporation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
version: '0'
|
251
251
|
requirements: []
|
252
252
|
rubyforge_project:
|
253
|
-
rubygems_version: 2.
|
253
|
+
rubygems_version: 2.2.2
|
254
254
|
signing_key:
|
255
255
|
specification_version: 4
|
256
256
|
summary: IoT For Everybody.
|