methlab 0.0.9 → 0.1.0
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/Rakefile +19 -19
- data/lib/methlab.rb +32 -1
- data/test/test_checks.rb +133 -133
- data/test/test_defaults.rb +38 -38
- data/test/test_inline.rb +26 -10
- data/test/test_integrate.rb +18 -18
- metadata +9 -4
data/Rakefile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
begin
|
2
|
-
|
2
|
+
require 'rubygems'
|
3
3
|
rescue LoadError
|
4
4
|
end
|
5
5
|
|
@@ -29,32 +29,32 @@ Rake::GemPackageTask.new(spec) do |s|
|
|
29
29
|
end
|
30
30
|
|
31
31
|
Rake::PackageTask.new(spec.name, spec.version) do |p|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
32
|
+
p.need_tar_gz = true
|
33
|
+
p.need_zip = true
|
34
|
+
p.package_files.include("./bin/**/*")
|
35
|
+
p.package_files.include("./Rakefile")
|
36
|
+
p.package_files.include("./lib/**/*.rb")
|
37
|
+
p.package_files.include("./test/**/*")
|
38
|
+
p.package_files.include("README")
|
39
39
|
end
|
40
40
|
|
41
41
|
Rake::TestTask.new do |t|
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
t.libs << 'lib'
|
43
|
+
t.test_files = FileList['test/test*.rb']
|
44
|
+
t.verbose = true
|
45
45
|
end
|
46
46
|
|
47
47
|
RDoc::Task.new do |rd|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
48
|
+
rd.rdoc_dir = "rdoc"
|
49
|
+
rd.main = "README"
|
50
|
+
rd.title = "MethLab: A method toolkit for Ruby"
|
51
|
+
rd.rdoc_files.include("./lib/**/*.rb")
|
52
|
+
rd.rdoc_files.include("README")
|
53
|
+
rd.options = %w(-a)
|
54
54
|
end
|
55
55
|
|
56
56
|
task :fixperms do
|
57
|
-
|
57
|
+
chmod(0644, Dir['**/*'])
|
58
58
|
end
|
59
59
|
|
60
60
|
task :default => [:clean, :test, :build]
|
@@ -65,5 +65,5 @@ desc "Clean the source tree"
|
|
65
65
|
task :clean => [:distclean]
|
66
66
|
|
67
67
|
task :to_blog => [:clobber_rdoc, :rdoc] do
|
68
|
-
|
68
|
+
sh "rm -fr $git/blog/content/docs/methlab && mv rdoc $git/blog/content/docs/methlab"
|
69
69
|
end
|
data/lib/methlab.rb
CHANGED
@@ -68,7 +68,7 @@
|
|
68
68
|
#
|
69
69
|
module MethLab
|
70
70
|
|
71
|
-
VERSION = "0.0
|
71
|
+
VERSION = "0.1.0"
|
72
72
|
|
73
73
|
# Integrates MethLab into all namespaces. It does this by patching itself
|
74
74
|
# into ::main and Module.
|
@@ -370,6 +370,37 @@ module MethLab
|
|
370
370
|
end
|
371
371
|
end
|
372
372
|
|
373
|
+
#
|
374
|
+
# attr_threaded_accessor creates thread-local accessors via
|
375
|
+
# +Thread.current+. As a result, while these are accessed in your class,
|
376
|
+
# they live in a flat namespace, and must be used with caution.
|
377
|
+
#
|
378
|
+
# Usage:
|
379
|
+
#
|
380
|
+
# class Foo
|
381
|
+
# attr_threaded_accessor(:one, :two)
|
382
|
+
#
|
383
|
+
# def bar
|
384
|
+
# self.one = 1
|
385
|
+
# self.two = 2
|
386
|
+
# end
|
387
|
+
# end
|
388
|
+
#
|
389
|
+
# f = Foo.new
|
390
|
+
# f.one # 1
|
391
|
+
# f.two # 2
|
392
|
+
#
|
393
|
+
# Thread.current[:one] # => 1
|
394
|
+
# Thread.current[:two] # => 2
|
395
|
+
#
|
396
|
+
def attr_threaded_accessor(*method_names)
|
397
|
+
method_names.each do |meth|
|
398
|
+
self.send(:define_method, meth, proc { Thread.current[meth] })
|
399
|
+
meth2 = meth.to_s.gsub(/$/, '=').to_sym
|
400
|
+
self.send(:define_method, meth2, proc { |x| Thread.current[meth] = x })
|
401
|
+
end
|
402
|
+
end
|
403
|
+
|
373
404
|
if $METHLAB_AUTOINTEGRATE
|
374
405
|
integrate
|
375
406
|
end
|
data/test/test_checks.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
begin
|
2
|
-
|
3
|
-
|
2
|
+
require 'rubygems'
|
3
|
+
gem 'test-unit'
|
4
4
|
rescue LoadError
|
5
5
|
end
|
6
6
|
|
@@ -12,182 +12,182 @@ require 'methlab'
|
|
12
12
|
MethLab.integrate
|
13
13
|
|
14
14
|
class CheckedClass
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
def_named(:named, :stuff => String, :stuff2 => [ /pee/, :required ], :stuff3 => :required) do |params|
|
16
|
+
[:stuff, :stuff2, :stuff3].collect { |x| params[x] }
|
17
|
+
end
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
def_ordered(:sequential, String, [Integer, :optional]) do |params|
|
20
|
+
params
|
21
|
+
end
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
def_ordered(:ranged, (0..9)) do |params|
|
24
|
+
params
|
25
|
+
end
|
26
26
|
|
27
|
-
|
27
|
+
def_attr(:set_me, String)
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
def_ordered(:proc_nil, proc { |x| x.nil? }) do |params|
|
30
|
+
params
|
31
|
+
end
|
32
32
|
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
def_ordered(:proc_raise, proc { |x| ArgumentError.new("foo") }) do |params|
|
34
|
+
params
|
35
|
+
end
|
36
36
|
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
def_named(:has_named_rt, :stuff => {:respond_to => :replace}) do |params|
|
38
|
+
params[:stuff]
|
39
|
+
end
|
40
40
|
|
41
|
-
|
42
|
-
|
43
|
-
|
41
|
+
def_ordered(:has_ordered_rt, {:respond_to => :replace}) do |params|
|
42
|
+
params[0]
|
43
|
+
end
|
44
44
|
|
45
|
-
|
45
|
+
def_attr :rt, {:respond_to => :replace}
|
46
46
|
end
|
47
47
|
|
48
48
|
$named_proc = build_named(:stuff => String) do |params|
|
49
|
-
|
49
|
+
params
|
50
50
|
end
|
51
51
|
|
52
52
|
$ordered_proc = build_ordered((0..9)) do |params|
|
53
|
-
|
53
|
+
params
|
54
54
|
end
|
55
55
|
|
56
56
|
# FIXME module tests
|
57
57
|
|
58
58
|
class TestChecks < Test::Unit::TestCase
|
59
|
-
|
60
|
-
|
59
|
+
def setup
|
60
|
+
@checked = CheckedClass.new
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_01_named
|
64
|
+
assert(@checked.respond_to?(:named))
|
65
|
+
|
66
|
+
assert_raises(ArgumentError.new("value of argument 'stuff' is an invalid type. Requires 'String'")) do
|
67
|
+
@checked.named(:stuff => 1, :stuff2 => "pee", :stuff3 => 1)
|
61
68
|
end
|
62
69
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
assert_raises(ArgumentError.new("value of argument 'stuff' is an invalid type. Requires 'String'")) do
|
67
|
-
@checked.named(:stuff => 1, :stuff2 => "pee", :stuff3 => 1)
|
68
|
-
end
|
69
|
-
|
70
|
-
assert_raises(ArgumentError.new("value of argument 'stuff2' does not match this regexp: '(?-mix:pee)'")) do
|
71
|
-
@checked.named(:stuff => "foo", :stuff2 => "bar", :stuff3 => 1)
|
72
|
-
end
|
73
|
-
|
74
|
-
assert_raises(ArgumentError.new("argument(s) 'stuff2' were not found but are required by the prototype")) do
|
75
|
-
@checked.named(:stuff => "foo", :stuff3 => 1)
|
76
|
-
end
|
77
|
-
|
78
|
-
assert_raises(ArgumentError.new("argument(s) 'stuff2, stuff3' were not found but are required by the prototype")) do
|
79
|
-
@checked.named(:stuff => "foo")
|
80
|
-
end
|
81
|
-
|
82
|
-
assert_raises(ArgumentError.new("argument(s) 'stuff2' were not found but are required by the prototype")) do
|
83
|
-
@checked.named(:stuff => "foo", :stuff3 => nil)
|
84
|
-
end
|
85
|
-
|
86
|
-
assert_equal(
|
87
|
-
@checked.named(:stuff => "foo", :stuff2 => "poopee", :stuff3 => 1),
|
88
|
-
["foo", "poopee", 1]
|
89
|
-
)
|
90
|
-
|
91
|
-
assert_equal($named_proc.call(:stuff => "foo"), { :stuff => "foo" })
|
70
|
+
assert_raises(ArgumentError.new("value of argument 'stuff2' does not match this regexp: '(?-mix:pee)'")) do
|
71
|
+
@checked.named(:stuff => "foo", :stuff2 => "bar", :stuff3 => 1)
|
92
72
|
end
|
93
73
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
74
|
+
assert_raises(ArgumentError.new("argument(s) 'stuff2' were not found but are required by the prototype")) do
|
75
|
+
@checked.named(:stuff => "foo", :stuff3 => 1)
|
76
|
+
end
|
77
|
+
|
78
|
+
assert_raises(ArgumentError.new("argument(s) 'stuff2, stuff3' were not found but are required by the prototype")) do
|
79
|
+
@checked.named(:stuff => "foo")
|
80
|
+
end
|
81
|
+
|
82
|
+
assert_raises(ArgumentError.new("argument(s) 'stuff2' were not found but are required by the prototype")) do
|
83
|
+
@checked.named(:stuff => "foo", :stuff3 => nil)
|
84
|
+
end
|
85
|
+
|
86
|
+
assert_equal(
|
87
|
+
@checked.named(:stuff => "foo", :stuff2 => "poopee", :stuff3 => 1),
|
88
|
+
["foo", "poopee", 1]
|
89
|
+
)
|
90
|
+
|
91
|
+
assert_equal($named_proc.call(:stuff => "foo"), { :stuff => "foo" })
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_02_checked
|
95
|
+
assert(@checked.respond_to?(:sequential))
|
96
|
+
|
97
|
+
assert_raises(ArgumentError.new("value of argument '0' is an invalid type. Requires 'String'")) do
|
98
|
+
@checked.sequential(nil)
|
99
|
+
end
|
100
|
+
|
101
|
+
assert_raises(ArgumentError.new("value of argument '1' is an invalid type. Requires 'Integer'")) do
|
102
|
+
@checked.sequential("foo", "bar")
|
103
|
+
end
|
104
|
+
|
105
|
+
assert_raises(ArgumentError.new("value of argument '1' is an invalid type. Requires 'Integer'")) do
|
106
|
+
@checked.sequential("foo", nil)
|
107
|
+
end
|
108
|
+
|
109
|
+
assert_raises(ArgumentError.new("too many arguments (3 for 2)")) do
|
110
|
+
@checked.sequential("foo", 1, nil)
|
111
|
+
end
|
112
|
+
|
113
|
+
assert_raises(ArgumentError.new("not enough arguments (0 for minimum 1)")) do
|
114
|
+
@checked.sequential()
|
115
|
+
end
|
116
|
+
|
117
|
+
assert_equal(@checked.sequential("foo"), ["foo"])
|
118
|
+
assert_equal(@checked.sequential("foo", 1), ["foo", 1])
|
119
119
|
end
|
120
120
|
|
121
121
|
def test_03_ranges
|
122
|
-
|
122
|
+
assert(@checked.respond_to?(:ranged))
|
123
123
|
|
124
|
-
|
125
|
-
|
126
|
-
|
124
|
+
assert_raises(ArgumentError.new("value of argument '0' does not match range '0..9'")) do
|
125
|
+
@checked.ranged(-1)
|
126
|
+
end
|
127
127
|
|
128
|
-
|
129
|
-
|
130
|
-
|
128
|
+
assert_raises(ArgumentError.new("value of argument '0' does not match range '0..9'")) do
|
129
|
+
@checked.ranged("foo")
|
130
|
+
end
|
131
131
|
|
132
|
-
|
133
|
-
|
134
|
-
|
132
|
+
assert_raises(ArgumentError.new("value of argument '0' does not match range '0..9'")) do
|
133
|
+
@checked.ranged(10)
|
134
|
+
end
|
135
135
|
|
136
|
-
|
137
|
-
|
136
|
+
assert_equal(@checked.ranged(5), [5])
|
137
|
+
assert_equal($ordered_proc.call(5), [5])
|
138
138
|
end
|
139
139
|
|
140
140
|
def test_04_procs
|
141
|
-
|
141
|
+
assert(@checked.respond_to?(:proc_nil))
|
142
142
|
|
143
|
-
|
144
|
-
|
145
|
-
|
143
|
+
assert_raises(ArgumentError.new("value of argument '0' does not pass custom validation.")) do
|
144
|
+
@checked.proc_nil(true)
|
145
|
+
end
|
146
146
|
|
147
|
-
|
148
|
-
|
149
|
-
assert(@checked.respond_to?(:proc_nil))
|
147
|
+
assert_equal(@checked.proc_nil(nil), [nil])
|
150
148
|
|
151
|
-
|
152
|
-
@checked.proc_raise(true)
|
153
|
-
end
|
149
|
+
assert(@checked.respond_to?(:proc_nil))
|
154
150
|
|
155
|
-
|
151
|
+
assert_raises(ArgumentError.new("foo")) do
|
152
|
+
@checked.proc_raise(true)
|
153
|
+
end
|
154
|
+
|
155
|
+
assert_equal(@checked.proc_nil(nil), [nil])
|
156
156
|
end
|
157
157
|
|
158
158
|
def test_05_attr
|
159
|
-
|
159
|
+
assert(@checked.respond_to?(:set_me))
|
160
160
|
|
161
|
-
|
162
|
-
|
163
|
-
|
161
|
+
assert_raises(ArgumentError.new("value of argument '0' is an invalid type. Requires 'String'")) do
|
162
|
+
@checked.set_me = 0
|
163
|
+
end
|
164
164
|
|
165
|
-
|
165
|
+
@checked.set_me = "Foo"
|
166
166
|
|
167
|
-
|
167
|
+
assert_equal(@checked.set_me, "Foo")
|
168
168
|
end
|
169
169
|
|
170
170
|
def test_06_respond_to
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
171
|
+
assert(@checked.respond_to?(:has_named_rt))
|
172
|
+
assert(@checked.respond_to?(:has_ordered_rt))
|
173
|
+
assert(@checked.respond_to?(:rt))
|
174
|
+
|
175
|
+
assert_raises(ArgumentError.new("value of argument '0' does not respond to 'replace'")) do
|
176
|
+
@checked.rt = nil
|
177
|
+
end
|
178
|
+
|
179
|
+
assert_raises(ArgumentError.new("value of argument '0' does not respond to 'replace'")) do
|
180
|
+
@checked.has_ordered_rt(nil)
|
181
|
+
end
|
182
|
+
|
183
|
+
assert_raises(ArgumentError.new("value of argument 'stuff' does not respond to 'replace'")) do
|
184
|
+
@checked.has_named_rt(:stuff => nil)
|
185
|
+
end
|
186
|
+
|
187
|
+
@checked.rt = "foo"
|
188
|
+
|
189
|
+
assert(@checked.rt, "foo")
|
190
|
+
assert(@checked.has_ordered_rt("foo"), "foo")
|
191
|
+
assert(@checked.has_named_rt(:stuff => "foo"), "foo")
|
192
192
|
end
|
193
193
|
end
|
data/test/test_defaults.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
begin
|
2
|
-
|
3
|
-
|
2
|
+
require 'rubygems'
|
3
|
+
gem 'test-unit'
|
4
4
|
rescue LoadError
|
5
5
|
end
|
6
6
|
|
@@ -12,49 +12,49 @@ require 'methlab'
|
|
12
12
|
MethLab.integrate
|
13
13
|
|
14
14
|
class DefaultClass
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
15
|
+
def_named(:named,
|
16
|
+
:foo => [String, {:default => "foo"}, :required],
|
17
|
+
:bar => [String, {:default => "bar"}]
|
18
|
+
) do |params|
|
19
|
+
params
|
20
|
+
end
|
21
|
+
|
22
|
+
def_ordered(:ordered,
|
23
|
+
[String, {:default => "foo"}, :required],
|
24
|
+
[String, {:default => "bar"}]
|
25
|
+
) do |params|
|
26
|
+
params
|
27
|
+
end
|
28
|
+
|
29
|
+
def_attr :ml_attr, [String, {:default => "foo"}]
|
30
30
|
end
|
31
31
|
|
32
32
|
class TestDefaults < Test::Unit::TestCase
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
def setup
|
34
|
+
@default = DefaultClass.new
|
35
|
+
end
|
36
36
|
|
37
|
-
|
38
|
-
|
37
|
+
def test_01_named
|
38
|
+
assert(@default.respond_to?(:named))
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
assert_equal(@default.named, {:foo => "foo", :bar => "bar"})
|
41
|
+
assert_equal(@default.named(:foo => "fixme"), {:foo => "fixme", :bar => "bar"})
|
42
|
+
assert_equal(@default.named(:foo => "fixme", :bar => "woot"), {:foo => "fixme", :bar => "woot"})
|
43
|
+
end
|
44
44
|
|
45
|
-
|
46
|
-
|
45
|
+
def test_02_ordered
|
46
|
+
assert(@default.respond_to?(:ordered))
|
47
47
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
48
|
+
assert_equal(@default.ordered, ["foo", "bar"])
|
49
|
+
assert_equal(@default.ordered("fixme"), ["fixme", "bar"])
|
50
|
+
assert_equal(@default.ordered("fixme", "woot"), ["fixme", "woot"])
|
51
|
+
end
|
52
52
|
|
53
|
-
|
54
|
-
|
53
|
+
def test_03_attr
|
54
|
+
assert(@default.respond_to?(:ml_attr))
|
55
55
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
56
|
+
assert_equal(@default.ml_attr, "foo")
|
57
|
+
@default.ml_attr = "bar"
|
58
|
+
assert_equal(@default.ml_attr, "bar")
|
59
|
+
end
|
60
60
|
end
|
data/test/test_inline.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
begin
|
2
|
-
|
3
|
-
|
2
|
+
require 'rubygems'
|
3
|
+
gem 'test-unit'
|
4
4
|
rescue LoadError
|
5
5
|
end
|
6
6
|
|
@@ -10,18 +10,34 @@ require 'test/unit'
|
|
10
10
|
require 'methlab'
|
11
11
|
|
12
12
|
class InlineTest
|
13
|
-
|
14
|
-
|
13
|
+
extend MethLab
|
14
|
+
|
15
|
+
inline(:foo) { nil }
|
16
|
+
inline(:bar, :baz, :quux) { 1 }
|
17
|
+
|
18
|
+
attr_threaded_accessor(:one, :two)
|
15
19
|
end
|
16
20
|
|
17
21
|
class TestInline < Test::Unit::TestCase
|
18
|
-
|
19
|
-
|
22
|
+
def test_01_inline_works
|
23
|
+
it = InlineTest.new
|
20
24
|
|
21
|
-
|
25
|
+
assert_equal(nil, it.foo)
|
22
26
|
|
23
|
-
|
24
|
-
|
25
|
-
end
|
27
|
+
[:bar, :baz, :quux].each do |meth|
|
28
|
+
assert_equal(1, it.send(meth))
|
26
29
|
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_02_attr_threaded_accessor
|
33
|
+
it = InlineTest.new
|
34
|
+
|
35
|
+
it.one = 1
|
36
|
+
it.two = 2
|
37
|
+
|
38
|
+
assert_equal(it.one, 1)
|
39
|
+
assert_equal(it.two, 2)
|
40
|
+
assert_equal(Thread.current[:one], 1)
|
41
|
+
assert_equal(Thread.current[:two], 2)
|
42
|
+
end
|
27
43
|
end
|
data/test/test_integrate.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
begin
|
2
|
-
|
3
|
-
|
2
|
+
require 'rubygems'
|
3
|
+
gem 'test-unit'
|
4
4
|
rescue LoadError
|
5
5
|
end
|
6
6
|
|
@@ -10,23 +10,23 @@ require 'test/unit'
|
|
10
10
|
require 'methlab'
|
11
11
|
|
12
12
|
class TestIntegrate < Test::Unit::TestCase
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
def test_01_integration
|
14
|
+
main = eval("self", TOPLEVEL_BINDING)
|
15
|
+
MethLab.integrate
|
16
16
|
|
17
|
-
|
18
|
-
|
17
|
+
module_methods = Module.instance_methods
|
18
|
+
main_methods = main.methods
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
assert(module_methods.include?(:def_named) || module_methods.include?("def_named"))
|
21
|
+
assert(module_methods.include?(:def_ordered) || module_methods.include?("def_ordered"))
|
22
|
+
assert(module_methods.include?(:build_named) || module_methods.include?("build_named"))
|
23
|
+
assert(module_methods.include?(:build_ordered) || module_methods.include?("build_ordered"))
|
24
|
+
assert(module_methods.include?(:inline) || module_methods.include?("inline"))
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
26
|
+
assert(main_methods.include?(:def_named) || main_methods.include?("def_named"))
|
27
|
+
assert(main_methods.include?(:def_ordered) || main_methods.include?("def_ordered"))
|
28
|
+
assert(main_methods.include?(:build_named) || main_methods.include?("build_named"))
|
29
|
+
assert(main_methods.include?(:build_ordered) || main_methods.include?("build_ordered"))
|
30
|
+
assert(main_methods.include?(:inline) || main_methods.include?("inline"))
|
31
|
+
end
|
32
32
|
end
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: methlab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 27
|
4
5
|
prerelease: false
|
5
6
|
segments:
|
6
7
|
- 0
|
8
|
+
- 1
|
7
9
|
- 0
|
8
|
-
|
9
|
-
version: 0.0.9
|
10
|
+
version: 0.1.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Erik Hollensbe
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-
|
18
|
+
date: 2010-06-16 00:00:00 -04:00
|
18
19
|
default_executable:
|
19
20
|
dependencies: []
|
20
21
|
|
@@ -44,23 +45,27 @@ rdoc_options: []
|
|
44
45
|
require_paths:
|
45
46
|
- lib
|
46
47
|
required_ruby_version: !ruby/object:Gem::Requirement
|
48
|
+
none: false
|
47
49
|
requirements:
|
48
50
|
- - ">="
|
49
51
|
- !ruby/object:Gem::Version
|
52
|
+
hash: 3
|
50
53
|
segments:
|
51
54
|
- 0
|
52
55
|
version: "0"
|
53
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
54
58
|
requirements:
|
55
59
|
- - ">="
|
56
60
|
- !ruby/object:Gem::Version
|
61
|
+
hash: 3
|
57
62
|
segments:
|
58
63
|
- 0
|
59
64
|
version: "0"
|
60
65
|
requirements: []
|
61
66
|
|
62
67
|
rubyforge_project:
|
63
|
-
rubygems_version: 1.3.
|
68
|
+
rubygems_version: 1.3.7
|
64
69
|
signing_key:
|
65
70
|
specification_version: 3
|
66
71
|
summary: A method construction and validation toolkit.
|