serialport 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZjZlYWM2MWEwMTFiMzQyMTQ4OTI2Y2Q2ZDA2ZmQyMGFiMzdlZmZiMA==
5
- data.tar.gz: !binary |-
6
- NDcwYjNlODBiMzQ5NTlkYjZmMzMwZTNjN2NkMjEyMDJhMzc4YzhkZQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- Yzk4ZTYxNmY4YjViZDEyYjZjMWRiN2EwZDQ0MWVhNDQxMTFhMWRjZTg0YWY0
10
- OTM3YmY1NjNlMjU0MGFkOGE1YTZkNTdhMGFhOTgxMDA0MzZjN2VmOGM3MGYy
11
- ZjE2NjdlM2UzYWYzYzBlMjA4NzlkNjFmNWYzNGY5NDcyYWUwNjk=
12
- data.tar.gz: !binary |-
13
- MjQ3NzM5ZWQ5NTkyZWY2MGEzMmVmNmQzZTA5M2U2NjM1YzU5OGM5MWRiNGQ0
14
- OTQzZThlNWVlNThhNjc4MDk0OTNmOWI3ZDQxYTg5ZjdkNjJmY2E0ZGZkNDNj
15
- ZTdjMDAyMjhlZWEyYTkzNWI5YjU4Y2QxZGUxYWYyMjlmMzQ1MmU=
2
+ SHA1:
3
+ metadata.gz: 7c285a09940b43a2a41d00aaf156ad52794b5df2
4
+ data.tar.gz: fe69bc91dc9ccee030fd28652a5f477a8bca2a20
5
+ SHA512:
6
+ metadata.gz: 42463bdf6563e70568ea2ceaed838a6aad0d38ede6f86e39cfa069cfacd75b74d3f2eaf7de008d07c1ef0198a1db6971e9a0733ced57ec3eb5f61f9cda5ed8e5
7
+ data.tar.gz: 1af3cf576b93dd9411ba3e96365c43a56bf46163262997b0d5e09a0e473f2e591150ca5db8e0ba092f9f84bae0ff47a71586b49c7ce707b463868cb1bb910078
data/.gitignore CHANGED
@@ -7,9 +7,10 @@
7
7
  /ext/native/*.o
8
8
  /ext/native/*.so
9
9
  /ext/native/Makefile
10
+ lib/*.so
10
11
  .*.swp
11
12
  tags
12
13
  *.gem
13
14
  *.bundle
14
15
  Gemfile.lock
15
- .yardoc
16
+ .yardoc
data/CHANGELOG CHANGED
@@ -1,32 +1,35 @@
1
+ 1.3.1 => 07/26/2014: [FIXED] Ruby 2.2 support
2
+ [NEW] UNIX MARK/SPACE parity (CMSPAR) support
3
+
1
4
  1.3.0 => 11/17/2013: [NEW] flush_input() and flush_output() methods [Manuel A. Güílamo (MaG)]
2
5
 
3
- 1.2.3 => 11/04/2013: [FIXED] Improved documentation (yard)
6
+ 1.2.3 => 11/04/2013: [FIXED] Improved documentation (yard)
4
7
 
5
- 1.2.2 => 11/03/2013: [FIXED] warning: already initialized constant VERSION
8
+ 1.2.2 => 11/03/2013: [FIXED] warning: already initialized constant VERSION
6
9
 
7
- 1.2.1 => 10/25/2013: [FIXED] removed absurd circular dependency
10
+ 1.2.1 => 10/25/2013: [FIXED] removed absurd circular dependency
8
11
 
9
- 1.2.0 => 10/25/2013: [NEW] rake-compiler, bundler, and travis ci integration
12
+ 1.2.0 => 10/25/2013: [NEW] rake-compiler, bundler, and travis ci integration
10
13
 
11
- 1.1.0 => 05/14/2012: [NEW] Ruby 2.0 Support [Aaron Patterson (tenderlove)]
14
+ 1.1.0 => 05/14/2012: [NEW] Ruby 2.0 Support [Aaron Patterson (tenderlove)]
12
15
  [FIXED] Support for baud rates up to 1000000 in Windows [Will Koehler (willkoehler)]
13
16
 
14
- 1.0.4 => 07/17/2010: [FIXED] [Windows] No longer restricted to specific bitrates
15
- [FIXED] [Windows] Removed potentially insecure sprintf() use
16
- [FIXED] [Windows] Workaround for rb_sys_fail not checking GetLastError()
17
-
18
- 1.0.3 => 04/08/2010: [FIXED] [Windows] Could not specify 10 or "COM10" or higher
19
- [FIXED] [Windows] Warning passing INT instead of LONG to GetCommModemStatus
17
+ 1.0.4 => 07/17/2010: [FIXED] [Windows] No longer restricted to specific bitrates
18
+ [FIXED] [Windows] Removed potentially insecure sprintf() use
19
+ [FIXED] [Windows] Workaround for rb_sys_fail not checking GetLastError()
20
+
21
+ 1.0.3 => 04/08/2010: [FIXED] [Windows] Could not specify 10 or "COM10" or higher
22
+ [FIXED] [Windows] Warning passing INT instead of LONG to GetCommModemStatus
20
23
 
21
- 1.0.2 => 04/06/2010: [FIXED] Passing a block into open did not properly handle a return from within the block
24
+ 1.0.2 => 04/06/2010: [FIXED] Passing a block into open did not properly handle a return from within the block
22
25
 
23
- 1.0.1 => 01/20/2010: [FIXED] Conditional RB_SERIAL_EXPORT needed for Visual Studio bonked GCC
26
+ 1.0.1 => 01/20/2010: [FIXED] Conditional RB_SERIAL_EXPORT needed for Visual Studio bonked GCC
24
27
 
25
28
  1.0.0 => 01/12/2010: [FIXED] x86_64 segmentation faults
26
- [NEW] Windows Ruby 1.9 support
29
+ [NEW] Windows Ruby 1.9 support
27
30
 
28
31
  0.7.4 => 10/12/2009: [NEW] Conditional 1.8.6 & 1.9 support (POSIX only).
29
- [NEW] MinGW support.
32
+ [NEW] MinGW support.
30
33
 
31
34
  0.7.3 => 10/09/2009: [NEW] POSIX Ruby 1.9 support
32
35
 
data/README.md CHANGED
@@ -8,6 +8,8 @@ Ruby/SerialPort is a Ruby library that provides a class for using RS-232 serial
8
8
 
9
9
  The native Windows version of this library supports the Microsoft Visual C++, Borland C++, and MinGW compilers.
10
10
 
11
+ There is an alternative gem with MRI, JRuby, and Rubinius support. See below.
12
+
11
13
  ## Installation
12
14
 
13
15
  Install the gem as normal: `sudo gem install serialport`
@@ -24,6 +26,10 @@ See <http://rubydoc.info/gems/serialport/SerialPort> or run `yard`
24
26
 
25
27
  See <https://github.com/hparra/ruby-serialport/issues>
26
28
 
29
+ ## Alternatives
30
+
31
+ The [Hybrid Group](http://hybridgroup.com/)'s MRI, JRuby, & Rubinius compatible [rubyserial](https://github.com/hybridgroup/rubyserial) gem may provide improved compatibilty in modern environments.
32
+
27
33
  ## License
28
34
 
29
35
  GPL
@@ -34,4 +40,4 @@ GPL
34
40
  * Alan Stern <stern@rowland.harvard.edu>
35
41
  * Tobin Richard <tobin.richard@gmail.com>
36
42
  * Hector Parra <hector@hectorparra.com>
37
- * Ryan C. Payne <rpayne-oss@bullittsystems.com>
43
+ * Ryan C. Payne <rpayne-oss@bullittsystems.com>
@@ -126,8 +126,7 @@ VALUE sp_create_impl(class, _port)
126
126
  break;
127
127
 
128
128
  case T_STRING:
129
- Check_SafeStr(_port);
130
- port = RSTRING_PTR(_port);
129
+ port = StringValueCStr(_port);
131
130
  break;
132
131
 
133
132
  default:
@@ -353,15 +352,38 @@ VALUE sp_set_modem_params_impl(argc, argv, self)
353
352
  case EVEN:
354
353
  params.c_cflag |= PARENB;
355
354
  params.c_cflag &= ~PARODD;
355
+ #ifdef CMSPAR
356
+ params.c_cflag &= ~CMSPAR;
357
+ #endif
356
358
  break;
357
359
 
358
360
  case ODD:
359
361
  params.c_cflag |= PARENB;
360
362
  params.c_cflag |= PARODD;
363
+ #ifdef CMSPAR
364
+ params.c_cflag &= ~CMSPAR;
365
+ #endif
366
+ break;
367
+
368
+ #ifdef CMSPAR
369
+ case SPACE:
370
+ params.c_cflag |= PARENB;
371
+ params.c_cflag &= ~PARODD;
372
+ params.c_cflag |= CMSPAR;
373
+ break;
374
+
375
+ case MARK:
376
+ params.c_cflag |= PARENB;
377
+ params.c_cflag |= PARODD;
378
+ params.c_cflag |= CMSPAR;
361
379
  break;
380
+ #endif
362
381
 
363
382
  case NONE:
364
383
  params.c_cflag &= ~PARENB;
384
+ #ifdef CMSPAR
385
+ params.c_cflag &= ~CMSPAR;
386
+ #endif
365
387
  break;
366
388
 
367
389
  default:
@@ -65,10 +65,10 @@ struct line_signals
65
65
  #endif
66
66
 
67
67
  #else
68
- #define SPACE 0
69
- #define MARK 0
70
68
  #define EVEN 1
71
69
  #define ODD 2
70
+ #define SPACE 3
71
+ #define MARK 4
72
72
 
73
73
  #define RB_SERIAL_EXPORT
74
74
  #endif
@@ -94,8 +94,7 @@ VALUE RB_SERIAL_EXPORT sp_create_impl(class, _port)
94
94
  break;
95
95
 
96
96
  case T_STRING:
97
- Check_SafeStr(_port);
98
- str_port = RSTRING_PTR(_port);
97
+ str_port = StringValueCStr(_port);
99
98
  if (str_port[0] != '\\') /* Check for Win32 Device Namespace prefix "\\.\" */
100
99
  {
101
100
  snprintf(port, sizeof(port) - 1, "\\\\.\\%s", str_port);
@@ -36,7 +36,7 @@ class SerialPort
36
36
  # to which the new serial port object will be passed. In this case
37
37
  # the connection is automaticaly closed when the block has finished.
38
38
  #
39
- # @yield [SerialPort] the serial port number or filename
39
+ # @yield [serial_port] the serial port number or filename
40
40
  # @see SerialPort#new
41
41
  # @see SerialPort#set_modem_params
42
42
  def SerialPort::open(port, *params)
@@ -1,3 +1,3 @@
1
1
  class SerialPort
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serialport
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Pierronnet
@@ -13,48 +13,48 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2013-11-24 00:00:00.000000000 Z
16
+ date: 2014-07-27 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler
20
20
  requirement: !ruby/object:Gem::Requirement
21
21
  requirements:
22
- - - ! '>='
22
+ - - '>='
23
23
  - !ruby/object:Gem::Version
24
24
  version: '0'
25
25
  type: :development
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
28
28
  requirements:
29
- - - ! '>='
29
+ - - '>='
30
30
  - !ruby/object:Gem::Version
31
31
  version: '0'
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: rake
34
34
  requirement: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ! '>='
36
+ - - '>='
37
37
  - !ruby/object:Gem::Version
38
38
  version: '0'
39
39
  type: :development
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ! '>='
43
+ - - '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rake-compiler
48
48
  requirement: !ruby/object:Gem::Requirement
49
49
  requirements:
50
- - - ! '>='
50
+ - - '>='
51
51
  - !ruby/object:Gem::Version
52
52
  version: 0.4.1
53
53
  type: :development
54
54
  prerelease: false
55
55
  version_requirements: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ! '>='
57
+ - - '>='
58
58
  - !ruby/object:Gem::Version
59
59
  version: 0.4.1
60
60
  description: Ruby/SerialPort is a Ruby library that provides a class for using RS-232
@@ -96,17 +96,17 @@ require_paths:
96
96
  - lib
97
97
  required_ruby_version: !ruby/object:Gem::Requirement
98
98
  requirements:
99
- - - ! '>='
99
+ - - '>='
100
100
  - !ruby/object:Gem::Version
101
101
  version: '0'
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  requirements:
104
- - - ! '>='
104
+ - - '>='
105
105
  - !ruby/object:Gem::Version
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.0.3
109
+ rubygems_version: 2.0.14
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Library for using RS-232 serial ports.