etwin 0.0.2 → 0.0.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: 93bf9e25afc02f993f8e9bd60a89b36632cfe75cf1ebbd83ec55cd0a64204feb
4
- data.tar.gz: edd4742d85abeea8b2806e655c8ac32854292a44c4ed8faef1f12ef7815653bd
3
+ metadata.gz: 69cc4a2279c94d413db0a4481a1370c9fc3f4e941c51742bff6398d19c76df74
4
+ data.tar.gz: c9c3e99a3f1242cb68adeb9b3edb8264855777698dc31df601e6845d5bc45e52
5
5
  SHA512:
6
- metadata.gz: a9456347bcff0462844e2f69119b50aecae08a19a47ccdd89cf8196e0a3c9d36ff9c3ced6b73d8e04bd3b6914c2d62d47aab234e4697ab59f52cea7d20884642
7
- data.tar.gz: 182fc1f1c91ad71050872b879de8373c39f603804b0181ae9f864dc5e85f17437b453dc9bbdf67056f1b5da7095ca87956f6a0d449817d2416c461e4ecaa1cfd
6
+ metadata.gz: d3d1d50d6109fa53d73b009cdf2e7bb866ad9eb7e70a92a4ee00663799111023c74cdaba9cfb4683bff2ba607f8bc54ab9c9b96609f6ee48ee5b8649a304c842
7
+ data.tar.gz: a24475b7fece1104fa8deca475d8de443a897c2c24c8908914094ed69dc5614c85f245575d86cccf5423c77f20c8a46cde7bcd9a0f434662cbd10ba994a05fba
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- etwin (0.0.1)
4
+ etwin (0.0.2)
5
5
  faraday (~> 1.1.0)
6
6
  sorbet-runtime (~> 0.5.6076)
7
7
 
data/README.md CHANGED
@@ -2,13 +2,12 @@
2
2
 
3
3
  ## Installation
4
4
 
5
- Add this line to your application's Gemfile:
5
+ Add a dependency on the `etwin` gem.
6
6
 
7
- ```ruby
8
- gem 'etwin'
9
- ```
7
+ - Either add `spec.add_runtime_dependency('etwin', '~> 0.0.3')` to your `*.gemspec`
8
+ - Or add `gem 'etwin', '~> 0.0.3'` to your `Gemfile`
10
9
 
11
- And then execute:
10
+ And then run:
12
11
 
13
12
  ```
14
13
  bundle install
@@ -14,14 +14,21 @@ module Etwin
14
14
 
15
15
  sig(:final) { params(base_uri: URI::HTTP).void }
16
16
  def initialize(base_uri)
17
+ # @type [URI::HTTP]
17
18
  @base_uri = T.let(base_uri.freeze, URI::HTTP)
19
+ # @type [Faraday::Connection]
20
+ @client = T.let(Faraday::Connection.new.freeze, Faraday::Connection)
18
21
  freeze
19
22
  end
20
23
 
21
24
  sig(:final) { override.params(auth: Auth, user_id: Etwin::User::UserId).returns(Etwin::User::User) }
22
25
  def get_user(auth, user_id)
23
26
  uri = resolve(['users', user_id.to_s])
24
- res = Faraday.get uri
27
+ # @type [Faraday::Request] req
28
+ # @type [Faraday::Response] res
29
+ res = @client.get uri do |req|
30
+ req.headers['Authorization'] = auth.authorization_header
31
+ end
25
32
  Etwin::User::User.from_json res.body
26
33
  end
27
34
 
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Etwin
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etwin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Samborski