capistrano-linuxpl 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/README.md +34 -0
- data/Rakefile +1 -0
- data/capistrano-linuxpl-0.0.1.gem +0 -0
- data/capistrano-linuxpl.gemspec +27 -0
- data/lib/capistrano/linuxpl/version.rb +5 -0
- data/lib/capistrano/linuxpl.rb +4 -0
- data/lib/capistrano/tasks/precompile_assets.rake +12 -0
- data/lib/capistrano/tasks/restart_server.rake +41 -0
- data/lib/capistrano-linuxpl.rb +0 -0
- metadata +96 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: bdbc1c8f75e22637f9a320d476834a8f63da5ee8
|
4
|
+
data.tar.gz: 6d42d0cc43f21b2d75d8ce3879c17a4094f328a8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 316e92db7833d2f01042032299e67b47d74cc41d7a19accddaa465460bb1750dd3ba6e52cb1585828e5ca064493cc8782833a7d2a54f4df764dd7ba48a763c5c
|
7
|
+
data.tar.gz: 4d3bd112185d6941ecd3f44464ebc04f0e3422821b69c231b1e584fd403bb5142971f5b82a8365f2af95c011cb0ce25d0d27c71f3dd4e3ce6674a5897a0840a8
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/capistrano3-puma.svg)](http://badge.fury.io/rb/capistrano3-puma)
|
2
|
+
# Capistrano::Linuxpl
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
gem 'capistrano-linuxpl', github: "blaszczakphoto/capistrano-linuxpl"
|
9
|
+
|
10
|
+
And then execute:
|
11
|
+
|
12
|
+
$ bundle
|
13
|
+
|
14
|
+
## Usage
|
15
|
+
```ruby
|
16
|
+
# Capfile
|
17
|
+
|
18
|
+
require 'capistrano/linuxpl'
|
19
|
+
```
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# deploy.rb
|
23
|
+
|
24
|
+
after 'deploy:log_revision', 'deploy:restart_server'
|
25
|
+
before :deploy, :precompile_assets
|
26
|
+
```
|
27
|
+
|
28
|
+
## Contributing
|
29
|
+
|
30
|
+
1. Fork it
|
31
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
32
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
33
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
34
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
Binary file
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'capistrano/linuxpl/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'capistrano-linuxpl'
|
8
|
+
spec.version = Capistrano::Linuxpl::VERSION
|
9
|
+
spec.authors = ['Mariusz Błaszczak']
|
10
|
+
spec.email = ['mariusz.blaszczak@gmail.com']
|
11
|
+
spec.description = %q{Linuxpl server integration for Capistrano}
|
12
|
+
spec.summary = %q{Linuxpl integration for Capistrano}
|
13
|
+
spec.homepage = 'https://github.com/blaszczakphoto/capistrano-linuxpl'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
|
16
|
+
spec.required_ruby_version = '>= 2.4.1'
|
17
|
+
|
18
|
+
spec.files = `git ls-files`.split($/)
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
|
24
|
+
spec.add_dependency 'capistrano', '~> 3.6'
|
25
|
+
spec.add_development_dependency 'rake'
|
26
|
+
spec.add_development_dependency 'bundler'
|
27
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'capistrano'
|
4
|
+
|
5
|
+
task :precompile_assets do
|
6
|
+
run_locally do
|
7
|
+
execute(:rm, "-rf public/assets/*")
|
8
|
+
execute(:rm, "-rf public/assets/.sprockets-manifest*")
|
9
|
+
execute("RAILS_ENV=production", "rake assets:precompile")
|
10
|
+
execute('git add . && git commit -m "update assets" && git push')
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'pry'
|
3
|
+
require 'capistrano'
|
4
|
+
|
5
|
+
namespace :deploy do
|
6
|
+
task :stop_server do
|
7
|
+
on roles(:all) do |_host|
|
8
|
+
within(fetch(:deploy_to)) do
|
9
|
+
current_dir = fetch(:deploy_to)
|
10
|
+
pid_file_relative_path = capture("cd #{current_dir}; find . -name 'server.pid' -type f")
|
11
|
+
next if pid_file_relative_path == ''
|
12
|
+
path_to_pid = File.join(current_dir, pid_file_relative_path.gsub("./", "/"))
|
13
|
+
if path_to_pid == ''
|
14
|
+
puts 'No server running'
|
15
|
+
else
|
16
|
+
puts 'Found server running PID file'
|
17
|
+
pid = capture("cat #{path_to_pid}")
|
18
|
+
pids_list = capture("ps aux | awk '{print $2}'")
|
19
|
+
execute(:kill, pid) if pid != '' && pids_list.include?(pid)
|
20
|
+
execute(:rm, "-rf #{path_to_pid}")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
task :start_server do
|
27
|
+
on roles(:all) do |_host|
|
28
|
+
within(fetch(:deploy_to)) do
|
29
|
+
within('current') do
|
30
|
+
execute(:bundle, :exec, :ruby, "bin/rails server webrick -e production -p #{fetch(:web_server_port)} -d")
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
|
37
|
+
task :restart_server do
|
38
|
+
invoke "deploy:stop_server"
|
39
|
+
invoke "deploy:start_server"
|
40
|
+
end
|
41
|
+
end
|
File without changes
|
metadata
ADDED
@@ -0,0 +1,96 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capistrano-linuxpl
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mariusz Błaszczak
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-08-24 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.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
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: Linuxpl server integration for Capistrano
|
56
|
+
email:
|
57
|
+
- mariusz.blaszczak@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- Gemfile
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- capistrano-linuxpl-0.0.1.gem
|
66
|
+
- capistrano-linuxpl.gemspec
|
67
|
+
- lib/capistrano-linuxpl.rb
|
68
|
+
- lib/capistrano/linuxpl.rb
|
69
|
+
- lib/capistrano/linuxpl/version.rb
|
70
|
+
- lib/capistrano/tasks/precompile_assets.rake
|
71
|
+
- lib/capistrano/tasks/restart_server.rake
|
72
|
+
homepage: https://github.com/blaszczakphoto/capistrano-linuxpl
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 2.4.1
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.6.11
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: Linuxpl integration for Capistrano
|
96
|
+
test_files: []
|