fake_florence 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/fake_florence/retriever.rb +4 -3
- data/lib/fake_florence/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d021c170347e15dc456e83623ed5b2abf4ee3cf6
|
4
|
+
data.tar.gz: 3205993b28080fe777d7e62ecdd1d5c3001d6ff1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e3d54dbc78cb0ba2039a98510d42a40014d15c0c14a3f45e0a6ed5be0c85ccd849d346b0e20330029f7a3cca8aa8b82e11a6a293ca7985d4cfa99166adb00c3
|
7
|
+
data.tar.gz: 7395944fe35f5892d71cca7ba142a3529a4b8d8fc0eab61a000c559d3b26e934796241eafa0c7872fef4b787f8e2a9aa5b6545917c15edfb45bf7ccc50222dd2
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'faraday'
|
2
|
-
require '
|
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)
|
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.
|
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:
|
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:
|