ludy 0.1.7 → 0.1.8
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/CHANGES +4 -0
- data/README +2 -2
- data/Rakefile +1 -1
- data/lib/ludy/tasks/preprocess_cpp/debug_hook.rb +5 -4
- data/lib/ludy/tasks/preprocess_cpp.rb +4 -3
- data/lib/ludy.rb +1 -1
- metadata +1 -1
data/CHANGES
CHANGED
data/README
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= ludy 0.1.
|
1
|
+
= ludy 0.1.8
|
2
2
|
by Lin Jen-Shin (a.k.a. godfat 真常)
|
3
3
|
strip any number: 18god29fat7029 (at] godfat32 -dooot- 20org
|
4
4
|
http://ludy.rubyforge.org
|
@@ -12,7 +12,7 @@ Aims to extend Ruby standard library, providing some useful tools that's not exi
|
|
12
12
|
|
13
13
|
1. ludy standard library extension, especially for functional programming.
|
14
14
|
2. rails/array paginator, included since 0.1.2
|
15
|
-
3. c++ erb meta-programming, included since 0.1.0
|
15
|
+
3. c++ erb meta-programming, included since 0.1.0 (support erubis 2.5+)
|
16
16
|
4. puzzle_generator, included since 0.0.8
|
17
17
|
|
18
18
|
== SYNOPSIS:
|
data/Rakefile
CHANGED
@@ -21,7 +21,7 @@ PROJ.description = paragraphs_of('README', 1).join("\n\n")
|
|
21
21
|
PROJ.changes = paragraphs_of('CHANGES', 0..1).join("\n\n")
|
22
22
|
PROJ.rubyforge_name = 'ludy'
|
23
23
|
|
24
|
-
PROJ.version = '0.1.
|
24
|
+
PROJ.version = '0.1.8'
|
25
25
|
PROJ.exclude << '.DS_Store' << '^tmp'
|
26
26
|
PROJ.dependencies << 'rake'
|
27
27
|
|
@@ -10,9 +10,10 @@ module Kernel
|
|
10
10
|
def debug_hook name, &block
|
11
11
|
Ludy::erbout name, block.binding
|
12
12
|
block.call
|
13
|
-
Ludy::erbout
|
14
|
-
|
15
|
-
std::cerr << \"method #{name} called, for \" << this << \" at
|
16
|
-
#endif
|
13
|
+
Ludy::erbout "
|
14
|
+
#ifndef NDEBUG
|
15
|
+
std::cerr << \"method #{name} called, for \" << this << \" at #{@file}: #{eval '__LINE__', block.binding}\\n\";
|
16
|
+
#endif
|
17
|
+
", block.binding
|
17
18
|
end
|
18
19
|
end
|
@@ -25,16 +25,17 @@ namespace :preprocess do
|
|
25
25
|
open output, 'w' do |o|
|
26
26
|
@class = output.pathmap '%n'
|
27
27
|
@dir = output.pathmap('%-1d')
|
28
|
+
@file = input
|
28
29
|
@indent = ' '
|
29
30
|
@prefix = ''
|
30
31
|
Project.name ||= 'please_set_Project_name_for_your_header_name'
|
31
|
-
o << template_engine[input].result(binding)
|
32
|
+
o << template_engine[open(input).read].result(binding)
|
32
33
|
end
|
33
34
|
end
|
34
35
|
|
35
36
|
erb_inputs.zip(erb_outputs).each{ |input, output|
|
36
37
|
file output => input do
|
37
|
-
preprocess lambda{|input| ERB.new input},
|
38
|
+
preprocess lambda{|input| ERB.new input}, input, output
|
38
39
|
end
|
39
40
|
}
|
40
41
|
|
@@ -53,7 +54,7 @@ namespace :preprocess do
|
|
53
54
|
erubis_inputs.zip(erubis_outputs).each{ |input, output|
|
54
55
|
file output => input do
|
55
56
|
class ErboutEruby < Erubis::Eruby; include Erubis::ErboutEnhancer; end
|
56
|
-
preprocess lambda{|input| ErboutEruby.new input, :trim => false},
|
57
|
+
preprocess lambda{|input| ErboutEruby.new input, :trim => false}, input, output
|
57
58
|
end
|
58
59
|
}
|
59
60
|
rescue LoadError; end # no erubis
|
data/lib/ludy.rb
CHANGED