hayato1980-tomcatmanager 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -5,8 +5,8 @@ begin
5
5
  require 'jeweler'
6
6
  Jeweler::Tasks.new do |gem|
7
7
  gem.name = "tomcatmanager"
8
- gem.summary = %Q{TODO: one-line summary of your gem}
9
- gem.description = %Q{TODO: longer description of your gem}
8
+ gem.summary = %Q{frontend of Apache Tomcat manager application}
9
+ gem.description = %Q{frontend of Apache Tomcat manager application implemented by ruby}
10
10
  gem.email = "haya10.ito+github@gmail.com"
11
11
  gem.homepage = "http://github.com/hayato1980/tomcatmanager"
12
12
  gem.authors = ["Hayato"]
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/bin/tomcatmanager CHANGED
@@ -5,17 +5,19 @@ require 'lib/tomcatmanager'
5
5
  option = { }
6
6
 
7
7
  opt = OptionParser.new do |opt|
8
- opt.on('-l', '--list') {|v| option[:command] = :list }
9
- opt.on('-d VAL', '--deploy=VAL') do |v|
8
+ opt.on('-l', '--list','list of application') {|v| option[:command] = :list }
9
+ opt.on('-d VAL', '--deploy=VAL','deploy application') do |v|
10
10
  option[:command] = :deploy
11
11
  option[:deploy] = v
12
12
  end
13
- opt.on('-e VAL', '--undeploy=VAL') do |v|
13
+ opt.on('-e VAL', '--undeploy=VAL','undeploy application') do |v|
14
14
  option[:command] = :undeploy
15
15
  option[:undeploy] = v
16
16
  end
17
- opt.on('--user VAL') {|v| option[:user] = v }
18
- opt.on('--password VAL') {|v| option[:password] = v }
17
+ opt.on('--serverinfo','print serverinfo') {|v| option[:command] = :serverinfo}
18
+
19
+ opt.on('--user VAL','manager application account') {|v| option[:user] = v }
20
+ opt.on('--password VAL','manager application password') {|v| option[:password] = v }
19
21
  end
20
22
 
21
23
  opt.parse!(ARGV)
@@ -32,5 +34,9 @@ when :deploy
32
34
  tm.deploy option[:deploy]
33
35
  when :undeploy
34
36
  tm.undeploy option[:undeploy]
37
+ when :serverinfo
38
+ puts tm.serverinfo
39
+ else
40
+ puts opt
35
41
  end
36
42
 
data/lib/tomcatmanager.rb CHANGED
@@ -49,7 +49,6 @@ class TomcatManager
49
49
 
50
50
  def default_pathname filename
51
51
  result =File.basename(filename).gsub( /\.war/i , "")
52
- puts result
53
52
  result
54
53
  end
55
54
  path = default_pathname(filename) if path.nil?
@@ -61,6 +60,10 @@ class TomcatManager
61
60
  puts response.body
62
61
  end
63
62
 
63
+ def serverinfo
64
+ request('/manager/serverinfo').body
65
+ end
66
+
64
67
  def request(path,method=:get)
65
68
  Net::HTTP.start(@host,@port) do |http|
66
69
  case method
@@ -83,4 +86,6 @@ class TomcatManager
83
86
  end
84
87
  end
85
88
 
89
+
90
+
86
91
  end
@@ -5,13 +5,13 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{tomcatmanager}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Hayato"]
12
12
  s.date = %q{2009-09-23}
13
13
  s.default_executable = %q{tomcatmanager}
14
- s.description = %q{TODO: longer description of your gem}
14
+ s.description = %q{frontend of Apache Tomcat manager application implemented by ruby}
15
15
  s.email = %q{haya10.ito+github@gmail.com}
16
16
  s.executables = ["tomcatmanager"]
17
17
  s.extra_rdoc_files = [
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
36
36
  s.rdoc_options = ["--charset=UTF-8"]
37
37
  s.require_paths = ["lib"]
38
38
  s.rubygems_version = %q{1.3.1}
39
- s.summary = %q{TODO: one-line summary of your gem}
39
+ s.summary = %q{frontend of Apache Tomcat manager application}
40
40
  s.test_files = [
41
41
  "spec/spec_helper.rb",
42
42
  "spec/tomcatmanager_spec.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hayato1980-tomcatmanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hayato
@@ -22,7 +22,7 @@ dependencies:
22
22
  - !ruby/object:Gem::Version
23
23
  version: "0"
24
24
  version:
25
- description: "TODO: longer description of your gem"
25
+ description: frontend of Apache Tomcat manager application implemented by ruby
26
26
  email: haya10.ito+github@gmail.com
27
27
  executables:
28
28
  - tomcatmanager
@@ -69,7 +69,7 @@ rubyforge_project:
69
69
  rubygems_version: 1.3.5
70
70
  signing_key:
71
71
  specification_version: 2
72
- summary: "TODO: one-line summary of your gem"
72
+ summary: frontend of Apache Tomcat manager application
73
73
  test_files:
74
74
  - spec/spec_helper.rb
75
75
  - spec/tomcatmanager_spec.rb