cloudwalk 0.2.2 → 0.2.3

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: aea743a36620090f3a10717a510be3622bdd0471
4
- data.tar.gz: 465ae5e47b26e2236d54c44e5a5cb3f1cc0a9061
3
+ metadata.gz: 0b29e37f8e657b08fcb05977e4d0de6fc45d58e1
4
+ data.tar.gz: ecdb7ee55fcb87e57a2e21261ce24bdc219a2b28
5
5
  SHA512:
6
- metadata.gz: d4d2378fc98b6014f1cd2f4d736ee455529c070ee7e45ddf8382948fb04de24e696ce786c44e3fe4a8773e11da34ba1b35242c6d03aae3baa77455379955d03d
7
- data.tar.gz: 4218f3cba0a01261fd72c08af0eb743dcece668df8c53fd57a699bc32350b5b70272b86494580258ca11bd2e1628efff099b80959c23e29b1d8eaa4a98ee487f
6
+ metadata.gz: 5d52bad05d34edac99ddb9c59840d81aebb8c1e3025fed88fe93c2fa9bd89f492f0e4491008ec771ca78d1a2eb327a49173ffd5126f82f86360f5582a013d953
7
+ data.tar.gz: 56c16d39e9cf0a5575b131affa6485c488fcc05a1e4c40d507906d673d51ae58a34893e2a3dae8511a9092df1c950720abbaca3e11e84ac9c9f419226b946ae8
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -169,8 +169,10 @@ module Cloudwalk
169
169
  raise Exception.new("application or module #{path} not found in Manager, please create it")
170
170
  end
171
171
 
172
+ app_cwfile = self.cwfile["apps"].find {|config| config["name"] == posxml2xml(posxml) }
173
+
172
174
  Cloudwalk::PosxmlVersion.update(
173
- app_lock["id"], app_lock["version_id"], File.read(path)
175
+ app_lock["id"], app_lock["version_id"], File.read(path), app_cwfile
174
176
  )
175
177
  end
176
178
  end
@@ -41,14 +41,22 @@ module Cloudwalk
41
41
  response
42
42
  end
43
43
 
44
- def self.update(app_id, version_id, bytecode)
45
- url = "#{self.host}/v1/apps/posxml/#{app_id}/versions/#{version_id}?access_token=#{self.token}"
46
- uri = URI(url)
44
+ def self.update(app_id, version_id, bytecode, app_parameters = nil)
45
+ url = "#{self.host}/v1/apps/posxml/#{app_id}/versions/#{version_id}?access_token=#{self.token}"
46
+ uri = URI(url)
47
+ form = {"bytecode" => Base64.strict_encode64(bytecode)}
47
48
  response = nil
48
49
 
50
+ if app_parameters
51
+ form["authorizer_url"] = app_parameters["authorizer_url"]
52
+ form["description"] = app_parameters["description"]
53
+ form["pos_display_label"] = app_parameters["pos_display_label"]
54
+ form["displayable"] = app_parameters["pos_display_label"] != "X"
55
+ end
56
+
49
57
  Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
50
58
  request = Net::HTTP::Put.new(uri)
51
- request.set_form_data({"bytecode" => Base64.strict_encode64(bytecode)})
59
+ request.set_form_data(form)
52
60
  response = http.request(request)
53
61
  end
54
62
  response.code == 200
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudwalk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Scalone