iopromise-faraday 0.1.0 → 0.1.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: 29ef0d8ff9445a5b2b5df2f1c941042f93d67e321875a3dfa805a66b36a6ea59
4
- data.tar.gz: '09188af815dd7f5f9f836e1c2ddf291d02ef044650f051b4dd8c896c681bafd0'
3
+ metadata.gz: e8935f63fb005e0cb08f430e353a189e291d47d7604371e1f8278bbe66e159de
4
+ data.tar.gz: aba657f24fb9c9c7092026293dae5c1df5fd2737039c18e13935cb1157bb11f7
5
5
  SHA512:
6
- metadata.gz: d2159f8ac5cf31233c9f0dc4279f2331dbe3ca3c25ce1cd3080277c50d23aa479da04ed1f152b82209e9e9f212670d1ada579227fe8f7f6e613e9077f9b9267d
7
- data.tar.gz: 0cb1930b3e308094fd17bf9a9c023e7e67a371271373106dccceca91f02aecc5b0945b5dc30d7dff5469947efdc26395988e906c29e9e1c5655aad1176807dfe
6
+ metadata.gz: f1c5c756c4953a99d419b4645f848ac11a8bb9af9caf7dd7da4324b5554912462f3c2c482aefc97246dbc4c9dc8a5fa26233091e1c1b6609178b286f41d7c1b0
7
+ data.tar.gz: d9e0f63e706b64f10038095586ef6c9e1f0a7999b655ea46ec839b50ad1f9cea99b207bf9b368943d59d58ecbd0a56c6ed7320352d1b0651e0cb8585f57ee2ca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iopromise-faraday (0.1.0)
4
+ iopromise-faraday (0.1.1)
5
5
  ethon (= 0.14.0)
6
6
  faraday (= 1.4.2)
7
7
  iopromise (~> 0.1.2)
@@ -1,13 +1,17 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'iopromise'
4
- require_relative 'faraday/client'
4
+ require_relative 'faraday/connection'
5
5
 
6
6
  module IOPromise
7
7
  module Faraday
8
8
  class << self
9
9
  def new(url = nil, options = {}, &block)
10
- ::IOPromise::Faraday::Client.new(url, options, &block)
10
+ options = ::Faraday.default_connection_options.merge(options)
11
+ ::IOPromise::Faraday::Connection.new(url, options) do |faraday|
12
+ faraday.adapter :typhoeus
13
+ block.call(faraday) unless block.nil?
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -16,6 +16,10 @@ module IOPromise
16
16
  def in_parallel(manager = nil)
17
17
  # not supported, we're always in parallel
18
18
  end
19
+
20
+ def run_request(*)
21
+ FaradayPromise.new(super)
22
+ end
19
23
  end
20
24
  end
21
25
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module IOPromise
4
4
  module Faraday
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iopromise-faraday
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theo Julienne
@@ -85,7 +85,6 @@ files:
85
85
  - bin/setup
86
86
  - iopromise-faraday.gemspec
87
87
  - lib/iopromise/faraday.rb
88
- - lib/iopromise/faraday/client.rb
89
88
  - lib/iopromise/faraday/connection.rb
90
89
  - lib/iopromise/faraday/continuable_hydra.rb
91
90
  - lib/iopromise/faraday/executor_pool.rb
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'connection'
4
-
5
- module IOPromise
6
- module Faraday
7
- class Client
8
- def initialize(url = nil, options = {}, &block)
9
- options = ::Faraday.default_connection_options.merge(options)
10
- @conn = ::IOPromise::Faraday::Connection.new(url, options) do |faraday|
11
- faraday.adapter :typhoeus
12
- block.call(faraday) unless block.nil?
13
- end
14
- end
15
-
16
- (::Faraday::METHODS_WITH_QUERY + ::Faraday::METHODS_WITH_BODY).each do |method|
17
- class_eval <<-RUBY, __FILE__, __LINE__ + 1
18
- def #{method}(*args, **kwargs)
19
- FaradayPromise.new(@conn.#{method}(*args, **kwargs))
20
- end
21
- RUBY
22
- end
23
- end
24
- end
25
- end