golf 0.4.8 → 0.4.9

Sign up to get free protection for your applications and to get access to all the features.
data/lib/golf/compiler.rb CHANGED
@@ -22,13 +22,13 @@ module Golf
22
22
  def res_json(dir = @golfpath)
23
23
  results = {}
24
24
  mypath = dir.split('').last == "/" ? dir : dir+"/"
25
+ myroot = @golfpath.split('').last == "/" ? @golfpath : @golfpath+"/"
25
26
  Find.find(mypath) do |path|
26
- start = mypath.length
27
- e = path.slice(start, path.length-start)
27
+ e = path.slice(mypath.length, path.length-mypath.length)
28
+ r = path.slice(myroot.length, path.length-myroot.length)
28
29
  f = URI.escape(e)
29
30
  g = File.basename(e)
30
-
31
- h = File.dirname(e) == "." ? [] : File.dirname(e).split("/")
31
+ h = File.dirname(r) == "." ? [] : File.dirname(r).split("/")
32
32
  if FileTest.directory?(path)
33
33
  next
34
34
  else
data/lib/golf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Golf
2
- VERSION = "0.4.8"
2
+ VERSION = "0.4.9"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 8
9
- version: 0.4.8
8
+ - 9
9
+ version: 0.4.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Micha Niskin, Alan Dipert, Julio Capote