Skip to content

Commit

Permalink
Hoist rack-cors into the Gemfile of the starter repo (#1061)
Browse files Browse the repository at this point in the history
Previously we listed `rack-cors` as a hard dependency in the `core` gems, which meant that application developers were forced to include the gem even if they're not using the api. This makes it possible to remove `rack-cors` from the application completely.

Joint PR: bullet-train-co/bullet_train#1954

Fixes: #1050
  • Loading branch information
jagthedrummer authored Feb 19, 2025
1 parent c427d45 commit 6a7d4a3
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 36 deletions.
3 changes: 0 additions & 3 deletions bullet_train-api/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

GEM
Expand Down Expand Up @@ -325,8 +324,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
1 change: 0 additions & 1 deletion bullet_train-api/bullet_train-api.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Gem::Specification.new do |spec|
spec.add_dependency "rails", ">= 6.0.0"
spec.add_dependency "pagy", "~> 8"
spec.add_dependency "pagy_cursor"
spec.add_dependency "rack-cors"
spec.add_dependency "doorkeeper"
spec.add_dependency "jbuilder-schema", "~> 2.6.6"
spec.add_dependency "factory_bot"
Expand Down
1 change: 0 additions & 1 deletion bullet_train-api/lib/bullet_train/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# require "wine_bouncer"
require "pagy"
require "pagy_cursor"
require "rack/cors"
require "doorkeeper"
require "scaffolding"
require "scaffolding/block_manipulator"
Expand Down
1 change: 0 additions & 1 deletion bullet_train-api/lib/bullet_train/api/engine.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "pagy"
require "rack/cors"

module BulletTrain
module Api
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-fields/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -334,8 +333,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-incoming_webhooks/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -331,8 +330,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-integrations-stripe/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -357,8 +356,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (2.2.10)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-outgoing_webhooks/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -333,8 +332,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-sortable/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -331,8 +330,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-super_scaffolding/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -325,8 +324,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-themes-light/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -340,8 +339,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-themes-tailwind_css/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -332,8 +331,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train-themes/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -328,8 +327,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down
3 changes: 0 additions & 3 deletions bullet_train/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ PATH
jbuilder-schema (~> 2.6.6)
pagy (~> 8)
pagy_cursor
rack-cors
rails (>= 6.0.0)

PATH
Expand Down Expand Up @@ -357,8 +356,6 @@ GEM
pwned (2.4.1)
racc (1.8.1)
rack (3.1.8)
rack-cors (2.0.2)
rack (>= 2.0.0)
rack-protection (4.1.1)
base64 (>= 0.1.0)
logger (>= 1.6.0)
Expand Down

0 comments on commit 6a7d4a3

Please sign in to comment.