capitomcat 0.0.2 → 0.0.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 05fb97e5443b9a5ed772b29b91acc43e45ebafb7
4
- data.tar.gz: 7ac4dbeaaf93dfd4499cb598e9a7150a94d26c2a
3
+ metadata.gz: 460283b08a3d25fe8c961e9916697ab59642bf16
4
+ data.tar.gz: 00f4e1a87866891dac1dae87a6598adc738d958f
5
5
  SHA512:
6
- metadata.gz: 62dc7e70f831b737bf5539c381731d7b368fa32e110a69269d10142fd28353ee017156e6326ec2e10387650aa82695ddaf5f1b5ccd2fba5ec7f832a630e1805f
7
- data.tar.gz: 259bc148df4060b929ca8606a902e6734aa4858cd542b03186499471f0d48743d16fe1d555bedcf5a645daf7281863a0393b8e1450c00519cb42a558304dde72
6
+ metadata.gz: cdafda575dcf154b73f551c165e631768d67207d3873fb8693aee9ceabe25d0aef2a77e0da1467a8f532236dbf1a28b8e488f291f58fcc2a4a92564c44798c01
7
+ data.tar.gz: f524e15d3483dcbf0e99745d9484e9819939873aa9e9acee4a0df97107596e9d5ad6e8abd0b368dba7e091dfded7496757b3bd8a042f67beb0b31b72b25686c1
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Capistrano Recipe for Tomcat
2
2
  ========================
3
3
 
4
+ https://rubygems.org/gems/capitomcat
5
+
4
6
  ##Installation
5
7
  To use Capitomcat in your Capistrano script, you need install as RubyGem
6
8
 
@@ -14,6 +16,12 @@ $ gem install capistrano
14
16
  $ gem install capistrano-ext
15
17
  </pre>
16
18
  ###Install Capitomcat
19
+ ####Install from RubyGems
20
+ <pre>
21
+ $ gem install capitomcat
22
+ </pre>
23
+
24
+ ####Install manually
17
25
  * Check-out the source code
18
26
  <pre>
19
27
  $ git clone git@github.com:sunggun-yu/capitomcat.git
data/capitomcat.gemspec CHANGED
@@ -6,13 +6,13 @@ $:.push File.expand_path("lib", __FILE__)
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "capitomcat"
9
- s.version = "0.0.2"
9
+ s.version = "0.0.3"
10
10
 
11
11
  s.authors = ["Sunggun Yu"]
12
12
  s.email = ["sunggun.dev@gmail.com"]
13
13
  s.licenses = ['Apache 2.0']
14
14
  s.date = %q{2013-12-27}
15
- s.homepage = "https://github.com/sunggun-yu/capitomcat"
15
+ s.homepage = "http://sunggun-yu.github.io/capitomcat/"
16
16
  s.summary = %q{Capistrano Recipe for Tomcat}
17
17
  s.description = %q{You can deploy your war file to multiple remote tomcat servers through this Capistrano recipe.}
18
18
 
@@ -11,14 +11,15 @@ set :user, "deploy"
11
11
  set :password, "#{password}" #Set password from parameter.
12
12
  set :tomcat_user, "tomcat"
13
13
  set :tomcat_cmd_user, "root"
14
+ set :tomcat_port, "8080"
14
15
 
15
16
  # Local file section
16
- set :local_war_file, "/tmp/app.war"
17
+ set :local_war_file, "/your-local-directory/app.war"
17
18
  set :context_template_file, "./template/context.xml.erb"
18
19
 
19
20
  # Remote setting section
20
21
  set :context_name, "app"
21
- set :remote_docBase, "/tmp/test/earl/war/abc.war"
22
- set :remote_context_file, "/tmp/test/tomcat/conf/Catalina/localhost/app.xml"
23
- set :remote_tomcat_cmd, "/tmp/test/etc/init.d/tomcat7"
24
- set :remote_tomcat_work_dir, "/opt/tomcat/work/Catalina/localhost/app"
22
+ set( :remote_docBase) {"/your-remote-directory-to-save-war-file/"+File.basename(local_war_file)} unless exists?(:remote_docBase)
23
+ set :remote_context_file, "/var/lib/tomcat7/conf/Catalina/localhost/app.xml"
24
+ set :remote_tomcat_cmd, "/etc/init.d/tomcat7"
25
+ set :remote_tomcat_work_dir, "/var/lib/tomcat7/work/Catalina/localhost/app"
@@ -6,18 +6,19 @@ load 'config/deploy.rb'
6
6
  role :app, "dev01"
7
7
 
8
8
  # User section
9
- set :user, "deploy"
9
+ set :user, "user"
10
10
  set :password, "#{password}" #Set password from parameter.
11
- set :tomcat_user, "tomcat"
11
+ set :tomcat_user, "root"
12
12
  set :tomcat_cmd_user, "root"
13
+ set :tomcat_port, "8080"
13
14
 
14
15
  # Local file section
15
- set :local_war_file, "/tmp/app.war"
16
+ set :local_war_file, "/your-local-directory/app.war"
16
17
  set :context_template_file, "./template/context.xml.erb"
17
18
 
18
19
  # Remote setting section
19
20
  set :context_name, "app"
20
- set :remote_docBase, "/tmp/test/earl/war/abc.war"
21
- set :remote_context_file, "/tmp/test/tomcat/conf/Catalina/localhost/app.xml"
22
- set :remote_tomcat_cmd, "/tmp/test/etc/init.d/tomcat7"
23
- set :remote_tomcat_work_dir, "/opt/tomcat/work/Catalina/localhost/app"
21
+ set( :remote_docBase) {"/your-remote-directory-to-save-war-file/"+File.basename(local_war_file)} unless exists?(:remote_docBase)
22
+ set :remote_context_file, "/var/lib/tomcat7/conf/Catalina/localhost/app.xml"
23
+ set :remote_tomcat_cmd, "/etc/init.d/tomcat7"
24
+ set :remote_tomcat_work_dir, "/var/lib/tomcat7/work/Catalina/localhost/app"
data/lib/capitomcat.rb CHANGED
@@ -21,7 +21,7 @@ configuration.load do
21
21
  desc "Start Tomcat"
22
22
  task :start, :roles => :app do
23
23
  run "echo `nohup #{sudo :as => tomcat_cmd_user} #{remote_tomcat_cmd} start&` && sleep 1", :pty => true
24
- run("for i in {0..360}; do echo \"Waiting for Tomcat to start\"; if [[ \"\" != \"$\(netstat -an | grep #{tomcat_port}\)\" ]]; then break; fi; sleep 30; done")
24
+ run("for i in {0..180}; do echo \"Waiting for Tomcat to start\"; if [ \"\" != \"$\(netstat -an | grep #{tomcat_port}\)\" ]; then break; fi; sleep 30; done")
25
25
  run("netstat -an | grep #{tomcat_port}")
26
26
  end
27
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capitomcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sunggun Yu
@@ -62,7 +62,7 @@ files:
62
62
  - examples/singlestage/config/deploy.rb
63
63
  - examples/singlestage/template/context.xml.erb
64
64
  - lib/capitomcat.rb
65
- homepage: https://github.com/sunggun-yu/capitomcat
65
+ homepage: http://sunggun-yu.github.io/capitomcat/
66
66
  licenses:
67
67
  - Apache 2.0
68
68
  metadata: {}