ruby-client 1.2.2 → 1.2.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
  SHA256:
3
- metadata.gz: 4711b6ed9140348c52a5e03c44e1b11d62e57215388e2132caaf2accf6645b64
4
- data.tar.gz: d97fe8bb83867f89123ed94985ef0dcc0a1edd1cce46fba8d9933c4958189a83
3
+ metadata.gz: 4a137cb7c34ec19c512aeba486576004f912971dc22a7ccbba363c20f2151bb7
4
+ data.tar.gz: 3852d552b5fb140c2c09f54367b6ff0b971e39760da206ea5c2a5c1498ef3fcd
5
5
  SHA512:
6
- metadata.gz: 8965bb208ef3de7dd5dd638e4c0e7e75a52bcda0effe8640e33f4a4bc6fbebdaf9431b358361bc7b15e2b1785884577c94d4bd802e2d0ba16fdd19c4da08fd56
7
- data.tar.gz: bb0874200c64eb473b20dde0b0afe04db15ae0ab228b3dbec460e5b93fbef69fa708786700c6c7c301795ddb22267cf8312307eeab4903ed7e7823bd4e1dfb13
6
+ metadata.gz: 5afd35c9c9955d3900fb07f938c6e6301220175f11743ea1d9929f5a81f424372319e8a5f8d47ca1c30510ef6cb37b195e29a230467476fbd316f98008d81e54
7
+ data.tar.gz: 43b2d1cf3f0523b4a975edfe486df8786e1fb8497dab245a008f8adbf381cff24e0c2981e960f7713d379c3f0561c49dc37c058f5dbff80d294fae267d1d5df9
@@ -1,3 +1,3 @@
1
1
  module Nimiq # :nodoc: all
2
- VERSION = "1.2.2"
2
+ VERSION = "1.2.3"
3
3
  end
data/lib/rpc.rb CHANGED
@@ -20,7 +20,7 @@ require "net/http"
20
20
  # :nodoc: all
21
21
  module ClientRPC
22
22
  class Connect
23
- attr_accessor :options, :uri
23
+ attr_accessor :options, :uri, :ssl
24
24
 
25
25
  DEFAULTS = {
26
26
  host: "localhost",
@@ -54,6 +54,7 @@ module ClientRPC
54
54
  user = uri.user
55
55
  pass = uri.password
56
56
  http = Net::HTTP.new(uri.host, uri.port)
57
+ http.use_ssl = true if @ssl
57
58
  request = Net::HTTP::Get.new(uri.request_uri)
58
59
  request.basic_auth(user, pass)
59
60
  request.body = request_body("", nil)
@@ -68,6 +69,7 @@ module ClientRPC
68
69
  user = uri.user
69
70
  pass = uri.password
70
71
  http = Net::HTTP.new(uri.host, uri.port)
72
+ http.use_ssl = true if @ssl
71
73
  request = Net::HTTP::Post.new(uri.request_uri)
72
74
  request.basic_auth(user, pass)
73
75
  request.body = request_body(name, params)
@@ -89,6 +91,7 @@ module ClientRPC
89
91
  host = options[:host]
90
92
  newhost = url_strip(host.dup)
91
93
  if (options[:host].include? "https")
94
+ @ssl = true
92
95
  return "https://#{options[:user]}:#{options[:pass]}@#{newhost}:#{options[:port]}"
93
96
  else
94
97
  return "http://#{options[:user]}:#{options[:pass]}@#{newhost}:#{options[:port]}"
@@ -1,5 +1,6 @@
1
1
  require "sorbet-runtime"
2
2
 
3
+ # :nodoc: all
3
4
  module Types
4
5
  extend T::Sig
5
6
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - jxdv