ruby-usb 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/README.win32 +6 -2
- data/Rakefile +16 -19
- metadata +1 -1
data/History.txt
CHANGED
data/README.win32
CHANGED
@@ -43,10 +43,11 @@ cp "C:\Program Files\LibUSB-Win32\lib\msvc\libusb.lib" ext\usb.lib
|
|
43
43
|
cp "C:\Program Files\LibUSB-Win32\include\usb.h" ext
|
44
44
|
|
45
45
|
== Build the gem with binary extensions
|
46
|
-
\usr\local\bin\rake clean compile
|
46
|
+
\usr\local\bin\rake clean compile
|
47
|
+
rake gem INLINE=1
|
47
48
|
|
48
49
|
== Install the gem in your official ruby (the one from Ruby one-click installer)
|
49
|
-
gem install pkg\ruby-usb-0.1.
|
50
|
+
gem install pkg\ruby-usb-0.1.3-x86-mswin32.gem
|
50
51
|
|
51
52
|
== Test that it works in your official ruby
|
52
53
|
> irb
|
@@ -55,3 +56,6 @@ irb(main):001:0> require 'usb'
|
|
55
56
|
irb(main):002:0> puts USB.devices.inspect
|
56
57
|
[#<USB::Device bus-0/\\.\libusb0-0001--0x0a5c-0x2110 0a5c:2110 Broadcom Corp BCM2045B ? (Bluetooth)>, #<USB::Device bus-0/\\.\libusb0-0002--0x0483-0x2016 0483:2016 STMicroelectronics Biometric Coprocessor ? (Vendor specific (00,00))>]
|
57
58
|
|
59
|
+
== Releasing on RubyForge
|
60
|
+
rake release VERSION=0.1.3
|
61
|
+
rubyforge add_file ruby-usb ruby-usb 0.1.3 pkg\ruby-usb-0.1.3-x86-mswin32-60.gem
|
data/Rakefile
CHANGED
@@ -1,33 +1,30 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'hoe'
|
3
3
|
|
4
|
-
Hoe.new('ruby-usb', '0.1.
|
4
|
+
hoe = Hoe.new('ruby-usb', '0.1.3') do |p|
|
5
5
|
p.summary = "Tanaka Akira's ruby-usb packaged as gems"
|
6
6
|
p.remote_rdoc_dir = ''
|
7
7
|
p.developer('Aslak Hellesøy', 'aslak.hellesoy@gmail.com')
|
8
8
|
p.developer('Tanaka Akira', 'akr@fsij.org')
|
9
|
-
p.clean_globs = ['ext/Makefile', 'ext/mkmf.log', 'ext/usb.bundle', 'ext/usb.o', '
|
9
|
+
p.clean_globs = ['ext/Makefile', 'ext/mkmf.log', 'ext/usb.bundle', 'ext/usb.o', 'ext/usb.so']
|
10
10
|
p.spec_extras[:dependencies] = lambda do |dependencies|
|
11
11
|
dependencies.reject!{|dep| dep.name == 'hoe'}
|
12
12
|
end
|
13
|
-
|
14
|
-
case RUBY_PLATFORM
|
15
|
-
when /i386-mingw32/
|
16
|
-
p.spec_extras[:files] = lambda do |files|
|
17
|
-
files += ['lib/usb.so']
|
18
|
-
end
|
19
|
-
else
|
20
|
-
p.spec_extras[:extensions] = ["ext/extconf.rb"]
|
21
|
-
end
|
22
13
|
end
|
23
14
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
15
|
+
case RUBY_PLATFORM
|
16
|
+
when /i386-mingw32/
|
17
|
+
filename = "ext/usb.so"
|
18
|
+
file filename do
|
19
|
+
Dir.chdir("ext") do
|
20
|
+
ruby "extconf.rb"
|
21
|
+
system('make')
|
22
|
+
end
|
29
23
|
end
|
30
|
-
|
24
|
+
desc 'Compile'
|
25
|
+
task :compile => [filename]
|
26
|
+
when /i386-mswin32/
|
27
|
+
hoe.spec.files += ['ext/usb.so']
|
28
|
+
else
|
29
|
+
hoe.spec.extensions = ['ext/extconf.rb']
|
31
30
|
end
|
32
|
-
desc 'Compile'
|
33
|
-
task :compile => [filename]
|