my_api_client 0.22.0 → 0.24.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.
data/my_api/Gemfile.lock CHANGED
@@ -1,35 +1,35 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- actionmailer (6.1.4.3)
5
- actionpack (= 6.1.4.3)
6
- actionview (= 6.1.4.3)
7
- activejob (= 6.1.4.3)
8
- activesupport (= 6.1.4.3)
4
+ actionmailer (6.1.6.1)
5
+ actionpack (= 6.1.6.1)
6
+ actionview (= 6.1.6.1)
7
+ activejob (= 6.1.6.1)
8
+ activesupport (= 6.1.6.1)
9
9
  mail (~> 2.5, >= 2.5.4)
10
10
  rails-dom-testing (~> 2.0)
11
- actionpack (6.1.4.3)
12
- actionview (= 6.1.4.3)
13
- activesupport (= 6.1.4.3)
11
+ actionpack (6.1.6.1)
12
+ actionview (= 6.1.6.1)
13
+ activesupport (= 6.1.6.1)
14
14
  rack (~> 2.0, >= 2.0.9)
15
15
  rack-test (>= 0.6.3)
16
16
  rails-dom-testing (~> 2.0)
17
17
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
18
- actionview (6.1.4.3)
19
- activesupport (= 6.1.4.3)
18
+ actionview (6.1.6.1)
19
+ activesupport (= 6.1.6.1)
20
20
  builder (~> 3.1)
21
21
  erubi (~> 1.4)
22
22
  rails-dom-testing (~> 2.0)
23
23
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
24
- activejob (6.1.4.3)
25
- activesupport (= 6.1.4.3)
24
+ activejob (6.1.6.1)
25
+ activesupport (= 6.1.6.1)
26
26
  globalid (>= 0.3.6)
27
- activemodel (6.1.4.3)
28
- activesupport (= 6.1.4.3)
29
- activerecord (6.1.4.3)
30
- activemodel (= 6.1.4.3)
31
- activesupport (= 6.1.4.3)
32
- activesupport (6.1.4.3)
27
+ activemodel (6.1.6.1)
28
+ activesupport (= 6.1.6.1)
29
+ activerecord (6.1.6.1)
30
+ activemodel (= 6.1.6.1)
31
+ activesupport (= 6.1.6.1)
32
+ activesupport (6.1.6.1)
33
33
  concurrent-ruby (~> 1.0, >= 1.0.2)
34
34
  i18n (>= 1.6, < 2)
35
35
  minitest (>= 5.1)
@@ -38,7 +38,7 @@ GEM
38
38
  addressable (2.8.0)
39
39
  public_suffix (>= 2.0.2, < 5.0)
40
40
  aws-eventstream (1.2.0)
41
- aws-mfa-secure (0.4.3)
41
+ aws-mfa-secure (0.4.4)
42
42
  activesupport
43
43
  aws-sdk-core
44
44
  aws_config
@@ -46,52 +46,52 @@ GEM
46
46
  rainbow
47
47
  thor
48
48
  zeitwerk
49
- aws-partitions (1.541.0)
50
- aws-sdk-apigateway (1.71.0)
51
- aws-sdk-core (~> 3, >= 3.122.0)
49
+ aws-partitions (1.616.0)
50
+ aws-sdk-apigateway (1.78.0)
51
+ aws-sdk-core (~> 3, >= 3.127.0)
52
52
  aws-sigv4 (~> 1.1)
53
- aws-sdk-cloudformation (1.63.0)
54
- aws-sdk-core (~> 3, >= 3.122.0)
53
+ aws-sdk-cloudformation (1.70.0)
54
+ aws-sdk-core (~> 3, >= 3.127.0)
55
55
  aws-sigv4 (~> 1.1)
56
- aws-sdk-cloudwatchlogs (1.49.0)
57
- aws-sdk-core (~> 3, >= 3.122.0)
56
+ aws-sdk-cloudwatchlogs (1.53.0)
57
+ aws-sdk-core (~> 3, >= 3.127.0)
58
58
  aws-sigv4 (~> 1.1)
59
- aws-sdk-core (3.124.0)
59
+ aws-sdk-core (3.132.0)
60
60
  aws-eventstream (~> 1, >= 1.0.2)
61
61
  aws-partitions (~> 1, >= 1.525.0)
62
62
  aws-sigv4 (~> 1.1)
63
- jmespath (~> 1.0)
64
- aws-sdk-dynamodb (1.69.0)
65
- aws-sdk-core (~> 3, >= 3.122.0)
63
+ jmespath (~> 1, >= 1.6.1)
64
+ aws-sdk-dynamodb (1.75.0)
65
+ aws-sdk-core (~> 3, >= 3.127.0)
66
66
  aws-sigv4 (~> 1.1)
67
- aws-sdk-kinesis (1.38.0)
68
- aws-sdk-core (~> 3, >= 3.122.0)
67
+ aws-sdk-kinesis (1.41.0)
68
+ aws-sdk-core (~> 3, >= 3.127.0)
69
69
  aws-sigv4 (~> 1.1)
70
- aws-sdk-kms (1.52.0)
71
- aws-sdk-core (~> 3, >= 3.122.0)
70
+ aws-sdk-kms (1.58.0)
71
+ aws-sdk-core (~> 3, >= 3.127.0)
72
72
  aws-sigv4 (~> 1.1)
73
- aws-sdk-lambda (1.76.0)
74
- aws-sdk-core (~> 3, >= 3.122.0)
73
+ aws-sdk-lambda (1.84.0)
74
+ aws-sdk-core (~> 3, >= 3.127.0)
75
75
  aws-sigv4 (~> 1.1)
76
- aws-sdk-s3 (1.109.0)
77
- aws-sdk-core (~> 3, >= 3.122.0)
76
+ aws-sdk-s3 (1.114.0)
77
+ aws-sdk-core (~> 3, >= 3.127.0)
78
78
  aws-sdk-kms (~> 1)
79
79
  aws-sigv4 (~> 1.4)
80
- aws-sdk-sns (1.49.0)
81
- aws-sdk-core (~> 3, >= 3.122.0)
80
+ aws-sdk-sns (1.53.0)
81
+ aws-sdk-core (~> 3, >= 3.127.0)
82
82
  aws-sigv4 (~> 1.1)
83
- aws-sdk-sqs (1.48.0)
84
- aws-sdk-core (~> 3, >= 3.122.0)
83
+ aws-sdk-sqs (1.51.1)
84
+ aws-sdk-core (~> 3, >= 3.127.0)
85
85
  aws-sigv4 (~> 1.1)
86
- aws-sdk-ssm (1.126.0)
87
- aws-sdk-core (~> 3, >= 3.122.0)
86
+ aws-sdk-ssm (1.138.0)
87
+ aws-sdk-core (~> 3, >= 3.127.0)
88
88
  aws-sigv4 (~> 1.1)
89
- aws-sigv4 (1.4.0)
89
+ aws-sigv4 (1.5.1)
90
90
  aws-eventstream (~> 1, >= 1.0.2)
91
91
  aws_config (0.1.0)
92
92
  builder (3.2.4)
93
93
  byebug (11.1.3)
94
- capybara (3.36.0)
94
+ capybara (3.37.1)
95
95
  addressable
96
96
  matrix
97
97
  mini_mime (>= 0.1.3)
@@ -100,29 +100,29 @@ GEM
100
100
  rack-test (>= 0.6.3)
101
101
  regexp_parser (>= 1.5, < 3.0)
102
102
  xpath (~> 3.2)
103
- cfn-status (0.4.3)
103
+ cfn-status (0.4.6)
104
104
  aws-sdk-cloudformation
105
105
  cfn_camelizer (0.4.9)
106
106
  activesupport
107
107
  memoist
108
108
  rainbow
109
109
  cfn_response (0.2.0)
110
- concurrent-ruby (1.1.9)
110
+ concurrent-ruby (1.1.10)
111
111
  crass (1.0.6)
112
- diff-lcs (1.4.4)
113
- dotenv (2.7.6)
114
- dynomite (1.2.6)
112
+ diff-lcs (1.5.0)
113
+ dotenv (2.8.1)
114
+ dynomite (1.2.7)
115
115
  activesupport
116
116
  aws-sdk-dynamodb
117
117
  rainbow
118
- erubi (1.10.0)
118
+ erubi (1.11.0)
119
119
  gems (1.2.0)
120
120
  globalid (1.0.0)
121
121
  activesupport (>= 5.0)
122
122
  hashie (5.0.0)
123
- i18n (1.8.11)
123
+ i18n (1.12.0)
124
124
  concurrent-ruby (~> 1.0)
125
- jets (3.0.23)
125
+ jets (3.1.5)
126
126
  actionmailer (~> 6.1.0)
127
127
  actionpack (~> 6.1.0)
128
128
  actionview (~> 6.1.0)
@@ -140,7 +140,7 @@ GEM
140
140
  aws-sdk-sqs
141
141
  aws-sdk-ssm
142
142
  cfn-status
143
- cfn_camelizer (~> 0.4.6)
143
+ cfn_camelizer (>= 0.4.9)
144
144
  cfn_response
145
145
  dotenv
146
146
  gems
@@ -153,19 +153,19 @@ GEM
153
153
  railties (~> 6.1.0)
154
154
  rainbow
155
155
  recursive-open-struct
156
- serverlessgems (~> 0.1.4)
156
+ serverlessgems (>= 0.2.0)
157
157
  shotgun
158
158
  text-table
159
159
  thor
160
- zeitwerk (~> 2.4.0)
160
+ zeitwerk (>= 2.6.0)
161
161
  jets-html-sanitizer (1.0.4)
162
162
  loofah (~> 2.2, >= 2.2.2)
163
- jmespath (1.4.0)
164
- kramdown (2.3.1)
163
+ jmespath (1.6.1)
164
+ kramdown (2.4.0)
165
165
  rexml
166
166
  launchy (2.5.0)
167
167
  addressable (~> 2.7)
168
- loofah (2.13.0)
168
+ loofah (2.18.0)
169
169
  crass (~> 1.0.2)
170
170
  nokogiri (>= 1.5.9)
171
171
  mail (2.7.1)
@@ -174,63 +174,63 @@ GEM
174
174
  memoist (0.16.2)
175
175
  method_source (1.0.0)
176
176
  mini_mime (1.1.2)
177
- mini_portile2 (2.6.1)
178
- minitest (5.14.4)
177
+ mini_portile2 (2.8.0)
178
+ minitest (5.16.2)
179
179
  nio4r (2.5.8)
180
- nokogiri (1.12.5)
181
- mini_portile2 (~> 2.6.1)
180
+ nokogiri (1.13.8)
181
+ mini_portile2 (~> 2.8.0)
182
182
  racc (~> 1.4)
183
- public_suffix (4.0.6)
184
- puma (5.5.2)
183
+ public_suffix (4.0.7)
184
+ puma (5.6.5)
185
185
  nio4r (~> 2.0)
186
186
  racc (1.6.0)
187
- rack (2.2.3)
188
- rack-test (1.1.0)
189
- rack (>= 1.0, < 3)
187
+ rack (2.2.4)
188
+ rack-test (2.0.2)
189
+ rack (>= 1.3)
190
190
  rails-dom-testing (2.0.3)
191
191
  activesupport (>= 4.2.0)
192
192
  nokogiri (>= 1.6)
193
- rails-html-sanitizer (1.4.2)
193
+ rails-html-sanitizer (1.4.3)
194
194
  loofah (~> 2.3)
195
- railties (6.1.4.3)
196
- actionpack (= 6.1.4.3)
197
- activesupport (= 6.1.4.3)
195
+ railties (6.1.6.1)
196
+ actionpack (= 6.1.6.1)
197
+ activesupport (= 6.1.6.1)
198
198
  method_source
199
- rake (>= 0.13)
199
+ rake (>= 12.2)
200
200
  thor (~> 1.0)
201
- rainbow (3.0.0)
201
+ rainbow (3.1.1)
202
202
  rake (13.0.6)
203
203
  recursive-open-struct (1.1.3)
204
- regexp_parser (2.1.1)
204
+ regexp_parser (2.4.0)
205
205
  rexml (3.2.5)
206
- rspec (3.10.0)
207
- rspec-core (~> 3.10.0)
208
- rspec-expectations (~> 3.10.0)
209
- rspec-mocks (~> 3.10.0)
210
- rspec-core (3.10.0)
211
- rspec-support (~> 3.10.0)
212
- rspec-expectations (3.10.0)
206
+ rspec (3.11.0)
207
+ rspec-core (~> 3.11.0)
208
+ rspec-expectations (~> 3.11.0)
209
+ rspec-mocks (~> 3.11.0)
210
+ rspec-core (3.11.0)
211
+ rspec-support (~> 3.11.0)
212
+ rspec-expectations (3.11.0)
213
213
  diff-lcs (>= 1.2.0, < 2.0)
214
- rspec-support (~> 3.10.0)
215
- rspec-mocks (3.10.0)
214
+ rspec-support (~> 3.11.0)
215
+ rspec-mocks (3.11.0)
216
216
  diff-lcs (>= 1.2.0, < 2.0)
217
- rspec-support (~> 3.10.0)
218
- rspec-support (3.10.0)
219
- rspec_junit_formatter (0.4.1)
217
+ rspec-support (~> 3.11.0)
218
+ rspec-support (3.11.1)
219
+ rspec_junit_formatter (0.6.0)
220
220
  rspec-core (>= 2, < 4, != 2.12.0)
221
- serverlessgems (0.1.6)
221
+ serverlessgems (0.2.0)
222
222
  gems
223
223
  memoist
224
224
  zeitwerk
225
225
  shotgun (0.9.2)
226
226
  rack (>= 1.0)
227
227
  text-table (1.2.4)
228
- thor (1.1.0)
229
- tzinfo (2.0.4)
228
+ thor (1.2.1)
229
+ tzinfo (2.0.5)
230
230
  concurrent-ruby (~> 1.0)
231
231
  xpath (3.2.0)
232
232
  nokogiri (~> 1.8)
233
- zeitwerk (2.4.2)
233
+ zeitwerk (2.6.0)
234
234
 
235
235
  PLATFORMS
236
236
  ruby
@@ -239,9 +239,9 @@ DEPENDENCIES
239
239
  byebug
240
240
  capybara
241
241
  dynomite
242
- jets
242
+ jets (~> 3.1.5)
243
243
  launchy
244
- nokogiri (~> 1.12.5)
244
+ nokogiri (~> 1.13.8)
245
245
  puma
246
246
  rack
247
247
  rspec
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The header API
4
+ class HeaderController < ApplicationController
5
+ # GET header
6
+ def index
7
+ params.each do |header_name, header_value|
8
+ response.set_header(header_name, header_value)
9
+ end
10
+ render status: :ok, json: {}
11
+ end
12
+ end
@@ -51,7 +51,7 @@ class PaginationController < ApplicationController
51
51
  # So this is workaround.
52
52
  def page_link(page)
53
53
  query_strings = "?#{{ page: page }.to_query}"
54
- uri = File.join(ENV['JETS_HOST'], ENV['JETS_STAGE'], pagination_path)
54
+ uri = File.join(ENV.fetch('JETS_HOST', nil), ENV.fetch('JETS_STAGE', nil), pagination_path)
55
55
  uri.sub!('http://', 'https://')
56
56
  URI.join(uri, query_strings)
57
57
  end
@@ -6,6 +6,7 @@ Jets.application.routes.draw do
6
6
  resources 'rest', only: %i[index show create update delete]
7
7
 
8
8
  get 'status/:status', to: 'status#show'
9
+ get 'header', to: 'header#index'
9
10
  get 'error/:code', to: 'error#show'
10
11
  get 'pagination', to: 'pagination#index'
11
12
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe ErrorController, type: :controller do
3
+ describe ErrorController do
4
4
  describe '#show' do
5
5
  context 'when request error code 10' do
6
6
  let(:code) { 10 }
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ describe HeaderController do
4
+ describe '#index' do
5
+ context 'when request header with a header' do
6
+ let(:headers) { { 'x-header': 'value' } }
7
+
8
+ it 'returns 200 OK request with header' do
9
+ get '/header', query: headers
10
+ expect(response.status).to eq 200
11
+ expect(response.body).to eq '{}'
12
+ expect(response.headers['x-header']).to eq 'value'
13
+ end
14
+ end
15
+
16
+ context 'when request header with multiple headers' do
17
+ let(:headers) do
18
+ {
19
+ 'x-header': 'value1',
20
+ 'x-second-header': 'value2',
21
+ }
22
+ end
23
+
24
+ it 'returns 200 OK request with header' do
25
+ get '/header', query: headers
26
+ expect(response.status).to eq 200
27
+ expect(response.body).to eq '{}'
28
+ expect(response.headers['x-header']).to eq 'value1'
29
+ expect(response.headers['x-second-header']).to eq 'value2'
30
+ end
31
+ end
32
+ end
33
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe PaginationController, type: :controller do
3
+ describe PaginationController do
4
4
  describe '#index' do
5
5
  let(:first_page) do
6
6
  {
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe RestController, type: :controller do
3
+ describe RestController do
4
4
  describe '#index' do
5
5
  context 'with order = asc' do
6
6
  let(:array_of_posts) do
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- describe StatusController, type: :controller do
3
+ describe StatusController do
4
4
  describe '#show' do
5
5
  context 'when request status code 200' do
6
6
  let(:status) { 200 }
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.required_ruby_version = '>= 2.6.0'
25
+ spec.required_ruby_version = '>= 2.7.0'
26
26
 
27
27
  spec.add_dependency 'activesupport', '>= 5.2.0'
28
28
  spec.add_dependency 'faraday', '>= 0.17.1'
@@ -81,7 +81,7 @@ GEM
81
81
  concurrent-ruby (~> 1.0)
82
82
  jsonpath (1.1.0)
83
83
  multi_json
84
- loofah (2.10.0)
84
+ loofah (2.18.0)
85
85
  crass (~> 1.0.2)
86
86
  nokogiri (>= 1.5.9)
87
87
  mail (2.7.1)
@@ -89,18 +89,18 @@ GEM
89
89
  marcel (1.0.1)
90
90
  method_source (1.0.0)
91
91
  mini_mime (1.1.0)
92
- mini_portile2 (2.6.1)
92
+ mini_portile2 (2.8.0)
93
93
  minitest (5.14.4)
94
94
  msgpack (1.3.3)
95
95
  multi_json (1.15.0)
96
96
  multipart-post (2.1.1)
97
97
  nio4r (2.5.7)
98
- nokogiri (1.12.5)
99
- mini_portile2 (~> 2.6.1)
98
+ nokogiri (1.13.9)
99
+ mini_portile2 (~> 2.8.0)
100
100
  racc (~> 1.4)
101
101
  public_suffix (4.0.6)
102
- racc (1.5.2)
103
- rack (2.2.3)
102
+ racc (1.6.0)
103
+ rack (2.2.3.1)
104
104
  rack-test (1.1.0)
105
105
  rack (>= 1.0, < 3)
106
106
  rails (5.2.6)
@@ -119,7 +119,7 @@ GEM
119
119
  rails-dom-testing (2.0.3)
120
120
  activesupport (>= 4.2.0)
121
121
  nokogiri (>= 1.6)
122
- rails-html-sanitizer (1.3.0)
122
+ rails-html-sanitizer (1.4.3)
123
123
  loofah (~> 2.3)
124
124
  railties (5.2.6)
125
125
  actionpack (= 5.2.6)
@@ -159,7 +159,7 @@ GEM
159
159
  sprockets (>= 3.0.0)
160
160
  thor (1.1.0)
161
161
  thread_safe (0.3.6)
162
- tzinfo (1.2.9)
162
+ tzinfo (1.2.10)
163
163
  thread_safe (~> 0.1)
164
164
  websocket-driver (0.7.4)
165
165
  websocket-extensions (>= 0.1.0)
@@ -5,6 +5,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
6
  gem 'bootsnap', '>= 1.4.2', require: false
7
7
  gem 'my_api_client', path: '../..'
8
+ gem "psych", "~> 3.0" # for Ruby 3.1
8
9
  gem 'rails', '~> 6.0.3'
9
10
 
10
11
  group :development, :test do