reflexion 0.1.3 → 0.1.4
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/.doc/ext/reflex/application.cpp +35 -76
- data/.doc/ext/reflex/defs.cpp +8 -0
- data/.doc/ext/reflex/key.cpp +38 -43
- data/.doc/ext/reflex/native.cpp +6 -4
- data/.doc/ext/reflex/points.cpp +47 -52
- data/.doc/ext/reflex/reflex.cpp +12 -13
- data/.doc/ext/reflex/view.cpp +242 -0
- data/.doc/ext/reflex/window.cpp +87 -178
- data/.gitignore +14 -0
- data/Rakefile +6 -31
- data/VERSION +1 -1
- data/examples/hello/.gitignore +2 -0
- data/examples/ruby/app.rb +2 -2
- data/examples/ruby/checker.rb +3 -3
- data/examples/ruby/fps.rb +14 -14
- data/examples/ruby/grid.rb +65 -0
- data/examples/ruby/hello.rb +19 -7
- data/examples/ruby/key.rb +4 -4
- data/examples/ruby/shapes.rb +6 -6
- data/examples/ruby/text.rb +20 -17
- data/examples/ruby/views.rb +88 -0
- data/examples/ruby/visuals.rb +27 -0
- data/ext/reflex/application.cpp +36 -76
- data/ext/reflex/defs.cpp +8 -0
- data/ext/reflex/defs.h +1 -18
- data/ext/reflex/extconf.rb +16 -8
- data/ext/reflex/key.cpp +39 -43
- data/ext/reflex/native.cpp +6 -4
- data/ext/reflex/points.cpp +48 -52
- data/ext/reflex/reflex.cpp +12 -13
- data/ext/reflex/view.cpp +260 -0
- data/ext/reflex/window.cpp +89 -178
- data/include/reflex/application.h +14 -7
- data/include/reflex/defs.h +8 -6
- data/include/reflex/exception.h +1 -1
- data/include/reflex/ruby/application.h +31 -10
- data/include/reflex/ruby/key.h +3 -3
- data/include/reflex/ruby/points.h +3 -3
- data/include/reflex/ruby/view.h +106 -0
- data/include/reflex/ruby/window.h +83 -12
- data/include/reflex/ruby.h +3 -2
- data/include/reflex/view.h +103 -0
- data/include/reflex/window.h +43 -18
- data/include/reflex.h +2 -1
- data/lib/reflex/application.rb +8 -7
- data/lib/reflex/autoinit.rb +1 -1
- data/lib/reflex/bitmap.rb +13 -0
- data/lib/reflex/bounds.rb +2 -122
- data/lib/reflex/ext.rb +5 -0
- data/lib/reflex/helpers.rb +36 -31
- data/lib/reflex/image.rb +13 -0
- data/lib/reflex/module.rb +9 -2
- data/lib/reflex/painter.rb +13 -0
- data/lib/reflex/point.rb +3 -59
- data/lib/reflex/reflex.rb +1 -1
- data/lib/reflex/texture.rb +13 -0
- data/lib/reflex/view.rb +33 -0
- data/lib/reflex/visuals/string.rb +53 -0
- data/lib/reflex/window.rb +18 -43
- data/lib/reflex.rb +3 -3
- data/reflex.gemspec +16 -42
- data/src/cocoa/application.mm +17 -23
- data/src/cocoa/applicationdata.h +3 -9
- data/src/cocoa/cocoaapplication.h +6 -4
- data/src/cocoa/cocoaapplication.mm +61 -19
- data/src/cocoa/cocoawindow.h +7 -5
- data/src/cocoa/cocoawindow.mm +109 -50
- data/src/cocoa/defs.mm +5 -2
- data/src/cocoa/window.mm +71 -41
- data/src/cocoa/windowdata.h +14 -9
- data/src/defs.cpp +1 -1
- data/src/exception.cpp +3 -18
- data/src/helpers.h +12 -0
- data/src/reflex.cpp +11 -5
- data/src/view.cpp +326 -0
- data/src/win32/application.cpp +7 -8
- data/src/win32/defs.h +1 -1
- data/src/win32/window.cpp +137 -41
- data/src/window.cpp +38 -1
- data/test/helpers.rb +2 -5
- data/test/test_application.rb +17 -0
- data/test/test_reflex.rb +4 -2
- data/test/test_view.rb +74 -0
- data/test/test_window.rb +33 -2
- metadata +157 -97
- data/include/reflex/helpers.h +0 -32
- data/test/test_bounds.rb +0 -163
- data/test/test_point.rb +0 -81
data/lib/reflex/bounds.rb
CHANGED
@@ -1,133 +1,13 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
-
require '
|
4
|
+
require 'rays/bounds'
|
5
5
|
|
6
6
|
|
7
7
|
module Reflex
|
8
8
|
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
include Comparable
|
13
|
-
|
14
|
-
attr_accessor :x, :y, :width, :height
|
15
|
-
|
16
|
-
def initialize (*args)
|
17
|
-
case args.size
|
18
|
-
when 0 then @x = @y = @width = @height = 0
|
19
|
-
when 1 then @x = @y = 0; @width = @height = args[0]
|
20
|
-
when 2 then @x = @y = 0; @width, @height = args
|
21
|
-
when 4 then @x, @y, @width, @height = args
|
22
|
-
else raise ArgumentError
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
def right ()
|
27
|
-
@x + @width - 1
|
28
|
-
end
|
29
|
-
|
30
|
-
def right= (right)
|
31
|
-
@width = right + 1 - @x
|
32
|
-
end
|
33
|
-
|
34
|
-
def bottom ()
|
35
|
-
@y + @height - 1
|
36
|
-
end
|
37
|
-
|
38
|
-
def bottom= (bottom)
|
39
|
-
@height = bottom + 1 - @y
|
40
|
-
end
|
41
|
-
|
42
|
-
alias w width
|
43
|
-
alias w= width=
|
44
|
-
|
45
|
-
alias h height
|
46
|
-
alias h= height=
|
47
|
-
|
48
|
-
alias left x
|
49
|
-
alias left= x=
|
50
|
-
|
51
|
-
alias top y
|
52
|
-
alias top= y=
|
53
|
-
|
54
|
-
alias l left
|
55
|
-
alias l= left=
|
56
|
-
|
57
|
-
alias t top
|
58
|
-
alias t= top=
|
59
|
-
|
60
|
-
alias r right
|
61
|
-
alias r= right=
|
62
|
-
|
63
|
-
alias b bottom
|
64
|
-
alias b= bottom=
|
65
|
-
|
66
|
-
def offset_to! (*args)
|
67
|
-
@x, @y = case args.size
|
68
|
-
when 1 then args * 2
|
69
|
-
when 2 then args
|
70
|
-
else raise ArgumentError
|
71
|
-
end
|
72
|
-
self
|
73
|
-
end
|
74
|
-
|
75
|
-
def offset_to (*args)
|
76
|
-
dup.offset_to! *args
|
77
|
-
end
|
78
|
-
|
79
|
-
def offset_by! (*args)
|
80
|
-
dx, dy = case args.size
|
81
|
-
when 1 then args * 2
|
82
|
-
when 2 then args
|
83
|
-
else raise ArgumentError
|
84
|
-
end
|
85
|
-
@x += dx
|
86
|
-
@y += dy
|
87
|
-
self
|
88
|
-
end
|
89
|
-
|
90
|
-
def offset_by (*args)
|
91
|
-
dup.offset_by! *args
|
92
|
-
end
|
93
|
-
|
94
|
-
def inset_by! (*args)
|
95
|
-
dx, dy = case args.size
|
96
|
-
when 1 then args * 2
|
97
|
-
when 2 then args
|
98
|
-
else raise ArgumentError
|
99
|
-
end
|
100
|
-
@x += dx
|
101
|
-
@y += dy
|
102
|
-
@width -= dx * 2
|
103
|
-
@height -= dy * 2
|
104
|
-
self
|
105
|
-
end
|
106
|
-
|
107
|
-
def inset_by (*args)
|
108
|
-
dup.inset_by! *args
|
109
|
-
end
|
110
|
-
|
111
|
-
def to_a ()
|
112
|
-
[@x, @y, @width, @height]
|
113
|
-
end
|
114
|
-
|
115
|
-
def [] (index)
|
116
|
-
case index
|
117
|
-
when 0 then Point.new(left, top)
|
118
|
-
when 1 then Point.new(right, bottom)
|
119
|
-
else raise IndexError
|
120
|
-
end
|
121
|
-
end
|
122
|
-
|
123
|
-
def <=> (o)
|
124
|
-
ret = @x <=> o.x; return ret if ret != 0
|
125
|
-
ret = @y <=> o.y; return ret if ret != 0
|
126
|
-
ret = right <=> o.right; return ret if ret != 0
|
127
|
-
bottom <=> o.bottom
|
128
|
-
end
|
129
|
-
|
130
|
-
end# Bounds
|
10
|
+
Bounds = Rays::Bounds
|
131
11
|
|
132
12
|
|
133
13
|
end# Reflex
|
data/lib/reflex/ext.rb
ADDED
data/lib/reflex/helpers.rb
CHANGED
@@ -1,52 +1,57 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
+
require 'reflex/point'
|
5
|
+
require 'reflex/bounds'
|
6
|
+
|
7
|
+
|
4
8
|
module Reflex
|
5
9
|
|
6
10
|
|
7
|
-
module
|
11
|
+
module HasBounds
|
8
12
|
|
9
|
-
def
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
klass.__send__ :define_method, name do |*args, &methodblock|
|
14
|
-
hookblock.call self, original, *args, &methodblock
|
15
|
-
end
|
16
|
-
self
|
13
|
+
def bounds (*args)
|
14
|
+
b = get_bounds
|
15
|
+
b.move_to! *args unless args.empty?
|
16
|
+
b
|
17
17
|
end
|
18
18
|
|
19
|
-
def
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
def bounds= (*args)
|
20
|
+
case args[0]
|
21
|
+
when Bounds
|
22
|
+
set_bounds *args[0].to_a
|
23
|
+
when Point
|
24
|
+
set_bounds *args.map{|p| p.to_a}.flatten
|
25
|
+
when Array
|
26
|
+
set_bounds *args[0]
|
27
|
+
when Integer, Float
|
28
|
+
set_bounds *args
|
23
29
|
end
|
24
30
|
end
|
25
31
|
|
26
|
-
def
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
ret
|
31
|
-
end
|
32
|
+
def move_to (x, y)
|
33
|
+
b = self.bounds
|
34
|
+
b.x, b.y = x, y
|
35
|
+
self.bounds = b
|
32
36
|
end
|
33
37
|
|
34
|
-
def
|
35
|
-
|
36
|
-
|
37
|
-
end
|
38
|
+
def move_by (dx, dy)
|
39
|
+
b = self.bounds
|
40
|
+
move_to b.x + dx, b.y + dy
|
38
41
|
end
|
39
42
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
43
|
+
def resize_to (width, height)
|
44
|
+
b = self.bounds
|
45
|
+
b.width, b.height = width, height
|
46
|
+
self.bounds = b
|
47
|
+
end
|
44
48
|
|
45
|
-
def
|
46
|
-
|
49
|
+
def resize_by (dwidth, dheight)
|
50
|
+
b = self.bounds
|
51
|
+
resize_to b.width + dwidth, b.height + dheight
|
47
52
|
end
|
48
53
|
|
49
|
-
end#
|
54
|
+
end# HasBounds
|
50
55
|
|
51
56
|
|
52
|
-
end#
|
57
|
+
end# Reflex
|
data/lib/reflex/image.rb
ADDED
data/lib/reflex/module.rb
CHANGED
@@ -22,8 +22,15 @@ module Reflex
|
|
22
22
|
File.join root_dir, 'task'
|
23
23
|
end
|
24
24
|
|
25
|
-
def load_tasks ()
|
26
|
-
|
25
|
+
def load_tasks (*names)
|
26
|
+
if names.empty?
|
27
|
+
Dir["#{task_dir}/**/*.rake"].each {|path| load path}
|
28
|
+
else
|
29
|
+
names.each do |name|
|
30
|
+
path = "#{task_dir}/#{name}.rake"
|
31
|
+
load path if File.exist? path
|
32
|
+
end
|
33
|
+
end
|
27
34
|
end
|
28
35
|
|
29
36
|
def version ()
|
data/lib/reflex/point.rb
CHANGED
@@ -1,69 +1,13 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
class Point
|
8
|
-
|
9
|
-
include Comparable
|
10
|
-
|
11
|
-
attr_accessor :x, :y
|
12
|
-
|
13
|
-
def initialize (*args)
|
14
|
-
case args.size
|
15
|
-
when 0 then @x = @y = 0
|
16
|
-
when 1 then @x = @y = args[0]
|
17
|
-
when 2 then @x, @y = args
|
18
|
-
else raise ArgumentError
|
19
|
-
end
|
20
|
-
end
|
4
|
+
require 'rays/point'
|
21
5
|
|
22
|
-
def offset_to! (*args)
|
23
|
-
case args.size
|
24
|
-
when 1 then @x = @y = args[0]
|
25
|
-
when 2 then @x, @y = args
|
26
|
-
else raise ArgumentError
|
27
|
-
end
|
28
|
-
self
|
29
|
-
end
|
30
6
|
|
31
|
-
|
32
|
-
dup.offset_to! *args
|
33
|
-
end
|
34
|
-
|
35
|
-
def offset_by! (*args)
|
36
|
-
case args.size
|
37
|
-
when 1 then @x += args[0]; @y += args[0]
|
38
|
-
when 2 then @x += args[0]; @y += args[1]
|
39
|
-
else raise ArgumentError
|
40
|
-
end
|
41
|
-
self
|
42
|
-
end
|
43
|
-
|
44
|
-
def offset_by (*args)
|
45
|
-
dup.offset_by! *args
|
46
|
-
end
|
47
|
-
|
48
|
-
def to_a ()
|
49
|
-
[@x, @y]
|
50
|
-
end
|
51
|
-
|
52
|
-
def [] (index)
|
53
|
-
case index
|
54
|
-
when 0 then @x
|
55
|
-
when 1 then @y
|
56
|
-
else raise IndexError
|
57
|
-
end
|
58
|
-
end
|
7
|
+
module Reflex
|
59
8
|
|
60
|
-
def <=> (o)
|
61
|
-
ret = @x <=> o.x
|
62
|
-
return ret if ret != 0
|
63
|
-
@y <=> o.y
|
64
|
-
end
|
65
9
|
|
66
|
-
|
10
|
+
Point = Rays::Point
|
67
11
|
|
68
12
|
|
69
13
|
end# Reflex
|
data/lib/reflex/reflex.rb
CHANGED
data/lib/reflex/view.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
|
4
|
+
require 'xot/hookable'
|
5
|
+
require 'xot/setter'
|
6
|
+
require 'xot/blockutil'
|
7
|
+
require 'reflex/ext'
|
8
|
+
require 'reflex/helpers'
|
9
|
+
|
10
|
+
|
11
|
+
module Reflex
|
12
|
+
|
13
|
+
|
14
|
+
class View
|
15
|
+
|
16
|
+
include Xot::Hookable
|
17
|
+
include Xot::Setter
|
18
|
+
include HasBounds
|
19
|
+
|
20
|
+
alias add add_child
|
21
|
+
alias remove remove_child
|
22
|
+
alias find find_child
|
23
|
+
|
24
|
+
def initialize (opts = {}, &block)
|
25
|
+
super()
|
26
|
+
set opts
|
27
|
+
Xot::BlockUtil.instance_eval_or_block_call self, &block if block
|
28
|
+
end
|
29
|
+
|
30
|
+
end# View
|
31
|
+
|
32
|
+
|
33
|
+
end# Reflex
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
|
4
|
+
require 'reflex/image'
|
5
|
+
require 'reflex/bitmap'
|
6
|
+
require 'reflex/view'
|
7
|
+
|
8
|
+
|
9
|
+
module Reflex
|
10
|
+
|
11
|
+
|
12
|
+
module Visuals
|
13
|
+
|
14
|
+
|
15
|
+
class String < View
|
16
|
+
|
17
|
+
attr_reader :data
|
18
|
+
|
19
|
+
def data= (data)
|
20
|
+
if data != @data
|
21
|
+
@data = data
|
22
|
+
@image = nil
|
23
|
+
end
|
24
|
+
@data
|
25
|
+
end
|
26
|
+
|
27
|
+
def draw (painter, bounds)
|
28
|
+
return unless @image ||= create_image(painter)
|
29
|
+
painter.fill = 0
|
30
|
+
painter.image @image
|
31
|
+
end
|
32
|
+
|
33
|
+
private
|
34
|
+
|
35
|
+
def create_image (painter)
|
36
|
+
dat = self.data
|
37
|
+
return nil unless dat
|
38
|
+
str = dat.to_s
|
39
|
+
font = painter.font
|
40
|
+
size = font.width(str), font.height * 10
|
41
|
+
resize_to *size
|
42
|
+
bmp = Bitmap.new *size, :GRAY
|
43
|
+
bmp.draw_string str
|
44
|
+
Image.new bmp, true
|
45
|
+
end
|
46
|
+
|
47
|
+
end# String
|
48
|
+
|
49
|
+
|
50
|
+
end# Visuals
|
51
|
+
|
52
|
+
|
53
|
+
end# Reflex
|
data/lib/reflex/window.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
-
require '
|
5
|
-
require '
|
4
|
+
require 'forwardable'
|
5
|
+
require 'xot/hookable'
|
6
|
+
require 'xot/setter'
|
7
|
+
require 'xot/blockutil'
|
8
|
+
require 'reflex/ext'
|
9
|
+
require 'reflex/painter'
|
6
10
|
require 'reflex/helpers'
|
7
|
-
require 'rays/painter'
|
8
11
|
|
9
12
|
|
10
13
|
module Reflex
|
@@ -12,51 +15,23 @@ module Reflex
|
|
12
15
|
|
13
16
|
class Window
|
14
17
|
|
15
|
-
include Hookable
|
16
|
-
include Setter
|
18
|
+
include Xot::Hookable
|
19
|
+
include Xot::Setter
|
20
|
+
include HasBounds
|
17
21
|
|
18
|
-
|
22
|
+
extend Forwardable
|
19
23
|
|
20
|
-
|
21
|
-
|
22
|
-
opts.each {|key, value| set key.intern, *value}
|
23
|
-
instance_eval &block if block
|
24
|
-
end
|
25
|
-
|
26
|
-
def paint ()
|
27
|
-
@painter.begin
|
28
|
-
yield @painter if block_given?
|
29
|
-
@painter.end
|
30
|
-
end
|
31
|
-
|
32
|
-
def bounds (*args)
|
33
|
-
b = Bounds.new *get_bounds
|
34
|
-
b.offset_to! *args unless args.empty?
|
35
|
-
b
|
36
|
-
end
|
37
|
-
|
38
|
-
def bounds= (*args)
|
39
|
-
case args[0]
|
40
|
-
when Bounds
|
41
|
-
set_bounds *args[0].to_a
|
42
|
-
when Point
|
43
|
-
set_bounds *args.map{|p| p.to_a}.flatten
|
44
|
-
when Array
|
45
|
-
set_bounds *args[0]
|
46
|
-
when Integer, Float
|
47
|
-
set_bounds *args
|
48
|
-
end
|
49
|
-
end
|
24
|
+
def_delegators :root,
|
25
|
+
:add, :remove, :find
|
50
26
|
|
51
|
-
def
|
52
|
-
|
27
|
+
def initialize (opts = {}, &block)
|
28
|
+
super()
|
29
|
+
set opts
|
30
|
+
Xot::BlockUtil.instance_eval_or_block_call self, &block if block
|
53
31
|
end
|
54
32
|
|
55
|
-
|
56
|
-
|
57
|
-
def resized (width, height)
|
58
|
-
@painter.canvas 0, 0, width, height
|
59
|
-
org_resized width, height
|
33
|
+
def paint (&block)
|
34
|
+
painter.begin &block
|
60
35
|
end
|
61
36
|
|
62
37
|
end# Window
|
data/lib/reflex.rb
CHANGED
@@ -4,8 +4,8 @@
|
|
4
4
|
require 'reflex/autoinit'
|
5
5
|
require 'reflex/module'
|
6
6
|
require 'reflex/reflex'
|
7
|
-
require 'reflex/point'
|
8
|
-
require 'reflex/bounds'
|
9
7
|
require 'reflex/application'
|
10
8
|
require 'reflex/window'
|
11
|
-
require 'reflex/
|
9
|
+
require 'reflex/view'
|
10
|
+
|
11
|
+
require 'reflex/visuals/string'
|
data/reflex.gemspec
CHANGED
@@ -1,70 +1,44 @@
|
|
1
1
|
# -*- mode: ruby; coding: utf-8 -*-
|
2
2
|
|
3
3
|
|
4
|
-
$: << File.
|
4
|
+
$: << File.expand_path('../lib', __FILE__)
|
5
5
|
|
6
|
-
require 'rake'
|
7
6
|
require 'reflex/module'
|
8
7
|
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
FILES = FileList[*%W[
|
15
|
-
README
|
16
|
-
ChangeLog
|
17
|
-
Rakefile
|
18
|
-
#{NAME}.gemspec
|
19
|
-
VERSION
|
20
|
-
task/**/*.rake
|
21
|
-
ext/**/*.rb
|
22
|
-
ext/**/*.h
|
23
|
-
ext/**/*.cpp
|
24
|
-
include/**/*.h
|
25
|
-
lib/**/*.rb
|
26
|
-
src/**/*.h
|
27
|
-
src/**/*.cpp
|
28
|
-
src/**/*.mm
|
29
|
-
examples/**/README
|
30
|
-
examples/**/Rakefile
|
31
|
-
examples/**/*.h
|
32
|
-
examples/**/*.cpp
|
33
|
-
examples/**/*.rb
|
34
|
-
test/**/*.rb
|
35
|
-
]]
|
36
|
-
|
37
|
-
RDOCS = FileList[*%W[
|
38
|
-
README
|
39
|
-
.doc/ext/**/*.cpp
|
40
|
-
]]
|
9
|
+
Gem::Specification.new do |s|
|
10
|
+
def glob (*patterns)
|
11
|
+
patterns.map {|pat| Dir.glob(pat).to_a}.flatten
|
12
|
+
end
|
41
13
|
|
14
|
+
mod = Reflex
|
15
|
+
name = mod.name.downcase
|
16
|
+
rdocs = glob *%w[README .doc/ext/**/*.cpp]
|
42
17
|
|
43
|
-
|
44
|
-
s.name = "#{NAME}ion"
|
18
|
+
s.name = "#{name}ion"
|
45
19
|
s.summary = 'A Graphical User Interface Tool Kit.'
|
46
20
|
s.description = 'This library helps you to develop interactive graphical user interface.'
|
47
|
-
s.version =
|
21
|
+
s.version = mod.version
|
48
22
|
|
49
23
|
s.authors = %w[snori]
|
50
24
|
s.email = 'snori@xord.org'
|
51
|
-
s.homepage = "http://github.com/xord/#{
|
25
|
+
s.homepage = "http://github.com/xord/#{name}"
|
52
26
|
|
53
27
|
s.platform = Gem::Platform::RUBY
|
54
28
|
s.required_ruby_version = '>=1.9.0'
|
55
|
-
s.require_paths << 'ext'
|
56
29
|
|
30
|
+
s.add_runtime_dependency 'bundler'
|
57
31
|
s.add_runtime_dependency 'xot'
|
58
32
|
s.add_runtime_dependency 'rucy'
|
59
33
|
s.add_runtime_dependency 'rays'
|
60
34
|
s.add_development_dependency 'rake'
|
61
35
|
s.add_development_dependency 'gemcutter'
|
62
36
|
|
63
|
-
s.files
|
64
|
-
s.
|
65
|
-
|
37
|
+
s.files = `git ls-files`.split $/
|
38
|
+
s.executables = s.files.grep(%r{^bin/}) {|f| File.basename f}
|
39
|
+
s.test_files = s.files.grep %r{^(test|spec|features)/}
|
40
|
+
s.extra_rdoc_files = rdocs.to_a
|
66
41
|
s.has_rdoc = true
|
67
|
-
s.extra_rdoc_files = RDOCS.to_a
|
68
42
|
|
69
43
|
s.extensions << 'Rakefile'
|
70
44
|
end
|