esplanade 1.0.1 → 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/CHANGELOG.md +5 -0
- data/README.md +5 -1
- data/esplanade.gemspec +1 -1
- data/lib/esplanade/request/doc.rb +2 -1
- data/lib/esplanade/request.rb +4 -3
- data/lib/esplanade/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d2e8924853da49cab100e7652334a7852d5780d
|
4
|
+
data.tar.gz: 07cf632061f623d79d277fdd1108c59a6a16f4d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 001fb1b997ca410b358f943e49d6dc47c12d55251ffea0a967b00e393e12156857b4828aa096d2f4ee3f41d458ad582eb31f512824621461d294876af728dff8
|
7
|
+
data.tar.gz: 33bb8fb3b67569d6a037a0f4658355a432ec3e31b14d0dec53cdff71cc6e6d31e5f6d8d69b9b0bc3cdbafb650dfd3fbc87e890ffb4b6e7b84a7d2515b50342df
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -70,7 +70,11 @@ From him the `Esplanade::Request::Error` and `Esplanade::Response::Error` are in
|
|
70
70
|
|
71
71
|
### Esplanade::Request::Error
|
72
72
|
|
73
|
-
From him the `Esplanade::Request::NotDocumented`, `Esplanade::Request::BodyIsNotJson` and `Esplanade::Request::Invalid` are inherited.
|
73
|
+
From him the `Esplanade::Request::PrefixNotMatch`, `Esplanade::Request::NotDocumented`, `Esplanade::Request::BodyIsNotJson` and `Esplanade::Request::Invalid` are inherited.
|
74
|
+
|
75
|
+
#### Esplanade::Request::PrefixNotMatch
|
76
|
+
|
77
|
+
Error message: `{:method=>"method", :path=>"path"}`.
|
74
78
|
|
75
79
|
#### Esplanade::Request::NotDocumented
|
76
80
|
|
data/esplanade.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency 'multi_json', '~> 1.11', '>= 1.11.1'
|
22
22
|
spec.add_runtime_dependency 'json-schema', '~> 2.6', '>= 2.6.2'
|
23
|
-
spec.add_runtime_dependency 'tomograph', '~> 1.
|
23
|
+
spec.add_runtime_dependency 'tomograph', '~> 1.2', '>= 1.2.0'
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.12'
|
25
25
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
26
|
spec.add_development_dependency 'byebug', '~> 8.2', '>= 8.2.1'
|
@@ -7,7 +7,8 @@ module Esplanade
|
|
7
7
|
end
|
8
8
|
|
9
9
|
def tomogram
|
10
|
-
|
10
|
+
raise PrefixNotMatch, message unless @main_documentation.prefix_match?(@raw.path)
|
11
|
+
@tomogram = @main_documentation.find_request(method: @raw.method, path: @raw.path)
|
11
12
|
raise NotDocumented, message if @tomogram.nil?
|
12
13
|
@tomogram
|
13
14
|
end
|
data/lib/esplanade/request.rb
CHANGED
@@ -5,9 +5,10 @@ require 'esplanade/request/validation'
|
|
5
5
|
module Esplanade
|
6
6
|
class Request
|
7
7
|
class Error < Esplanade::Error; end
|
8
|
-
class
|
9
|
-
class
|
10
|
-
class
|
8
|
+
class PrefixNotMatch < Error; end
|
9
|
+
class NotDocumented < Error; end
|
10
|
+
class BodyIsNotJson < Error; end
|
11
|
+
class Invalid < Error; end
|
11
12
|
|
12
13
|
def initialize(documentation, env)
|
13
14
|
@documentation = documentation
|
data/lib/esplanade/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esplanade
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d.efimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -56,20 +56,20 @@ dependencies:
|
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '1.
|
59
|
+
version: '1.2'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
62
|
+
version: 1.2.0
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '1.
|
69
|
+
version: '1.2'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 1.
|
72
|
+
version: 1.2.0
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: bundler
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|