win 0.3.7 → 0.3.8
Sign up to get free protection for your applications and to get access to all the features.
- data/HISTORY +4 -0
- data/VERSION +1 -1
- data/lib/win/library.rb +1 -1
- data/lib/win.rb +23 -0
- metadata +3 -2
data/HISTORY
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.8
|
data/lib/win/library.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'ffi'
|
2
|
-
require 'extension'
|
2
|
+
require File.expand_path(File.dirname(__FILE__) + '/../extension')
|
3
3
|
|
4
4
|
# Related Windows API functions are grouped by topic and defined in separate namespaces (modules),
|
5
5
|
# that also contain related constants and convenience methods. For example, Win::Dde module
|
data/lib/win.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'version'
|
2
|
+
require 'extension'
|
3
|
+
|
4
|
+
module Win
|
5
|
+
|
6
|
+
# Requires ruby source file(s). Accepts either single filename/glob or Array of filenames/globs.
|
7
|
+
# Accepts following options:
|
8
|
+
# :*file*:: Lib(s) required relative to this file - defaults to __FILE__
|
9
|
+
# :*dir*:: Required lib(s) located under this dir name - defaults to gem name
|
10
|
+
#
|
11
|
+
def self.require_libs( libs, opts={} )
|
12
|
+
file = Pathname.new(opts[:file] || __FILE__)
|
13
|
+
[libs].flatten.each do |lib|
|
14
|
+
name = file.dirname + (opts[:dir] || file.basename('.*')) + lib.gsub(/(?<!.rb)$/, '.rb')
|
15
|
+
Pathname.glob(name.to_s).sort.each {|rb| require rb}
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end # module WinGui
|
19
|
+
|
20
|
+
# Require all ruby source files located under directory lib/win_gui
|
21
|
+
# If you need files in specific order, you should specify it here before the glob
|
22
|
+
WinGui.require_libs %W[**/*]
|
23
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 8
|
9
|
+
version: 0.3.8
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- arvicco
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/win/gui/window.rb
|
79
79
|
- lib/win/gui.rb
|
80
80
|
- lib/win/library.rb
|
81
|
+
- lib/win.rb
|
81
82
|
- spec/extension_spec.rb
|
82
83
|
- spec/spec.opts
|
83
84
|
- spec/spec_helper.rb
|