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

Support EventMachine 1.0.4+ or EventMachine-LE #1

Merged

Conversation

antifuchs
Copy link
Contributor

Vanilla EventMachine 1.0.4 and above now support attach_server, so I think this gem should support it. Sadly, there's no good way in Rubygems specs to express a requirement on two different, and differently-versioned gems that do the ~same thing, so I believe this may be the next best thing /-:

Hope this is good, happy to make revisions if not (:

Since e4445e00c1c7c78d98b47b8c025631050bffb87f, regular EventMachine has
supported attach_server and attach_socket_server. This change allows
people to use this gem together with either EventMachine-LE or regular
EventMachine, provided it's recent enough.

Since rubygems has no way of expressing what we want to do in the
Gemspec, this change adjusts the spec to express the requirement in
human-readable words, and adds a load-time check to ensure whichever
EventMachine is in use is able to support this extension.
@ConradIrwin
Copy link
Owner

This seems good to me. The requirements field is just plain text that users have to parse?

It's probably fine to not explicitly depend on event machine, but it would be good to document the additional dependency in the readme's installation section.

On a vague note, I've often wondered if there could be a package manager where dependencies are declared as 'interfaces' and gems as 'implementations' (one gem could implement many interfaces); which would avoid problems like this, though that would no doubt come with a host of other issues.

@antifuchs
Copy link
Contributor Author

Yep, requirements is plain text (I think it ends up being kinda useless, but I believe it does get shown on rubygems.org - better than nothing!).

Agreed to the README change - have pushed a proposed doc update.

And also agreed on the dependency management thing; I'd love to have an or dependency in gems... or optional dependencies and conflicts (which would be super useful for us, right here).

ConradIrwin added a commit that referenced this pull request Aug 2, 2015
Support EventMachine 1.0.4+ or EventMachine-LE
@ConradIrwin ConradIrwin merged commit ee7ef6b into ConradIrwin:master Aug 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants