diff --git a/codegen/projections/rails_json/lib/rails_json.rb b/codegen/projections/rails_json/lib/rails_json.rb index 7eb8aa06..051d2b80 100644 --- a/codegen/projections/rails_json/lib/rails_json.rb +++ b/codegen/projections/rails_json/lib/rails_json.rb @@ -12,9 +12,6 @@ require_relative 'rails_json/builders' require_relative 'rails_json/client' require_relative 'rails_json/config' -begin - require_relative 'rails_json/customizations' -rescue LoadError; end require_relative 'rails_json/errors' require_relative 'rails_json/endpoint' require_relative 'rails_json/middleware' @@ -26,6 +23,9 @@ require_relative 'rails_json/types' require_relative 'rails_json/validators' require_relative 'rails_json/waiters' +begin + require_relative 'rails_json/customizations' +rescue LoadError; end module RailsJson VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip diff --git a/codegen/projections/rpcv2_cbor/lib/rpcv2_cbor.rb b/codegen/projections/rpcv2_cbor/lib/rpcv2_cbor.rb index 2e7e2263..58995bdf 100644 --- a/codegen/projections/rpcv2_cbor/lib/rpcv2_cbor.rb +++ b/codegen/projections/rpcv2_cbor/lib/rpcv2_cbor.rb @@ -12,9 +12,6 @@ require_relative 'rpcv2_cbor/builders' require_relative 'rpcv2_cbor/client' require_relative 'rpcv2_cbor/config' -begin - require_relative 'rpcv2_cbor/customizations' -rescue LoadError; end require_relative 'rpcv2_cbor/errors' require_relative 'rpcv2_cbor/endpoint' require_relative 'rpcv2_cbor/middleware' @@ -26,6 +23,9 @@ require_relative 'rpcv2_cbor/types' require_relative 'rpcv2_cbor/validators' require_relative 'rpcv2_cbor/waiters' +begin + require_relative 'rpcv2_cbor/customizations' +rescue LoadError; end module Rpcv2Cbor VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip diff --git a/codegen/projections/white_label/lib/white_label.rb b/codegen/projections/white_label/lib/white_label.rb index 9bfcbcf8..32ee6ff2 100644 --- a/codegen/projections/white_label/lib/white_label.rb +++ b/codegen/projections/white_label/lib/white_label.rb @@ -12,9 +12,6 @@ require_relative 'white_label/builders' require_relative 'white_label/client' require_relative 'white_label/config' -begin - require_relative 'white_label/customizations' -rescue LoadError; end require_relative 'white_label/errors' require_relative 'white_label/endpoint' require_relative 'white_label/middleware' @@ -27,6 +24,9 @@ require_relative 'white_label/validators' require_relative 'white_label/waiters' require_relative 'white_label/event_stream' +begin + require_relative 'white_label/customizations' +rescue LoadError; end module WhiteLabel VERSION = File.read(File.expand_path('../VERSION', __dir__)).strip diff --git a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/ModuleGenerator.java b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/ModuleGenerator.java index 68da831a..7d798168 100644 --- a/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/ModuleGenerator.java +++ b/codegen/smithy-ruby-codegen/src/main/java/software/amazon/smithy/ruby/codegen/generators/ModuleGenerator.java @@ -32,7 +32,7 @@ public class ModuleGenerator { Logger.getLogger(ModuleGenerator.class.getName()); private static final String[] DEFAULT_REQUIRES = { - "auth", "builders", "client", "config", "customizations", "errors", "endpoint", "middleware", + "auth", "builders", "client", "config", "errors", "endpoint", "middleware", "paginators", "params", "parsers", "stubs", "telemetry", "types", "validators", "waiters" }; @@ -71,20 +71,18 @@ public void render() { })); for (String require : DEFAULT_REQUIRES) { - if (require.equals("customizations")) { - writer - .openBlock("begin") - .write("require_relative '$L/customizations'", settings.getGemName()) - .closeBlock("rescue LoadError; end"); - } else { - writer.write("require_relative '$L/$L'", settings.getGemName(), require); - } + writer.write("require_relative '$L/$L'", settings.getGemName(), require); } if (context.eventStreamTransport().isPresent()) { writer.write("require_relative '$L/event_stream'", settings.getGemName()); } + writer + .openBlock("begin") + .write("require_relative '$L/customizations'", settings.getGemName()) + .closeBlock("rescue LoadError; end"); + for (String require : additionalFiles) { writer.write("require_relative '$L'", require); }