green_eye_monitor 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b004aae8d62d2f57551d0d4c1992c5e0f29fc9b1
4
- data.tar.gz: a35b37d7b5ecd8b6b8399041d6d899743c905532
3
+ metadata.gz: 09b0535de2863db3b5f87effe6df03574c05e175
4
+ data.tar.gz: 1ed78d617dd877f19d8290e50154fa467fa51135
5
5
  SHA512:
6
- metadata.gz: d0b1086f78f255704bbb7595380d838986af7ec8214e0787783232cee6f83c1d7509398aab9776043adcb12822248545c763b13c836212b863fffee1a5d6592f
7
- data.tar.gz: 45e9014c1ee81fdccca23b0706a7250034c1685513393890d13f782672d3d47a54cd435eb52c745ef2505aed5f1e6025f6481188a3aa4b1796a4b24e7b8128ae
6
+ metadata.gz: 016f16ef7c22fa7cf21f091c8f99f26f8d03235e3f279e1b2a11a8965a354bddaca570c5b83d68b1a6cab6d991bc33bc0dd2d6cd0dfe70dc0b9975bb0683350b
7
+ data.tar.gz: 39d715c5f09ec09f91eea866f7b0ff5c98b5b7ad072197a62a8751f8119231e64e0a7627fbe17ef993f7f562c24fc17f19f1a2968c5ca97daea026dec6919f8b
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ # 0.0.2 (20160515)
4
+
5
+ * Add command line serial port switch (@johnf)
6
+ * Fix shell support (@johnf)
7
+
3
8
  # 0.0.1 (20160412)
4
9
 
5
10
  * Initial Release (@johnf)
@@ -9,13 +9,14 @@ require 'awesome_print'
9
9
 
10
10
  opts = Slop.parse do |o|
11
11
  o.bool '-d', '--debug', 'enable debug mode'
12
+ o.string '--port', 'serial port', default: '/dev/ttyUSB1'
12
13
  o.on '--version', 'print the version' do
13
14
  puts Slop::VERSION
14
15
  exit
15
16
  end
16
17
  end
17
18
 
18
- client = GreenEyeMonitor::Client.new(:baud => 115_200, :debug => opts[:debug])
19
+ client = GreenEyeMonitor::Client.new(:baud => 115_200, :serial_port => opts[:port], :debug => opts[:debug])
19
20
 
20
21
  # client.packet_format = :bin48_net_time
21
22
  # client.enable_realtime
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency 'slop'
24
24
  spec.add_dependency 'awesome_print'
25
25
 
26
- spec.add_development_dependency 'bundler', '~> 1.10'
27
- spec.add_development_dependency 'rake', '~> 10.0'
26
+ spec.add_development_dependency 'bundler'
27
+ spec.add_development_dependency 'rake'
28
28
  spec.add_development_dependency 'rspec'
29
29
  spec.add_development_dependency 'rubocop'
30
30
  spec.add_development_dependency 'rubocop-rspec'
@@ -64,7 +64,7 @@ module GreenEyeMonitor
64
64
  command.strip!
65
65
  command = old_command if command.empty?
66
66
  write(command)
67
- puts read
67
+ puts read(:length => 100)
68
68
  old_command = command
69
69
  end
70
70
  end
@@ -254,6 +254,8 @@ module GreenEyeMonitor
254
254
  elsif options[:length]
255
255
  data = @serial.read(options[:length])
256
256
  raise(Errors::TooShort, "Data too short #{data.inspect}") if data.size != options[:length]
257
+ elsif options[:all]
258
+ data = @serial.read(1_000)
257
259
  else
258
260
  raise('Unsupported options')
259
261
  end
@@ -1,3 +1,3 @@
1
1
  module GreenEyeMonitor
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: green_eye_monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ferlito
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-16 00:00:00.000000000 Z
11
+ date: 2016-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: serialport
@@ -70,30 +70,30 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: '1.10'
75
+ version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: '1.10'
82
+ version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '10.0'
89
+ version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: '10.0'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
- rubygems_version: 2.4.5.1
219
+ rubygems_version: 2.5.1
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: Library to speak to Brultech GEM energy consumption monitor over a serial