hybridgroup-sphero 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,4 +18,10 @@
18
18
 
19
19
  * Pass a block to Sphero.start for DSL-awesomeness
20
20
  * Use Sphero#keep_going as a nicer alias for Ruby's sleep command
21
- * Add some additional test coverage
21
+ * Add some additional test coverage
22
+
23
+ === 1.1.2 / 2013-01-07
24
+
25
+ * 1 bugfix
26
+
27
+ * Correct Sphero#keep_going to call Kernel sleep method correctly
@@ -4,7 +4,7 @@ require 'sphero/response'
4
4
  require 'thread'
5
5
 
6
6
  class Sphero
7
- VERSION = '1.1.1'
7
+ VERSION = '1.1.2'
8
8
 
9
9
  class << self
10
10
  def start(dev, &block)
@@ -89,7 +89,7 @@ class Sphero
89
89
 
90
90
  # just a nicer alias for Ruby's own sleep
91
91
  def keep_going(duration)
92
- sleep duration
92
+ Kernel::sleep duration
93
93
  end
94
94
 
95
95
  private
@@ -13,6 +13,13 @@ class TestSphero < MiniTest::Unit::TestCase
13
13
  assert_kind_of Sphero, Sphero.start('someport')
14
14
  end
15
15
 
16
+ def test_start_sphero_executes_block
17
+ Sphero.any_instance.expects(:ping)
18
+ Sphero.start('someport') do
19
+ ping
20
+ end
21
+ end
22
+
16
23
  def test_ping
17
24
  Sphero::Request::Ping.expects(:new).with(@seq)
18
25
  @sphero.expects(:write)
@@ -81,4 +88,9 @@ class TestSphero < MiniTest::Unit::TestCase
81
88
  @sphero.expects(:roll).with(0, 0)
82
89
  @sphero.stop
83
90
  end
91
+
92
+ def test_keepgoing
93
+ Kernel.expects(:sleep).with(3)
94
+ @sphero.keep_going 3
95
+ end
84
96
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hybridgroup-sphero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
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: 2013-01-05 00:00:00.000000000 Z
12
+ date: 2013-01-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: serialport