xqcoretools 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/xqcoretools +10 -4
- metadata +2 -2
data/bin/xqcoretools
CHANGED
@@ -126,7 +126,7 @@ class XQCoreTools < Thor
|
|
126
126
|
for node in nodes do
|
127
127
|
if node.has_attribute?('type') && node.get_attribute('type') == 'text/javascript'
|
128
128
|
if node.has_attribute?('src')
|
129
|
-
srcComponents = node.get_attribute('src').scan(/library\.xqcore.com\/(
|
129
|
+
srcComponents = node.get_attribute('src').scan(/library\.xqcore.com\/local\/debug\/([^\/]+)\/xqcore.js/)
|
130
130
|
if srcComponents.length > 0
|
131
131
|
scriptVersion = srcComponents[0][0]
|
132
132
|
|
@@ -135,8 +135,14 @@ class XQCoreTools < Thor
|
|
135
135
|
runtimeFile = "xqcore-web-#{platform.downcase}.js"
|
136
136
|
runtimeFolder = "#{includeFolder}/#{runtimeFile}"
|
137
137
|
runtimePath = "#{path}/#{runtimeFolder}"
|
138
|
+
|
139
|
+
url = http://library.xqcore.com/local/debug/latest/xqcore.js
|
140
|
+
|
141
|
+
if runtimePath == 'latest'
|
142
|
+
downloadCache.cacheFile(url)
|
143
|
+
end
|
138
144
|
|
139
|
-
downloadCache.saveFile("#{scriptVersion}/#{runtimeFile}", runtimePath)
|
145
|
+
downloadCache.saveFile("#{scriptVersion}/#{runtimeFile}", runtimePath, isLatestVersion)
|
140
146
|
|
141
147
|
node.set_attribute('src', runtimeFolder)
|
142
148
|
|
@@ -369,7 +375,7 @@ class XQCoreToolsDownloadCache
|
|
369
375
|
@cacheFolder = XQCoreTools::createTemporaryFolder(folder)
|
370
376
|
end
|
371
377
|
|
372
|
-
def cacheFile(url)
|
378
|
+
def cacheFile(url, forceUpdate = false)
|
373
379
|
file = @cacheFolder + "/#{url}"
|
374
380
|
dir = File.dirname(file)
|
375
381
|
|
@@ -377,7 +383,7 @@ class XQCoreToolsDownloadCache
|
|
377
383
|
FileUtils.mkdir_p dir
|
378
384
|
end
|
379
385
|
|
380
|
-
if !File.exists?
|
386
|
+
if !File.exists?(file) || forceUpdate
|
381
387
|
downloadFile(url, file)
|
382
388
|
end
|
383
389
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xqcoretools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-22 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Tools for synchronizing multiple CSharp projects and deploying to several
|
15
15
|
platform
|