stitches 4.2.1 → 4.2.2

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: 076cbbf3b2dfdd8b9b01d5c9f80cc091c223f14008fd7d45ceb2fff58bf454a0
4
- data.tar.gz: a0d73979c10617fd6567aa7089236da49c7d2f1e1f58648931af5f5a0d7562b4
3
+ metadata.gz: 31a88657d0835e4d9dae083be3a5351e0cfe719dc0c930def115d0a1d9749849
4
+ data.tar.gz: 4f873d97147ef91da025f0f06eb29c0c800f6a2f6410739cc64c7050b17fbb4b
5
5
  SHA512:
6
- metadata.gz: 46e0364ba7c84f2fe1ca66cac2b74236b173bd023b4573b41f0ed718c66828c1131075802e7cc388f427f7de81af6e9bc13c763429f68382ce6a8729d548e988
7
- data.tar.gz: af3e5c6b23f9134ee842b300a65afcf13455d3842516696e3774e35a324d590271058f581db1451ecccbbf23c3c70f63ec2d12476c0306a1dfdf50825c7e5d55
6
+ metadata.gz: 9c78c55c6a88cf128e1d58e9fce561f32f53207c0de2f8ddb107449fe2de2638e73f76e842aece05b1d5431072459bf7747dd736746d7ad81f3c153841f00627
7
+ data.tar.gz: 0ae33e523eb0f782f6cdf3a0bc457c8f09fa3a140759e344f8fe07b6a9b209dfcb119df77abe167017a491462bb83db9f10ce7f1aae7d82aa5c8b9b7046ef1bb
@@ -12,7 +12,6 @@ module Stitches
12
12
 
13
13
  desc "Bootstraps your API service with a basic ping controller and spec to ensure everything is setup properly"
14
14
  def bootstrap_api
15
- gem "apitome"
16
15
  gem_group :development, :test do
17
16
  gem "rspec"
18
17
  gem "rspec-rails"
@@ -22,12 +21,8 @@ module Stitches
22
21
  Bundler.with_clean_env do
23
22
  run "bundle install"
24
23
  end
25
- generate "apitome:install"
26
24
  generate "rspec:install"
27
25
 
28
- gsub_file 'config/initializers/apitome.rb', /config.mount_at = .*$/, "config.mount_at = nil"
29
- gsub_file 'config/initializers/apitome.rb', /config.title = .*$/, "config.title = 'Service Documentation'"
30
-
31
26
  inject_into_file "config/routes.rb", before: /^end/ do<<-ROUTES
32
27
  namespace :api do
33
28
  scope module: :v1, constraints: Stitches::ApiVersionConstraint.new(1) do
@@ -40,11 +35,6 @@ namespace :api do
40
35
  # as well as for your client to be able to validate this as well.
41
36
  end
42
37
  end
43
-
44
- api_docs = Rack::Auth::Basic.new(Apitome::Engine) do |_, password|
45
- password == ENV['HTTP_AUTH_PASSWORD']
46
- end
47
- mount api_docs, at: "docs"
48
38
  ROUTES
49
39
  end
50
40
 
@@ -77,7 +67,7 @@ require 'stitches/spec'
77
67
  require 'rspec_api_documentation'
78
68
 
79
69
  RspecApiDocumentation.configure do |config|
80
- config.format = :json
70
+ config.format = [:json, :html]
81
71
  config.request_headers_to_include = %w(
82
72
  Accept
83
73
  Content-Type
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Stitches
4
- VERSION = '4.2.1'
4
+ VERSION = '4.2.2'
5
5
  end
@@ -44,7 +44,6 @@ end
44
44
 
45
45
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
46
46
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
47
- gem 'apitome'
48
47
 
49
48
  group :development, :test do
50
49
  gem 'rspec'
@@ -51,7 +51,7 @@ RSpec.describe "Adding Stitches to a New Rails App", :integration do
51
51
  run use_local_stitches
52
52
  # It's unclear why, but on CI the gems are not found when installed
53
53
  # through bundler however installing them explicitly first fixes it.
54
- run "gem install apitome rspec-rails rspec_api_documentation"
54
+ run "gem install rspec-rails rspec_api_documentation"
55
55
  run "bundle install"
56
56
  example.run
57
57
  end
@@ -69,11 +69,9 @@ RSpec.describe "Adding Stitches to a New Rails App", :integration do
69
69
  # It's also in one big block because making a new rails app and running the generator multiple times seems bad.
70
70
  aggregate_failures do
71
71
  expect(File.exist?(rails_root / "app" / "controllers" / "api" / "api_controller.rb")).to eq(true)
72
- expect(rails_root / "Gemfile").to contain_gem("apitome")
73
72
  expect(rails_root / "Gemfile").to contain_gem("rspec_api_documentation")
74
73
  expect(rails_root / "config" / "routes.rb").to have_route(namespace: :api, module_scope: :v1, resource: 'ping')
75
74
  expect(rails_root / "config" / "routes.rb").to have_route(namespace: :api, module_scope: :v2, resource: 'ping')
76
- expect(rails_root / "config" / "routes.rb").to have_mounted_engine("Apitome::Engine")
77
75
  migrations = Dir["#{rails_root}/db/migrate/*.rb"].sort
78
76
  expect(migrations.size).to eq(2)
79
77
  expect(migrations[0]).to match(/\/\d+_enable_uuid_ossp_extension.rb/)
@@ -81,8 +79,6 @@ RSpec.describe "Adding Stitches to a New Rails App", :integration do
81
79
  expect(File.read(rails_root / "spec" / "rails_helper.rb")).to include("config.include RSpec::Rails::RequestExampleGroup, type: :feature")
82
80
  expect(File.read(rails_root / "spec" / "rails_helper.rb")).to include("require 'stitches/spec'")
83
81
  expect(File.read(rails_root / "spec" / "rails_helper.rb")).to include("require 'rspec_api_documentation'")
84
- expect(File.read(rails_root / "config" / "initializers" / "apitome.rb")).to include("config.mount_at = nil")
85
- expect(File.read(rails_root / "config" / "initializers" / "apitome.rb")).to include("config.title = 'Service Documentation'")
86
82
  expect(File.read(rails_root / "app" / "controllers" / "api" / "api_controller.rb")).to include("rescue_from StandardError")
87
83
  expect(File.read(rails_root / "app" / "controllers" / "api" / "api_controller.rb")).to include("rescue_from ActiveRecord::RecordNotFound")
88
84
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stitches
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.1
4
+ version: 4.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stitch Fix Engineering
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-09-20 00:00:00.000000000 Z
14
+ date: 2021-10-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -251,7 +251,6 @@ files:
251
251
  - spec/fake_app/db/schema_modern.rb
252
252
  - spec/fake_app/db/seeds.rb
253
253
  - spec/fake_app/db/test.sqlite3
254
- - spec/fake_app/doc/api.md
255
254
  - spec/fake_app/lib/tasks/generate_api_key.rake
256
255
  - spec/fake_app/public/404.html
257
256
  - spec/fake_app/public/422.html
@@ -293,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
293
292
  - !ruby/object:Gem::Version
294
293
  version: '0'
295
294
  requirements: []
296
- rubygems_version: 3.2.20
295
+ rubygems_version: 3.1.4
297
296
  signing_key:
298
297
  specification_version: 4
299
298
  summary: You'll be in stitches at how easy it is to create a service at Stitch Fix
@@ -352,7 +351,6 @@ test_files:
352
351
  - spec/fake_app/db/schema_modern.rb
353
352
  - spec/fake_app/db/seeds.rb
354
353
  - spec/fake_app/db/test.sqlite3
355
- - spec/fake_app/doc/api.md
356
354
  - spec/fake_app/lib/tasks/generate_api_key.rake
357
355
  - spec/fake_app/public/404.html
358
356
  - spec/fake_app/public/422.html
@@ -1,4 +0,0 @@
1
- Apitome Documentation
2
- =====================
3
-
4
- This file was automatically generated, and can be found at `doc/api.md`.