artoo-pebble 1.0.2 → 1.1.0

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: 41277619dbab2c7a89bda9e7475dc86c878a5685
4
- data.tar.gz: 0c03e766bb83521f313fb1afba39748512eb748b
3
+ metadata.gz: c42dd7b0cbedf235cdc1de1e6a7bc58146c8c969
4
+ data.tar.gz: 3070dbf47b8157a3795709fead12cdbaa660834d
5
5
  SHA512:
6
- metadata.gz: 44b3297f8be4a3910fa778479f0e0e56bc910f8cf83dbd4ffebd42c923883f538a54823730db03736ef5cfc08d823ecdbea9348685f63ec215576da3967b3c80
7
- data.tar.gz: 0238ad1c3fb189f32bc859afd75ea6c12c0f32e80da257234287b603e2f6323566f155b40afcfbf36fd67f5284bdf748e36417e0a5253d436c3f2cd452dad996
6
+ metadata.gz: 8eb882849f35a4fb08c7756d5517760de7d673629e679ca7b8022c8430f134329c80141e4f6698666e2e253ee1a6469364a1c6e92e27cc324934451c413986ee
7
+ data.tar.gz: 10056e171a13b5318c88b1a1c8c374bca87cbd729844a53dc5ec2e74a478bb146bd018a91dd6be0ed4ac921922d62a54dbe580c18f8120b3435f290a636acf60
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- artoo-pebble (1.0.2)
4
+ artoo-pebble (1.1.0)
5
5
  artoo (>= 1.2.2)
6
6
  hybridgroup-pebblewatch (>= 0.1.2)
7
7
 
data/README.md CHANGED
@@ -19,7 +19,7 @@ gem install artoo-pebble
19
19
  ```ruby
20
20
  require 'artoo'
21
21
 
22
- connection :pebble, :adaptor => :pebble, :port => "/dev/rfcomm0", :id => "378B"
22
+ connection :pebble, :adaptor => :pebble, :port => "127.0.0.1:4567", :id => "378B"
23
23
  device :watch, :driver => :pebble
24
24
 
25
25
  def button_push(*data)
@@ -56,7 +56,7 @@ $ artoo connect scan
56
56
  Now you are ready to connect to the Sphero using the socket, in this example port 4567:
57
57
 
58
58
  ```
59
- artoo connect socat 4567 pebble
59
+ artoo connect serial pebble 4567
60
60
  ```
61
61
 
62
62
  ### Ubuntu
@@ -69,7 +69,7 @@ The main steps are:
69
69
 
70
70
  You will need to pair with the Pebble, entering any needed password.
71
71
 
72
- Then you can find the Bluetooth address, for example `00:18:33:86:37:8B`, by using the `artoo connect scan` command:
72
+ Then you can find the Bluetooth address, for example `00:18:33:86:37:8B`, by using the `artoo connect scan` command:
73
73
 
74
74
  ```
75
75
  $ artoo connect scan
@@ -84,7 +84,7 @@ artoo connect bind 00:18:33:86:37:8B pebble
84
84
  Now you are ready to connect to the Pebble using a socket, in this example port 4567:
85
85
 
86
86
  ```
87
- artoo connect socat 4567 pebble
87
+ artoo connect serial pebble 4567
88
88
  ```
89
89
 
90
90
  ### Windows
@@ -1,8 +1,8 @@
1
1
  require 'artoo'
2
2
 
3
- connection :pebble, :adaptor => :pebble, :port => "/dev/rfcomm0", :id => "378B"
3
+ connection :pebble, :adaptor => :pebble, :port => "127.0.0.1:4567", :id => "E36E"
4
4
  device :watch, :driver => :pebble
5
-
5
+
6
6
  work do
7
7
  watch.set_nowplaying_metadata("Artoo", "Hello", Time.now.to_s)
8
8
  every(5.seconds) do
@@ -1,6 +1,6 @@
1
1
  require 'artoo'
2
2
 
3
- connection :pebble, :adaptor => :pebble, :port => "/dev/rfcomm0", :id => "378B"
3
+ connection :pebble, :adaptor => :pebble, :port => "127.0.0.1:4567", :id => "378B"
4
4
  device :watch, :driver => :pebble
5
5
 
6
6
  def button_push(*data)
@@ -1,5 +1,5 @@
1
1
  module Artoo
2
2
  module Pebble
3
- VERSION = '1.0.2'
3
+ VERSION = '1.1.0'
4
4
  end
5
5
  end
@@ -5,18 +5,11 @@ module Artoo
5
5
  # Connect to a pebble device
6
6
  # @see device documentation for more information
7
7
  class Pebble < Adaptor
8
- finalizer :finalize
9
8
  attr_reader :pebble
10
9
 
11
10
  # Number of retries when connecting
12
11
  RETRY_COUNT = 5
13
12
 
14
- # Closes connection with device if connected
15
- # @return [Boolean]
16
- def finalize
17
- pebble.disconnect if connected?
18
- end
19
-
20
13
  # Creates a connection with device
21
14
  # @return [Boolean]
22
15
  def connect
@@ -42,7 +35,7 @@ module Artoo
42
35
  # Closes connection with device
43
36
  # @return [Boolean]
44
37
  def disconnect
45
- pebble.disconnect if connected?
38
+ pebble.disconnect
46
39
  super
47
40
  end
48
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: artoo-pebble
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ron Evans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-27 00:00:00.000000000 Z
11
+ date: 2013-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: artoo