cloudwalk 1.5.0 → 1.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df89970569b0a74d8671c9123dd5bb7024cf7246
4
- data.tar.gz: 69d05f1b37967843ad7c086728b2c9958aa27ae9
3
+ metadata.gz: 8090ed8628cafe558569a7497206ffe35775ea20
4
+ data.tar.gz: 8d14541307e0868ce923b33bd2841b320575dd64
5
5
  SHA512:
6
- metadata.gz: b2715839df190edd1e3e5d559fa943a2bb1ee510ca2b2d9717b9d8080338982be9046b0aa791b53c6155d2b150fb0a79aab8e27d81b4fff072fedcc61d050d31
7
- data.tar.gz: d4ad46f0d13af8db63a5abfc8515b12e40e4421d0abfd6d1405d17c5e13528652396dfc06f0c8594131eb6e90fc2f25d2b8c23a3b73e6c05e88e733e09c69f49
6
+ metadata.gz: f8b2daf0d8ec51a40da8f41f349e77164d63eb8ea8e90064dcf9ca24a1d6400c5c81fa694186dfed1844b3c50bcf3fbfae11d9d68b986a7463389eb2ddefaee4
7
+ data.tar.gz: bf7b9f1afb95cda87abfdb06a413316cdd3ec6578843464c130b66eafc8facc9162c2a8ecccceded332ff174ca3a1a593df5863d9cceed13083aa999c31c830c
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -19,6 +19,10 @@ module Cloudwalk
19
19
  def xml2posxml(str)
20
20
  str.sub(".xml", ".posxml")
21
21
  end
22
+
23
+ def xml2rb(str)
24
+ str.sub(".xml", "_xml.rb")
25
+ end
22
26
  end
23
27
  end
24
28
 
@@ -82,9 +82,29 @@ module Cloudwalk
82
82
  Cloudwalk::CwFileJson.setup(true)
83
83
  Cloudwalk::CwFileJson.persist_lock!
84
84
  end
85
+
86
+ desc "Translate from .xml to .rb, OUT_PATH expected"
87
+ task :translate do
88
+ raise "OUT_PATH not send" unless out = ENV["OUT_PATH"]
89
+
90
+ if path = ARGV[1..-1].first
91
+ xmls = [self.libs.find { |file| file == path }]
92
+ xmls.zip([File.join(out, File.basename(xml2rb(xml)))])
93
+ else
94
+ xmls = self.libs.inject([]) do |array, lib|
95
+ array << [lib, File.join(out, File.basename(xml2rb(xml)))]
96
+ end
97
+ end
98
+
99
+ xmls.each do |xml, out|
100
+ sh "cloudwalk compile -txml -o #{out} #{xml}"
101
+ end
102
+ end
85
103
  end
104
+
86
105
  task :default => "cloudwalk:build"
87
106
  end
88
107
  end
89
108
  end
90
109
  end
110
+
@@ -47,6 +47,25 @@ module Cloudwalk
47
47
  Cloudwalk::CwFileJson.setup(true)
48
48
  Cloudwalk::CwFileJson.persist_lock!
49
49
  end
50
+
51
+ desc "Compile each .rb to .mrb"
52
+ task :single_build do
53
+ FileUtils.mkdir_p "./out/shared"
54
+
55
+ files = FileList["./lib/*"].zip(FileList["./lib/*"].pathmap("./out/shared/%n.mrb"))
56
+ files.each do |file,out|
57
+ next if file == "./lib/main.rb"
58
+ if File.file?(file)
59
+ sh "cloudwalk compile -g -o #{out} #{file}"
60
+ end
61
+ end
62
+ end
63
+
64
+ desc "Create zipfile from all .mrb"
65
+ task :single_package do
66
+ require "archive/zip"
67
+ Archive::Zip.archive "./out/mrb.zip", FileList["./out/shared/*.mrb"].to_a
68
+ end
50
69
  end
51
70
 
52
71
  task :default => "cloudwalk:build"
@@ -44,7 +44,6 @@ module Cloudwalk
44
44
  get(id)["name"]
45
45
  end
46
46
 
47
-
48
47
  def self.update(app_id, bytecode, app_parameters = nil)
49
48
  url = "#{self.host}/v1/apps/ruby/#{app_id}?access_token=#{self.token}"
50
49
  uri = URI(url)
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.5.0
4
+ version: 1.6.0
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-01-29 00:00:00.000000000 Z
11
+ date: 2018-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake