Breinify 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Breinify.gemspec +1 -1
- data/lib/Breinify.rb +10 -10
- data/lib/Breinify/version.rb +1 -1
- metadata +2 -3
- data/Breinify-0.1.3.gem +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35bd2d8fb70ac161eb80fc0c4cecd027c7c8a334
|
4
|
+
data.tar.gz: 64ce6f273d7f89a3081d46b5c03753bcfd54a9f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c3f51559503cd6ae8ef510c16462bee4aa4a6a983439a03ce62b0dfb29653aab6a201b4febcd0c2cec127aecbfd0cd1acb2d37aaf3a1c8217c0e80637a53b0b
|
7
|
+
data.tar.gz: 9e0c4a7921ead7c61ec14c67239c63e2f7a8a5609c6c4596cffc6e3e69a802aac6efac827779b2f74d5dc6001169bf6cbb652738485f26c1f59ab173481b6135
|
data/Breinify.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'Breinify/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "Breinify"
|
8
8
|
spec.version = Breinify::VERSION
|
9
|
-
spec.authors = ["Marco"]
|
9
|
+
spec.authors = ["Breinify, Marco Recchioni"]
|
10
10
|
spec.email = ["marco.recchioni@breinify.com"]
|
11
11
|
|
12
12
|
spec.summary = %q{Breinify´s DigitalDNA API puts dynamic behavior-based, people-driven data right at your fingertips.}
|
data/lib/Breinify.rb
CHANGED
@@ -10,9 +10,9 @@ module Breinify
|
|
10
10
|
##
|
11
11
|
# LOGGING
|
12
12
|
# logger
|
13
|
-
|
14
|
-
|
15
|
-
$log.sev_threshold = Logger::
|
13
|
+
##$log = Logger.new(STDOUT)
|
14
|
+
$log = Logger.new('breinify.log', 'daily')
|
15
|
+
$log.sev_threshold = Logger::ERROR
|
16
16
|
|
17
17
|
##
|
18
18
|
# == Description
|
@@ -132,14 +132,14 @@ module Breinify
|
|
132
132
|
|
133
133
|
attr_accessor :http,
|
134
134
|
:request,
|
135
|
-
:
|
135
|
+
:init_done
|
136
136
|
|
137
137
|
##
|
138
138
|
# Create an instance of BreinConfig
|
139
139
|
#
|
140
140
|
def initialize
|
141
141
|
@brein_config = BreinConfig.instance
|
142
|
-
@
|
142
|
+
@init_done = false
|
143
143
|
end
|
144
144
|
|
145
145
|
##
|
@@ -147,7 +147,7 @@ module Breinify
|
|
147
147
|
def init_rest
|
148
148
|
|
149
149
|
# if the initialization has already been done then go back
|
150
|
-
if @
|
150
|
+
if @init_done
|
151
151
|
return
|
152
152
|
end
|
153
153
|
|
@@ -166,7 +166,7 @@ module Breinify
|
|
166
166
|
@request = Net::HTTP::Post.new(uri.request_uri, {'accept': 'application/json'})
|
167
167
|
|
168
168
|
# indicates that the initializing for HTTP instance variables has been done
|
169
|
-
@
|
169
|
+
@init_done = true
|
170
170
|
end
|
171
171
|
|
172
172
|
##
|
@@ -241,11 +241,11 @@ module Breinify
|
|
241
241
|
|
242
242
|
# prepare the body and send the request
|
243
243
|
init_rest
|
244
|
-
request.body = data.to_json
|
245
|
-
$log.debug 'JSON data request is: ' +
|
244
|
+
@request.body = data.to_json
|
245
|
+
$log.debug 'JSON data request is: ' + @request.body.to_json.to_s
|
246
246
|
|
247
247
|
# Send the request
|
248
|
-
response = http.request(request)
|
248
|
+
response = http.request(@request)
|
249
249
|
$log.debug 'response from call is: ' + response.to_s
|
250
250
|
|
251
251
|
rescue Exception => e
|
data/lib/Breinify/version.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Breinify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Marco
|
7
|
+
- Breinify, Marco Recchioni
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
@@ -64,7 +64,6 @@ extensions: []
|
|
64
64
|
extra_rdoc_files: []
|
65
65
|
files:
|
66
66
|
- ".gitignore"
|
67
|
-
- Breinify-0.1.3.gem
|
68
67
|
- Breinify.gemspec
|
69
68
|
- Gemfile
|
70
69
|
- LICENSE
|
data/Breinify-0.1.3.gem
DELETED
Binary file
|