Skip to content
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

Namespace should match the gem name #10

Closed
estebanz01 opened this issue Oct 17, 2017 · 5 comments
Closed

Namespace should match the gem name #10

estebanz01 opened this issue Oct 17, 2017 · 5 comments

Comments

@estebanz01
Copy link
Owner

Per this thread: https://www.reddit.com/r/ruby/comments/76vse9/rubystatistics_a_gem_for_statistical_methods_and/

It's important to have a match between the gem name and the global namespace defined. I tried to move it, but It broke all my specs and the paths didn't load as desired.

@pboling
Copy link

pboling commented Aug 11, 2023

Related to this issue, in the readme, the gem that we install is called ruby-statistics, but the readme says under "Basic Usage":

just require the statistics gem in order to load it

What is the statistics gem?

@estebanz01
Copy link
Owner Author

Hola @pboling ! that's not a gem, but the name of a namespace defined here: https://github.com/estebanz01/ruby-statistics/blob/master/lib/statistics.rb

This issue is specifically to address the mismatch: ruby-statistics gem should use a namespace of RubyStatistics instead of Statistics.

the readme and the examples in the wiki, is telling you that if you require 'statistics', then you can use the gem as expected.

Hope it helps!

@pboling
Copy link

pboling commented Aug 15, 2023

that's not a gem, but the name of a namespace defined here

Right, I mentioned it because the README says it is a gem, but it isn't. Very confusing.

I figured out that it should be added like this to a project using a Gemfile:

gem 'ruby-statistics`, require: 'statistics'

That's probably what the readme should say.

@estebanz01
Copy link
Owner Author

well, that requires the gem in the entire project, sometimes you don't want that, you might want to use only the distributions or only an specific class.

Thanks for the feedback. I'll try to come up with better wording for the README.

@estebanz01 estebanz01 moved this to To-Do in Statistics Oct 17, 2023
@estebanz01 estebanz01 moved this from To-Do to Bugs in Statistics Oct 17, 2023
@estebanz01 estebanz01 moved this from Bugs to In Progress in Statistics Jan 22, 2024
@estebanz01 estebanz01 moved this from In Progress to Done in Statistics May 12, 2024
@estebanz01
Copy link
Owner Author

Resolved in #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants