teamforge 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,6 +39,15 @@ module TeamForge
39
39
 
40
40
 
41
41
  fq_path = @server + SERVICE_PATH + @endpoint
42
+
43
+
44
+ @verbose ||= false
45
+
46
+ Savon.configure do |config|
47
+ config.log = verbose? # disable logging
48
+ config.log_level = :info # changing the log level
49
+ end
50
+ HTTPI.log = verbose? # disable HTTPI logging
42
51
 
43
52
 
44
53
  # The client from Savon is instantiated with the proper namespace, the endpoint for the request, and SSL verification (from HTTPI) turned off
@@ -1,5 +1,5 @@
1
1
  module TeamForge
2
2
 
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
 
5
5
  end
data/lib/teamforge.rb CHANGED
@@ -45,6 +45,18 @@ module TeamForge
45
45
  @server=format_url(server)
46
46
  end
47
47
 
48
+ def self.verbose?
49
+ @verbose
50
+ end
51
+
52
+ def self.verbose=(verbose)
53
+ if !!verbose == true && verbose != 0
54
+ @verbose=true
55
+ else
56
+ @verbose=false
57
+ end
58
+ end
59
+
48
60
  def self.format_url(url)
49
61
  url = "http://#{url}" unless /^http?/ =~ url
50
62
  url = url.gsub(/\/+$/, '')
@@ -52,11 +64,8 @@ module TeamForge
52
64
 
53
65
  # 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.
54
66
  # When loaded, Savon logging is turned off as is HTTPI logging. Otherwise, by default Savon writes all messages to Stdout.
55
- Savon.configure do |config|
56
- config.log = false # disable logging
57
- config.log_level = :info # changing the log level
58
- end
59
- HTTPI.log = false # disable HTTPI logging
67
+
68
+
60
69
 
61
70
  # Error to indicate problems accessing a CTF server
62
71
  class TeamForgeError < RuntimeError; end
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.0.5
4
+ version: 0.0.6
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-10 00:00:00.000000000Z
12
+ date: 2013-04-15 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: savon
16
- requirement: &2153451120 !ruby/object:Gem::Requirement
16
+ requirement: &2153374960 !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: *2153451120
24
+ version_requirements: *2153374960
25
25
  description: A Ruby SOAP wrapper to communicate with TeamForge WebServices
26
26
  email: pwolf@collab.net
27
27
  executables: []