palladium 1.0.0 → 1.1.0
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/palladium/version.rb +1 -1
- data/lib/palladium.rb +13 -5
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d05e520a7a2fbe6335acd8dfd02983197f89d0ecf0fa4e3c6fc29838fca26f02
|
|
4
|
+
data.tar.gz: 1deae261c49894c4fb874784bab262fdb2d649bb44284cfbbb007490cda032bc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 00440c93414805bb13882711df753a21423a812ed87e9dba77ef1ad90033950d870da3276cdc16a4c022dcbf6f4f95b3a92ee72455acb7cdca71bec6a98697d9
|
|
7
|
+
data.tar.gz: d1ddb455e73d7614ba3d47aad59916fd5a8a6c0f8f8e32ed95ff9ad1147d7ef5a3b893ee77abae21c3a23061cafacfd1471161a68a46635697601d1e062aeb5f
|
data/lib/palladium/version.rb
CHANGED
data/lib/palladium.rb
CHANGED
|
@@ -17,10 +17,10 @@ module Palladium
|
|
|
17
17
|
def initialize(options = {})
|
|
18
18
|
@logger = Logger.new($stdout)
|
|
19
19
|
@logger.level = options[:log] || 1
|
|
20
|
-
options[:port]
|
|
21
|
-
@http = Net::HTTP.new(options[:host],
|
|
20
|
+
@port = options[:port] || 443
|
|
21
|
+
@http = Net::HTTP.new(options[:host], @port)
|
|
22
|
+
@http.use_ssl = true if ssl_connection?
|
|
22
23
|
@host = options[:host]
|
|
23
|
-
@port = options[:port]
|
|
24
24
|
@product = options[:product]
|
|
25
25
|
@plan = options[:plan]
|
|
26
26
|
@run = options[:run]
|
|
@@ -69,8 +69,16 @@ module Palladium
|
|
|
69
69
|
|
|
70
70
|
# get link to result set
|
|
71
71
|
def result_set_link
|
|
72
|
-
"http#{'s' if
|
|
73
|
-
|
|
72
|
+
"http#{'s' if ssl_connection?}://#{@host}/product/#{@product_id}/"\
|
|
73
|
+
"plan/#{@plan_id}/run/#{@run_id}/result_set/#{@result_set_id}"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
private
|
|
77
|
+
|
|
78
|
+
# Check if connection should be ssl
|
|
79
|
+
# @return [True, False]
|
|
80
|
+
def ssl_connection?
|
|
81
|
+
@port == 443
|
|
74
82
|
end
|
|
75
83
|
end
|
|
76
84
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: palladium
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rotatyy Dmitriy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-09-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -114,7 +114,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
114
114
|
- !ruby/object:Gem::Version
|
|
115
115
|
version: '0'
|
|
116
116
|
requirements: []
|
|
117
|
-
rubygems_version: 3.
|
|
117
|
+
rubygems_version: 3.2.22
|
|
118
118
|
signing_key:
|
|
119
119
|
specification_version: 4
|
|
120
120
|
summary: Gem for using Palladium API
|