fiveruns_tuneup_core 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/fiveruns/tuneup/panel.rb +2 -0
- data/lib/fiveruns/tuneup/superlative.rb +38 -0
- data/lib/fiveruns_tuneup_core.rb +2 -1
- metadata +3 -2
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ AUTHOR = "FiveRuns Development Team"
|
|
7
7
|
EMAIL = "dev@fiveruns.com"
|
8
8
|
HOMEPAGE = "http://tuneup.fiveruns.com/"
|
9
9
|
SUMMARY = "Core utilities for FiveRuns TuneUp panels"
|
10
|
-
GEM_VERSION = "0.5.
|
10
|
+
GEM_VERSION = "0.5.2"
|
11
11
|
|
12
12
|
spec = Gem::Specification.new do |s|
|
13
13
|
s.rubyforge_project = 'fiveruns'
|
@@ -39,6 +39,7 @@ module Fiveruns
|
|
39
39
|
|
40
40
|
def template
|
41
41
|
%(
|
42
|
+
<!-- FIVERUNS_TUNEUP:START -->
|
42
43
|
<div id="tuneup"><h1>FiveRuns TuneUp</h1><div style="display: block;" id="tuneup-content"><div id="tuneup-panel">
|
43
44
|
<div id="tuneup-data">
|
44
45
|
<div id="tuneup-top">
|
@@ -55,6 +56,7 @@ module Fiveruns
|
|
55
56
|
</ul>
|
56
57
|
</div>
|
57
58
|
</div></div></div>
|
59
|
+
<!-- FIVERUNS_TUNEUP:END -->
|
58
60
|
)
|
59
61
|
end
|
60
62
|
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module Fiveruns
|
2
|
+
module Tuneup
|
3
|
+
|
4
|
+
module Superlative
|
5
|
+
|
6
|
+
def self.wedges
|
7
|
+
@wedges ||= []
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.on(target, level = :singleton, &block)
|
11
|
+
wedge = Module.new(&block)
|
12
|
+
case level
|
13
|
+
when :singleton
|
14
|
+
save = Module.new
|
15
|
+
wedge.instance_methods.each do |meth|
|
16
|
+
save.send(:define_method, meth, target.method(meth))
|
17
|
+
if target.metaclass.instance_methods.include?(meth.to_s)
|
18
|
+
target.metaclass.send(:remove_method, meth)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
target.extend save
|
22
|
+
target.extend wedge
|
23
|
+
when :instances # Instance
|
24
|
+
wedges << wedge
|
25
|
+
offset = wedges.size - 1
|
26
|
+
hook = Module.new
|
27
|
+
hook.module_eval %{
|
28
|
+
def new(*args, &block)
|
29
|
+
super.extend(Fiveruns::Tuneup::Superlative.wedges[#{offset}])
|
30
|
+
end
|
31
|
+
}
|
32
|
+
target.extend hook
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
data/lib/fiveruns_tuneup_core.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fiveruns_tuneup_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FiveRuns Development Team
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-
|
12
|
+
date: 2008-11-07 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- lib/fiveruns/tuneup/panel.rb
|
63
63
|
- lib/fiveruns/tuneup/run.rb
|
64
64
|
- lib/fiveruns/tuneup/step.rb
|
65
|
+
- lib/fiveruns/tuneup/superlative.rb
|
65
66
|
- lib/fiveruns/tuneup/templating.rb
|
66
67
|
- lib/fiveruns_tuneup_core.rb
|
67
68
|
- test/fixtures
|