xrpc 0.1.7 → 0.1.7.1

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: 89265cba7bc367d5a468be6b3ea0c0deb34fff4f2427f6b313ad6ea61da73848
4
- data.tar.gz: 1c3c6b6971e69e3cb5d5baf27edc66663267a09dee219f730c94386720bc4c5a
3
+ metadata.gz: 8825e70d17e8d6876f64a5c77de564a456ac77de4ddbcf4c39c78689cdbb183a
4
+ data.tar.gz: 4b577d36fa0b00b2dbdd4bfc39eea2f45a1bab19328c129b68ab872731804ba0
5
5
  SHA512:
6
- metadata.gz: 2580f8cb019432556ca537833620af3bbb3b44011ceaa07a34fc8d4672a3e8a00289e2eb35e0443f7c27fae7b162b25f36f1f7215a216fc31689c58a2bbb551c
7
- data.tar.gz: 60e7829c7f44abb67e3064cb17bbc6efebf5fa196666fbae10ec7c19a14832749baa25168badd88c077a7cf2ee6a5bbe126066a33cf2baf50a09cbbbb001c104
6
+ metadata.gz: bf67af9d4340fc5f7c22fa0fbcbf8c9bb08bc6827e3b55a8f074db25bf759f212e57b573ebfa74d91bdd8829eb4936635070515ad08a77e25a55d938f79efd4d
7
+ data.tar.gz: eca8e6351a22de1080cf6280c607031973dc7cbd5bdeb90128579627bfd605de98c12f8065605f4d84fe772b09c66b96e7b457d611d4eabe988fd445106c5477
data/lib/xrpc/client.rb CHANGED
@@ -9,7 +9,8 @@ module XRPC
9
9
  end
10
10
 
11
11
  class Client
12
- attr_accessor :headers, :token
12
+ attr_accessor :headers
13
+ attr_reader :token
13
14
 
14
15
  def initialize(base_url, token = nil)
15
16
  @token = token
@@ -18,7 +19,12 @@ module XRPC
18
19
  end
19
20
 
20
21
  def headers!
21
- @headers = { :"Content-Type" => "application/json", :Authorization => "Bearer #{@token}" }
22
+ @headers[:Authorization] = "Bearer #{@token}"
23
+ end
24
+
25
+ def token=(token)
26
+ @token = token
27
+ headers!
22
28
  end
23
29
 
24
30
  def get
data/lib/xrpc/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XRPC
4
- VERSION = "0.1.7"
4
+ VERSION = "0.1.7.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shreyan Jain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-21 00:00:00.000000000 Z
11
+ date: 2023-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json