Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blinkstick
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.0.0-p247
4 changes: 4 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "http://rubygems.org"

gem "libusb"
gem "color"
14 changes: 14 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
GEM
remote: http://rubygems.org/
specs:
color (1.4.2)
ffi (1.9.3)
libusb (0.4.0)
ffi (>= 1.0)

PLATFORMS
ruby

DEPENDENCIES
color
libusb
19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,29 @@ Description of files:

* blinkstick.rb - main BlinkStick class definition
* example-info.rb - displays information of each BlinkStick
* example-infoblock.rb - read/write info block sample
* example-infoblock.rb - read/write info block sample
* example-off.rb - turn all blinksticks off
* example-random.rb - set random color to all blinksticks

Running examples:

```sh
ruby example-info.py
ruby examples/example-info.rb
```

Usage
-----

Add gem "blinkstick" to your Gemfile.
```gem "blinkstick"```

```
require "blinkstick"

BlinkStick.find_all.each { | b |
b.random_color
puts b.serial + ": " + b.color.html
}
```

Permission problems
Expand Down
23 changes: 23 additions & 0 deletions blinkstick.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "blinkstick/version"

Gem::Specification.new do |s|
s.name = "blinkstick"
s.version = BlinkStick::VERSION
s.date = "2014-01-02"
s.summary = "Blinkstick"
s.description = <<-DESC
BlinkStick provides a ruby interface to an Agile Innovative BlinkStick via libusb.
DESC
s.files = Dir.glob("{lib}/**/*")
s.require_path = "lib"

s.homepage = "https://github.com/arvydas/blinkstick-ruby"
s.email = "arvydas@agileinnovative.co.uk"
s.authors = ["Arvydas Juskevicius"]

s.add_runtime_dependency "libusb", [">= 0.4.0"]
s.add_runtime_dependency "color", [">= 1.4.2"]
end

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions lib/blinkstick/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class BlinkStick
VERSION = "1.0.1"
end