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
Rename Zip module to RubyZip #132
Comments
Example of libs what provide same ::Zip namespace please. If you talking about zipruby then you need understand what latest version of zipruby was 4 years ago. |
See also: danmunn/redmine_dmsf#110 Please keep in mind that, while I'm free to choose which zip gem to use in my projects, I can't hunt down all the authors of other gems I use and force them to switch to rubyzip. Namespace poisoning is not a good practice, and "our project is the most active" is actually a good reason to utilize best practices rather than resist them. |
zip gem is outdate. No sence to use it. rubyzip supports 1.9.x and 2.x. |
If I am not wrong, not having a namespace is causing a conflict in our project where we have a Zip model. (which denotes a zipcode) |
We are using https://github.com/Constellation/crxmake which requires zip gem. This is causing a namespace conflict in another gem that is trying to use rubyzip. Do you have a fix for this issue that I could implement? |
The rawr gem conflicts as well. |
I have forked and renamed the module to RubyZip to work around my rawr conflict. Others may find this useful. I will create a PR, in the events the owners may be interested. |
Sorry @simonoff but this is a best practice for a reason. Having your gem namespaced to its own name avoids conflicts, it doesn't even matter if another gem defined the Zip module. Not trying to be condescending by linking this, but it's very clear that this is against the ruby gems conventions http://guides.rubygems.org/name-your-gem/ |
I realise that it is a massive pain to rename the top-level module but I agree it should be done. How about doing it for version 2? Semantic Versioning allows/encourages this. The API was changed in a non-backwards compatible way for version 1 ( |
@lblackburn I understand your idea. But! |
Anything on this? This is causing me issues as well. Sure, zipruby may be unmaintained as you say, but that doesn't mean existing apps aren't using it, or that there aren't other gems depending on it that people may be using. |
Much better to ask the owner of the unmaintained Gems are still versioned, so as long as the major version is switched it would be no different than other breaking changes (in other words, replacing the entire underlying library for a gem is not different from other types of breaking changes). |
Just got bitten by this, added Agree with others who said that the top-level class in |
I think the top level class should be Rubyzip (not RubyZip). |
+1 I have a Zip model. When executing Rails.application.eager_load! I got this error:
What are your thoughts on this change? If there's anything I can do, I'd love to help. |
This gem is missing a To work around this, you can declare the gem like this:
|
Gems that include
rubyzip
conflict with gems that includezip
since both call their main moduleZip
. A way to separate the two is absolutely necessary if we want to avoid dirty hackery to the tune of:Note that the main include file should also be renamed to
rubyzip.rb
, otherwise loading the right gem also turns into a Russian roulette game.The text was updated successfully, but these errors were encountered: