arduino_firmata 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.2.8 2013-03-21
2
+
3
+ * throw error if default arduino not found
4
+
1
5
  === 0.2.7 2013-03-20
2
6
 
3
7
  * select Thread/EventMachine on connect
@@ -17,6 +17,6 @@ Gem::Specification.new do |gem|
17
17
  gem.require_paths = ["lib"]
18
18
 
19
19
  gem.add_dependency 'serialport', '>= 1.1.0'
20
- gem.add_dependency 'args_parser', '>= 0.1.2'
21
- gem.add_dependency 'event_emitter', '>= 0.2.2'
20
+ gem.add_dependency 'args_parser', '>= 0.1.4'
21
+ gem.add_dependency 'event_emitter', '>= 0.2.4'
22
22
  end
@@ -4,7 +4,11 @@ $:.unshift(File.dirname(__FILE__)) unless
4
4
  require 'serialport'
5
5
  require 'event_emitter'
6
6
  require 'stringio'
7
+ require 'arduino_firmata/error'
7
8
  require 'arduino_firmata/main'
8
9
  require 'arduino_firmata/const'
9
10
  require 'arduino_firmata/arduino'
10
11
  require 'arduino_firmata/version'
12
+
13
+ module ArduinoFirmata
14
+ end
@@ -0,0 +1,4 @@
1
+ module ArduinoFirmata
2
+ class Error < StandardError
3
+ end
4
+ end
@@ -6,7 +6,7 @@ module ArduinoFirmata
6
6
 
7
7
  def self.connect(serial_name=nil, params={}, &block)
8
8
  serial_name = self.list[0] unless serial_name
9
-
9
+ raise Error.new 'Arduino not found' unless serial_name
10
10
  Params.default.each do |k,v|
11
11
  params[k] = v unless params[k]
12
12
  end
@@ -1,4 +1,3 @@
1
-
2
1
  module ArduinoFirmata
3
- VERSION = '0.2.7'
2
+ VERSION = '0.2.8'
4
3
  end
@@ -0,0 +1,15 @@
1
+ require File.expand_path 'test_helper', File.dirname(__FILE__)
2
+
3
+ class TestDeviceNotFound < MiniTest::Unit::TestCase
4
+
5
+ def test_nodevice
6
+ err = nil
7
+ begin
8
+ a = ArduinoFirmata.connect 'dummy-device'
9
+ rescue => e
10
+ err = e
11
+ end
12
+ assert e.kind_of? StandardError
13
+ end
14
+
15
+ end
metadata CHANGED
@@ -1,60 +1,72 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: arduino_firmata
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.8
4
5
  prerelease:
5
- version: 0.2.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Sho Hashimoto
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2013-03-19 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2013-03-20 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: serialport
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
23
21
  version: 1.1.0
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: args_parser
28
23
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.1.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: args_parser
32
+ requirement: !ruby/object:Gem::Requirement
30
33
  none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: 0.1.2
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 0.1.4
35
38
  type: :runtime
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: event_emitter
39
39
  prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.1.4
46
+ - !ruby/object:Gem::Dependency
47
+ name: event_emitter
48
+ requirement: !ruby/object:Gem::Requirement
41
49
  none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: 0.2.2
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: 0.2.4
46
54
  type: :runtime
47
- version_requirements: *id003
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 0.2.4
48
62
  description: Arduino Firmata protocol (http://firmata.org) implementation on Ruby.
49
- email:
63
+ email:
50
64
  - hashimoto@shokai.org
51
- executables:
65
+ executables:
52
66
  - arduino_firmata
53
67
  extensions: []
54
-
55
68
  extra_rdoc_files: []
56
-
57
- files:
69
+ files:
58
70
  - .gitignore
59
71
  - Gemfile
60
72
  - History.txt
@@ -66,6 +78,7 @@ files:
66
78
  - lib/arduino_firmata.rb
67
79
  - lib/arduino_firmata/arduino.rb
68
80
  - lib/arduino_firmata/const.rb
81
+ - lib/arduino_firmata/error.rb
69
82
  - lib/arduino_firmata/main.rb
70
83
  - lib/arduino_firmata/version.rb
71
84
  - samples/README.md
@@ -88,38 +101,37 @@ files:
88
101
  - test/test_arduino_firmata.rb
89
102
  - test/test_block.rb
90
103
  - test/test_classmethods.rb
104
+ - test/test_device_not_found.rb
91
105
  - test/test_helper.rb
92
106
  - test/test_sysex.rb
93
107
  homepage: http://shokai.github.com/arduino_firmata
94
108
  licenses: []
95
-
96
109
  post_install_message:
97
110
  rdoc_options: []
98
-
99
- require_paths:
111
+ require_paths:
100
112
  - lib
101
- required_ruby_version: !ruby/object:Gem::Requirement
113
+ required_ruby_version: !ruby/object:Gem::Requirement
102
114
  none: false
103
- requirements:
104
- - - ">="
105
- - !ruby/object:Gem::Version
106
- version: "0"
107
- required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ required_rubygems_version: !ruby/object:Gem::Requirement
108
120
  none: false
109
- requirements:
110
- - - ">="
111
- - !ruby/object:Gem::Version
112
- version: "0"
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
113
125
  requirements: []
114
-
115
126
  rubyforge_project:
116
- rubygems_version: 1.8.17
127
+ rubygems_version: 1.8.24
117
128
  signing_key:
118
129
  specification_version: 3
119
130
  summary: Arduino Firmata protocol (http://firmata.org) implementation on Ruby.
120
- test_files:
131
+ test_files:
121
132
  - test/test_arduino_firmata.rb
122
133
  - test/test_block.rb
123
134
  - test/test_classmethods.rb
135
+ - test/test_device_not_found.rb
124
136
  - test/test_helper.rb
125
137
  - test/test_sysex.rb