teamforge 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,7 @@ module TeamForge
16
16
  # response: The response message name that is expected from a successful call to the CTF server. A symbol is expected
17
17
  # E.g. :loginResponse
18
18
  # proxy: If a proxy server is being used to connect to the the CTF server it should be specified. It can be left blank.
19
- def self.request(req_msg, server=nil, proxy=nil)
19
+ def self.request(req_msg, server=nil, ssl=nil, proxy=nil)
20
20
  return unless req_msg.kind_of? Struct
21
21
 
22
22
  server ||= @server
@@ -24,7 +24,7 @@ module TeamForge
24
24
  if server.nil?
25
25
  raise(TeamForgeError, "No TeamForge server specified")
26
26
  else
27
- @server = format_url(server)
27
+ @server = format_url(server, ssl)
28
28
  end
29
29
 
30
30
  proxy ||= @proxy
@@ -9,8 +9,8 @@ module TeamForge
9
9
  # Calling this method 'request' on any Soap Message Struct in teamforge will send it to the server specified.
10
10
  # The TeamForge module will remember the TeamForge server specified so it doesn't have to be entered each time.
11
11
  ######
12
- def request(server=nil, proxy=nil)
13
- TeamForge.request(self, server, proxy)
12
+ def request(server=nil, ssl=nil, proxy=nil)
13
+ TeamForge.request(self, server, ssl, proxy)
14
14
  end
15
15
 
16
16
 
@@ -1,5 +1,5 @@
1
1
  module TeamForge
2
2
 
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
 
5
5
  end
data/lib/teamforge.rb CHANGED
@@ -57,9 +57,13 @@ module TeamForge
57
57
  end
58
58
  end
59
59
 
60
- def self.format_url(url)
61
- url = "http://#{url}" unless /^http?/ =~ url
62
- url = url.gsub(/\/+$/, '')
60
+ def self.format_url(url, ssl=nil)
61
+
62
+ if ssl
63
+ url = "https://#{url.gsub(/^http(|s):\/\/?/i,'')}"
64
+ else
65
+ url = "http://#{url.gsub(/^http(|s):\/\/?/i,'')}"
66
+ end
63
67
  end
64
68
 
65
69
  # Currently, this SDK wrapper uses Savon to send and receive soap messages. Only the Client is being used currently but not any of the parsers. Adapting to a different HTTP library would be fairly simple.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teamforge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-16 00:00:00.000000000Z
12
+ date: 2013-05-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon
16
- requirement: &2153065100 !ruby/object:Gem::Requirement
16
+ requirement: &2153056460 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 1.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2153065100
24
+ version_requirements: *2153056460
25
25
  description: A Ruby SOAP wrapper to communicate with TeamForge WebServices
26
26
  email: pwolf@collab.net
27
27
  executables: []