millworker 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,9 @@
1
+ === 0.1.2 / 2012-09-18
2
+
3
+ * 1 bug fix:
4
+
5
+ * Cleaned up unicode beginning/ending characters
6
+
1
7
  === 0.1.1 / 2012-09-18
2
8
 
3
9
  * 1 bug fix:
@@ -36,7 +36,7 @@ end
36
36
 
37
37
  def serial_port
38
38
  return @serial_port unless @serial_port.nil?
39
- @serial_port ||= SerialPort.new(SERIAL_PORT || config[:serial_port],{"baud" => 9600, "parity" => SerialPort::NONE, "data_bits" => 8})
39
+ @serial_port ||= SerialPort.new(SERIAL_PORT || config[:serial_port],{"baud" => 9600, "parity" => SerialPort::NONE})
40
40
  @serial_port.read_timeout = 1000
41
41
  @serial_port
42
42
  end
@@ -88,14 +88,14 @@ command :start do |c|
88
88
 
89
89
  loop do
90
90
  data = input.gets
91
- next if data.nil? || data.empty?
91
+ next if data.nil? || data.empty? || data =~ /\u0003$/
92
92
 
93
93
  # Take off newline from serial read
94
94
  data.strip!
95
95
  logger.info "received: '#{data.inspect}'"
96
96
 
97
- # Take off start & end of text unicode characters
98
- rfid_id = data.slice(/\u0002(.*)\u0003/, 1)
97
+ # Take off start of text unicode characters
98
+ rfid_id = data.slice(/\u0002(.*)/, 1)
99
99
  next if rfid_id.nil?
100
100
 
101
101
  # Read task list in every time so the daemon does not need to be
@@ -107,7 +107,7 @@ command :start do |c|
107
107
  next
108
108
  else
109
109
  tasks.each do |task|
110
- command = "#{task} #{data}"
110
+ command = "#{task} #{rfid_id}"
111
111
 
112
112
  execute(command) { |result|
113
113
  logger.info("executed: '#{command}', result: #{result}")
@@ -1,3 +1,3 @@
1
1
  module Millworker
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: millworker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
metadata.gz.sig CHANGED
Binary file