fake_florence 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d2c5123d928582a6c986f0243198c4c4efecdf0
4
- data.tar.gz: ec1eb451cc86867f18fc23cb37bc226a570d661d
3
+ metadata.gz: d021c170347e15dc456e83623ed5b2abf4ee3cf6
4
+ data.tar.gz: 3205993b28080fe777d7e62ecdd1d5c3001d6ff1
5
5
  SHA512:
6
- metadata.gz: ca69fa7eb6684c6f72401f27ef2c888c44a1c9560fca534bfcc9b62b747ccba271e6af3726587e0b6c4e6ccb6a216114f3e0a01aed49614a8dc27c2699b5351f
7
- data.tar.gz: c02fdd8aaebffec882f0a9a368825376355140f3bb4cb8199ecf1ee36978a62d59d7ae772eb952107b1b9f54f98f02b58a37e40d258b42f88e54eb0371c51343
6
+ metadata.gz: 7e3d54dbc78cb0ba2039a98510d42a40014d15c0c14a3f45e0a6ed5be0c85ccd849d346b0e20330029f7a3cca8aa8b82e11a6a293ca7985d4cfa99166adb00c3
7
+ data.tar.gz: 7395944fe35f5892d71cca7ba142a3529a4b8d8fc0eab61a000c559d3b26e934796241eafa0c7872fef4b787f8e2a9aa5b6545917c15edfb45bf7ccc50222dd2
@@ -1,5 +1,5 @@
1
1
  require 'faraday'
2
- require 'pp'
2
+ require 'uri'
3
3
  require 'faraday_middleware'
4
4
 
5
5
  module FakeFlorence
@@ -9,17 +9,18 @@ module FakeFlorence
9
9
  class HTTPFailure < RuntimeError; end
10
10
 
11
11
  def initialize(root_url)
12
- @root = root_url
12
+ @root = URI.parse(root_url)
13
13
 
14
14
  @http = Faraday.new do |f|
15
15
  f.response :json, content_type: /\bjson$/
16
+ f.use Faraday::Request::BasicAuthentication, @root.user, @root.password if @root.user
16
17
  f.use Faraday::Response::RaiseError
17
18
  f.adapter Faraday.default_adapter
18
19
  end
19
20
  end
20
21
 
21
22
  def each_feature
22
- urls = [@root]
23
+ urls = [@root.to_s]
23
24
 
24
25
  while url = urls.shift
25
26
  response = @http.get(url)
@@ -1,3 +1,3 @@
1
1
  module FakeFlorence
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_florence
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Hastings-Spital
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-15 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-validation
@@ -188,3 +188,4 @@ signing_key:
188
188
  specification_version: 4
189
189
  summary: A local Florence server for use with Determinator locally
190
190
  test_files: []
191
+ has_rdoc: