lazibi 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -1
- data/lib/helper/parser_helper.rb +5 -5
- data/lib/lazibi/version.rb +1 -1
- data/lib/lazibi.rb +15 -15
- data/lib/vendor/beautifier.rb +6 -1
- data/website/index.html +2 -2
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
== 0.1.
|
1
|
+
== 0.1.6 2007-06-18
|
2
|
+
|
3
|
+
* Patched beautifier to support /\// style RE and %w() %w{}
|
4
|
+
* Make Lazibi works with itself again
|
5
|
+
|
6
|
+
== 0.1.5 2007-06-15
|
2
7
|
|
3
8
|
* Use beautifier to pre-format ruby scripts
|
4
9
|
* Completely compatible with Rails projects now, no fix anymore :]
|
data/lib/helper/parser_helper.rb
CHANGED
@@ -13,16 +13,16 @@ module Lazibi
|
|
13
13
|
|
14
14
|
def begin_keys
|
15
15
|
s = %w( module def class if begin for while unless do case )
|
16
|
-
|
17
|
-
|
16
|
+
m = ['\sdo\s*$|\sdo\s+(\|[^|]+\|)']
|
17
|
+
s.map!{|key| "^#{key}\\b"}
|
18
18
|
|
19
|
-
|
19
|
+
Regexp.new(s.concat(m).join('|'))
|
20
20
|
end
|
21
21
|
|
22
22
|
def middle_keys
|
23
23
|
s = %w( rescue else ensure elsif when )
|
24
|
-
|
25
|
-
|
24
|
+
s.map!{|key| "^#{key}\\b"}
|
25
|
+
Regexp.new(s.join('|'))
|
26
26
|
end
|
27
27
|
|
28
28
|
def end_keys
|
data/lib/lazibi/version.rb
CHANGED
data/lib/lazibi.rb
CHANGED
@@ -9,22 +9,22 @@ module Lazibi
|
|
9
9
|
class Runner
|
10
10
|
include Parser
|
11
11
|
include Task
|
12
|
-
|
12
|
+
|
13
13
|
def run
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
14
|
+
load_config
|
15
|
+
init_meta unless File.exists? '.backup'
|
16
|
+
@metas = {}
|
17
|
+
while true
|
18
|
+
current_metas = get_metas
|
19
|
+
current_metas.each_pair do |meta, m_time|
|
20
|
+
if @metas[meta] != m_time
|
21
|
+
update_rb meta
|
22
|
+
puts "+ #{meta}..."
|
23
|
+
end
|
24
|
+
end
|
25
|
+
@metas = current_metas
|
26
|
+
sleep 1
|
27
|
+
end
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
data/lib/vendor/beautifier.rb
CHANGED
@@ -88,13 +88,18 @@ module Beautifier
|
|
88
88
|
if(!commentLine)
|
89
89
|
# throw out sequences that will
|
90
90
|
# only sow confusion
|
91
|
-
tline.gsub!(
|
91
|
+
tline.gsub!(/\/.*?[^\\]\//,"")
|
92
92
|
tline.gsub!(/%r\{.*?\}/,"")
|
93
93
|
tline.gsub!(/%r(.).*?\1/,"")
|
94
94
|
tline.gsub!(/\\\"/,"'")
|
95
95
|
tline.gsub!(/".*?"/,"\"\"")
|
96
96
|
tline.gsub!(/'.*?'/,"''")
|
97
97
|
tline.gsub!(/#\{.*?\}/,"")
|
98
|
+
|
99
|
+
# more ..
|
100
|
+
tline.gsub!(/%w\{[^\{]*?\}/, '')
|
101
|
+
tline.gsub!(/%w\([^(]*?\)/, '')
|
102
|
+
|
98
103
|
$outdentExp.each do |re|
|
99
104
|
if(tline =~ re)
|
100
105
|
tab -= 1
|
data/website/index.html
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<h1>Welcome to Lazibi</h1>
|
34
34
|
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/lazibi"; return false'>
|
35
35
|
<p>Get Version</p>
|
36
|
-
<a href="http://rubyforge.org/projects/lazibi" class="numbers">0.1.
|
36
|
+
<a href="http://rubyforge.org/projects/lazibi" class="numbers">0.1.6</a>
|
37
37
|
</div>
|
38
38
|
<p>
|
39
39
|
Lazibi is a meta language which allows you to use Python like syntax (
|
@@ -176,7 +176,7 @@ Released under the MIT license (included)
|
|
176
176
|
</p>
|
177
177
|
|
178
178
|
<p class="coda">
|
179
|
-
<a href="mailto:nfjinjing@gmail.com">Jinjing</a>,
|
179
|
+
<a href="mailto:nfjinjing@gmail.com">Jinjing</a>, 18th June 2007<br>
|
180
180
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
181
181
|
</p>
|
182
182
|
</div>
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.3
|
|
3
3
|
specification_version: 1
|
4
4
|
name: lazibi
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2007-06-
|
6
|
+
version: 0.1.6
|
7
|
+
date: 2007-06-18 00:00:00 +08:00
|
8
8
|
summary: Python like syntax for Ruby
|
9
9
|
require_paths:
|
10
10
|
- lib
|