ubiq-security 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 97aa80db52e77adb021ed791c52ca09b12bea36fd82d402fca9506e8fcac253d
4
- data.tar.gz: b421f79fe3e7630dc3b20fc588156c679f60914ecf880c9f799d3861a4d1d9a2
3
+ metadata.gz: cfa206519b2bde1e566a7d55830bee2b5a68a3b6613b92eaaf59fa984f4818ce
4
+ data.tar.gz: d08cf519e3d0ec92845e68cd4132e2dc30b31c3a65154c566e6be21604b50b72
5
5
  SHA512:
6
- metadata.gz: 2d6d1136d3db18adf77b492c8369feb76d448fc263e5178be4b896a3c2767ee872700eb2832f8acd7d2ec99f3779e478da4a6172072e1613e72dd7815ff4d2e4
7
- data.tar.gz: 12cc028eed9331209b3198ceb4b82dc3fd019da29d2148b02923d955a2439d18cb84f8ba2e435d34ba6da2eb8bbb815f0545d67ef4aa567968ae3cf2bdab31c6
6
+ metadata.gz: 74e12caae5793215eb606adc55dd773e172d567b1ae780c95e10601adaa2eb374d7a40557865213e60f58d18d550c88f3913ccda9d3bc355f100128aec747d11
7
+ data.tar.gz: 265978ac51da6790983dba2b6f7d6f8ed03c6c49116a7ad18d291a28392370f0c5a5fcd2ec93dbac4976baa1607b74519ef5e6ee097cb97d5cb729478d7c2b49
data/README.md CHANGED
@@ -82,7 +82,7 @@ Pass credentials and data into the encryption function. The encrypted data will
82
82
 
83
83
 
84
84
  ```ruby
85
- require "ubiq-security"
85
+ require 'ubiq-security'
86
86
  include Ubiq
87
87
 
88
88
  encrypted_data = encrypt(credentials, plaintext_data)
@@ -94,7 +94,7 @@ encrypted_data = encrypt(credentials, plaintext_data)
94
94
  Pass credentials and encrypted data into the decryption function. The plaintext data will be returned.
95
95
 
96
96
  ```ruby
97
- require "ubiq-security"
97
+ require 'ubiq-security'
98
98
  include Ubiq
99
99
 
100
100
  plaintext_data = decrypt(credentials, encrypted_data)
@@ -111,7 +111,7 @@ plaintext_data = decrypt(credentials, encrypted_data)
111
111
 
112
112
 
113
113
  ```ruby
114
- require "ubiq-security"
114
+ require 'ubiq-security'
115
115
  include Ubiq
116
116
 
117
117
  # Process 1 MiB of plaintext data at a time
@@ -146,7 +146,7 @@ BLOCK_SIZE = 1024 * 1024
146
146
 
147
147
 
148
148
  ```ruby
149
- require "ubiq-security"
149
+ require 'ubiq-security'
150
150
  include Ubiq
151
151
 
152
152
  # Process 1 MiB of encrypted data at a time
@@ -87,9 +87,13 @@ module Ubiq
87
87
  return all_headers
88
88
  end
89
89
 
90
+ # Only want to return port in the URI if the
91
+ # host contained one, otherwise let gateway resolve it
90
92
  def self.get_host(host)
91
93
  uri = URI(host)
92
- return "#{uri.hostname}:#{uri.port}"
94
+ ret = uri.hostname.to_s
95
+ ret += ":#{uri.port}" if host.match(/:[0-9]+/)
96
+ ret
93
97
  end
94
98
 
95
99
  def self.get_date
@@ -13,6 +13,9 @@
13
13
  #
14
14
  # https://ubiqsecurity.com/legal
15
15
  #
16
+
17
+ # frozen_string_literal: true
18
+
16
19
  module Ubiq
17
- UBIQ_HOST = 'api.ubiqsecurity.com:8811'
20
+ UBIQ_HOST = 'api.ubiqsecurity.com'
18
21
  end
@@ -17,5 +17,5 @@
17
17
  # frozen_string_literal: true
18
18
 
19
19
  module Ubiq
20
- VERSION = '1.0.2'
20
+ VERSION = '1.0.3'
21
21
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubiq-security
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ubiq Security, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-20 00:00:00.000000000 Z
11
+ date: 2020-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb-readline