rmodbus 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/NEWS.md CHANGED
@@ -1,3 +1,7 @@
1
+ ###2012-07-17 Release 1.1.5
2
+
3
+ 1. Fixed issue [#24](https://github.com/flipback/rmodbus/issues/24) for RTUClient.
4
+
1
5
  ###2012-06-28 Release 1.1.4
2
6
 
3
7
  1. Fixed issue [#23](https://github.com/flipback/rmodbus/issues/23).
data/Rakefile CHANGED
@@ -31,3 +31,7 @@ task :default => :spec
31
31
 
32
32
  require 'yard'
33
33
  YARD::Rake::YardocTask.new
34
+
35
+ task :pry do
36
+ sh "bundle exec pry -r ./lib/rmodbus.rb"
37
+ end
data/lib/rmodbus/sp.rb CHANGED
@@ -36,6 +36,7 @@ module ModBus
36
36
  @read_timeout = opts[:read_timeout] unless opts[:read_timeout].nil?
37
37
 
38
38
  io = SerialPort.new(@port, @baud, @data_bits, @stop_bits, @parity)
39
+ io.flow_control = SerialPort::NONE
39
40
  io.read_timeout = @read_timeout
40
41
  io
41
42
  end
@@ -1,6 +1,6 @@
1
1
  # RModBus - free implementation of ModBus protocol on Ruby.
2
2
  #
3
- # Copyright (C) 2011 Timin Aleksey
3
+ # Copyright (C) 2012 Timin Aleksey
4
4
  #
5
5
  # This program is free software: you can redistribute it and/or modify
6
6
  # it under the terms of the GNU General Public License as published by
@@ -13,5 +13,5 @@
13
13
  # GNU General Public License for more details.
14
14
  module ModBus
15
15
  # Package version
16
- VERSION = '1.1.4'
16
+ VERSION = '1.1.5'
17
17
  end
data/spec/logging_spec.rb CHANGED
@@ -42,7 +42,7 @@ begin
42
42
  @sp = mock('Serial port')
43
43
  SerialPort.should_receive(:new).with("/dev/port1", 9600, 7, 2, SerialPort::ODD).and_return(@sp)
44
44
 
45
- @sp.stub!(:read_timeout)
45
+ @sp.should_receive(:flow_control=).with(SerialPort::NONE)
46
46
  @sp.stub!(:read_timeout=)
47
47
 
48
48
  @slave = ModBus::RTUClient.new("/dev/port1", 9600, :data_bits => 7, :stop_bits => 2, :parity => SerialPort::ODD).with_slave(1)
@@ -5,7 +5,7 @@ describe ModBus::RTUClient do
5
5
  @sp = mock('Serial port')
6
6
  SerialPort.should_receive(:new).with("/dev/port1", 9600, 8, 1, 0).and_return(@sp)
7
7
  @sp.stub!(:read_timeout=)
8
- @sp.stub!(:read_timeout)
8
+ @sp.should_receive(:flow_control=).with(SerialPort::NONE)
9
9
  @sp.stub!(:read_nonblock)
10
10
 
11
11
  @cl = ModBus::RTUClient.new("/dev/port1", 9600, :data_bits => 8, :stop_bits => 1, :parity => SerialPort::NONE)
@@ -43,6 +43,7 @@ describe ModBus::RTUClient do
43
43
  SerialPort.should_receive(:new).with(port, baud, 8, 1, SerialPort::NONE).and_return(@sp)
44
44
  @sp.should_receive(:closed?).and_return(false)
45
45
  @sp.should_receive(:close)
46
+ @sp.should_receive(:flow_control=).with(SerialPort::NONE)
46
47
  ModBus::RTUClient.connect(port, baud) do |cl|
47
48
  cl.port.should == port
48
49
  cl.baud.should == baud
@@ -5,6 +5,7 @@ describe ModBus::RTUServer do
5
5
  @sp = mock "SerialPort"
6
6
  SerialPort.should_receive(:new).with('/dev/ttyS0', 4800, 7, 2, SerialPort::NONE).and_return(@sp)
7
7
  @sp.stub!(:read_timeout=)
8
+ @sp.should_receive(:flow_control=).with(SerialPort::NONE)
8
9
 
9
10
  @server = ModBus::RTUServer.new('/dev/ttyS0', 4800, 1, :data_bits => 7, :stop_bits => 2)
10
11
  @server.coils = [1,0,1,1]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rmodbus
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-28 00:00:00.000000000 Z
12
+ date: 2012-07-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake