my_api_client 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +23 -7
  3. data/.rubocop_todo.yml +1 -1
  4. data/CHANGELOG.md +27 -2
  5. data/Gemfile +2 -0
  6. data/Gemfile.lock +23 -21
  7. data/README.jp.md +10 -10
  8. data/README.md +392 -8
  9. data/gemfiles/rails_7.0.gemfile +15 -0
  10. data/lib/generators/rails/templates/api_client.rb.erb +3 -5
  11. data/lib/generators/rspec/templates/api_client_spec.rb.erb +0 -8
  12. data/lib/my_api_client/version.rb +1 -1
  13. data/my_api/Gemfile +1 -1
  14. data/my_api/Gemfile.lock +68 -66
  15. data/my_api/spec/spec_helper.rb +1 -1
  16. data/my_api_client.gemspec +3 -0
  17. data/rails_app/rails_5.2/Gemfile.lock +3 -3
  18. data/rails_app/rails_6.0/Gemfile.lock +15 -9
  19. data/rails_app/rails_6.1/Gemfile +2 -2
  20. data/rails_app/rails_6.1/Gemfile.lock +3 -3
  21. data/rails_app/rails_6.1/Rakefile +3 -1
  22. data/rails_app/rails_6.1/bin/bundle +28 -20
  23. data/rails_app/rails_6.1/bin/rails +4 -2
  24. data/rails_app/rails_6.1/bin/rake +4 -2
  25. data/rails_app/rails_6.1/bin/setup +3 -1
  26. data/rails_app/rails_6.1/config.ru +3 -1
  27. data/rails_app/rails_7.0/Gemfile +13 -0
  28. data/rails_app/rails_7.0/Gemfile.lock +147 -0
  29. data/rails_app/rails_7.0/README.md +24 -0
  30. data/rails_app/rails_7.0/Rakefile +8 -0
  31. data/rails_app/rails_7.0/app/controllers/application_controller.rb +4 -0
  32. data/rails_app/rails_7.0/app/models/application_record.rb +5 -0
  33. data/rails_app/rails_7.0/bin/bundle +122 -0
  34. data/rails_app/rails_7.0/bin/rails +6 -0
  35. data/rails_app/rails_7.0/bin/rake +6 -0
  36. data/rails_app/rails_7.0/bin/setup +35 -0
  37. data/rails_app/rails_7.0/config/application.rb +41 -0
  38. data/rails_app/rails_7.0/config/boot.rb +5 -0
  39. data/rails_app/rails_7.0/config/credentials.yml.enc +1 -0
  40. data/rails_app/rails_7.0/config/database.yml +25 -0
  41. data/rails_app/rails_7.0/config/environment.rb +7 -0
  42. data/rails_app/rails_7.0/config/environments/development.rb +58 -0
  43. data/rails_app/rails_7.0/config/environments/production.rb +70 -0
  44. data/rails_app/rails_7.0/config/environments/test.rb +52 -0
  45. data/rails_app/rails_7.0/config/initializers/cors.rb +17 -0
  46. data/rails_app/rails_7.0/config/initializers/filter_parameter_logging.rb +8 -0
  47. data/rails_app/rails_7.0/config/initializers/inflections.rb +17 -0
  48. data/rails_app/rails_7.0/config/locales/en.yml +33 -0
  49. data/rails_app/rails_7.0/config/routes.rb +8 -0
  50. data/rails_app/rails_7.0/config.ru +8 -0
  51. data/rails_app/rails_7.0/db/seeds.rb +8 -0
  52. data/rails_app/rails_7.0/public/robots.txt +1 -0
  53. data/rails_app/rails_7.0/spec/rails_helper.rb +14 -0
  54. data/rails_app/rails_7.0/spec/spec_helper.rb +13 -0
  55. metadata +34 -4
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)
5
- actionpack (= 6.1.4)
6
- actionview (= 6.1.4)
7
- activejob (= 6.1.4)
8
- activesupport (= 6.1.4)
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)
9
9
  mail (~> 2.5, >= 2.5.4)
10
10
  rails-dom-testing (~> 2.0)
11
- actionpack (6.1.4)
12
- actionview (= 6.1.4)
13
- activesupport (= 6.1.4)
11
+ actionpack (6.1.4.3)
12
+ actionview (= 6.1.4.3)
13
+ activesupport (= 6.1.4.3)
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)
19
- activesupport (= 6.1.4)
18
+ actionview (6.1.4.3)
19
+ activesupport (= 6.1.4.3)
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)
25
- activesupport (= 6.1.4)
24
+ activejob (6.1.4.3)
25
+ activesupport (= 6.1.4.3)
26
26
  globalid (>= 0.3.6)
27
- activemodel (6.1.4)
28
- activesupport (= 6.1.4)
29
- activerecord (6.1.4)
30
- activemodel (= 6.1.4)
31
- activesupport (= 6.1.4)
32
- activesupport (6.1.4)
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)
33
33
  concurrent-ruby (~> 1.0, >= 1.0.2)
34
34
  i18n (>= 1.6, < 2)
35
35
  minitest (>= 5.1)
@@ -37,7 +37,7 @@ GEM
37
37
  zeitwerk (~> 2.3)
38
38
  addressable (2.8.0)
39
39
  public_suffix (>= 2.0.2, < 5.0)
40
- aws-eventstream (1.1.1)
40
+ aws-eventstream (1.2.0)
41
41
  aws-mfa-secure (0.4.3)
42
42
  activesupport
43
43
  aws-sdk-core
@@ -46,53 +46,54 @@ GEM
46
46
  rainbow
47
47
  thor
48
48
  zeitwerk
49
- aws-partitions (1.479.0)
50
- aws-sdk-apigateway (1.62.0)
51
- aws-sdk-core (~> 3, >= 3.112.0)
49
+ aws-partitions (1.541.0)
50
+ aws-sdk-apigateway (1.71.0)
51
+ aws-sdk-core (~> 3, >= 3.122.0)
52
52
  aws-sigv4 (~> 1.1)
53
- aws-sdk-cloudformation (1.53.0)
54
- aws-sdk-core (~> 3, >= 3.112.0)
53
+ aws-sdk-cloudformation (1.63.0)
54
+ aws-sdk-core (~> 3, >= 3.122.0)
55
55
  aws-sigv4 (~> 1.1)
56
- aws-sdk-cloudwatchlogs (1.41.0)
57
- aws-sdk-core (~> 3, >= 3.112.0)
56
+ aws-sdk-cloudwatchlogs (1.49.0)
57
+ aws-sdk-core (~> 3, >= 3.122.0)
58
58
  aws-sigv4 (~> 1.1)
59
- aws-sdk-core (3.117.0)
59
+ aws-sdk-core (3.124.0)
60
60
  aws-eventstream (~> 1, >= 1.0.2)
61
- aws-partitions (~> 1, >= 1.239.0)
61
+ aws-partitions (~> 1, >= 1.525.0)
62
62
  aws-sigv4 (~> 1.1)
63
63
  jmespath (~> 1.0)
64
- aws-sdk-dynamodb (1.60.0)
65
- aws-sdk-core (~> 3, >= 3.112.0)
64
+ aws-sdk-dynamodb (1.69.0)
65
+ aws-sdk-core (~> 3, >= 3.122.0)
66
66
  aws-sigv4 (~> 1.1)
67
- aws-sdk-kinesis (1.32.1)
68
- aws-sdk-core (~> 3, >= 3.112.0)
67
+ aws-sdk-kinesis (1.38.0)
68
+ aws-sdk-core (~> 3, >= 3.122.0)
69
69
  aws-sigv4 (~> 1.1)
70
- aws-sdk-kms (1.44.0)
71
- aws-sdk-core (~> 3, >= 3.112.0)
70
+ aws-sdk-kms (1.52.0)
71
+ aws-sdk-core (~> 3, >= 3.122.0)
72
72
  aws-sigv4 (~> 1.1)
73
- aws-sdk-lambda (1.64.0)
74
- aws-sdk-core (~> 3, >= 3.112.0)
73
+ aws-sdk-lambda (1.76.0)
74
+ aws-sdk-core (~> 3, >= 3.122.0)
75
75
  aws-sigv4 (~> 1.1)
76
- aws-sdk-s3 (1.96.2)
77
- aws-sdk-core (~> 3, >= 3.112.0)
76
+ aws-sdk-s3 (1.109.0)
77
+ aws-sdk-core (~> 3, >= 3.122.0)
78
78
  aws-sdk-kms (~> 1)
79
+ aws-sigv4 (~> 1.4)
80
+ aws-sdk-sns (1.49.0)
81
+ aws-sdk-core (~> 3, >= 3.122.0)
79
82
  aws-sigv4 (~> 1.1)
80
- aws-sdk-sns (1.42.0)
81
- aws-sdk-core (~> 3, >= 3.112.0)
83
+ aws-sdk-sqs (1.48.0)
84
+ aws-sdk-core (~> 3, >= 3.122.0)
82
85
  aws-sigv4 (~> 1.1)
83
- aws-sdk-sqs (1.40.0)
84
- aws-sdk-core (~> 3, >= 3.112.0)
86
+ aws-sdk-ssm (1.126.0)
87
+ aws-sdk-core (~> 3, >= 3.122.0)
85
88
  aws-sigv4 (~> 1.1)
86
- aws-sdk-ssm (1.112.0)
87
- aws-sdk-core (~> 3, >= 3.112.0)
88
- aws-sigv4 (~> 1.1)
89
- aws-sigv4 (1.2.4)
89
+ aws-sigv4 (1.4.0)
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.35.3)
94
+ capybara (3.36.0)
95
95
  addressable
96
+ matrix
96
97
  mini_mime (>= 0.1.3)
97
98
  nokogiri (~> 1.8)
98
99
  rack (>= 1.6.0)
@@ -116,12 +117,12 @@ GEM
116
117
  rainbow
117
118
  erubi (1.10.0)
118
119
  gems (1.2.0)
119
- globalid (0.4.2)
120
- activesupport (>= 4.2.0)
121
- hashie (4.1.0)
122
- i18n (1.8.10)
120
+ globalid (1.0.0)
121
+ activesupport (>= 5.0)
122
+ hashie (5.0.0)
123
+ i18n (1.8.11)
123
124
  concurrent-ruby (~> 1.0)
124
- jets (3.0.11)
125
+ jets (3.0.23)
125
126
  actionmailer (~> 6.1.0)
126
127
  actionpack (~> 6.1.0)
127
128
  actionview (~> 6.1.0)
@@ -156,7 +157,7 @@ GEM
156
157
  shotgun
157
158
  text-table
158
159
  thor
159
- zeitwerk
160
+ zeitwerk (~> 2.4.0)
160
161
  jets-html-sanitizer (1.0.4)
161
162
  loofah (~> 2.2, >= 2.2.2)
162
163
  jmespath (1.4.0)
@@ -164,42 +165,43 @@ GEM
164
165
  rexml
165
166
  launchy (2.5.0)
166
167
  addressable (~> 2.7)
167
- loofah (2.10.0)
168
+ loofah (2.13.0)
168
169
  crass (~> 1.0.2)
169
170
  nokogiri (>= 1.5.9)
170
171
  mail (2.7.1)
171
172
  mini_mime (>= 0.1.1)
173
+ matrix (0.4.2)
172
174
  memoist (0.16.2)
173
175
  method_source (1.0.0)
174
- mini_mime (1.1.0)
176
+ mini_mime (1.1.2)
175
177
  mini_portile2 (2.6.1)
176
178
  minitest (5.14.4)
177
- nio4r (2.5.7)
178
- nokogiri (1.12.2)
179
+ nio4r (2.5.8)
180
+ nokogiri (1.12.5)
179
181
  mini_portile2 (~> 2.6.1)
180
182
  racc (~> 1.4)
181
183
  public_suffix (4.0.6)
182
- puma (5.4.0)
184
+ puma (5.5.2)
183
185
  nio4r (~> 2.0)
184
- racc (1.5.2)
186
+ racc (1.6.0)
185
187
  rack (2.2.3)
186
188
  rack-test (1.1.0)
187
189
  rack (>= 1.0, < 3)
188
190
  rails-dom-testing (2.0.3)
189
191
  activesupport (>= 4.2.0)
190
192
  nokogiri (>= 1.6)
191
- rails-html-sanitizer (1.3.0)
193
+ rails-html-sanitizer (1.4.2)
192
194
  loofah (~> 2.3)
193
- railties (6.1.4)
194
- actionpack (= 6.1.4)
195
- activesupport (= 6.1.4)
195
+ railties (6.1.4.3)
196
+ actionpack (= 6.1.4.3)
197
+ activesupport (= 6.1.4.3)
196
198
  method_source
197
199
  rake (>= 0.13)
198
200
  thor (~> 1.0)
199
201
  rainbow (3.0.0)
200
202
  rake (13.0.6)
201
203
  recursive-open-struct (1.1.3)
202
- regexp_parser (2.0.3)
204
+ regexp_parser (2.1.1)
203
205
  rexml (3.2.5)
204
206
  rspec (3.10.0)
205
207
  rspec-core (~> 3.10.0)
@@ -216,7 +218,7 @@ GEM
216
218
  rspec-support (3.10.0)
217
219
  rspec_junit_formatter (0.4.1)
218
220
  rspec-core (>= 2, < 4, != 2.12.0)
219
- serverlessgems (0.1.4)
221
+ serverlessgems (0.1.6)
220
222
  gems
221
223
  memoist
222
224
  zeitwerk
@@ -239,7 +241,7 @@ DEPENDENCIES
239
241
  dynomite
240
242
  jets
241
243
  launchy
242
- nokogiri (~> 1.12.2)
244
+ nokogiri (~> 1.12.5)
243
245
  puma
244
246
  rack
245
247
  rspec
@@ -18,7 +18,7 @@ require 'jets/spec_helpers'
18
18
  # Rspec helper module
19
19
  module Helpers
20
20
  def payload(name)
21
- JSON.parse(IO.read("spec/fixtures/payloads/#{name}.json"))
21
+ JSON.parse(File.read("spec/fixtures/payloads/#{name}.json"))
22
22
  end
23
23
  end
24
24
 
@@ -40,4 +40,7 @@ Gem::Specification.new do |spec|
40
40
  spec.add_development_dependency 'simplecov', '0.21.2'
41
41
  spec.add_development_dependency 'webmock'
42
42
  spec.add_development_dependency 'yard'
43
+ spec.metadata = {
44
+ 'rubygems_mfa_required' => 'true',
45
+ }
43
46
  end
@@ -89,14 +89,14 @@ 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.5.3)
92
+ mini_portile2 (2.6.1)
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.11.7)
99
- mini_portile2 (~> 2.5.0)
98
+ nokogiri (1.12.5)
99
+ mini_portile2 (~> 2.6.1)
100
100
  racc (~> 1.4)
101
101
  public_suffix (4.0.6)
102
102
  racc (1.5.2)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../..
3
3
  specs:
4
- my_api_client (0.20.0)
4
+ my_api_client (0.21.0)
5
5
  activesupport (>= 5.2.0)
6
6
  faraday (>= 0.17.1)
7
7
  jsonpath
@@ -67,7 +67,7 @@ GEM
67
67
  zeitwerk (~> 2.2, >= 2.2.2)
68
68
  addressable (2.8.0)
69
69
  public_suffix (>= 2.0.2, < 5.0)
70
- bootsnap (1.4.8)
70
+ bootsnap (1.9.3)
71
71
  msgpack (~> 1.0)
72
72
  builder (3.2.4)
73
73
  byebug (11.1.3)
@@ -75,19 +75,25 @@ GEM
75
75
  crass (1.0.6)
76
76
  diff-lcs (1.4.4)
77
77
  erubi (1.10.0)
78
- faraday (1.4.2)
78
+ faraday (1.8.0)
79
79
  faraday-em_http (~> 1.0)
80
80
  faraday-em_synchrony (~> 1.0)
81
81
  faraday-excon (~> 1.1)
82
+ faraday-httpclient (~> 1.0.1)
82
83
  faraday-net_http (~> 1.0)
83
84
  faraday-net_http_persistent (~> 1.1)
85
+ faraday-patron (~> 1.0)
86
+ faraday-rack (~> 1.0)
84
87
  multipart-post (>= 1.2, < 3)
85
88
  ruby2_keywords (>= 0.0.4)
86
89
  faraday-em_http (1.0.0)
87
90
  faraday-em_synchrony (1.0.0)
88
91
  faraday-excon (1.1.0)
92
+ faraday-httpclient (1.0.1)
89
93
  faraday-net_http (1.0.1)
90
- faraday-net_http_persistent (1.1.0)
94
+ faraday-net_http_persistent (1.2.0)
95
+ faraday-patron (1.0.0)
96
+ faraday-rack (1.0.0)
91
97
  globalid (0.4.2)
92
98
  activesupport (>= 4.2.0)
93
99
  i18n (1.8.10)
@@ -102,14 +108,14 @@ GEM
102
108
  marcel (1.0.1)
103
109
  method_source (1.0.0)
104
110
  mini_mime (1.1.0)
105
- mini_portile2 (2.5.3)
111
+ mini_portile2 (2.6.1)
106
112
  minitest (5.14.4)
107
- msgpack (1.3.3)
113
+ msgpack (1.4.2)
108
114
  multi_json (1.15.0)
109
115
  multipart-post (2.1.1)
110
116
  nio4r (2.5.7)
111
- nokogiri (1.11.7)
112
- mini_portile2 (~> 2.5.0)
117
+ nokogiri (1.12.5)
118
+ mini_portile2 (~> 2.6.1)
113
119
  racc (~> 1.4)
114
120
  public_suffix (4.0.6)
115
121
  racc (1.5.2)
@@ -160,7 +166,7 @@ GEM
160
166
  rspec-mocks (~> 3.9)
161
167
  rspec-support (~> 3.9)
162
168
  rspec-support (3.9.3)
163
- ruby2_keywords (0.0.4)
169
+ ruby2_keywords (0.0.5)
164
170
  sawyer (0.8.2)
165
171
  addressable (>= 2.3.5)
166
172
  faraday (> 0.8, < 2.0)
@@ -3,12 +3,12 @@
3
3
  source 'https://rubygems.org'
4
4
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
+ gem 'my_api_client', path: '../..'
6
7
  gem 'rails', '~> 6.1.0'
7
8
  gem 'sqlite3', '~> 1.4'
8
- gem 'my_api_client', path: '../..'
9
9
 
10
10
  group :development, :test do
11
- gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
11
+ gem 'byebug', platforms: %i[mri mingw x64_mingw]
12
12
  gem 'rspec-rails'
13
13
  end
14
14
 
@@ -108,13 +108,13 @@ GEM
108
108
  marcel (1.0.1)
109
109
  method_source (1.0.0)
110
110
  mini_mime (1.0.3)
111
- mini_portile2 (2.5.3)
111
+ mini_portile2 (2.6.1)
112
112
  minitest (5.14.4)
113
113
  multi_json (1.15.0)
114
114
  multipart-post (2.1.1)
115
115
  nio4r (2.5.7)
116
- nokogiri (1.11.7)
117
- mini_portile2 (~> 2.5.0)
116
+ nokogiri (1.12.5)
117
+ mini_portile2 (~> 2.6.1)
118
118
  racc (~> 1.4)
119
119
  public_suffix (4.0.6)
120
120
  racc (1.5.2)
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
4
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
5
 
4
- require_relative "config/application"
6
+ require_relative 'config/application'
5
7
 
6
8
  Rails.application.load_tasks
@@ -8,46 +8,48 @@
8
8
  # this file is here to facilitate running it.
9
9
  #
10
10
 
11
- require "rubygems"
11
+ require 'rubygems'
12
12
 
13
13
  m = Module.new do
14
14
  module_function
15
15
 
16
16
  def invoked_as_script?
17
- File.expand_path($0) == File.expand_path(__FILE__)
17
+ File.expand_path($PROGRAM_NAME) == File.expand_path(__FILE__)
18
18
  end
19
19
 
20
20
  def env_var_version
21
- ENV["BUNDLER_VERSION"]
21
+ ENV['BUNDLER_VERSION']
22
22
  end
23
23
 
24
24
  def cli_arg_version
25
25
  return unless invoked_as_script? # don't want to hijack other binstubs
26
- return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
26
+ return unless 'update'.start_with?(ARGV.first || ' ') # must be running `bundle update`
27
+
27
28
  bundler_version = nil
28
29
  update_index = nil
29
30
  ARGV.each_with_index do |a, i|
30
31
  if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
32
  bundler_version = a
32
33
  end
33
- next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1
34
+ next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/o
35
+
36
+ bundler_version = Regexp.last_match(1)
35
37
  update_index = i
36
38
  end
37
39
  bundler_version
38
40
  end
39
41
 
40
42
  def gemfile
41
- gemfile = ENV["BUNDLE_GEMFILE"]
43
+ gemfile = ENV['BUNDLE_GEMFILE']
42
44
  return gemfile if gemfile && !gemfile.empty?
43
45
 
44
- File.expand_path("../../Gemfile", __FILE__)
46
+ File.expand_path('../Gemfile', __dir__)
45
47
  end
46
48
 
47
49
  def lockfile
48
50
  lockfile =
49
51
  case File.basename(gemfile)
50
- when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
52
+ when 'gems.rb' then gemfile.sub(/\.rb$/, gemfile)
51
53
  else "#{gemfile}.lock"
52
54
  end
53
55
  File.expand_path(lockfile)
@@ -55,15 +57,19 @@ m = Module.new do
55
57
 
56
58
  def lockfile_version
57
59
  return unless File.file?(lockfile)
60
+
58
61
  lockfile_contents = File.read(lockfile)
59
- return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
62
+ unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/o
63
+ return
64
+ end
65
+
60
66
  Regexp.last_match(1)
61
67
  end
62
68
 
63
69
  def bundler_version
64
70
  @bundler_version ||=
65
71
  env_var_version || cli_arg_version ||
66
- lockfile_version
72
+ lockfile_version
67
73
  end
68
74
 
69
75
  def bundler_requirement
@@ -73,28 +79,32 @@ m = Module.new do
73
79
 
74
80
  requirement = bundler_gem_version.approximate_recommendation
75
81
 
76
- return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
82
+ return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new('2.7.0')
77
83
 
78
- requirement += ".a" if bundler_gem_version.prerelease?
84
+ requirement += '.a' if bundler_gem_version.prerelease?
79
85
 
80
86
  requirement
81
87
  end
82
88
 
83
89
  def load_bundler!
84
- ENV["BUNDLE_GEMFILE"] ||= gemfile
90
+ ENV['BUNDLE_GEMFILE'] ||= gemfile
85
91
 
86
92
  activate_bundler
87
93
  end
88
94
 
89
95
  def activate_bundler
90
96
  gem_error = activation_error_handling do
91
- gem "bundler", bundler_requirement
97
+ gem 'bundler', bundler_requirement
92
98
  end
93
99
  return if gem_error.nil?
100
+
94
101
  require_error = activation_error_handling do
95
- require "bundler/version"
102
+ require 'bundler/version'
103
+ end
104
+ if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
105
+ return
96
106
  end
97
- return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
107
+
98
108
  warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
99
109
  exit 42
100
110
  end
@@ -109,6 +119,4 @@ end
109
119
 
110
120
  m.load_bundler!
111
121
 
112
- if m.invoked_as_script?
113
- load Gem.bin_path("bundler", "bundle")
114
- end
122
+ load Gem.bin_path('bundler', 'bundle') if m.invoked_as_script?
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  APP_PATH = File.expand_path('../config/application', __dir__)
3
- require_relative "../config/boot"
4
- require "rails/commands"
5
+ require_relative '../config/boot'
6
+ require 'rails/commands'
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require_relative "../config/boot"
3
- require "rake"
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../config/boot'
5
+ require 'rake'
4
6
  Rake.application.run
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
- require "fileutils"
2
+ # frozen_string_literal: true
3
+
4
+ require 'fileutils'
3
5
 
4
6
  # path to your application root.
5
7
  APP_ROOT = File.expand_path('..', __dir__)
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file is used by Rack-based servers to start the application.
2
4
 
3
- require_relative "config/environment"
5
+ require_relative 'config/environment'
4
6
 
5
7
  run Rails.application
6
8
  Rails.application.load_server
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
+
6
+ gem 'my_api_client', path: '../..'
7
+ gem 'rails', '~> 7.0.0'
8
+ gem 'sqlite3', '~> 1.4'
9
+
10
+ group :development, :test do
11
+ gem 'debug', platforms: %i[mri mingw x64_mingw]
12
+ gem 'rspec-rails'
13
+ end