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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56e2f63c2b063682f928f1187c3ad0ae112b0f5f12597e8ed9beae5ad8436794
4
- data.tar.gz: 66864c1de7443a10f1a7fb2bb24f5357054c038ea364d12f2e31679bc3ea8d84
3
+ metadata.gz: 4bc1adc37f8d7c2434e3f4500519dc120f354910fdc4c5ec3956ed7398044867
4
+ data.tar.gz: 30fe481025e1c19f6143dc512905b9b5e4175ffab9bfe75c41b04a19eefee8ba
5
5
  SHA512:
6
- metadata.gz: c8f7b3e0b51236ff2b2937bb671b4ddc8a2bff869f9cb325e907c016aa9a516c82a7604ba114f1642f1f4c86a359ca9637c76e540aa1f1b89716f674ad2b6589
7
- data.tar.gz: a06a790a61a14c9cda69c6def8e12bc4c4bb59c8031e943f015819c3ccd8bd0d2463845e290017ca078491ac98526182406dd4ea3667974ea1599f228dc4b4d8
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.1)
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.15.0)
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))
@@ -1,3 +1,3 @@
1
1
  module EtFakeAcasServer
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.4"
3
3
  end
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.1
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-14 00:00:00.000000000 Z
11
+ date: 2022-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler