Breinify 0.1.2 → 0.1.3
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/Breinify.rb +3 -6
- data/lib/Breinify/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: 4e0d7096a39f0eb881f569007a3b2af0b26eb7a7
|
|
4
|
+
data.tar.gz: f8bc4e397e5e98cd3dcd4ebc62d36c2a401c62e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fef0c3f701a69d9ea42b51cd5df8fb30d3751c394f864d2a32b7293261ae03ecf3a0c2ab6e747d471a1a25ed35598dad049c2085526bbde9cce2e0f82ce4a1de
|
|
7
|
+
data.tar.gz: 20783afb40468e8f39b027c53d633855f1df8dde18aaea667c91a4950407192d64c06fec82bb05cb09be716442d135fd73c27a65058f8956ad6fee6050e9ed32
|
data/lib/Breinify.rb
CHANGED
|
@@ -147,9 +147,6 @@ module Breinify
|
|
|
147
147
|
## add the userAgent
|
|
148
148
|
userAgent = retrieiveUserAgentInformation
|
|
149
149
|
|
|
150
|
-
# for test purposes
|
|
151
|
-
userAgent = 'BLABLA'
|
|
152
|
-
|
|
153
150
|
# fetch previous values - if they exists
|
|
154
151
|
begin
|
|
155
152
|
additionalValues = options.fetch('user', {}).fetch('additional', {})
|
|
@@ -167,7 +164,7 @@ module Breinify
|
|
|
167
164
|
@@logger.debug 'Could not handle userAgent information'
|
|
168
165
|
end
|
|
169
166
|
|
|
170
|
-
# url to use with
|
|
167
|
+
# url to use with actvity endpoint
|
|
171
168
|
fullUrl = @@url + @@activityEndpoint
|
|
172
169
|
|
|
173
170
|
# retrieve all the options
|
|
@@ -178,7 +175,7 @@ module Breinify
|
|
|
178
175
|
http.use_ssl = true if uri.scheme == 'https'
|
|
179
176
|
request = Net::HTTP::Post.new(uri.request_uri, {'accept': 'application/json'})
|
|
180
177
|
request.body = data.to_json
|
|
181
|
-
@@logger.debug 'JSON data is: ' + data.to_json.to_s
|
|
178
|
+
@@logger.debug 'JSON data request is: ' + data.to_json.to_s
|
|
182
179
|
|
|
183
180
|
# Send the request
|
|
184
181
|
response = http.request(request)
|
|
@@ -197,7 +194,7 @@ module Breinify
|
|
|
197
194
|
#
|
|
198
195
|
def self.retrieiveUserAgentInformation
|
|
199
196
|
begin
|
|
200
|
-
userAgent = request.
|
|
197
|
+
userAgent = request.user_agent
|
|
201
198
|
@@logger.debug 'userAgent is: ' + userAgent
|
|
202
199
|
rescue
|
|
203
200
|
@@logger.debug 'Sorry, no userAgent can be detected'
|
data/lib/Breinify/version.rb
CHANGED