golf 0.4.7 → 0.4.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/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
- path = "#{@golfpath}/"
25
- Find.find(@golfpath) do |path|
26
- start = @golfpath.length
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
@@ -1,3 +1,3 @@
1
1
  module Golf
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 7
9
- version: 0.4.7
8
+ - 8
9
+ version: 0.4.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Micha Niskin, Alan Dipert, Julio Capote