solidusio / solidus_braintree

💳 Integrate Solidus with Braintree
https://www.braintreepayments.com/
BSD 3-Clause "New" or "Revised" License
19 stars 55 forks source link

Remove SolidusBraintree::Spree namespace #155

Closed mamhoff closed 2 months ago

mamhoff commented 2 months ago

This namespace very effectively hinders access to the root ::Spree namespace and would make require every reference to the Spree constant to be fully qualified.

Fixes the following build error:

exist  config/initializers
   identical  config/initializers/solidus_braintree.rb
        rake  railties:install:migrations FROM=solidus_braintree
         run  bin/rails db:migrate from "."
        gsub  config/routes.rb
/lib/generators/solidus_braintree/install/install_generator.rb:153:in `solidus_mount_point': uninitialized constant SolidusBraintree::Spree::Core (NameError)

        mount_point = Spree::Core::Engine.routes.find_script_name({})
                                 ^^^^^^^^
mamhoff commented 2 months ago

Add #156 in here to see if that fixes the build issues

tvdeyen commented 2 months ago

Let's wait for the tests to pass and then extract #156 so we get a dedicated changelog entry for the major version bump of the braintree gem.

tvdeyen commented 2 months ago

Thanks, I merged all the PRs necessary to make the build green again. Mind to rebase?

mamhoff commented 2 months ago

Done, thank you!