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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c8821732d52cf7d678064177e737b4675fc4567
4
- data.tar.gz: 76f2c0cdb6f247bcc4ecfde1984087e7ac4e44f6
3
+ metadata.gz: 4e0d7096a39f0eb881f569007a3b2af0b26eb7a7
4
+ data.tar.gz: f8bc4e397e5e98cd3dcd4ebc62d36c2a401c62e9
5
5
  SHA512:
6
- metadata.gz: 8499453201e5e40f0ff5409dbb6c380f2b8ae59e64204f17fd9c5b62b79bd4ca6f775d40a208893f22c7a0522e28f1bb081f54124eab0ecaaab1542bff64f83b
7
- data.tar.gz: 4d0c707d1cedcdd2636af5a5706961c29f483a8882d03f5262747a5088cb13f2ba7bd3bd38ba29982f8cf91a7dfd4832d8562cd023450916f3256ab47052442f
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 actvitiy endpoint
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.env['HTTP_USER_AGENT']
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'
@@ -1,5 +1,5 @@
1
1
  module Breinify
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Breinify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco