ropen_pi 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ceb1dcb570ea80f36d68680a5c320bbb9a74990c782ae03044b7bbb64b8789de
4
- data.tar.gz: c2db6c536861712270128ff243a1dce00c588b95eacf33b1e1060f61f169c2f7
3
+ metadata.gz: f86834742cd1643f964b60f07ce4ae9aa1be0b5187856bf412aed237d3947702
4
+ data.tar.gz: e66857f8eecd559392e4a81e4cdbb044e3f1012f28601c863496dbf0c32a1da3
5
5
  SHA512:
6
- metadata.gz: 01d64a2bbaac53fde43fadbc6d07b8bc33d8b3b51da4f377551b485808fb7d30fd8f966b31539efc066ce8591f122307d452cf0e79280a6fee00f5ce86857063
7
- data.tar.gz: b06452a57da3d37842e5f2b047f8541d2eee7872c73da33ecb270eca11f6819f8e0c03d949acf9e28b3066eb776a7669f3c035e5bfc4b441821ca1091017bf88
6
+ metadata.gz: c3cbd9fc614f7f0791f4fdb0d0965426c2e06ac62cef288ff1ac2307188d73d7f1360cc8852c93bd1aaed81528be18da6cfffb05c9cf51b7435208a626dd30be
7
+ data.tar.gz: a4cb8aebd774ef451f2902d680d53972a2daac7416002e1dfa7a67610c08da6d11556bea23e5945570d90d2968dcc37bec8af3e3b009bfa36aa9e756ec5b1973
@@ -1,72 +1,75 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ropen_pi (0.2.0)
4
+ ropen_pi (0.3.0)
5
5
  hashie
6
6
  json-schema
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actioncable (6.0.2.2)
12
- actionpack (= 6.0.2.2)
11
+ actioncable (6.0.3.1)
12
+ actionpack (= 6.0.3.1)
13
13
  nio4r (~> 2.0)
14
14
  websocket-driver (>= 0.6.1)
15
- actionmailbox (6.0.2.2)
16
- actionpack (= 6.0.2.2)
17
- activejob (= 6.0.2.2)
18
- activerecord (= 6.0.2.2)
19
- activestorage (= 6.0.2.2)
20
- activesupport (= 6.0.2.2)
15
+ actionmailbox (6.0.3.1)
16
+ actionpack (= 6.0.3.1)
17
+ activejob (= 6.0.3.1)
18
+ activerecord (= 6.0.3.1)
19
+ activestorage (= 6.0.3.1)
20
+ activesupport (= 6.0.3.1)
21
21
  mail (>= 2.7.1)
22
- actionmailer (6.0.2.2)
23
- actionpack (= 6.0.2.2)
24
- actionview (= 6.0.2.2)
25
- activejob (= 6.0.2.2)
22
+ actionmailer (6.0.3.1)
23
+ actionpack (= 6.0.3.1)
24
+ actionview (= 6.0.3.1)
25
+ activejob (= 6.0.3.1)
26
26
  mail (~> 2.5, >= 2.5.4)
27
27
  rails-dom-testing (~> 2.0)
28
- actionpack (6.0.2.2)
29
- actionview (= 6.0.2.2)
30
- activesupport (= 6.0.2.2)
28
+ actionpack (6.0.3.1)
29
+ actionview (= 6.0.3.1)
30
+ activesupport (= 6.0.3.1)
31
31
  rack (~> 2.0, >= 2.0.8)
32
32
  rack-test (>= 0.6.3)
33
33
  rails-dom-testing (~> 2.0)
34
34
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
35
- actiontext (6.0.2.2)
36
- actionpack (= 6.0.2.2)
37
- activerecord (= 6.0.2.2)
38
- activestorage (= 6.0.2.2)
39
- activesupport (= 6.0.2.2)
35
+ actiontext (6.0.3.1)
36
+ actionpack (= 6.0.3.1)
37
+ activerecord (= 6.0.3.1)
38
+ activestorage (= 6.0.3.1)
39
+ activesupport (= 6.0.3.1)
40
40
  nokogiri (>= 1.8.5)
41
- actionview (6.0.2.2)
42
- activesupport (= 6.0.2.2)
41
+ actionview (6.0.3.1)
42
+ activesupport (= 6.0.3.1)
43
43
  builder (~> 3.1)
44
44
  erubi (~> 1.4)
45
45
  rails-dom-testing (~> 2.0)
46
46
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
47
- activejob (6.0.2.2)
48
- activesupport (= 6.0.2.2)
47
+ activejob (6.0.3.1)
48
+ activesupport (= 6.0.3.1)
49
49
  globalid (>= 0.3.6)
50
- activemodel (6.0.2.2)
51
- activesupport (= 6.0.2.2)
52
- activerecord (6.0.2.2)
53
- activemodel (= 6.0.2.2)
54
- activesupport (= 6.0.2.2)
55
- activestorage (6.0.2.2)
56
- actionpack (= 6.0.2.2)
57
- activejob (= 6.0.2.2)
58
- activerecord (= 6.0.2.2)
50
+ activemodel (6.0.3.1)
51
+ activesupport (= 6.0.3.1)
52
+ activerecord (6.0.3.1)
53
+ activemodel (= 6.0.3.1)
54
+ activesupport (= 6.0.3.1)
55
+ activestorage (6.0.3.1)
56
+ actionpack (= 6.0.3.1)
57
+ activejob (= 6.0.3.1)
58
+ activerecord (= 6.0.3.1)
59
59
  marcel (~> 0.3.1)
60
- activesupport (6.0.2.2)
60
+ activesupport (6.0.3.1)
61
61
  concurrent-ruby (~> 1.0, >= 1.0.2)
62
62
  i18n (>= 0.7, < 2)
63
63
  minitest (~> 5.1)
64
64
  tzinfo (~> 1.1)
65
- zeitwerk (~> 2.2)
65
+ zeitwerk (~> 2.2, >= 2.2.2)
66
66
  addressable (2.7.0)
67
67
  public_suffix (>= 2.0.2, < 5.0)
68
68
  builder (3.2.4)
69
69
  bump (0.8.0)
70
+ bundler-audit (0.6.1)
71
+ bundler (>= 1.2.0, < 3)
72
+ thor (~> 0.18)
70
73
  byebug (11.0.1)
71
74
  coderay (1.1.2)
72
75
  concurrent-ruby (1.1.6)
@@ -76,7 +79,7 @@ GEM
76
79
  globalid (0.4.2)
77
80
  activesupport (>= 4.2.0)
78
81
  hashie (4.1.0)
79
- i18n (1.8.2)
82
+ i18n (1.8.3)
80
83
  concurrent-ruby (~> 1.0)
81
84
  json-schema (2.8.1)
82
85
  addressable (>= 2.4)
@@ -88,10 +91,10 @@ GEM
88
91
  marcel (0.3.3)
89
92
  mimemagic (~> 0.3.2)
90
93
  method_source (0.9.2)
91
- mimemagic (0.3.4)
94
+ mimemagic (0.3.5)
92
95
  mini_mime (1.0.2)
93
96
  mini_portile2 (2.4.0)
94
- minitest (5.14.0)
97
+ minitest (5.14.1)
95
98
  nio4r (2.5.2)
96
99
  nokogiri (1.10.9)
97
100
  mini_portile2 (~> 2.4.0)
@@ -101,33 +104,33 @@ GEM
101
104
  pry-byebug (3.7.0)
102
105
  byebug (~> 11.0)
103
106
  pry (~> 0.10)
104
- public_suffix (4.0.4)
107
+ public_suffix (4.0.5)
105
108
  rack (2.2.2)
106
109
  rack-test (1.1.0)
107
110
  rack (>= 1.0, < 3)
108
- rails (6.0.2.2)
109
- actioncable (= 6.0.2.2)
110
- actionmailbox (= 6.0.2.2)
111
- actionmailer (= 6.0.2.2)
112
- actionpack (= 6.0.2.2)
113
- actiontext (= 6.0.2.2)
114
- actionview (= 6.0.2.2)
115
- activejob (= 6.0.2.2)
116
- activemodel (= 6.0.2.2)
117
- activerecord (= 6.0.2.2)
118
- activestorage (= 6.0.2.2)
119
- activesupport (= 6.0.2.2)
111
+ rails (6.0.3.1)
112
+ actioncable (= 6.0.3.1)
113
+ actionmailbox (= 6.0.3.1)
114
+ actionmailer (= 6.0.3.1)
115
+ actionpack (= 6.0.3.1)
116
+ actiontext (= 6.0.3.1)
117
+ actionview (= 6.0.3.1)
118
+ activejob (= 6.0.3.1)
119
+ activemodel (= 6.0.3.1)
120
+ activerecord (= 6.0.3.1)
121
+ activestorage (= 6.0.3.1)
122
+ activesupport (= 6.0.3.1)
120
123
  bundler (>= 1.3.0)
121
- railties (= 6.0.2.2)
124
+ railties (= 6.0.3.1)
122
125
  sprockets-rails (>= 2.0.0)
123
126
  rails-dom-testing (2.0.3)
124
127
  activesupport (>= 4.2.0)
125
128
  nokogiri (>= 1.6)
126
129
  rails-html-sanitizer (1.3.0)
127
130
  loofah (~> 2.3)
128
- railties (6.0.2.2)
129
- actionpack (= 6.0.2.2)
130
- activesupport (= 6.0.2.2)
131
+ railties (6.0.3.1)
132
+ actionpack (= 6.0.3.1)
133
+ activesupport (= 6.0.3.1)
131
134
  method_source
132
135
  rake (>= 0.8.7)
133
136
  thor (>= 0.20.3, < 2.0)
@@ -145,20 +148,20 @@ GEM
145
148
  diff-lcs (>= 1.2.0, < 2.0)
146
149
  rspec-support (~> 3.9.0)
147
150
  rspec-support (3.9.2)
148
- sprockets (4.0.0)
151
+ sprockets (4.0.2)
149
152
  concurrent-ruby (~> 1.0)
150
153
  rack (> 1, < 3)
151
154
  sprockets-rails (3.2.1)
152
155
  actionpack (>= 4.0)
153
156
  activesupport (>= 4.0)
154
157
  sprockets (>= 3.0.0)
155
- thor (1.0.1)
158
+ thor (0.20.3)
156
159
  thread_safe (0.3.6)
157
160
  tzinfo (1.2.7)
158
161
  thread_safe (~> 0.1)
159
- websocket-driver (0.7.1)
162
+ websocket-driver (0.7.2)
160
163
  websocket-extensions (>= 0.1.0)
161
- websocket-extensions (0.1.4)
164
+ websocket-extensions (0.1.5)
162
165
  zeitwerk (2.3.0)
163
166
 
164
167
  PLATFORMS
@@ -167,8 +170,9 @@ PLATFORMS
167
170
  DEPENDENCIES
168
171
  bump
169
172
  bundler (~> 2.0)
173
+ bundler-audit
170
174
  pry-byebug
171
- rails (~> 6.0.2.2)
175
+ rails (~> 6.0.3.1)
172
176
  rake (~> 13.0)
173
177
  ropen_pi!
174
178
  rspec (~> 3.9)
@@ -5,7 +5,7 @@ ruby '2.7.0'
5
5
 
6
6
  gem 'rails', '~> 6.0.0'
7
7
  gem 'pg', '>= 0.18', '< 2.0'
8
- gem 'puma', '~> 4.3.3'
8
+ gem 'puma', '~> 4.3.5'
9
9
  gem 'bootsnap', '>= 1.4.2', require: false
10
10
  gem 'rack-cors', '>= 1.0.6'
11
11
 
@@ -117,7 +117,7 @@ GEM
117
117
  pry-stack_explorer (0.4.9.3)
118
118
  binding_of_caller (>= 0.7)
119
119
  pry (>= 0.9.11)
120
- puma (4.3.3)
120
+ puma (4.3.5)
121
121
  nio4r (~> 2.0)
122
122
  rack (2.1.1)
123
123
  rack-cors (1.1.1)
@@ -218,7 +218,7 @@ DEPENDENCIES
218
218
  pry-byebug
219
219
  pry-rails
220
220
  pry-stack_explorer
221
- puma (~> 4.3.3)
221
+ puma (~> 4.3.5)
222
222
  rack-cors (>= 1.0.6)
223
223
  rails (~> 6.0.0)
224
224
  rspec-rails
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  # @TODO: replace hashie!
3
4
  require 'hashie'
4
5
 
@@ -105,18 +106,19 @@ module RopenPi
105
106
  # rubocop:enable Metrics/MethodLength
106
107
 
107
108
  def request_body_text_plain(required: false, description: nil, examples: nil)
108
- content_hash = { 'test/plain' => { schema: {type: :string}, examples: examples }.compact! || {} }
109
+ content_hash = { 'test/plain' => { schema: { type: :string }, examples: examples }.compact! || {} }
109
110
  request_body(description: description, required: required, content: content_hash)
110
111
  end
111
112
 
112
113
  # TODO: add examples to this like we can for json, might be large lift
113
114
  # as many assumptions are made on content-type
114
115
  def request_body_xml(schema:, required: false, description: nil, examples: nil)
115
- passed_examples = Array(examples)
116
+ # passed_examples = Array(examples)
116
117
  content_hash = { 'application/xml' => { schema: schema, examples: examples }.compact! || {} }
117
118
  request_body(description: description, required: required, content: content_hash)
118
119
  end
119
120
 
121
+ # rubocop:disable Metrics/MethodLength
120
122
  def request_body_multipart(schema:, description: nil)
121
123
  content_hash = { 'multipart/form-data' => { schema: schema } }
122
124
  request_body(description: description, content: content_hash)
@@ -145,6 +147,7 @@ module RopenPi
145
147
  end
146
148
  end
147
149
  end
150
+ # rubocop:enable Metrics/MethodLength
148
151
 
149
152
  def parameter(attributes)
150
153
  attributes[:required] = true if attributes[:in] && attributes[:in].to_sym == :path
@@ -161,7 +161,7 @@ class RopenPi::Specs::RequestFactory
161
161
  # Rails test infrastructure allows us to send the values directly as a hash
162
162
  # PROS: simple to implement, CONS: serialization/deserialization is bypassed in test
163
163
  tuples = parameters.select { |p| p[:in] == :formData }
164
- .map { |p| [p[:name], example.send(p[:name])] }
164
+ .map { |p| [p[:name], example.send(p[:name])] }
165
165
  Hash[tuples]
166
166
  end
167
167
 
@@ -9,13 +9,8 @@ module RopenPi::Specs
9
9
  end
10
10
 
11
11
  module Yml
12
- require 'active_support/core_ext/hash/keys'
13
-
14
12
  def self.convert(doc)
15
- doc.deep_stringify_keys!
16
- doc.deep_transform_values { |value| value.to_s if value.is_a?(Symbol) }
17
-
18
- doc.to_yaml
13
+ JSON.parse(Json.convert(doc)).to_yaml
19
14
  end
20
15
  end
21
16
 
@@ -1,4 +1,4 @@
1
1
  module RopenPi
2
- VERSION = '0.2.0'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  APP_JSON = 'application/json'.freeze
4
4
  end
@@ -27,7 +27,8 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "rspec", "~> 3.9"
28
28
  spec.add_development_dependency "pry-byebug"
29
29
  spec.add_development_dependency "bump"
30
- spec.add_development_dependency "rails", "~> 6.0.2.2"
30
+ spec.add_development_dependency "bundler-audit"
31
+ spec.add_development_dependency "rails", "~> 6.0.3.1"
31
32
 
32
33
  #
33
34
  # spec.add_runtime_dependency "dry_open_api", "~> 0.1.1"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ropen_pi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Ruck
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-22 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,20 +80,34 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: bundler-audit
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'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rails
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - "~>"
88
102
  - !ruby/object:Gem::Version
89
- version: 6.0.2.2
103
+ version: 6.0.3.1
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
- version: 6.0.2.2
110
+ version: 6.0.3.1
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: hashie
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -170,7 +184,7 @@ homepage: https://github.com/talentplatforms/ropen_pi
170
184
  licenses:
171
185
  - MIT
172
186
  metadata: {}
173
- post_install_message:
187
+ post_install_message:
174
188
  rdoc_options: []
175
189
  require_paths:
176
190
  - lib
@@ -186,7 +200,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
200
  version: '0'
187
201
  requirements: []
188
202
  rubygems_version: 3.1.2
189
- signing_key:
203
+ signing_key:
190
204
  specification_version: 4
191
205
  summary: Integration of OpenAPI v3 and RSPEC
192
206
  test_files: []