tomcat-manager 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,3 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # © 2012 Dakota Bailey
3
+ require 'rest_client'
3
4
  require 'tomcat_manager/core.rb'
@@ -3,10 +3,12 @@
3
3
  class TomcatManager
4
4
  @apps = nil
5
5
 
6
- def initialize(base_url, user, pass)
6
+ def initialize(base_url, user, pass, timeout = nil, open_timeout = nil)
7
7
  @base_url = base_url
8
8
  @user = user
9
9
  @pass = pass
10
+ @timeout = timeout
11
+ @open_timeout = open_timeout
10
12
  end
11
13
 
12
14
  def undeploy(ctx_path)
@@ -57,7 +59,7 @@ class TomcatManager
57
59
 
58
60
  def execute(cmd, options = {})
59
61
  url = @base_url + '/' + cmd
60
- opts = options.merge({:user => @user, :password => @pass})
62
+ opts = options.merge({:user => @user, :password => @pass, :timeout => @timeout, :open_timeout => @open_timeout})
61
63
  resource = RestClient::Resource.new url, opts
62
64
  resource.get
63
65
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tomcat-manager}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dakota Bailey"]
12
- s.date = %q{2012-04-04}
12
+ s.date = %q{2012-04-05}
13
13
  s.description = %q{Library for interacting with the tomcat manager web application.}
14
14
  s.email = %q{dakota.bailey@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 3
9
+ version: 0.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dakota Bailey
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-04-04 00:00:00 -06:00
17
+ date: 2012-04-05 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency