From 99123fdb1201180146d84da99839c4b9d1448f9e Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Sun, 14 Nov 2010 20:35:55 +1100 Subject: [PATCH 1/7] Version bump to 0.2.1 --- .gitignore | 21 +++++++++++++++++++++ Rakefile | 19 +++++++++++++++++++ VERSION | 1 + 3 files changed, 41 insertions(+) create mode 100644 .gitignore create mode 100644 Rakefile create mode 100644 VERSION diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c1e0daf --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +## MAC OS +.DS_Store + +## TEXTMATE +*.tmproj +tmtags + +## EMACS +*~ +\#* +.\#* + +## VIM +*.swp + +## PROJECT::GENERAL +coverage +rdoc +pkg + +## PROJECT::SPECIFIC diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..82250c4 --- /dev/null +++ b/Rakefile @@ -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 = "akr@fsij.org" + 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 + diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..0c62199 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.2.1 From dae75a0d56ad734694ed48b28e9fa4c417f89ade Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Sun, 14 Nov 2010 20:43:31 +1100 Subject: [PATCH 2/7] commit gempsec --- ruby-usb.gemspec | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 ruby-usb.gemspec diff --git a/ruby-usb.gemspec b/ruby-usb.gemspec new file mode 100644 index 0000000..b2935e8 --- /dev/null +++ b/ruby-usb.gemspec @@ -0,0 +1,48 @@ +# 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-14} + s.email = %q{akr@fsij.org} + 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", + "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 + From 2397ed6542ec60f2ed9a89ed59e384c6890468f1 Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Sun, 14 Nov 2010 20:43:33 +1100 Subject: [PATCH 3/7] Regenerated gemspec for version 0.2.1 --- ruby-usb.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruby-usb.gemspec b/ruby-usb.gemspec index b2935e8..2d575b9 100644 --- a/ruby-usb.gemspec +++ b/ruby-usb.gemspec @@ -26,6 +26,7 @@ Gem::Specification.new do |s| "constants.h", "extconf.rb", "lib/usb.rb", + "ruby-usb.gemspec", "sample/usb-power", "usb.c" ] From 52e61f4d299d955bdd2a5a57a8d688cc45211019 Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Tue, 16 Nov 2010 19:30:16 +1100 Subject: [PATCH 4/7] Regenerated gemspec for version 0.2.1 --- ruby-usb.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby-usb.gemspec b/ruby-usb.gemspec index 2d575b9..f6ab0d3 100644 --- a/ruby-usb.gemspec +++ b/ruby-usb.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| 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-14} + s.date = %q{2010-11-16} s.email = %q{akr@fsij.org} s.extensions = ["extconf.rb"] s.extra_rdoc_files = [ From c637213e1a2dee5b48332924cb3d59fd0f3114c0 Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Sat, 27 Nov 2010 14:41:50 +1100 Subject: [PATCH 5/7] add rescue for error commonly encountered on OSX --- lib/usb.rb | 2 +- ruby-usb.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/usb.rb b/lib/usb.rb index 1d8ae5f..7e3b1f5 100644 --- a/lib/usb.rb +++ b/lib/usb.rb @@ -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") diff --git a/ruby-usb.gemspec b/ruby-usb.gemspec index f6ab0d3..0e1a1dc 100644 --- a/ruby-usb.gemspec +++ b/ruby-usb.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| 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-16} + s.date = %q{2010-11-17} s.email = %q{akr@fsij.org} s.extensions = ["extconf.rb"] s.extra_rdoc_files = [ From 9ff3680e20616f581220a8d16cc0fd4a2f282ddd Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Sat, 27 Nov 2010 14:46:46 +1100 Subject: [PATCH 6/7] update readme --- README | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/README b/README index 1fbafbe..6fb8d3b 100644 --- a/README +++ b/README @@ -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 @@ -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/ + From 03412264fd0f502c1554d861eacbb26ddb2119be Mon Sep 17 00:00:00 2001 From: Perryn Fowler Date: Sat, 27 Nov 2010 14:50:31 +1100 Subject: [PATCH 7/7] Regenerated gemspec for version 0.2.1 --- ruby-usb.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ruby-usb.gemspec b/ruby-usb.gemspec index 0e1a1dc..5d70483 100644 --- a/ruby-usb.gemspec +++ b/ruby-usb.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| 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-17} + s.date = %q{2010-11-27} s.email = %q{akr@fsij.org} s.extensions = ["extconf.rb"] s.extra_rdoc_files = [