golf 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/golf/compiler.rb +5 -4
- data/lib/golf/version.rb +1 -1
- metadata +2 -2
data/lib/golf/compiler.rb
CHANGED
@@ -19,14 +19,15 @@ module Golf
|
|
19
19
|
traverse("#{@golfpath}/components", "html")
|
20
20
|
end
|
21
21
|
|
22
|
-
def res_json
|
22
|
+
def res_json(dir = @golfpath)
|
23
23
|
results = {}
|
24
|
-
|
25
|
-
Find.find(
|
26
|
-
start =
|
24
|
+
mypath = dir.split('').last == "/" ? dir : dir+"/"
|
25
|
+
Find.find(mypath) do |path|
|
26
|
+
start = mypath.length
|
27
27
|
e = path.slice(start, path.length-start)
|
28
28
|
f = URI.escape(e)
|
29
29
|
g = File.basename(e)
|
30
|
+
|
30
31
|
h = File.dirname(e) == "." ? [] : File.dirname(e).split("/")
|
31
32
|
if FileTest.directory?(path)
|
32
33
|
next
|
data/lib/golf/version.rb
CHANGED