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
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
## MAC OS
.DS_Store

## TEXTMATE
*.tmproj
tmtags

## EMACS
*~
\#*
.\#*

## VIM
*.swp

## PROJECT::GENERAL
coverage
rdoc
pkg

## PROJECT::SPECIFIC
19 changes: 14 additions & 5 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,26 @@ LGPL
* ruby : http://www.ruby-lang.org/
* libusb 0.1 : http://libusb.sourceforge.net/

== Download
== Installing via make

* latest release: http://www.a-k-r.org/ruby-usb/ruby-usb-0.2.tar.gz
* Download:
** latest release: http://www.a-k-r.org/ruby-usb/ruby-usb-0.2.tar.gz
**development version: http://github.com/akr/ruby-usb

* development version: http://github.com/akr/ruby-usb

== Install
*Install

% ruby extconf.rb
% make
% make install

== Installing as a gem

% gem install ruby-usb

On OSX you may need to specify your architecure.
For example:
% ARCHFLAGS="-arch x86_64" gem install ruby-usb

== Reference Manual

See rdoc/ or
Expand All @@ -46,3 +54,4 @@ http://www.a-k-r.org/ruby-usb/rdoc/
* USB.org : http://www.usb.org/
* AC Power Control through USB : http://www.gniibe.org/ac-power-by-usb/ac-power-control.html
* How To Control USB Missile Launcher on Linux : http://blog.taragana.com/index.php/archive/how-to-control-usb-missile-launcher-on-linux/

19 changes: 19 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require 'rubygems'
require 'rake'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "ruby-usb"
gem.summary = %Q{ruby-usb is a libusb binding library for Ruby.}
gem.email = "[email protected]"
gem.homepage = "http://github.com/akr/ruby-usb"
gem.authors = ["Tanaka Akira","Perryn Fowler (0.2.1 gem packaging)"]
gem.extensions = ["extconf.rb"]
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end

1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.2.1
2 changes: 1 addition & 1 deletion lib/usb.rb
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ def get_string_simple(index)
result = "\0" * 1024
begin
self.usb_get_string_simple(index, result)
rescue Errno::EPIPE, Errno::EFBIG, Errno::EPERM
rescue Errno::EPIPE, Errno::EFBIG, Errno::EPERM, Errno::ERANGE
return nil
end
result.delete!("\0")
Expand Down
49 changes: 49 additions & 0 deletions ruby-usb.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{ruby-usb}
s.version = "0.2.1"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Tanaka Akira", "Perryn Fowler (0.2.1 gem packaging)"]
s.date = %q{2010-11-27}
s.email = %q{[email protected]}
s.extensions = ["extconf.rb"]
s.extra_rdoc_files = [
"ChangeLog",
"README"
]
s.files = [
".gitignore",
"COPYING",
"ChangeLog",
"README",
"Rakefile",
"VERSION",
"constants.h",
"extconf.rb",
"lib/usb.rb",
"ruby-usb.gemspec",
"sample/usb-power",
"usb.c"
]
s.homepage = %q{http://github.com/akr/ruby-usb}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{ruby-usb is a libusb binding library for Ruby.}

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
else
end
else
end
end