littlewire 0.9.9 → 0.9.10

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: d9ca8fcff30feecd9fe4ebc8e8f45c739a5323e1
4
- data.tar.gz: 778139b656900649e89474a1e09ca81b4fe583b7
3
+ metadata.gz: faff763dc04f2ffe58f2822cf20432ef26d3a345
4
+ data.tar.gz: 1a2416192c3d6a0bd2edc981d9609120dbec324a
5
5
  SHA512:
6
- metadata.gz: e74dbb1edb11ddae5b29f0e98e36b9976fb9840ef7ad6ba296f97a7f26ba148fd014684bad80e6b403280d942ce7b56c24f9c80388f3f9571a252ffe5cf9b873
7
- data.tar.gz: 2aae285f83ff40926bb389cb1c91eeb3fc20d65d94867d94565de6d67b7aa839f90105ac2ccff7c385018c7c5cb518d625f2c5de8405a5ac236a9ba8d29fc0fd
6
+ metadata.gz: 5463faeef169647d0b1afd5b01f55678bb2df76b0c0c60daf79e69beffbf4f7834152010f88c9512a934b973e3e5b864405f9f85286ba97b5393e22c69ff82a4
7
+ data.tar.gz: 055e35724c43efcb91b678cfc0238f4d48e6a4e6d2f765db4069283d02c7a5997322e1e2552ea7688163250b736f312c2961b4dba46fc8627c57a00dd29ef63b
@@ -6,7 +6,8 @@ require 'littlewire/gadgets/micronucleus'
6
6
 
7
7
  class LittleWireUtility < Thor
8
8
  # for ruby 1.9 compatibility, we use this instead of ruby 2.0 __dir__
9
- Directory = defined?(__dir__) ? __dir__ : File.pathname(__FILE__)
9
+ #Directory = defined?(__dir__) ? __dir__ : File.pathname(__FILE__)
10
+ Directory = File.dirname(__FILE__)
10
11
 
11
12
  desc "install [version]", "Install a specific firmware on to the littlewire device"
12
13
  def install version = 'latest'
@@ -55,17 +56,19 @@ class LittleWireUtility < Thor
55
56
  puts "Library Version: #{LittleWire.version}"
56
57
 
57
58
  wire = LittleWire.connect
58
- puts "Device Firmware: #{wire.version}" if wire
59
+ if wire
60
+ puts "Device Firmware: #{wire.version}"
59
61
 
60
- latest_path = File.join(Directory, "..", "firmware", "#{LittleWire::SupportedVersions.first}.hex")
61
- if LittleWire::SupportedVersions.index(wire.version) != 0 and File.exists? latest_path
62
- puts "An updated firmware is available, version #{LittleWire::SupportedVersions.first}"
63
- puts "To update, run:"
64
- puts " littlewire.rb install #{LittleWire::SupportedVersions.first}"
65
- puts ""
66
- puts "If you bought your LittleWire as a kit from Seeed Studios, you may need to first"
67
- puts "install the Micronucleus bootloader as described on the littlewire.cc website."
68
- puts ""
62
+ latest_path = File.join(Directory, "..", "firmware", "#{LittleWire::SupportedVersions.first}.hex")
63
+ if LittleWire::SupportedVersions.index(wire.version) != 0 and File.exists? latest_path
64
+ puts "An updated firmware is available, version #{LittleWire::SupportedVersions.first}"
65
+ puts "To update, run:"
66
+ puts " littlewire.rb install #{LittleWire::SupportedVersions.first}"
67
+ puts ""
68
+ puts "If you bought your LittleWire as a kit from Seeed Studios, you may need to first"
69
+ puts "install the Micronucleus bootloader as described on the littlewire.cc website."
70
+ puts ""
71
+ end
69
72
  end
70
73
  end
71
74
 
@@ -1,5 +1,5 @@
1
1
  class LittleWire
2
- Version = '0.9.9'
2
+ Version = '0.9.10'
3
3
 
4
4
  # correct interface, to enable dynamic stuff later if need be:
5
5
  def self.version
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: littlewire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.9
4
+ version: 0.9.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bluebie