stitches 4.0.0 → 4.2.0.RC1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +95 -30
  3. data/.github/CODEOWNERS +1 -1
  4. data/.gitignore +1 -0
  5. data/.ruby-version +1 -1
  6. data/Gemfile.rails-6.1 +7 -0
  7. data/README.md +36 -4
  8. data/lib/stitches/add_disabled_at_to_api_clients_generator.rb +18 -0
  9. data/lib/stitches/allowlist_middleware.rb +20 -6
  10. data/lib/stitches/api_client_access_wrapper.rb +42 -11
  11. data/lib/stitches/api_key.rb +5 -5
  12. data/lib/stitches/configuration.rb +4 -0
  13. data/lib/stitches/generator_files/db/migrate/add_disabled_at_to_api_clients.rb +9 -0
  14. data/lib/stitches/generator_files/db/migrate/create_api_clients.rb +1 -0
  15. data/lib/stitches/valid_mime_type.rb +11 -4
  16. data/lib/stitches/version.rb +1 -1
  17. data/lib/stitches_norailtie.rb +1 -0
  18. data/owners.json +1 -1
  19. data/spec/api_key_middleware_spec.rb +368 -0
  20. data/spec/api_version_constraint_middleware_spec.rb +58 -0
  21. data/spec/configuration_spec.rb +1 -1
  22. data/spec/deprecation_spec.rb +1 -1
  23. data/spec/error_spec.rb +1 -1
  24. data/spec/errors_spec.rb +3 -3
  25. data/spec/fake_app/.rspec +1 -0
  26. data/spec/fake_app/.ruby-version +1 -0
  27. data/spec/fake_app/Gemfile +53 -0
  28. data/spec/fake_app/README.md +24 -0
  29. data/spec/fake_app/Rakefile +6 -0
  30. data/spec/fake_app/app/assets/config/manifest.js +2 -0
  31. data/spec/fake_app/app/assets/stylesheets/application.css +15 -0
  32. data/spec/fake_app/app/controllers/api.rb +2 -0
  33. data/spec/fake_app/app/controllers/api/api_controller.rb +31 -0
  34. data/spec/fake_app/app/controllers/api/v1.rb +2 -0
  35. data/spec/fake_app/app/controllers/api/v1/hellos_controller.rb +7 -0
  36. data/spec/fake_app/app/controllers/api/v1/pings_controller.rb +16 -0
  37. data/spec/fake_app/app/controllers/api/v2.rb +2 -0
  38. data/spec/fake_app/app/controllers/api/v2/hellos_controller.rb +7 -0
  39. data/spec/fake_app/app/controllers/api/v2/pings_controller.rb +16 -0
  40. data/spec/fake_app/app/controllers/application_controller.rb +2 -0
  41. data/spec/fake_app/app/helpers/application_helper.rb +2 -0
  42. data/spec/fake_app/app/models/api_client.rb +2 -0
  43. data/spec/fake_app/app/models/application_record.rb +3 -0
  44. data/spec/fake_app/bin/rails +4 -0
  45. data/spec/fake_app/bin/rake +4 -0
  46. data/spec/fake_app/bin/setup +33 -0
  47. data/spec/fake_app/config.ru +6 -0
  48. data/spec/fake_app/config/application.rb +35 -0
  49. data/spec/fake_app/config/boot.rb +3 -0
  50. data/spec/fake_app/config/credentials.yml.enc +1 -0
  51. data/spec/fake_app/config/database.yml +25 -0
  52. data/spec/fake_app/config/environment.rb +5 -0
  53. data/spec/fake_app/config/environments/development.rb +71 -0
  54. data/spec/fake_app/config/environments/production.rb +109 -0
  55. data/spec/fake_app/config/environments/test.rb +52 -0
  56. data/spec/fake_app/config/initializers/assets.rb +12 -0
  57. data/spec/fake_app/config/initializers/cookies_serializer.rb +5 -0
  58. data/spec/fake_app/config/initializers/filter_parameter_logging.rb +6 -0
  59. data/spec/fake_app/config/initializers/stitches.rb +24 -0
  60. data/spec/fake_app/config/locales/en.yml +33 -0
  61. data/spec/fake_app/config/master.key +1 -0
  62. data/spec/fake_app/config/puma.rb +43 -0
  63. data/spec/fake_app/config/routes.rb +17 -0
  64. data/spec/fake_app/config/storage.yml +34 -0
  65. data/spec/fake_app/db/development.sqlite3 +0 -0
  66. data/spec/fake_app/db/migrate/20210802153118_enable_uuid_ossp_extension.rb +7 -0
  67. data/spec/fake_app/db/migrate/20210802153119_create_api_clients.rb +14 -0
  68. data/spec/fake_app/db/schema_missing_disabled_at.rb +12 -0
  69. data/spec/fake_app/db/schema_missing_enabled.rb +11 -0
  70. data/spec/fake_app/db/schema_modern.rb +13 -0
  71. data/spec/fake_app/db/seeds.rb +7 -0
  72. data/spec/fake_app/db/test.sqlite3 +0 -0
  73. data/spec/fake_app/doc/api.md +4 -0
  74. data/spec/fake_app/lib/tasks/generate_api_key.rake +10 -0
  75. data/spec/fake_app/public/404.html +67 -0
  76. data/spec/fake_app/public/422.html +67 -0
  77. data/spec/fake_app/public/500.html +66 -0
  78. data/spec/fake_app/public/apple-touch-icon-precomposed.png +0 -0
  79. data/spec/fake_app/public/apple-touch-icon.png +0 -0
  80. data/spec/fake_app/public/favicon.ico +0 -0
  81. data/spec/fake_app/public/javascripts/apitome/application.js +31 -0
  82. data/spec/fake_app/public/robots.txt +1 -0
  83. data/spec/fake_app/public/stylesheets/apitome/application.css +269 -0
  84. data/spec/fake_app/test/application_system_test_case.rb +5 -0
  85. data/spec/fake_app/test/test_helper.rb +13 -0
  86. data/spec/fake_app/tmp/development_secret.txt +1 -0
  87. data/spec/integration/add_to_rails_app_spec.rb +9 -1
  88. data/spec/rails_helper.rb +64 -0
  89. data/spec/valid_mime_type_middleware_spec.rb +59 -0
  90. data/spec/valid_mime_type_spec.rb +22 -4
  91. data/stitches.gemspec +2 -0
  92. metadata +171 -14
  93. data/spec/api_client_access_wrapper_spec.rb +0 -52
  94. data/spec/api_key_spec.rb +0 -208
  95. data/spec/api_version_constraint_spec.rb +0 -33
@@ -0,0 +1,5 @@
1
+ require "test_helper"
2
+
3
+ class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
4
+ driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
5
+ end
@@ -0,0 +1,13 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require_relative "../config/environment"
3
+ require "rails/test_help"
4
+
5
+ class ActiveSupport::TestCase
6
+ # Run tests in parallel with specified workers
7
+ parallelize(workers: :number_of_processors)
8
+
9
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
@@ -0,0 +1 @@
1
+ 5555d81df49718e5b9412e544323f9cebcadf7ab825e9ac15b35c57091b4d9a0731033d343b6532c1e08de53f265ae2c0268f67bf65eb1ddc8b230716179d50a
@@ -63,7 +63,7 @@ RSpec.describe "Adding Stitches to a New Rails App", :integration do
63
63
  run "bin/rails generate stitches:api"
64
64
 
65
65
  # Yuck! So much duplication! BUT: Rails app templates have a notoriously silent failure mode, so mostly
66
- # what this is doing is ensuring that the generator inserted stuff when asked and that the very basics of what happens
66
+ # what this is doing is ensuring that the generator inserted stuff when asked and that the very basics of what happens
67
67
  # during generation are there. It's gross, and I'm sorry.
68
68
  #
69
69
  # It's also in one big block because making a new rails app and running the generator multiple times seems bad.
@@ -85,6 +85,14 @@ RSpec.describe "Adding Stitches to a New Rails App", :integration do
85
85
  expect(File.read(rails_root / "config" / "initializers" / "apitome.rb")).to include("config.title = 'Service Documentation'")
86
86
  expect(File.read(rails_root / "app" / "controllers" / "api" / "api_controller.rb")).to include("rescue_from StandardError")
87
87
  expect(File.read(rails_root / "app" / "controllers" / "api" / "api_controller.rb")).to include("rescue_from ActiveRecord::RecordNotFound")
88
+
89
+ run "bin/rails generate stitches:add_enabled_to_api_clients"
90
+ migrations = Dir["#{rails_root}/db/migrate/*.rb"].sort
91
+ expect(migrations.size).to eq(3)
92
+
93
+ run "bin/rails generate stitches:add_disabled_at_to_api_clients"
94
+ migrations = Dir["#{rails_root}/db/migrate/*.rb"].sort
95
+ expect(migrations.size).to eq(4)
88
96
  end
89
97
  end
90
98
 
@@ -0,0 +1,64 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
4
+ require "rails_helper"
5
+ ENV["RAILS_ENV"] ||= "test"
6
+
7
+ require File.expand_path("fake_app/config/environment.rb", __dir__)
8
+
9
+ # Prevent database truncation if the environment is production
10
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
11
+ require "rspec/rails"
12
+ # Add additional requires below this line. Rails is not loaded until this point!
13
+
14
+ ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
15
+
16
+ load 'fake_app/db/schema_modern.rb'
17
+
18
+ # Requires supporting ruby files with custom matchers and macros, etc, in
19
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
20
+ # run as spec files by default. This means that files in spec/support that end
21
+ # in _spec.rb will both be required and run as specs, causing the specs to be
22
+ # run twice. It is recommended that you do not name files matching this glob to
23
+ # end with _spec.rb. You can configure this pattern with the --pattern
24
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
25
+ #
26
+ # The following line is provided for convenience purposes. It has the downside
27
+ # of increasing the boot-up time by auto-requiring all files in the support
28
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
29
+ # require only the support files necessary.
30
+ #
31
+ # Rails.root is /spec/fake_app_x so going up one dir to the support dir
32
+ Dir[Rails.root.join("../", "support", "**", "*.rb")].sort.each { |f| require f }
33
+
34
+ RSpec.configure do |config|
35
+ # Remove this line to enable support for ActiveRecord
36
+ config.use_active_record = false
37
+
38
+ # If you enable ActiveRecord support you should unncomment these lines,
39
+ # note if you'd prefer not to run each example within a transaction, you
40
+ # should set use_transactional_fixtures to false.
41
+ #
42
+ # config.fixture_path = "#{::Rails.root}/spec/fixtures"
43
+ # config.use_transactional_fixtures = true
44
+
45
+ # RSpec Rails can automatically mix in different behaviours to your tests
46
+ # based on their file location, for example enabling you to call `get` and
47
+ # `post` in specs under `spec/controllers`.
48
+ #
49
+ # You can disable this behaviour by removing the line below, and instead
50
+ # explicitly tag your specs with their type, e.g.:
51
+ #
52
+ # RSpec.describe UsersController, type: :controller do
53
+ # # ...
54
+ # end
55
+ #
56
+ # The different available types are documented in the features, such as in
57
+ # https://relishapp.com/rspec/rspec-rails/docs
58
+ config.infer_spec_type_from_file_location!
59
+
60
+ # Filter lines from Rails gems in backtraces.
61
+ config.filter_rails_from_backtrace!
62
+ # arbitrary gems may also be filtered via:
63
+ # config.filter_gems_from_backtrace("gem name")
64
+ end
@@ -0,0 +1,59 @@
1
+ require 'rails_helper'
2
+ require 'securerandom'
3
+
4
+ RSpec.describe "/api/hellos", type: :request do
5
+ let!(:api_client) {
6
+ uuid = SecureRandom.uuid
7
+ ApiClient.create(name: "MyApiClient", key: uuid, enabled: true, created_at: Time.now())
8
+ }
9
+ let(:uuid) { api_client.key }
10
+ let(:auth_header) { "MyAwesomeInternalScheme key=#{uuid}" }
11
+ let(:accept_header) { "application/json; version=1" }
12
+ let(:headers) {
13
+ h = {
14
+ "Authorization" => auth_header
15
+ }
16
+ h["Accept"] = accept_header if accept_header
17
+ h
18
+ }
19
+ let(:allowlist) { nil }
20
+
21
+ before do
22
+ Stitches.configuration.reset_to_defaults!
23
+ Stitches.configuration.custom_http_auth_scheme = 'MyAwesomeInternalScheme'
24
+ Stitches::ApiClientAccessWrapper.clear_api_cache
25
+ end
26
+
27
+ def execute_call(accept_header:)
28
+ headers = {
29
+ "Authorization" => auth_header
30
+ }
31
+ headers["Accept"] = accept_header if accept_header
32
+
33
+ get "/api/hellos", headers: headers
34
+ end
35
+
36
+ it "returns good result when no problems exist in accept_header" do
37
+ execute_call(accept_header: "application/json; version=1")
38
+
39
+ expect(response.status).to eq 200
40
+ end
41
+
42
+ it "fails accept header has missing version" do
43
+ execute_call(accept_header: "application/json")
44
+
45
+ expect(response.status).to eq 406
46
+ end
47
+
48
+ it "fails accept header has bad version" do
49
+ execute_call(accept_header: "application/json; version=nan")
50
+
51
+ expect(response.status).to eq 406
52
+ end
53
+
54
+ it "fails when mime type is bad" do
55
+ execute_call(accept_header: "application/xml; version=1")
56
+
57
+ expect(response.status).to eq 406
58
+ end
59
+ end
@@ -1,8 +1,8 @@
1
- require 'spec_helper.rb'
1
+ require 'rails_helper'
2
2
 
3
3
  describe Stitches::ValidMimeType do
4
4
  let(:app) { double("rack app") }
5
-
5
+
6
6
  before do
7
7
  allow(app).to receive(:call).with(env)
8
8
  end
@@ -132,6 +132,24 @@ describe Stitches::ValidMimeType do
132
132
  end
133
133
  end
134
134
 
135
+ # The only remaining thing being tested outside the integration test is the little hole opened up to allow
136
+ # protobuf services to function
137
+ context "protbuf mime type" do
138
+ let(:env) {
139
+ {
140
+ "PATH_INFO" => "/api/ping",
141
+ "HTTP_ACCEPT" => "application/protobuf",
142
+ }
143
+ }
144
+
145
+ before do
146
+ @response = middleware.call(env)
147
+ end
148
+ it "calls through to the rest of the chain" do
149
+ expect(app).to have_received(:call).with(env)
150
+ end
151
+ end
152
+
135
153
  context "unacceptable responses" do
136
154
  before do
137
155
  @response = middleware.call(env)
@@ -144,7 +162,7 @@ describe Stitches::ValidMimeType do
144
162
  }
145
163
  it_behaves_like "an unacceptable response"
146
164
  end
147
- context "bad mime type" do
165
+ context "bad version" do
148
166
  let(:env) {
149
167
  {
150
168
  "PATH_INFO" => "/api/ping",
@@ -153,7 +171,7 @@ describe Stitches::ValidMimeType do
153
171
  }
154
172
  it_behaves_like "an unacceptable response"
155
173
  end
156
- context "bad version" do
174
+ context "bad mime type" do
157
175
  let(:env) {
158
176
  {
159
177
  "PATH_INFO" => "/api/ping",
data/stitches.gemspec CHANGED
@@ -23,6 +23,8 @@ Gem::Specification.new do |s|
23
23
  s.add_runtime_dependency("lru_redux")
24
24
 
25
25
  s.add_development_dependency("rspec", ">= 3")
26
+ s.add_development_dependency("rspec-rails")
27
+ s.add_development_dependency("sqlite3")
26
28
  s.add_development_dependency("rake")
27
29
  s.add_development_dependency("rspec_junit_formatter")
28
30
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stitches
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.2.0.RC1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stitch Fix Engineering
8
8
  - Andrew Peterson
9
9
  - Dave Copeland
10
10
  - Jonathan Dean
11
- autorequire:
11
+ autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2020-07-27 00:00:00.000000000 Z
14
+ date: 2021-08-10 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -69,6 +69,34 @@ dependencies:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: '3'
72
+ - !ruby/object:Gem::Dependency
73
+ name: rspec-rails
74
+ requirement: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ type: :development
80
+ prerelease: false
81
+ version_requirements: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ - !ruby/object:Gem::Dependency
87
+ name: sqlite3
88
+ requirement: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ type: :development
94
+ prerelease: false
95
+ version_requirements: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
72
100
  - !ruby/object:Gem::Dependency
73
101
  name: rake
74
102
  requirement: !ruby/object:Gem::Requirement
@@ -123,12 +151,14 @@ files:
123
151
  - Gemfile.rails-5.1
124
152
  - Gemfile.rails-5.2
125
153
  - Gemfile.rails-6.0
154
+ - Gemfile.rails-6.1
126
155
  - LICENSE.txt
127
156
  - README.md
128
157
  - Rakefile
129
158
  - build-matrix.json
130
159
  - lib/stitches.rb
131
160
  - lib/stitches/add_deprecation_generator.rb
161
+ - lib/stitches/add_disabled_at_to_api_clients_generator.rb
132
162
  - lib/stitches/add_enabled_to_api_clients_generator.rb
133
163
  - lib/stitches/allowlist_middleware.rb
134
164
  - lib/stitches/api_client_access_wrapper.rb
@@ -147,6 +177,7 @@ files:
147
177
  - lib/stitches/generator_files/app/controllers/api/v2/pings_controller.rb
148
178
  - lib/stitches/generator_files/app/models/api_client.rb
149
179
  - lib/stitches/generator_files/config/initializers/stitches.rb
180
+ - lib/stitches/generator_files/db/migrate/add_disabled_at_to_api_clients.rb
150
181
  - lib/stitches/generator_files/db/migrate/add_enabled_to_api_clients.rb
151
182
  - lib/stitches/generator_files/db/migrate/create_api_clients.rb
152
183
  - lib/stitches/generator_files/db/migrate/enable_uuid_ossp_extension.rb
@@ -166,25 +197,88 @@ files:
166
197
  - lib/stitches/version.rb
167
198
  - lib/stitches_norailtie.rb
168
199
  - owners.json
169
- - spec/api_client_access_wrapper_spec.rb
170
- - spec/api_key_spec.rb
171
- - spec/api_version_constraint_spec.rb
200
+ - spec/api_key_middleware_spec.rb
201
+ - spec/api_version_constraint_middleware_spec.rb
172
202
  - spec/configuration_spec.rb
173
203
  - spec/deprecation_spec.rb
174
204
  - spec/error_spec.rb
175
205
  - spec/errors_spec.rb
206
+ - spec/fake_app/.rspec
207
+ - spec/fake_app/.ruby-version
208
+ - spec/fake_app/Gemfile
209
+ - spec/fake_app/README.md
210
+ - spec/fake_app/Rakefile
211
+ - spec/fake_app/app/assets/config/manifest.js
212
+ - spec/fake_app/app/assets/stylesheets/application.css
213
+ - spec/fake_app/app/controllers/api.rb
214
+ - spec/fake_app/app/controllers/api/api_controller.rb
215
+ - spec/fake_app/app/controllers/api/v1.rb
216
+ - spec/fake_app/app/controllers/api/v1/hellos_controller.rb
217
+ - spec/fake_app/app/controllers/api/v1/pings_controller.rb
218
+ - spec/fake_app/app/controllers/api/v2.rb
219
+ - spec/fake_app/app/controllers/api/v2/hellos_controller.rb
220
+ - spec/fake_app/app/controllers/api/v2/pings_controller.rb
221
+ - spec/fake_app/app/controllers/application_controller.rb
222
+ - spec/fake_app/app/helpers/application_helper.rb
223
+ - spec/fake_app/app/models/api_client.rb
224
+ - spec/fake_app/app/models/application_record.rb
225
+ - spec/fake_app/bin/rails
226
+ - spec/fake_app/bin/rake
227
+ - spec/fake_app/bin/setup
228
+ - spec/fake_app/config.ru
229
+ - spec/fake_app/config/application.rb
230
+ - spec/fake_app/config/boot.rb
231
+ - spec/fake_app/config/credentials.yml.enc
232
+ - spec/fake_app/config/database.yml
233
+ - spec/fake_app/config/environment.rb
234
+ - spec/fake_app/config/environments/development.rb
235
+ - spec/fake_app/config/environments/production.rb
236
+ - spec/fake_app/config/environments/test.rb
237
+ - spec/fake_app/config/initializers/assets.rb
238
+ - spec/fake_app/config/initializers/cookies_serializer.rb
239
+ - spec/fake_app/config/initializers/filter_parameter_logging.rb
240
+ - spec/fake_app/config/initializers/stitches.rb
241
+ - spec/fake_app/config/locales/en.yml
242
+ - spec/fake_app/config/master.key
243
+ - spec/fake_app/config/puma.rb
244
+ - spec/fake_app/config/routes.rb
245
+ - spec/fake_app/config/storage.yml
246
+ - spec/fake_app/db/development.sqlite3
247
+ - spec/fake_app/db/migrate/20210802153118_enable_uuid_ossp_extension.rb
248
+ - spec/fake_app/db/migrate/20210802153119_create_api_clients.rb
249
+ - spec/fake_app/db/schema_missing_disabled_at.rb
250
+ - spec/fake_app/db/schema_missing_enabled.rb
251
+ - spec/fake_app/db/schema_modern.rb
252
+ - spec/fake_app/db/seeds.rb
253
+ - spec/fake_app/db/test.sqlite3
254
+ - spec/fake_app/doc/api.md
255
+ - spec/fake_app/lib/tasks/generate_api_key.rake
256
+ - spec/fake_app/public/404.html
257
+ - spec/fake_app/public/422.html
258
+ - spec/fake_app/public/500.html
259
+ - spec/fake_app/public/apple-touch-icon-precomposed.png
260
+ - spec/fake_app/public/apple-touch-icon.png
261
+ - spec/fake_app/public/favicon.ico
262
+ - spec/fake_app/public/javascripts/apitome/application.js
263
+ - spec/fake_app/public/robots.txt
264
+ - spec/fake_app/public/stylesheets/apitome/application.css
265
+ - spec/fake_app/test/application_system_test_case.rb
266
+ - spec/fake_app/test/test_helper.rb
267
+ - spec/fake_app/tmp/development_secret.txt
176
268
  - spec/integration/add_to_rails_app_spec.rb
269
+ - spec/rails_helper.rb
177
270
  - spec/spec/be_gone_spec.rb
178
271
  - spec/spec/have_api_error_spec.rb
179
272
  - spec/spec/show_deprecation_spec.rb
180
273
  - spec/spec_helper.rb
274
+ - spec/valid_mime_type_middleware_spec.rb
181
275
  - spec/valid_mime_type_spec.rb
182
276
  - stitches.gemspec
183
277
  homepage: https://github.com/stitchfix/stitches
184
278
  licenses:
185
279
  - MIT
186
280
  metadata: {}
187
- post_install_message:
281
+ post_install_message:
188
282
  rdoc_options: []
189
283
  require_paths:
190
284
  - lib
@@ -195,25 +289,88 @@ required_ruby_version: !ruby/object:Gem::Requirement
195
289
  version: '0'
196
290
  required_rubygems_version: !ruby/object:Gem::Requirement
197
291
  requirements:
198
- - - ">="
292
+ - - ">"
199
293
  - !ruby/object:Gem::Version
200
- version: '0'
294
+ version: 1.3.1
201
295
  requirements: []
202
- rubygems_version: 3.1.2
203
- signing_key:
296
+ rubygems_version: 3.2.20
297
+ signing_key:
204
298
  specification_version: 4
205
299
  summary: You'll be in stitches at how easy it is to create a service at Stitch Fix
206
300
  test_files:
207
- - spec/api_client_access_wrapper_spec.rb
208
- - spec/api_key_spec.rb
209
- - spec/api_version_constraint_spec.rb
301
+ - spec/api_key_middleware_spec.rb
302
+ - spec/api_version_constraint_middleware_spec.rb
210
303
  - spec/configuration_spec.rb
211
304
  - spec/deprecation_spec.rb
212
305
  - spec/error_spec.rb
213
306
  - spec/errors_spec.rb
307
+ - spec/fake_app/.rspec
308
+ - spec/fake_app/.ruby-version
309
+ - spec/fake_app/Gemfile
310
+ - spec/fake_app/README.md
311
+ - spec/fake_app/Rakefile
312
+ - spec/fake_app/app/assets/config/manifest.js
313
+ - spec/fake_app/app/assets/stylesheets/application.css
314
+ - spec/fake_app/app/controllers/api.rb
315
+ - spec/fake_app/app/controllers/api/api_controller.rb
316
+ - spec/fake_app/app/controllers/api/v1.rb
317
+ - spec/fake_app/app/controllers/api/v1/hellos_controller.rb
318
+ - spec/fake_app/app/controllers/api/v1/pings_controller.rb
319
+ - spec/fake_app/app/controllers/api/v2.rb
320
+ - spec/fake_app/app/controllers/api/v2/hellos_controller.rb
321
+ - spec/fake_app/app/controllers/api/v2/pings_controller.rb
322
+ - spec/fake_app/app/controllers/application_controller.rb
323
+ - spec/fake_app/app/helpers/application_helper.rb
324
+ - spec/fake_app/app/models/api_client.rb
325
+ - spec/fake_app/app/models/application_record.rb
326
+ - spec/fake_app/bin/rails
327
+ - spec/fake_app/bin/rake
328
+ - spec/fake_app/bin/setup
329
+ - spec/fake_app/config.ru
330
+ - spec/fake_app/config/application.rb
331
+ - spec/fake_app/config/boot.rb
332
+ - spec/fake_app/config/credentials.yml.enc
333
+ - spec/fake_app/config/database.yml
334
+ - spec/fake_app/config/environment.rb
335
+ - spec/fake_app/config/environments/development.rb
336
+ - spec/fake_app/config/environments/production.rb
337
+ - spec/fake_app/config/environments/test.rb
338
+ - spec/fake_app/config/initializers/assets.rb
339
+ - spec/fake_app/config/initializers/cookies_serializer.rb
340
+ - spec/fake_app/config/initializers/filter_parameter_logging.rb
341
+ - spec/fake_app/config/initializers/stitches.rb
342
+ - spec/fake_app/config/locales/en.yml
343
+ - spec/fake_app/config/master.key
344
+ - spec/fake_app/config/puma.rb
345
+ - spec/fake_app/config/routes.rb
346
+ - spec/fake_app/config/storage.yml
347
+ - spec/fake_app/db/development.sqlite3
348
+ - spec/fake_app/db/migrate/20210802153118_enable_uuid_ossp_extension.rb
349
+ - spec/fake_app/db/migrate/20210802153119_create_api_clients.rb
350
+ - spec/fake_app/db/schema_missing_disabled_at.rb
351
+ - spec/fake_app/db/schema_missing_enabled.rb
352
+ - spec/fake_app/db/schema_modern.rb
353
+ - spec/fake_app/db/seeds.rb
354
+ - spec/fake_app/db/test.sqlite3
355
+ - spec/fake_app/doc/api.md
356
+ - spec/fake_app/lib/tasks/generate_api_key.rake
357
+ - spec/fake_app/public/404.html
358
+ - spec/fake_app/public/422.html
359
+ - spec/fake_app/public/500.html
360
+ - spec/fake_app/public/apple-touch-icon-precomposed.png
361
+ - spec/fake_app/public/apple-touch-icon.png
362
+ - spec/fake_app/public/favicon.ico
363
+ - spec/fake_app/public/javascripts/apitome/application.js
364
+ - spec/fake_app/public/robots.txt
365
+ - spec/fake_app/public/stylesheets/apitome/application.css
366
+ - spec/fake_app/test/application_system_test_case.rb
367
+ - spec/fake_app/test/test_helper.rb
368
+ - spec/fake_app/tmp/development_secret.txt
214
369
  - spec/integration/add_to_rails_app_spec.rb
370
+ - spec/rails_helper.rb
215
371
  - spec/spec/be_gone_spec.rb
216
372
  - spec/spec/have_api_error_spec.rb
217
373
  - spec/spec/show_deprecation_spec.rb
218
374
  - spec/spec_helper.rb
375
+ - spec/valid_mime_type_middleware_spec.rb
219
376
  - spec/valid_mime_type_spec.rb