monkey-lib 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/monkey/ext.rb +5 -5
- data/lib/monkey/ext/file.rb +1 -1
- data/spec/monkey/ext_spec.rb +1 -1
- metadata +4 -4
data/lib/monkey/ext.rb
CHANGED
@@ -17,8 +17,8 @@ module Monkey
|
|
17
17
|
if klass
|
18
18
|
@core_class = klass
|
19
19
|
klass.send :include, self
|
20
|
-
self::
|
21
|
-
self::
|
20
|
+
self::ExtClassMethods.extend ClassDsl
|
21
|
+
self::ExtClassMethods.core_class @core_class
|
22
22
|
@core_class.class_eval <<-EOS
|
23
23
|
def method_missing(meth, *args, &blk)
|
24
24
|
return super if Monkey::Backend.setup?
|
@@ -52,7 +52,7 @@ module Monkey
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def included(klass)
|
55
|
-
klass.extend self::
|
55
|
+
klass.extend self::ExtClassMethods
|
56
56
|
super
|
57
57
|
end
|
58
58
|
|
@@ -78,7 +78,7 @@ module Monkey
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def class_methods(&block)
|
81
|
-
self::
|
81
|
+
self::ExtClassMethods.class_eval(&block)
|
82
82
|
end
|
83
83
|
|
84
84
|
def expects(*list)
|
@@ -98,7 +98,7 @@ module Monkey
|
|
98
98
|
class_name = filename.capitalize
|
99
99
|
extension = eval <<-EOS
|
100
100
|
module ::Monkey::Ext::#{class_name} # <- for MacRuby!?
|
101
|
-
module
|
101
|
+
module ExtClassMethods; end # <- for 1.9
|
102
102
|
self
|
103
103
|
end
|
104
104
|
EOS
|
data/lib/monkey/ext/file.rb
CHANGED
data/spec/monkey/ext_spec.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monkey-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 4
|
10
|
+
version: 0.5.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Konstantin Haase
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-09-
|
18
|
+
date: 2010-09-20 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|