lego_ev3 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lego_ev3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jodi Giordano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-24 00:00:00.000000000 Z
11
+ date: 2015-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: net-ssh-simple
@@ -29,12 +29,14 @@ description: Uses the amazing ev3dev.org stuff to interface with the Lego EV3 st
29
29
  email: giordano.jodi@gmail.com
30
30
  executables:
31
31
  - lego-ev3
32
+ - lego-ev3-tcp-server
32
33
  extensions: []
33
34
  extra_rdoc_files: []
34
35
  files:
35
36
  - Gemfile
36
37
  - README.md
37
38
  - bin/lego-ev3
39
+ - bin/lego-ev3-tcp-server
38
40
  - lib/brick.rb
39
41
  - lib/commands/builder.rb
40
42
  - lib/commands/lego_port.rb
@@ -43,11 +45,16 @@ files:
43
45
  - lib/connection/base.rb
44
46
  - lib/connection/connection.rb
45
47
  - lib/connection/local.rb
46
- - lib/connection/remote.rb
48
+ - lib/connection/ssh.rb
49
+ - lib/connection/ssh_command.rb
50
+ - lib/connection/tcp_client.rb
51
+ - lib/connection/tcp_server.rb
47
52
  - lib/connection/upload.rb
48
53
  - lib/exceptions.rb
49
54
  - lib/lego_ev3.rb
50
55
  - lib/sensors/base.rb
56
+ - lib/sensors/color.rb
57
+ - lib/sensors/infrared.rb
51
58
  - lib/sensors/touch.rb
52
59
  - lib/tacho_motor.rb
53
60
  - lib/utilities.rb
@@ -1,39 +0,0 @@
1
- require 'net/ssh/simple'
2
-
3
- module LegoEv3
4
- class RemoteConnection < BaseConnection
5
- attr_accessor :timeout
6
-
7
- def initialize(host, user, password)
8
- super()
9
-
10
- @host = host
11
- @user = user
12
- @password = password
13
- @timeout = 10
14
- end
15
-
16
- def close
17
- @connection.close if @connection
18
- @connection = nil
19
- end
20
-
21
- protected
22
-
23
- def create_connection
24
- Net::SSH::Simple.new(host_name: @host, user: @user, password: @password, timeout: @timeout)
25
- end
26
-
27
- def call_connection(command)
28
- begin
29
- @connection.ssh(@host, command).stdout
30
- rescue => e
31
- if e.wrapped.kind_of?(Timeout::Error)
32
- raise RemoteConnectionException.new(@host, @user, @password)
33
- else
34
- raise e
35
- end
36
- end
37
- end
38
- end
39
- end