cloudwalk 1.9.0 → 1.9.1
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.
- checksums.yaml +4 -4
- data/exe/i386-apple-darwin14 +0 -0
- data/exe/i686-pc-linux-gnu +0 -0
- data/exe/i686-w64-mingw32.exe +0 -0
- data/exe/x86_64-apple-darwin14 +0 -0
- data/exe/x86_64-pc-linux-gnu +0 -0
- data/exe/x86_64-w64-mingw32.exe +0 -0
- data/lib/cloudwalk/cw_file_json.rb +52 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 184f76c269f8fe57ace73fc0032c02ab5f656c5f
|
4
|
+
data.tar.gz: 337ce866b3863dcc950b0455057cde2853154611
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83e3ca52737c2a673216d8a907a647a0f65ded070adcd285892cd32f5f1611225570b4dcec47e7b2a9a5da9744d1de8b5efaed94982bb89014d5f33d57e924ef
|
7
|
+
data.tar.gz: e1a1380dc8873b3c4c020e5e05529b37398a920107cef4615801ee51d9ebfce7127d21a0bed51fdcd9291dc3c2a202360e0babf4c58a0643a78502d7d72fcb2d
|
data/exe/i386-apple-darwin14
CHANGED
Binary file
|
data/exe/i686-pc-linux-gnu
CHANGED
Binary file
|
data/exe/i686-w64-mingw32.exe
CHANGED
Binary file
|
data/exe/x86_64-apple-darwin14
CHANGED
Binary file
|
data/exe/x86_64-pc-linux-gnu
CHANGED
Binary file
|
data/exe/x86_64-w64-mingw32.exe
CHANGED
Binary file
|
@@ -222,6 +222,58 @@ module Cloudwalk
|
|
222
222
|
true
|
223
223
|
end
|
224
224
|
end
|
225
|
+
|
226
|
+
def compare_modules(local_app, module_ids)
|
227
|
+
local_module_app_ids = local_app["modules"].inject([]) do |mods, app|
|
228
|
+
mods << app["id"]
|
229
|
+
end
|
230
|
+
|
231
|
+
module_app_ids = module_ids.inject([]) do |mods, app|
|
232
|
+
mods << app["app_id"]
|
233
|
+
end
|
234
|
+
|
235
|
+
local_creation = local_module_app_ids - module_app_ids
|
236
|
+
remote_creation = module_app_ids - local_module_app_ids
|
237
|
+
|
238
|
+
if local_creation.nil?
|
239
|
+
raise ApplicationConfigError.new("Application #{local_app["name"]}: Local modules are missing #{local_creation}")
|
240
|
+
end
|
241
|
+
|
242
|
+
if remote_creation.nil?
|
243
|
+
raise ApplicationConfigError.new("Application #{local_app["name"]}: Remote modules are missing #{local_creation}")
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
# curl -X GET "https://api-staging.cloudwalk.io/v1/apps/posxml?access_token=TOKEN"
|
248
|
+
# curl -X GET "https://manager.cloudwalk.io/v1/apps/posxml/3082/versions?access_token=TOKEN"
|
249
|
+
def update_apps(list, apps, config)
|
250
|
+
all = Cloudwalk::Posxml::PosxmlApplication.all
|
251
|
+
list.each do |app, version|
|
252
|
+
local_app = apps.find { |json| json["name"] == app }
|
253
|
+
|
254
|
+
if app[-4..-1] == ".xml" # Check if is posxml application
|
255
|
+
remote_app = all.find { |app_json| app_json["posxml_app"]["name"] == xml2posxml(app) }
|
256
|
+
|
257
|
+
if remote_app
|
258
|
+
remote_posxml_app = remote_app["posxml_app"]
|
259
|
+
remote_versions = Cloudwalk::Posxml::PosxmlVersion.all(remote_posxml_app["id"])
|
260
|
+
remote_version_json = remote_versions.find { |json| json["app_version"]["number"] == version }
|
261
|
+
|
262
|
+
if remote_version_json && (remote_version = remote_version_json["app_version"])
|
263
|
+
remote_version_detail = Cloudwalk::Posxml::PosxmlVersion.get(remote_posxml_app["id"], remote_version["id"])
|
264
|
+
# TODO: Check if application exists locally
|
265
|
+
build_application(local_app, config, remote_posxml_app, remote_version, remote_version_detail["app_version"]["module_ids"])
|
266
|
+
else
|
267
|
+
# TODO versions not found, what to do?
|
268
|
+
end
|
269
|
+
else
|
270
|
+
# TODO app not found, what to do?
|
271
|
+
end
|
272
|
+
else
|
273
|
+
# Ruby flow
|
274
|
+
end
|
275
|
+
end
|
276
|
+
end
|
225
277
|
end
|
226
278
|
end
|
227
279
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudwalk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thiago Scalone
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|