wedge 0.0.19 → 0.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a2f2c44c81d49081288bfe24434855b91bf876c
4
- data.tar.gz: e8ff7f64b09778e9f61a20fb08dd6b815799ab85
3
+ metadata.gz: de8579ae1dfb224cca702f0d1d49731b3bb30c19
4
+ data.tar.gz: d257a9c6c4abc09de23f7b17a6eb386339522bc4
5
5
  SHA512:
6
- metadata.gz: c864705aeee87f01be1f5b4a62c8b845248840f1798cf6ebfd75749c0093629c849327ae25a543face0e8ecc3d38a006dc8417bdfd1c0ee1d2cad0ee87bb8279
7
- data.tar.gz: 5012dd77f880958fd1a16ff580153a8cae1a4b816e1186224be5daf1e8b579b187fd0ffc7b044908dc92f0410c47689d059650937568bc97e81814fabc7c9873
6
+ metadata.gz: 7363f752b9b60234eb6e2fbb162deeecd452596241a0110ad5587941081c762b5d1e92e44f64e54d0a7a1d5d015e500ba43c20705ac77e58ddc6db55b985582f
7
+ data.tar.gz: 126e63a1af92d926cdc2fd456aabe786e4d9f945c78e3cdbecef319cbfc74f6025e7d30b95ef1f05e273923dcbd03f609667e844549961ec9109f3561efe66c4
@@ -35,7 +35,7 @@ class Roda
35
35
 
36
36
  module RequestClassMethods
37
37
  def wedge_route_regex
38
- assets_url = ::Wedge.assets_url.gsub(%r{^(http(|s)://[^\/]*\/|\/)}, '')
38
+ assets_url = ::Wedge.assets_url.gsub(%r{^\/}, '')
39
39
  %r{#{assets_url}/(.*)\.(.*)$}
40
40
  end
41
41
  end
@@ -203,7 +203,7 @@ module Wedge
203
203
  payload[:wedge_method_called] = meth
204
204
  payload[:wedge_method_args] = args
205
205
 
206
- call_url = "#{Wedge.assets_url}/#{path_name}.call".gsub(%r{^(http(|s)://[^\/]*\/|\/)}, '')
206
+ call_url = "#{Wedge.assets_url}/#{path_name}.call"
207
207
 
208
208
  HTTP.post("/#{call_url}",
209
209
  headers: {
data/lib/wedge/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wedge
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
3
3
  end
data/lib/wedge.rb CHANGED
@@ -29,6 +29,11 @@ module Wedge
29
29
  end
30
30
 
31
31
  def assets_url
32
+ url = opts.assets_url.gsub(%r{^(http(|s)://[^\/]*\/|\/)}, '/')
33
+ "#{url}#{opts.cache_assets ? "/#{opts.assets_key}" : ''}"
34
+ end
35
+
36
+ def assets_url_with_host
32
37
  "#{opts.assets_url}#{opts.cache_assets ? "/#{opts.assets_key}" : ''}"
33
38
  end
34
39
 
@@ -203,7 +208,7 @@ module Wedge
203
208
 
204
209
  def load_comp options = {}, promise = Promise.new
205
210
  path_name = options[:path_name]
206
- assets_url = Wedge.assets_url
211
+ assets_url = Wedge.assets_url_with_host
207
212
 
208
213
  # fix: this could give people unwanted behaviour, change getScript to just
209
214
  # use ajax.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wedge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj