Skip to content

Commit 3bf25bd

Browse files
committed
First release
0 parents  commit 3bf25bd

File tree

18 files changed

+343
-0
lines changed

18 files changed

+343
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.idea
2+
Gemfile.lock
3+
*.gem
4+
.DS_Store

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### v0.1.0, 2018-01-02
2+
- Functional for sysv, upstart, and systemd apache2 and httpd environments

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
3+
gemspec

Gemfile.lock

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
PATH
2+
remote: .
3+
specs:
4+
capistrano-apache (0.0.1)
5+
capistrano (~> 3.2)
6+
7+
GEM
8+
remote: https://rubygems.org/
9+
specs:
10+
airbrussh (1.3.0)
11+
sshkit (>= 1.6.1, != 1.7.0)
12+
capistrano (3.10.1)
13+
airbrussh (>= 1.0.0)
14+
i18n
15+
rake (>= 10.0.0)
16+
sshkit (>= 1.9.0)
17+
concurrent-ruby (1.0.5)
18+
i18n (0.9.1)
19+
concurrent-ruby (~> 1.0)
20+
net-scp (1.2.1)
21+
net-ssh (>= 2.6.5)
22+
net-ssh (4.2.0)
23+
rake (10.5.0)
24+
sshkit (1.15.1)
25+
net-scp (>= 1.1.2)
26+
net-ssh (>= 2.8.0)
27+
28+
PLATFORMS
29+
ruby
30+
31+
DEPENDENCIES
32+
capistrano-apache!
33+
rake (~> 10.1)
34+
35+
BUNDLED WITH
36+
1.16.0

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Capistrano Plugins
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Capistrano Apache
2+
3+
Official Capistrano extension for Apache tasks.
4+
5+
### Environments Supported
6+
| | systemd | sysv & upstart |
7+
| ---- | ------- | -------------- |
8+
| HTTPD | ```capistrano/apache/systemd/httpd``` | ```capistrano/apache/sysv_upstart/httpd``` |
9+
| APACHE2 | ```capistrano/apache/systemd/apache2``` | ```capistrano/apache/systemd/apache2``` |
10+
11+
## Installation
12+
13+
Add this line to your application's Gemfile:
14+
15+
```ruby
16+
gem 'capistrano', '~> 3.2'
17+
gem 'capistrano-apache'
18+
```
19+
20+
## Usage
21+
22+
Require one of the above modules (Environments Supported) in your `Capfile`:
23+
24+
```ruby
25+
require 'capistrano/apache/systemd/httpd'
26+
```
27+
28+
`capistrano/apache` comes with 5 tasks:
29+
30+
* apache:reload
31+
* apache:force_reload
32+
* apache:restart
33+
* apache:stop
34+
* apache:zap
35+
36+
You can execute the task on command line:
37+
38+
```bash
39+
cap production apache:reload
40+
```
41+
42+
And configure it on your `deploy.rb` file:
43+
44+
```ruby
45+
namespace :deploy do
46+
after :finishing, 'apache:reload'
47+
after :rollback, 'apache:reload'
48+
end
49+
```
50+
51+
### Configuration
52+
53+
Configurable options shown here are also the defaults:
54+
55+
```ruby
56+
set :apache_with_sudo, true
57+
set :apache_roles, :web
58+
```
59+
60+
### More Capistrano automation?
61+
62+
Check out [capistrano-plugins](https://github.com/capistrano-plugins) github org.
63+
64+
### Contributing and bug reports
65+
66+
Contributions and improvements are very welcome.
67+
68+
If something is not working for you, or you find a bug please report it.
69+
70+
### Thanks
71+
72+
* [Sullivan Senechal](https://github.com/Soullivaneuh) @ [NexyLan](https://www.nexylan.com) - Original creator of sysv & upstart code plugin this is heavily based on
73+
74+
### License
75+
76+
[MIT](LICENSE.md)

Rakefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require 'bundler/gem_tasks'

capistrano-apache.gemspec

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# -*- encoding: utf-8 -*-
2+
lib = File.expand_path('../lib', __FILE__)
3+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4+
require 'capistrano/apache/version'
5+
6+
Gem::Specification.new do |gem|
7+
gem.name = 'capistrano-apache'
8+
gem.version = Capistrano::Apache::VERSION
9+
gem.summary = 'Capistrano extension for Apache tasks using systemd'
10+
gem.description = 'Executes Apache service tasks like reload or restart from Capistrano'
11+
gem.authors = ['Sullivan Senechal, Nathan Pierce']
12+
gem.email = ['soullivaneuh@gmail.com','connarpierce@gmail.com']
13+
gem.homepage = 'https://github.com/capistrano-plugins/capistrano-apache'
14+
gem.license = 'MIT'
15+
16+
gem.files = `git ls-files`.split($/)
17+
gem.require_paths = ['lib']
18+
19+
gem.add_dependency 'capistrano', '~> 3.2'
20+
gem.add_development_dependency 'rake', '~> 10.1'
21+
end

lib/capistrano/apache/apache.rake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace :load do
2+
task :defaults do
3+
set :apache_with_sudo, true
4+
set :apache_roles, :web
5+
end
6+
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
load File.expand_path('../../apache.rake', __FILE__) # Load configuration options
2+
load File.expand_path('../tasks/apache2.rake', __FILE__)

0 commit comments

Comments
 (0)