Skip to content

Re-organize namespaces; Do not autoload; Fix typo #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2025
Merged

Re-organize namespaces; Do not autoload; Fix typo #18

merged 3 commits into from
Jun 3, 2025

Conversation

tangrufus
Copy link
Member

No description provided.

@tangrufus tangrufus requested a review from Copilot June 3, 2025 20:55
Copilot

This comment was marked as outdated.

@tangrufus tangrufus changed the title Re-organize namespaces; Do not autoload Re-organize namespaces; Do not autoload; Fix typo Jun 3, 2025
@tangrufus tangrufus requested a review from Copilot June 3, 2025 21:06
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR reorganizes namespaces, removes autoload usage for helper modules, and fixes a typo in console output abbreviation.

  • Re-organizes test and library namespaces under Rails::AppEnv
  • Replaces autoload directives with explicit require_relative calls
  • Updates test descriptions to correctly reflect production environment abbreviations

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/units/app_env/extensions/rails/app_env_aware_test.rb Adds tests for app_env resolution with both APP_ENV and Rails.env
test/units/app_env/extensions/application/app_configurable_test.rb Adds tests for delegated configuration retrieval
test/units/app_env/environment_inquirer_test.rb Updates test naming for instance methods within a module wrapper
test/units/app_env/credentials_test.rb Updates credentials tests to reference Credentials consistently
test/units/app_env/console_test.rb Updates console tests and fixes typo for production abbreviation
lib/rails/rails_ext/credentials_command.rb Removes autoloaded credentials command extension
lib/rails/app_env/version.rb Bumps version from 0.2.0 to 0.3.0
lib/rails/app_env/railtie.rb Updates railtie to extend new modules
lib/rails/app_env/rails_helpers.rb
lib/rails/app_env/application_helpers.rb
Removes autoload helper modules
lib/rails/app_env/extensions/rails/app_env_aware.rb
lib/rails/app_env/extensions/credentials_command/original_aware.rb
lib/rails/app_env/extensions/application/app_configurable.rb
Introduces extension-based implementations for app_env and app configuration
lib/rails/app_env/credentials.rb Adds guard clause in monkey_patch and updates references accordingly
lib/rails/app_env.rb Removes autoload directives and explicitly requires dependent files
Comments suppressed due to low confidence (4)

lib/rails/app_env.rb:16

  • [nitpick] The removal of autoload for ApplicationHelpers is clear; ensure the module documentation and developer guides are updated to reflect these changes.
autoload :ApplicationHelpers, "rails/app_env/application_helpers"

lib/rails/app_env/credentials.rb:41

  • [nitpick] Consider adding an inline comment explaining the guard clause to clarify its purpose and help future maintainers understand why extension is skipped when CredentialsCommand is not defined.
return unless defined?(Rails::Command::CredentialsCommand)

test/units/app_env/environment_inquirer_test.rb:3

  • [nitpick] The namespace change to use a module wrapper for EnvironmentInquirer improves clarity; please verify that similar naming conventions are consistently applied across all test files.
module Rails::AppEnv

test/units/app_env/console_test.rb:29

  • Ensure that the abbreviation 'prod' accurately reflects the intended behavior across both tests and production code; update the implementation if necessary for consistency.
test "#colorized_env shorten Rails.app_env to prod when Rails.app_env is production" do

@tangrufus tangrufus merged commit f4c412d into main Jun 3, 2025
8 checks passed
@tangrufus tangrufus deleted the ext branch June 3, 2025 21:08
@tangrufus tangrufus deployed to rubygems.org June 3, 2025 21:08 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant