From 50147eae4272449b71639bee551616dec548e85d Mon Sep 17 00:00:00 2001 From: Jared White Date: Sun, 18 Aug 2024 10:00:59 -0700 Subject: [PATCH] fix: resolve install issues with Bundler by making `bridgetown-foundation` a direct dependency of `bridgetown`, relocating versioning responsibility to foundation gem --- Gemfile.lock | 23 ++++++++++--------- bridgetown-builder/bridgetown-builder.gemspec | 2 +- bridgetown-builder/lib/bridgetown-builder.rb | 1 - bridgetown-core/bridgetown-core.gemspec | 2 +- .../bridgetown-foundation.gemspec | 4 ++-- .../lib/bridgetown-foundation.rb | 2 +- .../lib/bridgetown/foundation/version.rb | 8 ------- .../lib/bridgetown}/version.rb | 2 +- .../bridgetown-paginate.gemspec | 2 +- .../lib/bridgetown-paginate.rb | 1 - bridgetown-routes/bridgetown-routes.gemspec | 2 +- bridgetown-website/Gemfile.lock | 23 ++++++++++--------- bridgetown/bridgetown.gemspec | 3 ++- bridgetown/lib/bridgetown.rb | 1 - 14 files changed, 34 insertions(+), 42 deletions(-) delete mode 100644 bridgetown-foundation/lib/bridgetown/foundation/version.rb rename {bridgetown-core/lib/bridgetown-core => bridgetown-foundation/lib/bridgetown}/version.rb (74%) diff --git a/Gemfile.lock b/Gemfile.lock index eb5dcd88c..fa9716e77 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,17 +1,17 @@ PATH remote: bridgetown-builder specs: - bridgetown-builder (2.0.0.beta1) - bridgetown-core (= 2.0.0.beta1) + bridgetown-builder (2.0.0.beta2) + bridgetown-core (= 2.0.0.beta2) PATH remote: bridgetown-core specs: - bridgetown-core (2.0.0.beta1) + bridgetown-core (2.0.0.beta2) activesupport (>= 6.0, < 8.0) addressable (~> 2.4) amazing_print (~> 1.2) - bridgetown-foundation (= 2.0.0.beta1) + bridgetown-foundation (= 2.0.0.beta2) csv (~> 3.2) dry-inflector (>= 1.0) erubi (~> 1.9) @@ -37,7 +37,7 @@ PATH PATH remote: bridgetown-foundation specs: - bridgetown-foundation (2.0.0.beta1) + bridgetown-foundation (2.0.0.beta2) hash_with_dot_access (~> 2.0) inclusive (~> 1.0) zeitwerk (~> 2.5) @@ -45,16 +45,17 @@ PATH PATH remote: bridgetown-paginate specs: - bridgetown-paginate (2.0.0.beta1) - bridgetown-core (= 2.0.0.beta1) + bridgetown-paginate (2.0.0.beta2) + bridgetown-core (= 2.0.0.beta2) PATH remote: bridgetown specs: - bridgetown (2.0.0.beta1) - bridgetown-builder (= 2.0.0.beta1) - bridgetown-core (= 2.0.0.beta1) - bridgetown-paginate (= 2.0.0.beta1) + bridgetown (2.0.0.beta2) + bridgetown-builder (= 2.0.0.beta2) + bridgetown-core (= 2.0.0.beta2) + bridgetown-foundation (= 2.0.0.beta2) + bridgetown-paginate (= 2.0.0.beta2) GEM remote: https://rubygems.org/ diff --git a/bridgetown-builder/bridgetown-builder.gemspec b/bridgetown-builder/bridgetown-builder.gemspec index fa8768a8d..3d7b9c69f 100644 --- a/bridgetown-builder/bridgetown-builder.gemspec +++ b/bridgetown-builder/bridgetown-builder.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "../bridgetown-core/lib/bridgetown-core/version" +require_relative "../bridgetown-foundation/lib/bridgetown/version" Gem::Specification.new do |spec| spec.name = "bridgetown-builder" diff --git a/bridgetown-builder/lib/bridgetown-builder.rb b/bridgetown-builder/lib/bridgetown-builder.rb index ae6969775..cdb7ea2e2 100644 --- a/bridgetown-builder/lib/bridgetown-builder.rb +++ b/bridgetown-builder/lib/bridgetown-builder.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require "bridgetown-core" -require "bridgetown-core/version" module Bridgetown module Builders diff --git a/bridgetown-core/bridgetown-core.gemspec b/bridgetown-core/bridgetown-core.gemspec index e26b04f81..378764cee 100644 --- a/bridgetown-core/bridgetown-core.gemspec +++ b/bridgetown-core/bridgetown-core.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "lib/bridgetown-core/version" +require_relative "../bridgetown-foundation/lib/bridgetown/version" Gem::Specification.new do |s| s.name = "bridgetown-core" diff --git a/bridgetown-foundation/bridgetown-foundation.gemspec b/bridgetown-foundation/bridgetown-foundation.gemspec index 9145f72a9..258562947 100644 --- a/bridgetown-foundation/bridgetown-foundation.gemspec +++ b/bridgetown-foundation/bridgetown-foundation.gemspec @@ -1,10 +1,10 @@ # frozen_string_literal: true -require_relative "lib/bridgetown/foundation/version" +require_relative "lib/bridgetown/version" Gem::Specification.new do |spec| spec.name = "bridgetown-foundation" - spec.version = Bridgetown::Foundation::VERSION + spec.version = Bridgetown::VERSION spec.author = "Bridgetown Team" spec.email = "maintainers@bridgetownrb.com" spec.summary = "Ruby language extensions and other utilities useful for the Bridgetown ecosystem" diff --git a/bridgetown-foundation/lib/bridgetown-foundation.rb b/bridgetown-foundation/lib/bridgetown-foundation.rb index d4c62c179..9cbec1022 100644 --- a/bridgetown-foundation/lib/bridgetown-foundation.rb +++ b/bridgetown-foundation/lib/bridgetown-foundation.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "bridgetown/foundation/version" +require "bridgetown/version" require "hash_with_dot_access" require "inclusive" require "zeitwerk" diff --git a/bridgetown-foundation/lib/bridgetown/foundation/version.rb b/bridgetown-foundation/lib/bridgetown/foundation/version.rb deleted file mode 100644 index 78e8add8b..000000000 --- a/bridgetown-foundation/lib/bridgetown/foundation/version.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -module Bridgetown - module Foundation - # TODO: should we define versions here now and pull it within Core? - VERSION = "2.0.0.beta1" - end -end diff --git a/bridgetown-core/lib/bridgetown-core/version.rb b/bridgetown-foundation/lib/bridgetown/version.rb similarity index 74% rename from bridgetown-core/lib/bridgetown-core/version.rb rename to bridgetown-foundation/lib/bridgetown/version.rb index 1e819f323..8fbc055bd 100644 --- a/bridgetown-core/lib/bridgetown-core/version.rb +++ b/bridgetown-foundation/lib/bridgetown/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module Bridgetown - VERSION = "2.0.0.beta1" + VERSION = "2.0.0.beta2" CODE_NAME = "(TBD!)" end diff --git a/bridgetown-paginate/bridgetown-paginate.gemspec b/bridgetown-paginate/bridgetown-paginate.gemspec index d5f7014f0..ec151e03e 100644 --- a/bridgetown-paginate/bridgetown-paginate.gemspec +++ b/bridgetown-paginate/bridgetown-paginate.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "../bridgetown-core/lib/bridgetown-core/version" +require_relative "../bridgetown-foundation/lib/bridgetown/version" Gem::Specification.new do |spec| spec.name = "bridgetown-paginate" diff --git a/bridgetown-paginate/lib/bridgetown-paginate.rb b/bridgetown-paginate/lib/bridgetown-paginate.rb index c62fa777a..8f4520052 100644 --- a/bridgetown-paginate/lib/bridgetown-paginate.rb +++ b/bridgetown-paginate/lib/bridgetown-paginate.rb @@ -8,7 +8,6 @@ ################################################# require "bridgetown-core" -require "bridgetown-core/version" module Bridgetown module Paginate diff --git a/bridgetown-routes/bridgetown-routes.gemspec b/bridgetown-routes/bridgetown-routes.gemspec index 47e243242..2b416ba50 100644 --- a/bridgetown-routes/bridgetown-routes.gemspec +++ b/bridgetown-routes/bridgetown-routes.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "../bridgetown-core/lib/bridgetown-core/version" +require_relative "../bridgetown-foundation/lib/bridgetown/version" Gem::Specification.new do |spec| spec.name = "bridgetown-routes" diff --git a/bridgetown-website/Gemfile.lock b/bridgetown-website/Gemfile.lock index 60917ce2a..6dfd123c0 100644 --- a/bridgetown-website/Gemfile.lock +++ b/bridgetown-website/Gemfile.lock @@ -1,17 +1,17 @@ PATH remote: ../bridgetown-builder specs: - bridgetown-builder (2.0.0.beta1) - bridgetown-core (= 2.0.0.beta1) + bridgetown-builder (2.0.0.beta2) + bridgetown-core (= 2.0.0.beta2) PATH remote: ../bridgetown-core specs: - bridgetown-core (2.0.0.beta1) + bridgetown-core (2.0.0.beta2) activesupport (>= 6.0, < 8.0) addressable (~> 2.4) amazing_print (~> 1.2) - bridgetown-foundation (= 2.0.0.beta1) + bridgetown-foundation (= 2.0.0.beta2) csv (~> 3.2) dry-inflector (>= 1.0) erubi (~> 1.9) @@ -37,7 +37,7 @@ PATH PATH remote: ../bridgetown-foundation specs: - bridgetown-foundation (2.0.0.beta1) + bridgetown-foundation (2.0.0.beta2) hash_with_dot_access (~> 2.0) inclusive (~> 1.0) zeitwerk (~> 2.5) @@ -45,16 +45,17 @@ PATH PATH remote: ../bridgetown-paginate specs: - bridgetown-paginate (2.0.0.beta1) - bridgetown-core (= 2.0.0.beta1) + bridgetown-paginate (2.0.0.beta2) + bridgetown-core (= 2.0.0.beta2) PATH remote: ../bridgetown specs: - bridgetown (2.0.0.beta1) - bridgetown-builder (= 2.0.0.beta1) - bridgetown-core (= 2.0.0.beta1) - bridgetown-paginate (= 2.0.0.beta1) + bridgetown (2.0.0.beta2) + bridgetown-builder (= 2.0.0.beta2) + bridgetown-core (= 2.0.0.beta2) + bridgetown-foundation (= 2.0.0.beta2) + bridgetown-paginate (= 2.0.0.beta2) GEM remote: https://rubygems.org/ diff --git a/bridgetown/bridgetown.gemspec b/bridgetown/bridgetown.gemspec index 80c8f49da..137150561 100644 --- a/bridgetown/bridgetown.gemspec +++ b/bridgetown/bridgetown.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -require_relative "../bridgetown-core/lib/bridgetown-core/version" +require_relative "../bridgetown-foundation/lib/bridgetown/version" Gem::Specification.new do |s| s.name = "bridgetown" @@ -26,6 +26,7 @@ Gem::Specification.new do |s| s.add_dependency("bridgetown-builder", Bridgetown::VERSION) s.add_dependency("bridgetown-core", Bridgetown::VERSION) + s.add_dependency("bridgetown-foundation", Bridgetown::VERSION) s.add_dependency("bridgetown-paginate", Bridgetown::VERSION) s.metadata["rubygems_mfa_required"] = "true" end diff --git a/bridgetown/lib/bridgetown.rb b/bridgetown/lib/bridgetown.rb index d7d2c0c55..2ac562158 100644 --- a/bridgetown/lib/bridgetown.rb +++ b/bridgetown/lib/bridgetown.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true require "bridgetown-core" -require "bridgetown-core/version" # Load additional monorepo gems require "bridgetown-builder"