teamforge 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/teamforge/version.rb +1 -1
- data/lib/teamforge.rb +21 -4
- metadata +3 -3
data/lib/teamforge/version.rb
CHANGED
data/lib/teamforge.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require "savon"
|
2
2
|
require "time"
|
3
|
+
require "uri"
|
3
4
|
require "teamforge/ctfsoap"
|
4
5
|
require "teamforge/version"
|
5
6
|
require "teamforge/tfsoaprequest"
|
@@ -42,7 +43,7 @@ module TeamForge
|
|
42
43
|
end
|
43
44
|
|
44
45
|
def self.server=(server)
|
45
|
-
@server=format_url(server)
|
46
|
+
@server=format_url(server, @use_ssl)
|
46
47
|
end
|
47
48
|
|
48
49
|
def self.verbose?
|
@@ -57,13 +58,29 @@ module TeamForge
|
|
57
58
|
end
|
58
59
|
end
|
59
60
|
|
60
|
-
def self.
|
61
|
-
|
62
|
-
|
61
|
+
def self.use_ssl
|
62
|
+
@use_ssl
|
63
|
+
end
|
64
|
+
|
65
|
+
def self.use_ssl=(use_ssl)
|
66
|
+
@use_ssl = use_ssl
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.format_url(url, ssl=true)
|
70
|
+
|
71
|
+
if ssl || ssl.nil?
|
63
72
|
url = "https://#{url.gsub(/^http(|s):\/\/?/i,'')}"
|
64
73
|
else
|
65
74
|
url = "http://#{url.gsub(/^http(|s):\/\/?/i,'')}"
|
75
|
+
end
|
76
|
+
|
77
|
+
uri = URI.parse url
|
78
|
+
unless uri.kind_of? URI::HTTP
|
79
|
+
raise TeamForgeError "Invalid Server URL"
|
66
80
|
end
|
81
|
+
|
82
|
+
return url
|
83
|
+
|
67
84
|
end
|
68
85
|
|
69
86
|
# 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.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-05-08 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: savon
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153599540 !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: *
|
24
|
+
version_requirements: *2153599540
|
25
25
|
description: A Ruby SOAP wrapper to communicate with TeamForge WebServices
|
26
26
|
email: pwolf@collab.net
|
27
27
|
executables: []
|