capistrano-jetty 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 80ab21a037d32393260aeb2b755131b8e6d9d591
4
+ data.tar.gz: d282802bdcba2f12f55548440878ddab281a6aff
5
+ SHA512:
6
+ metadata.gz: f0677667c31648fd2d92f204108d1723bdd47072d7a524863d61de6b852081d61bead651545860bfb93939dd7a09f5d96f54e30703e4b86ed82283d79cd4fc5d
7
+ data.tar.gz: 5149693dd78e0ca13fbeef13d51c2d56f8d21e7414daf51fbb19550d2e172840e6d1c17a5e00f0dce3a4aa12984af5c2f85cd953492b4988d993031b40126962
data/.editorconfig ADDED
@@ -0,0 +1,19 @@
1
+ ; EditorConfig is awesome: http://EditorConfig.org
2
+
3
+ root = true
4
+
5
+ ; UTF-8 charset
6
+ ; Unix-style newlines with a newline ending every file
7
+ ; 2 space indent
8
+ ; Trim trailing whitespace
9
+ [*]
10
+ indent_style = space
11
+ indent_size = 2
12
+ end_of_line = lf
13
+ charset = utf-8
14
+ trim_trailing_whitespace = true
15
+ insert_final_newline = true
16
+
17
+ [*.md]
18
+ indent_size = 4
19
+ trim_trailing_whitespace = false
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/CHANGELOG.rb ADDED
@@ -0,0 +1,28 @@
1
+ # Capistrano::Jetty Changelog
2
+
3
+ This is the Changelog for Capistrano::Jetty.
4
+
5
+ ## v0.0.6 (2014-02-12)
6
+
7
+ * Use correct filepaths for better namespacing
8
+
9
+ ## v0.0.5 (2014-02-11)
10
+
11
+ * Revert previous change, as they should work inside `:deploy` namespace
12
+ * Make task hooks explicit
13
+
14
+ ## v0.0.4 (2014-02-11)
15
+
16
+ * Move task hooks into global namespace so tasks actually hook in & are run
17
+
18
+ ## v0.0.3 (2014-02-11)
19
+
20
+ * Add missing, empty Ruby file to load Gem properly
21
+
22
+ ## v0.0.2 (2014-02-11)
23
+
24
+ * Fix incorrect `require` in gemspec
25
+
26
+ ## v0.0.1 (2014-02-11)
27
+
28
+ * Initial release
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in capistrano-jetty.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 EverTrue
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # Capistrano::Jetty
2
+
3
+ This gem provides support in Capistrano 3.x for copying a deployed artifact into Jetty’s webapps directory, then restarting Jetty.
4
+
5
+ Plays nicely with [evertrue/capistrano-scm-jenkins](https://github.com/evertrue/capistrano-scm-jenkins).
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'capistrano-jetty'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ ```bash
18
+ $ bundle
19
+ ```
20
+
21
+ ## Usage
22
+
23
+ This Gem requires that your deploy user have *passwordless sudo rights* to run
24
+ `service jetty restart`. See [Capistrano’s Authorisation docs](http://capistranorb.com/documentation/getting-started/authentication-and-authorisation/#toc_8)
25
+ for a simple example.
26
+
27
+ In `Capfile`:
28
+ ```ruby
29
+ require 'capistrano-jetty/jetty'
30
+ ```
31
+
32
+ In your `config/deploy.rb`:
33
+
34
+ ```ruby
35
+ # Filename to grab from your current_path & copy to
36
+ set :deployed_artifact_filename, "#{fetch(:application)}.war"
37
+
38
+ # Path to your Jetty webapps directory
39
+ set :jetty_webapps_path, '/usr/share/jetty/webapps'
40
+ ```
41
+
42
+ ## Contributing
43
+
44
+ 1. Fork it ( http://github.com/evertrue/capistrano-jetty/fork )
45
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
46
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
47
+ 4. Push to the branch (`git push origin my-new-feature`)
48
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require 'bundler/gem_tasks'
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'capistrano-jetty'
7
+ spec.version = '1.0.0'
8
+ spec.authors = ['Jeff Byrnes']
9
+ spec.email = ['jeff@evertrue.com']
10
+ spec.summary = %q{Capistrano 3 plugin for handling Jetty.}
11
+ spec.description = %q{
12
+ Capistrano 3 plugin that handles updating a deployed artifact & Jetty.
13
+ }
14
+ spec.homepage = "https://github.com/evertrue/#{spec.name}"
15
+ spec.license = 'MIT'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ['lib']
21
+
22
+ spec.add_dependency 'capistrano', '~> 3.1'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.5'
25
+ spec.add_development_dependency 'rake'
26
+ end
File without changes
@@ -0,0 +1 @@
1
+ load File.expand_path('../tasks/jetty.rake', __FILE__)
@@ -0,0 +1,19 @@
1
+ namespace :deploy do
2
+ desc 'Grab the latest artifact from '
3
+ task :update_webapps do
4
+ on roles(:app) do
5
+ execute :cp, "#{release_path}/#{fetch(:deployed_artifact_filename)}",
6
+ "#{fetch(:jetty_webapps_path)}/#{fetch(:deployed_artifact_filename)}"
7
+ end
8
+ end
9
+
10
+ desc 'Restart Jetty'
11
+ task :restart do
12
+ on roles(:app), in: :sequence, wait: 5 do
13
+ execute :sudo, :service, 'jetty', 'restart'
14
+ end
15
+ end
16
+
17
+ before 'deploy:published', 'deploy:update_webapps'
18
+ after 'deploy:published', 'deploy:restart'
19
+ end
metadata ADDED
@@ -0,0 +1,98 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capistrano-jetty
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Jeff Byrnes
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: capistrano
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '3.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.5'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: "\nCapistrano 3 plugin that handles updating a deployed artifact & Jetty.\n
56
+ \ "
57
+ email:
58
+ - jeff@evertrue.com
59
+ executables: []
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".editorconfig"
64
+ - ".gitignore"
65
+ - CHANGELOG.rb
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - capistrano-jetty.gemspec
71
+ - lib/capistrano-jetty.rb
72
+ - lib/capistrano-jetty/jetty.rb
73
+ - lib/capistrano-jetty/tasks/jetty.rake
74
+ homepage: https://github.com/evertrue/capistrano-jetty
75
+ licenses:
76
+ - MIT
77
+ metadata: {}
78
+ post_install_message:
79
+ rdoc_options: []
80
+ require_paths:
81
+ - lib
82
+ required_ruby_version: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ required_rubygems_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ requirements: []
93
+ rubyforge_project:
94
+ rubygems_version: 2.2.2
95
+ signing_key:
96
+ specification_version: 4
97
+ summary: Capistrano 3 plugin for handling Jetty.
98
+ test_files: []