esplanade 1.7.1 → 1.8.1

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: 1709500c684e2cd5fb6c0c86445bd413e46ed575e191f5e1557c85680b3b118b
4
- data.tar.gz: b7aa44c92516981b0f0433378b6b526e48656198782cd8c7fed0d2147a902249
3
+ metadata.gz: 5a90e7d68748b374eb4f4bd21d9515fca3e394c895cb1f10b93b4a451e4705ec
4
+ data.tar.gz: f1d667aa35adfa7c16a58c4e00195ffed6df93756596e47e70304d846512437a
5
5
  SHA512:
6
- metadata.gz: f4372ec2e97839ea3dee256282954c5a5b8540eaa592afa37ab976ef0dff7da7d49357318e292d7aa834ba27f1593b659cf589d159f1ca6e17c6bae1d13bc053
7
- data.tar.gz: 3a59d0192b6d4bef73e5c239deb16dff6b4fe96eb4b353d67edbf72b645c4084aac0c5d0175e3482c01368023540166939997219b3cbde2a83b7f295dc554d3f
6
+ metadata.gz: a2f4a8999fbf16159cbbde4d2a91653de6366d355830900f6f4ab2fbb6d6ed28863d0d582e6565760163881244a696236ce03fafba94b8a79a65478ff78e8bbc
7
+ data.tar.gz: 9cbf07ff7efeee10e97a2e8ca85e22902f3a2751e3b9e2227de3777da5d44dba1dc60ef5e150afe13a80e4ce6eec69c8dad39f67dc70ad4fd64c2c3158a684ca
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Change log
2
2
 
3
+ ### 1.8.1 - 2023-10-06
4
+
5
+ * patch
6
+ * add home page
7
+
8
+ ### 1.8.0 - 2021-09-29
9
+
10
+ * patch
11
+ * remove multi_json
12
+
3
13
  ### 1.7.1 - 2021-02-10
4
14
 
5
15
  * setting
data/README.md CHANGED
@@ -167,20 +167,6 @@ Error message format:
167
167
 
168
168
  Parent class for those described below. Inherited from `Esplanade::Error`.
169
169
 
170
- #### Esplanade::Response::PrefixNotMatch
171
-
172
- Error message format:
173
-
174
- ```ruby
175
- {
176
- :request => {
177
- :method => "method",
178
- :path => "path"
179
- },
180
- :status => "status"
181
- }
182
- ```
183
-
184
170
  #### Esplanade::Response::NotDocumented
185
171
 
186
172
  Error message format:
data/esplanade.gemspec CHANGED
@@ -9,6 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ['d.efimov@fun-box.ru']
10
10
 
11
11
  spec.summary = 'Validate requests and responses against API Blueprint specifications'
12
+ spec.homepage = 'https://github.com/matchtechnologies/esplanade'
12
13
  spec.license = 'MIT'
13
14
 
14
15
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
@@ -17,12 +18,11 @@ Gem::Specification.new do |spec|
17
18
  spec.require_paths = ['lib']
18
19
 
19
20
  spec.add_runtime_dependency 'json-schema', '~> 2.6', '>= 2.6.2'
20
- spec.add_runtime_dependency 'multi_json', '~> 1.11', '>= 1.11.1'
21
21
  spec.add_runtime_dependency 'tomograph', '~> 3.1', '>= 3.1.0'
22
- spec.add_development_dependency 'byebug', '>= 10.0.0'
23
- spec.add_development_dependency 'rake', '~> 13'
24
- spec.add_development_dependency 'rspec', '~> 3.9', '>= 3.9.0'
25
- spec.add_development_dependency 'rubocop', '~> 0.81', '>= 0.81.0'
26
- spec.add_development_dependency 'simplecov', '~> 0.18', '>= 0.18'
22
+ spec.add_development_dependency 'byebug', '~> 11.1', '>= 11.1.3'
23
+ spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
24
+ spec.add_development_dependency 'rspec', '~> 3.10'
25
+ spec.add_development_dependency 'rubocop', '~> 1.22.0'
26
+ spec.add_development_dependency 'simplecov', '~> 0.21'
27
27
  spec.required_ruby_version = '>= 2.4.0'
28
28
  end
@@ -1,5 +1,3 @@
1
- require 'multi_json'
2
-
3
1
  module Esplanade
4
2
  class Request
5
3
  class Raw
@@ -18,8 +16,8 @@ module Esplanade
18
16
  end
19
17
 
20
18
  def to_hash
21
- @hash ||= MultiJson.load(to_string)
22
- rescue MultiJson::ParseError
19
+ @hash ||= JSON.parse(to_string.to_s)
20
+ rescue JSON::ParserError
23
21
  raise BodyIsNotJson.new(**message)
24
22
  end
25
23
 
@@ -32,10 +32,10 @@ module Esplanade
32
32
  res = JSON::Validator.fully_validate(json_schema, @raw.body.to_hash)
33
33
  break res if res == []
34
34
  end
35
- if main_res != []
36
- ['invalid']
37
- else
35
+ if main_res == []
38
36
  []
37
+ else
38
+ ['invalid']
39
39
  end
40
40
  end
41
41
 
@@ -11,8 +11,6 @@ module Esplanade
11
11
  raise NotDocumented.new(**message) if @tomogram == []
12
12
 
13
13
  @tomogram
14
- rescue Esplanade::Request::PrefixNotMatch
15
- raise PrefixNotMatch.new(**message)
16
14
  end
17
15
 
18
16
  def json_schemas
@@ -2,8 +2,6 @@ module Esplanade
2
2
  class Response
3
3
  class Error < Esplanade::Error; end
4
4
 
5
- class PrefixNotMatch < Error; end
6
-
7
5
  class NotDocumented < Error
8
6
  def initialize(request:, status:)
9
7
  @method = request[:method]
@@ -1,5 +1,3 @@
1
- require 'multi_json'
2
-
3
1
  module Esplanade
4
2
  class Response
5
3
  class Raw
@@ -16,8 +14,8 @@ module Esplanade
16
14
  end
17
15
 
18
16
  def to_hash
19
- @hash ||= MultiJson.load(to_string)
20
- rescue MultiJson::ParseError
17
+ @hash ||= JSON.parse(to_string)
18
+ rescue JSON::ParserError
21
19
  raise BodyIsNotJson.new(**message)
22
20
  end
23
21
 
@@ -29,10 +29,10 @@ module Esplanade
29
29
  res = JSON::Validator.fully_validate(json_schema, @raw.body.to_hash)
30
30
  break res if res == []
31
31
  end
32
- if main_res != []
33
- ['invalid']
34
- else
32
+ if main_res == []
35
33
  []
34
+ else
35
+ ['invalid']
36
36
  end
37
37
  end
38
38
 
@@ -1,3 +1,3 @@
1
1
  module Esplanade
2
- VERSION = '1.7.1'.freeze
2
+ VERSION = '1.8.1'.freeze
3
3
  end
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.7.1
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.efimov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-10 00:00:00.000000000 Z
11
+ date: 2023-10-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -30,26 +30,6 @@ dependencies:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
32
  version: 2.6.2
33
- - !ruby/object:Gem::Dependency
34
- name: multi_json
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '1.11'
40
- - - ">="
41
- - !ruby/object:Gem::Version
42
- version: 1.11.1
43
- type: :runtime
44
- prerelease: false
45
- version_requirements: !ruby/object:Gem::Requirement
46
- requirements:
47
- - - "~>"
48
- - !ruby/object:Gem::Version
49
- version: '1.11'
50
- - - ">="
51
- - !ruby/object:Gem::Version
52
- version: 1.11.1
53
33
  - !ruby/object:Gem::Dependency
54
34
  name: tomograph
55
35
  requirement: !ruby/object:Gem::Requirement
@@ -74,90 +54,84 @@ dependencies:
74
54
  name: byebug
75
55
  requirement: !ruby/object:Gem::Requirement
76
56
  requirements:
57
+ - - "~>"
58
+ - !ruby/object:Gem::Version
59
+ version: '11.1'
77
60
  - - ">="
78
61
  - !ruby/object:Gem::Version
79
- version: 10.0.0
62
+ version: 11.1.3
80
63
  type: :development
81
64
  prerelease: false
82
65
  version_requirements: !ruby/object:Gem::Requirement
83
66
  requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: '11.1'
84
70
  - - ">="
85
71
  - !ruby/object:Gem::Version
86
- version: 10.0.0
72
+ version: 11.1.3
87
73
  - !ruby/object:Gem::Dependency
88
74
  name: rake
89
75
  requirement: !ruby/object:Gem::Requirement
90
76
  requirements:
91
77
  - - "~>"
92
78
  - !ruby/object:Gem::Version
93
- version: '13'
79
+ version: '13.0'
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 13.0.6
94
83
  type: :development
95
84
  prerelease: false
96
85
  version_requirements: !ruby/object:Gem::Requirement
97
86
  requirements:
98
87
  - - "~>"
99
88
  - !ruby/object:Gem::Version
100
- version: '13'
89
+ version: '13.0'
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 13.0.6
101
93
  - !ruby/object:Gem::Dependency
102
94
  name: rspec
103
95
  requirement: !ruby/object:Gem::Requirement
104
96
  requirements:
105
97
  - - "~>"
106
98
  - !ruby/object:Gem::Version
107
- version: '3.9'
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: 3.9.0
99
+ version: '3.10'
111
100
  type: :development
112
101
  prerelease: false
113
102
  version_requirements: !ruby/object:Gem::Requirement
114
103
  requirements:
115
104
  - - "~>"
116
105
  - !ruby/object:Gem::Version
117
- version: '3.9'
118
- - - ">="
119
- - !ruby/object:Gem::Version
120
- version: 3.9.0
106
+ version: '3.10'
121
107
  - !ruby/object:Gem::Dependency
122
108
  name: rubocop
123
109
  requirement: !ruby/object:Gem::Requirement
124
110
  requirements:
125
111
  - - "~>"
126
112
  - !ruby/object:Gem::Version
127
- version: '0.81'
128
- - - ">="
129
- - !ruby/object:Gem::Version
130
- version: 0.81.0
113
+ version: 1.22.0
131
114
  type: :development
132
115
  prerelease: false
133
116
  version_requirements: !ruby/object:Gem::Requirement
134
117
  requirements:
135
118
  - - "~>"
136
119
  - !ruby/object:Gem::Version
137
- version: '0.81'
138
- - - ">="
139
- - !ruby/object:Gem::Version
140
- version: 0.81.0
120
+ version: 1.22.0
141
121
  - !ruby/object:Gem::Dependency
142
122
  name: simplecov
143
123
  requirement: !ruby/object:Gem::Requirement
144
124
  requirements:
145
125
  - - "~>"
146
126
  - !ruby/object:Gem::Version
147
- version: '0.18'
148
- - - ">="
149
- - !ruby/object:Gem::Version
150
- version: '0.18'
127
+ version: '0.21'
151
128
  type: :development
152
129
  prerelease: false
153
130
  version_requirements: !ruby/object:Gem::Requirement
154
131
  requirements:
155
132
  - - "~>"
156
133
  - !ruby/object:Gem::Version
157
- version: '0.18'
158
- - - ">="
159
- - !ruby/object:Gem::Version
160
- version: '0.18'
134
+ version: '0.21'
161
135
  description:
162
136
  email:
163
137
  - d.efimov@fun-box.ru
@@ -199,7 +173,7 @@ files:
199
173
  - lib/esplanade/response/raw/body.rb
200
174
  - lib/esplanade/response/validation.rb
201
175
  - lib/esplanade/version.rb
202
- homepage:
176
+ homepage: https://github.com/matchtechnologies/esplanade
203
177
  licenses:
204
178
  - MIT
205
179
  metadata: {}