scorpio 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
data/scorpio.gemspec CHANGED
@@ -13,29 +13,21 @@ Gem::Specification.new do |spec|
13
13
  spec.description = 'ORM style REST client'
14
14
  spec.homepage = "https://github.com/notEthan/scorpio"
15
15
  spec.license = "AGPL-3.0"
16
- ignore_files = %w(.gitignore .travis.yml Gemfile test)
17
- ignore_files_re = %r{\A(#{ignore_files.map { |f| Regexp.escape(f) }.join('|')})(/|\z)}
18
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(ignore_files_re) }
19
- spec.test_files = `git ls-files -z test`.split("\x0")
20
- spec.bindir = "exe"
21
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
16
+
17
+ spec.files = [
18
+ 'LICENSE.md',
19
+ 'CHANGELOG.md',
20
+ 'README.md',
21
+ '.yardopts',
22
+ 'scorpio.gemspec',
23
+ *Dir['lib/**/*'],
24
+ *Dir['documents/**/*'],
25
+ ].reject { |f| File.lstat(f).ftype == 'directory' }
26
+
22
27
  spec.require_paths = ["lib"]
23
28
 
24
- spec.add_dependency "jsi", "~> 0.4.0"
25
- spec.add_dependency "ur", "~> 0.2.0"
26
- spec.add_dependency "faraday"
27
- spec.add_development_dependency "rake"
28
- spec.add_development_dependency "minitest", "~> 5.0"
29
- spec.add_development_dependency "minitest-around"
30
- spec.add_development_dependency "minitest-reporters"
31
- spec.add_development_dependency "sinatra", "~> 1.0"
32
- spec.add_development_dependency "rack", "~> 1.0"
33
- spec.add_development_dependency "rack-accept"
34
- spec.add_development_dependency "rack-test"
35
- spec.add_development_dependency "api_hammer"
36
- spec.add_development_dependency "activerecord"
37
- spec.add_development_dependency "sqlite3", "~> 1.4" # loosen this in accordance with active_record/connection_adapters/sqlite3_adapter.rb
38
- spec.add_development_dependency "database_cleaner"
39
- spec.add_development_dependency "simplecov"
40
- spec.add_development_dependency "yard"
29
+ spec.add_dependency "jsi", "~> 0.6.0"
30
+ spec.add_dependency "ur", "~> 0.2.1"
31
+ spec.add_dependency "faraday", "< 2.0"
32
+ spec.add_dependency "addressable", '~> 2.3'
41
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scorpio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan
8
- autorequire:
9
- bindir: exe
8
+ autorequire:
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-06 00:00:00.000000000 Z
11
+ date: 2022-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jsi
@@ -16,238 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.4.0
19
+ version: 0.6.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.4.0
26
+ version: 0.6.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ur
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.0
33
+ version: 0.2.1
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.2.0
40
+ version: 0.2.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: faraday
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "<"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '2.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '2.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: addressable
57
57
  requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '5.0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '5.0'
83
- - !ruby/object:Gem::Dependency
84
- name: minitest-around
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: minitest-reporters
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: sinatra
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '1.0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '1.0'
125
- - !ruby/object:Gem::Dependency
126
- name: rack
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1.0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
58
  requirements:
136
59
  - - "~>"
137
60
  - !ruby/object:Gem::Version
138
- version: '1.0'
139
- - !ruby/object:Gem::Dependency
140
- name: rack-accept
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: rack-test
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: api_hammer
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- - !ruby/object:Gem::Dependency
182
- name: activerecord
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: '0'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - ">="
193
- - !ruby/object:Gem::Version
194
- version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: sqlite3
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '1.4'
202
- type: :development
61
+ version: '2.3'
62
+ type: :runtime
203
63
  prerelease: false
204
64
  version_requirements: !ruby/object:Gem::Requirement
205
65
  requirements:
206
66
  - - "~>"
207
67
  - !ruby/object:Gem::Version
208
- version: '1.4'
209
- - !ruby/object:Gem::Dependency
210
- name: database_cleaner
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
- - !ruby/object:Gem::Dependency
224
- name: simplecov
225
- requirement: !ruby/object:Gem::Requirement
226
- requirements:
227
- - - ">="
228
- - !ruby/object:Gem::Version
229
- version: '0'
230
- type: :development
231
- prerelease: false
232
- version_requirements: !ruby/object:Gem::Requirement
233
- requirements:
234
- - - ">="
235
- - !ruby/object:Gem::Version
236
- version: '0'
237
- - !ruby/object:Gem::Dependency
238
- name: yard
239
- requirement: !ruby/object:Gem::Requirement
240
- requirements:
241
- - - ">="
242
- - !ruby/object:Gem::Version
243
- version: '0'
244
- type: :development
245
- prerelease: false
246
- version_requirements: !ruby/object:Gem::Requirement
247
- requirements:
248
- - - ">="
249
- - !ruby/object:Gem::Version
250
- version: '0'
68
+ version: '2.3'
251
69
  description: ORM style REST client
252
70
  email:
253
71
  - ethan@unth.net
@@ -255,13 +73,10 @@ executables: []
255
73
  extensions: []
256
74
  extra_rdoc_files: []
257
75
  files:
258
- - ".simplecov"
259
76
  - ".yardopts"
260
77
  - CHANGELOG.md
261
78
  - LICENSE.md
262
79
  - README.md
263
- - Rakefile
264
- - bin/documents_to_yml.rb
265
80
  - documents/github.com/OAI/OpenAPI-Specification/blob/oas3-schema/schemas/v3.0/schema.yaml
266
81
  - documents/swagger.io/v2/schema.json
267
82
  - documents/swagger.io/v2/schema.yml
@@ -274,6 +89,7 @@ files:
274
89
  - lib/scorpio/openapi/operation.rb
275
90
  - lib/scorpio/openapi/operations_scope.rb
276
91
  - lib/scorpio/openapi/reference.rb
92
+ - lib/scorpio/openapi/tag.rb
277
93
  - lib/scorpio/openapi/v3/server.rb
278
94
  - lib/scorpio/pickle_adapter.rb
279
95
  - lib/scorpio/request.rb
@@ -281,20 +97,12 @@ files:
281
97
  - lib/scorpio/response.rb
282
98
  - lib/scorpio/ur.rb
283
99
  - lib/scorpio/version.rb
284
- - resources/icons/AGPL-3.0.png
285
100
  - scorpio.gemspec
286
- - test/blog.openapi2.yml
287
- - test/blog.openapi3.yml
288
- - test/blog.rb
289
- - test/blog.rest_description.yml
290
- - test/blog_scorpio_models.rb
291
- - test/scorpio_test.rb
292
- - test/test_helper.rb
293
101
  homepage: https://github.com/notEthan/scorpio
294
102
  licenses:
295
103
  - AGPL-3.0
296
104
  metadata: {}
297
- post_install_message:
105
+ post_install_message:
298
106
  rdoc_options: []
299
107
  require_paths:
300
108
  - lib
@@ -309,15 +117,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
117
  - !ruby/object:Gem::Version
310
118
  version: '0'
311
119
  requirements: []
312
- rubygems_version: 3.0.6
313
- signing_key:
120
+ rubygems_version: 3.1.2
121
+ signing_key:
314
122
  specification_version: 4
315
123
  summary: Scorpio REST client
316
- test_files:
317
- - test/blog.openapi2.yml
318
- - test/blog.openapi3.yml
319
- - test/blog.rb
320
- - test/blog.rest_description.yml
321
- - test/blog_scorpio_models.rb
322
- - test/scorpio_test.rb
323
- - test/test_helper.rb
124
+ test_files: []
data/.simplecov DELETED
@@ -1 +0,0 @@
1
- SimpleCov.start
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "rake/testtask"
2
-
3
- Rake::TestTask.new(:test) do |t|
4
- t.libs << "test"
5
- t.libs << "lib"
6
- t.test_files = FileList['test/**/*_test.rb']
7
- end
8
-
9
- require 'wwtd/tasks'
10
- task 'default' => 'wwtd:local'
@@ -1,33 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'pathname'
4
- require 'json'
5
- require 'yaml'
6
-
7
- root = Pathname.new(__FILE__).dirname.join('..')
8
-
9
- document_dirs = [root.join('documents'), root.join('test/documents')]
10
- documents = document_dirs.map { |d| Pathname.glob(d.join('**/*')) }.inject([], &:+)
11
- json_documents = documents.select { |p| p.file? && !['.yml', '.yaml'].include?(p.extname) }
12
-
13
- json_documents.each do |file|
14
- begin
15
- json_contents = JSON.parse(file.read)
16
- yaml = YAML.dump(json_contents, line_width: -1)
17
- yaml_filepath = Pathname.new(file.to_path.chomp('.json') + '.yml')
18
- if yaml_filepath.exist?
19
- contents = yaml_filepath.read
20
- if contents == yaml
21
- puts "#{yaml_filepath.to_path} unchanged"
22
- else
23
- yaml_filepath.write(yaml)
24
- puts "#{yaml_filepath.to_path} changed; updated"
25
- end
26
- else
27
- yaml_filepath.write(yaml)
28
- puts "#{yaml_filepath.to_path} created"
29
- end
30
- rescue JSON::ParserError
31
- puts "#{file.to_path}: not json"
32
- end
33
- end
Binary file
@@ -1,113 +0,0 @@
1
- ---
2
- swagger: '2.0'
3
- info:
4
- title: Scorpio Blog
5
- description: REST service for the Scorpio Blog
6
- version: ''
7
- contact: {}
8
- host: blog
9
- basePath: "/v1"
10
- schemes: ['https']
11
- consumes:
12
- - application/json
13
- produces:
14
- - application/json
15
- paths:
16
- "/articles":
17
- get:
18
- tags:
19
- - articles
20
- operationId: articles.index
21
- responses:
22
- default:
23
- description: default response
24
- schema:
25
- type: array
26
- items:
27
- "$ref": "#/definitions/articles"
28
- post:
29
- tags:
30
- - articles
31
- operationId: articles.post
32
- parameters:
33
- - name: body
34
- in: body
35
- required: true
36
- schema:
37
- "$ref": "#/definitions/articles"
38
- responses:
39
- default:
40
- description: default response
41
- schema:
42
- "$ref": "#/definitions/articles"
43
- "/articles_with_root":
44
- get:
45
- tags:
46
- - articles
47
- operationId: articles.index_with_root
48
- responses:
49
- default:
50
- description: default response
51
- schema:
52
- type: object
53
- properties:
54
- articles:
55
- type: array
56
- items:
57
- "$ref": "#/definitions/articles"
58
- best_article:
59
- "$ref": "#/definitions/articles"
60
- version:
61
- type: string
62
- "/articles/{id}":
63
- get:
64
- tags:
65
- - articles
66
- operationId: articles.read
67
- parameters:
68
- - name: id
69
- in: path
70
- required: true
71
- type: string
72
- responses:
73
- default:
74
- description: default response
75
- schema:
76
- "$ref": "#/definitions/articles"
77
- patch:
78
- tags:
79
- - articles
80
- operationId: articles.patch
81
- parameters:
82
- - name: id
83
- in: path
84
- required: true
85
- type: string
86
- - name: body
87
- in: body
88
- required: true
89
- schema:
90
- "$ref": "#/definitions/articles"
91
- responses:
92
- default:
93
- description: default response
94
- schema:
95
- "$ref": "#/definitions/articles"
96
- "/clean":
97
- post:
98
- tags:
99
- - clean
100
- operationId: clean
101
- responses:
102
- default:
103
- description: default response
104
- definitions:
105
- articles:
106
- type: object
107
- properties:
108
- id:
109
- type: integer
110
- title:
111
- type: string
112
- author_id:
113
- type: integer
@@ -1,131 +0,0 @@
1
- openapi: 3.0.0
2
- servers:
3
- - url: "{scheme}://{host}:{port}/{basePath}"
4
- variables:
5
- scheme:
6
- default: https
7
- host:
8
- default: blog.scorpio
9
- port:
10
- default: '443'
11
- basePath:
12
- enum:
13
- - v1
14
- default: v1
15
- info:
16
- title: Scorpio Blog
17
- description: REST service for the Scorpio Blog
18
- version: ''
19
- contact: {}
20
- paths:
21
- /articles:
22
- get:
23
- tags:
24
- - articles
25
- operationId: articles.index
26
- responses:
27
- default:
28
- description: default response
29
- content:
30
- application/json:
31
- schema:
32
- type: array
33
- items:
34
- $ref: '#/components/schemas/articles'
35
- post:
36
- tags:
37
- - articles
38
- operationId: articles.post
39
- responses:
40
- default:
41
- description: default response
42
- content:
43
- application/json:
44
- schema:
45
- $ref: '#/components/schemas/articles'
46
- requestBody:
47
- $ref: '#/components/requestBodies/articles'
48
- /articles_with_root:
49
- get:
50
- tags:
51
- - articles
52
- operationId: articles.index_with_root
53
- responses:
54
- default:
55
- description: default response
56
- content:
57
- application/json:
58
- schema:
59
- type: object
60
- properties:
61
- articles:
62
- type: array
63
- items:
64
- $ref: '#/components/schemas/articles'
65
- best_article:
66
- $ref: '#/components/schemas/articles'
67
- version:
68
- type: string
69
- '/articles/{id}':
70
- get:
71
- tags:
72
- - articles
73
- operationId: articles.read
74
- parameters:
75
- - name: id
76
- in: path
77
- required: true
78
- schema:
79
- type: string
80
- responses:
81
- default:
82
- description: default response
83
- content:
84
- application/json:
85
- schema:
86
- $ref: '#/components/schemas/articles'
87
- patch:
88
- tags:
89
- - articles
90
- operationId: articles.patch
91
- parameters:
92
- - name: id
93
- in: path
94
- required: true
95
- schema:
96
- type: string
97
- responses:
98
- default:
99
- description: default response
100
- content:
101
- application/json:
102
- schema:
103
- $ref: '#/components/schemas/articles'
104
- requestBody:
105
- $ref: '#/components/requestBodies/articles'
106
- /clean:
107
- post:
108
- tags:
109
- - clean
110
- operationId: clean
111
- responses:
112
- default:
113
- description: default response
114
- components:
115
- requestBodies:
116
- articles:
117
- content:
118
- application/json:
119
- schema:
120
- $ref: '#/components/schemas/articles'
121
- required: true
122
- schemas:
123
- articles:
124
- type: object
125
- properties:
126
- id:
127
- type: integer
128
- title:
129
- type: string
130
- author_id:
131
- type: integer