hybridgroup / rubyserial

FFI Ruby library for RS-232 serial port communication
https://rubygems.org/gems/rubyserial
Other
154 stars 27 forks source link

Allow enabling parity on posix systems #34

Closed donv closed 8 years ago

donv commented 8 years ago

We use rubyserial with RS485 where EVEN parity is enabled. With the changes in this PR, it works well on both OS X and Linux (on a Raspberry PI 3).

I don't have any documentation for Windows, so I have not added the feature there. I added a warning if someone tries to use parity on Windows.

I added a spec for using the parity option.

Finally I updated the README with usage for parity and listed the default.

Hopefully this can be merged and released 😄 .

donv commented 8 years ago

The test failure is due to an unbounded json version resolves to version 2.0.1 which requires Ruby 2.0+. This is unrelated to the PR.

The solution is to bind json to version '<2', at least when testing Ruby 1.9.3. Do you want me to add that?

hunterboerner commented 8 years ago

@deadprogram ^

deadprogram commented 8 years ago

Hi, @donv

Since Ruby 1.9.3 is now considered end of life, should be perhaps just discontinue support for it? @hunterboerner any opinion on that?

hunterboerner commented 8 years ago

@deadprogram

image

donv commented 8 years ago

Whether Ruby 1.9.3 support should be discontinued is outside this PR. I am happy to help with that inside or outside this PR, but my first priority is getting this PR merged.

donv commented 8 years ago

Added PR #35 to solve the Ruby 1.9.3 issue.

deadprogram commented 8 years ago

Thanks very much @donv

donv commented 8 years ago

Thanks!

donv commented 8 years ago

And thanks for the release!