bpm_manager 0.10.6 → 0.10.7

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: c8b648175bc820d719c154609c84c3bd8964cb35
4
- data.tar.gz: c474b7b7f3153ebf904f2f8d7e02d90cbd01034a
3
+ metadata.gz: 8abe029fcc7da8f3cb6fac060b2bd8a937cfa011
4
+ data.tar.gz: b115502c0f510f9acfd57f039bae7341e406aa3f
5
5
  SHA512:
6
- metadata.gz: 90f0a7344a79cbed61c76d02c4fca001c9f26b78edbcc09b25aa3f11f37b4217de6c76b1020a337cf7093077ec52bf074d46ce7a4c58d28574c804d5a21a5d06
7
- data.tar.gz: 9bdbbf395d060aada92f9b307b133f91864e0623d4c312598a5f0aec9fbc6002fe453fe748ab618af9fc37bb2e771ce6926b2f6ebb1a2b5db771947c8f35adad
6
+ metadata.gz: 420c77853d566690eb08ef9666b961f879ab671fbe542d7237f2f46cc516492ae2ca4ba41ee3e74e8653d70ab857e6a06731ddb4197bb1c375c28e341bad848e
7
+ data.tar.gz: 64f5eacfb504309b0bdcb441bbda665d46aec6f060ae520f5921d03a4acca2b0fcc747cd24af81c07e2542097d42a42ee58e63756f848bf4ff148e2a4f277feb
data/lib/bpm_manager.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require "bpm_manager/version"
2
2
  require "bpm_manager/red_hat"
3
3
  require "bpm_manager/oracle"
4
+ require "rest-client"
4
5
 
5
6
  module BpmManager
6
7
  class << self
@@ -30,4 +31,9 @@ module BpmManager
30
31
  def self.uri(rest_service = '')
31
32
  URI.encode('http' + (configuration.bpm_use_ssl ? 's' : '') + '://' + configuration.bpm_username + ':' + configuration.bpm_password + '@' + configuration.bpm_url + configuration.bpm_url_suffix + (rest_service.nil? ? '' : rest_service))
32
33
  end
34
+
35
+ # Returns the Rest Client private resource
36
+ def self.server
37
+ RestClient::Resource.new(URI.encode('http' + (configuration.bpm_use_ssl ? 's' : '') + '://' + configuration.bpm_url + configuration.bpm_url_suffix), :user => configuration.bpm_username, :password => configuration.bpm_password, :headers => {:content_type => :json, :accept => :json})
38
+ end
33
39
  end
@@ -11,9 +11,7 @@ module BpmManager
11
11
 
12
12
  # Creates a new Process
13
13
  def self.create_process(deployment_id, process_definition_id, opts = {})
14
- url = URI.encode(BpmManager.uri('/runtime/' + deployment_id.to_s + '/process/' + process_definition_id.to_s + '/start' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&'))))
15
- puts '---->' + url.inspect
16
- RestClient.post(url, :headers => {:content_type => :json, :accept => :json})
14
+ self.server[URI.encode(BpmManager.uri('/runtime/' + deployment_id.to_s + '/process/' + process_definition_id.to_s + '/start' + (opts.empty? ? '' : '?' + opts.map{|k,v| k.to_s + '=' + v.to_s}.join('&'))))].post
17
15
  end
18
16
 
19
17
  # Gets all Process Instances
@@ -1,3 +1,3 @@
1
1
  module BpmManager
2
- VERSION = "0.10.6"
2
+ VERSION = "0.10.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bpm_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.6
4
+ version: 0.10.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Presa