solidusio-contrib / solidus_easypost

:envelope: Solidus integration with EasyPost.
BSD 3-Clause "New" or "Revised" License
13 stars 23 forks source link

README is incompatible with latest rubygems release #73

Closed brchristian closed 4 years ago

brchristian commented 4 years ago

If I install this extension using the latest RubyGems release, like so...

gem 'solidus_easypost'

...and then try to follow the README, I cannot:

NameError:
  uninitialized constant EasyPost
# ./config/initializers/easy_post.rb:1:in `<top (required)>'

I notice that neither EasyPost nor SolidusEasypost are available in the Rails console.

I believe that this is because of https://github.com/solidusio-contrib/solidus_easypost/commit/f12aeff18ef4c3daf262c5ee28dd172a43bcf6e7, which changed a bunch of the namespacing.

This is very confusing for new users.

My recommendation is that we do one or more of these three things:

  1. Make a new RubyGems release that incorporates https://github.com/solidusio-contrib/solidus_easypost/commit/f12aeff18ef4c3daf262c5ee28dd172a43bcf6e7.

  2. Say somewhere in the readme that the setup has changed significantly in the master branch since the last RubyGems release.

  3. Revert https://github.com/solidusio-contrib/solidus_easypost/commit/f12aeff18ef4c3daf262c5ee28dd172a43bcf6e7. (I happen to not be a big fan of this commit, because the convention of high-level namespaces unique to an extension, e.g., SolidusEasypost, is not consistent with other Solidus extensions.)

I think we should probably do one of these three things, because currently it is very confusing to try to set up this extension.

aldesantis commented 4 years ago

@brchristian I agree that we should release a new version — I'll take care of this on Friday, sorry for the confusion. I will also add an explanation to the readme so people know they need to look at the right version of the readme.

However, I don't agree we should revert https://github.com/solidusio-contrib/solidus_easypost/commit/f12aeff18ef4c3daf262c5ee28dd172a43bcf6e7. While I know that extension namespacing is not currently consistent, the preferred standard is to namespace everything under the gem's name rather than a generic Spree or Solidus namespace, in order to avoid potential conflicts with other gems/extensions.

With that said, I don't know what's up with the EasyPost namespace not being available. That's provided by the Ruby EasyPost SDK, not by this Solidus extension. Have you checked if perhaps you're on an old version of the easypost gem for some reason?

aldesantis commented 4 years ago

@brchristian FYI I don't have access to this extension on RubyGems. I sent @brendandeere an email and will release a new version as soon as possible. 🙏

aldesantis commented 4 years ago

@brchristian I have just released 2.0.0 of the gem.

Please note that I have also updated the syntax to configure the extension in the process, to bring it up to date with the standard we're following in other extensions. Everything's documented in the readme.

Thanks for your patience!