et_fake_acas_server 0.2.1 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/et_fake_acas_server/json_server.rb +12 -0
- data/lib/et_fake_acas_server/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bc1adc37f8d7c2434e3f4500519dc120f354910fdc4c5ec3956ed7398044867
|
4
|
+
data.tar.gz: 30fe481025e1c19f6143dc512905b9b5e4175ffab9bfe75c41b04a19eefee8ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 706fa99e13a22af3697bcf3da22c45c23134a901b6fcbf1d57c6c6810eceaaa067d9ad25aaefec398b3f039b253134ac2f85b225f33195ed04ef356ac943dcab
|
7
|
+
data.tar.gz: 25f121a7886f5291572eba856aeab558d74ce0ef29aaa4a9eb2fd697f3452375c93be3302dcfded96231263ef59c6e0b047dde3871f53d6b00bf0bdaf242c6f0
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
et_fake_acas_server (0.2.
|
4
|
+
et_fake_acas_server (0.2.4)
|
5
5
|
activesupport (~> 6.1)
|
6
6
|
iodine (~> 0.7)
|
7
7
|
nokogiri (~> 1.8, >= 1.8.2)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
concurrent-ruby (~> 1.0)
|
24
24
|
iodine (0.7.47)
|
25
25
|
mini_portile2 (2.8.0)
|
26
|
-
minitest (5.
|
26
|
+
minitest (5.16.1)
|
27
27
|
multi_json (1.15.0)
|
28
28
|
mustermann (1.1.1)
|
29
29
|
ruby2_keywords (~> 0.0.1)
|
@@ -32,6 +32,8 @@ module EtFakeAcasServer
|
|
32
32
|
case certificate_number
|
33
33
|
when /\A(R|NE|MU)000200/ then
|
34
34
|
json_builder_for_no_match(certificate_number)
|
35
|
+
when /\A(R|NE|MU)000500/ then
|
36
|
+
halt 500, JSON.pretty_generate(json_builder_for_internal_error)
|
35
37
|
else
|
36
38
|
json_builder_for_found(certificate_number)
|
37
39
|
end
|
@@ -57,6 +59,16 @@ module EtFakeAcasServer
|
|
57
59
|
}
|
58
60
|
end
|
59
61
|
|
62
|
+
def json_builder_for_internal_error
|
63
|
+
{
|
64
|
+
error: {
|
65
|
+
code: 'NoResponse',
|
66
|
+
message: 'The server did not receive a response from an upstream server.'
|
67
|
+
}
|
68
|
+
|
69
|
+
}
|
70
|
+
end
|
71
|
+
|
60
72
|
def dummy_certificate_as_base_64
|
61
73
|
filename = File.absolute_path(File.join('..', 'pdfs', '76 EC (C) Certificate R000080.pdf'), __dir__)
|
62
74
|
Base64.encode64(File.read(filename))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: et_fake_acas_server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gary Taylor
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|