rill 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. data/lib/rill.rb +5 -5
  2. metadata +1 -1
data/lib/rill.rb CHANGED
@@ -33,7 +33,7 @@ class Rill
33
33
  def resolve_module(mod)
34
34
  return if @preloads.include?(mod) || @modules.include?(mod)
35
35
 
36
- mod = parse_mod(mod)
36
+ mod = parse_module(mod)
37
37
  path = File.join(@base, "#{mod}.js")
38
38
  code = File.open(path).read
39
39
 
@@ -68,7 +68,7 @@ class Rill
68
68
  # mark the module id
69
69
  # parse and set the module dependencies if not present
70
70
  def polish(mod, code = nil)
71
- mod = parse_mod(mod)
71
+ mod = parse_module(mod)
72
72
 
73
73
  return polish_code(mod, code) unless code.nil? || code == ''
74
74
 
@@ -86,7 +86,7 @@ class Rill
86
86
  end
87
87
 
88
88
  def polish_code(mod, code)
89
- mod = parse_mod(mod)
89
+ mod = parse_module(mod)
90
90
 
91
91
  if code =~ /^define\(function/
92
92
  deps = parse_deps(code)
@@ -101,8 +101,8 @@ class Rill
101
101
  code
102
102
  end
103
103
 
104
- def parse_mod(mod)
105
- mod.sub(/^#{@base}/, '').sub(/\.js$/, '')
104
+ def parse_module(mod)
105
+ mod.sub(/^#{@base}\/?/, '').sub(/\.js$/, '')
106
106
  end
107
107
 
108
108
  def expand_path(dep, mod)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rill
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: