capistrano-pumaio 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28f2f643848071b61e0f09c194bf3e64f3e25250
4
- data.tar.gz: f4a8f4d268a36ad2c77308fdebc7fd1bf095af1a
3
+ metadata.gz: 2310240f0a36101268d9c072316f521870c5ad60
4
+ data.tar.gz: 90536366f4022d84715e0479eaba30538bdc2363
5
5
  SHA512:
6
- metadata.gz: b44351b1f634e795738d84ff362f5f80eefe505e150bf54791da2385befc7f432898d96bb2749262084d0d528899d42e5b2e5278b8b2e03fd5ffbc1182d5defc
7
- data.tar.gz: 9361019cb5ae4339ff18c9d8b2f148a19190e862e287a23449515fa30c9445c1ffc6141b288c7b311111598f80b0d0e29b3b041d0594f8d09fecabc0680c732a
6
+ metadata.gz: bf465c728b4ed5f49b26e8314ae8b4d39094e313ff691c8cdec6f40c00ae54193eb8ca6b7d315cae99637c082208d2251dc6abf1630f3162a4402744c70d584e
7
+ data.tar.gz: d779d99dae2027fb0f48ef327bba80eb240b9ca48055b1ee30979e4178eed88e4788d341cce394b0329da514e95535c36b377e13ced189ea447c2ea730aa6cd8
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
2
2
 
3
3
  gem 'capistrano', '~> 3.4'
4
4
  gem 'activesupport', '>= 3.0'
5
- gem 'capistrano-monit_runit', '~> 3.0.1'
5
+ gem 'capistrano-monit_runit', '~> 3.0.2'
6
6
 
7
7
  group :development do
8
8
  gem 'bundler', '~> 1.7'
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GEM
13
13
  i18n
14
14
  rake (>= 10.0.0)
15
15
  sshkit (~> 1.3)
16
- capistrano-monit_runit (3.0.1)
16
+ capistrano-monit_runit (3.0.2)
17
17
  activesupport (>= 3.0)
18
18
  capistrano (~> 3.4)
19
19
  colorize (0.7.5)
@@ -78,5 +78,5 @@ DEPENDENCIES
78
78
  activesupport (>= 3.0)
79
79
  bundler (~> 1.7)
80
80
  capistrano (~> 3.4)
81
- capistrano-monit_runit (~> 3.0.1)
81
+ capistrano-monit_runit (~> 3.0.2)
82
82
  jeweler (~> 2.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.1
1
+ 3.0.2
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: capistrano-pumaio 3.0.1 ruby lib
5
+ # stub: capistrano-pumaio 3.0.2 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "capistrano-pumaio"
9
- s.version = "3.0.1"
9
+ s.version = "3.0.2"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Leif Ringstad"]
14
- s.date = "2015-03-26"
14
+ s.date = "2015-08-06"
15
15
  s.description = "Capistrano recipes for puma using runit and monit. Includes nginx recipes for the app server."
16
16
  s.email = "leifcr@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -55,20 +55,20 @@ Gem::Specification.new do |s|
55
55
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
56
  s.add_runtime_dependency(%q<capistrano>, ["~> 3.4"])
57
57
  s.add_runtime_dependency(%q<activesupport>, [">= 3.0"])
58
- s.add_runtime_dependency(%q<capistrano-monit_runit>, ["~> 3.0.1"])
58
+ s.add_runtime_dependency(%q<capistrano-monit_runit>, ["~> 3.0.2"])
59
59
  s.add_development_dependency(%q<bundler>, ["~> 1.7"])
60
60
  s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
61
61
  else
62
62
  s.add_dependency(%q<capistrano>, ["~> 3.4"])
63
63
  s.add_dependency(%q<activesupport>, [">= 3.0"])
64
- s.add_dependency(%q<capistrano-monit_runit>, ["~> 3.0.1"])
64
+ s.add_dependency(%q<capistrano-monit_runit>, ["~> 3.0.2"])
65
65
  s.add_dependency(%q<bundler>, ["~> 1.7"])
66
66
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
67
67
  end
68
68
  else
69
69
  s.add_dependency(%q<capistrano>, ["~> 3.4"])
70
70
  s.add_dependency(%q<activesupport>, [">= 3.0"])
71
- s.add_dependency(%q<capistrano-monit_runit>, ["~> 3.0.1"])
71
+ s.add_dependency(%q<capistrano-monit_runit>, ["~> 3.0.2"])
72
72
  s.add_dependency(%q<bundler>, ["~> 1.7"])
73
73
  s.add_dependency(%q<jeweler>, ["~> 2.0"])
74
74
  end
@@ -1,7 +1,12 @@
1
1
  module Capistrano
2
2
  module Helpers
3
3
  module Puma
4
+ ##
5
+ # Module Nginx provides helper functions for nginx configuration
6
+ ##
4
7
  module Nginx
8
+ module_function
9
+
5
10
  def default_pw_generator
6
11
  pw = SecureRandom.random_number(36**10).to_s(36).rjust(10, '0')
7
12
  info "Random password generated: #{pw}"
@@ -1,20 +1,19 @@
1
1
  require 'capistrano/helpers/base'
2
2
  require 'capistrano/helpers/monit'
3
- require 'capistrano/helpers/puma/monit'
4
3
  require 'capistrano/dsl/base_paths'
5
- include Capistrano::DSL::BasePaths
6
- include Capistrano::Helpers::Base
7
- include Capistrano::Helpers::Monit
8
- include Capistrano::Helpers::Puma::Monit
4
+ require 'capistrano/helpers/puma/monit'
9
5
 
10
6
  namespace :puma do
7
+ include Capistrano::DSL::BasePaths
8
+ include Capistrano::Helpers::Base
9
+ include Capistrano::Helpers::Monit
11
10
  namespace :monit do
12
11
  desc 'MONIT: Setup Puma service'
13
12
  task :setup do
14
13
  on roles(:app) do |host|
15
14
  info "MONIT: Uploading configuration for puma for #{fetch(:application)} on #{host}"
16
15
  # Upload configuration
17
- upload! template_to_s_io(fetch(:puma_monit_config_template)), available_configuration_with_path
16
+ upload! template_to_s_io(fetch(:puma_monit_config_template)), Capistrano::Helpers::Puma::Monit.available_configuration_with_path
18
17
  end
19
18
  end
20
19
 
@@ -22,7 +21,7 @@ namespace :puma do
22
21
  task :enable do
23
22
  on roles(:app) do |host|
24
23
  info "MONIT: Enabling service for puma for application #{fetch(:application)} on #{host}"
25
- enable_monitor(available_configuration_file )
24
+ enable_monitor(Capistrano::Helpers::Puma::Monit.available_configuration_file)
26
25
  end
27
26
  end
28
27
 
@@ -30,7 +29,7 @@ namespace :puma do
30
29
  task :disable do
31
30
  on roles(:app) do |host|
32
31
  info "MONIT: Disabling service for puma for application #{fetch(:application)} on #{host}"
33
- disable_monitor(available_configuration_file)
32
+ disable_monitor(Capistrano::Helpers::Puma::Monit.available_configuration_file)
34
33
  end
35
34
  end
36
35
 
@@ -10,7 +10,6 @@ namespace :puma do
10
10
  desc 'Get the config needed to add to sudoers for nginx commands'
11
11
  task :sudoers do
12
12
  run_locally do
13
- info '---------------ENTRIES FOR SUDOERS (Nginx)---------------------'
14
13
  puts '#---------------ENTRIES FOR SUDOERS (Nginx)---------------------'
15
14
  puts "#{fetch(:user)} ALL=NOPASSWD: /bin/mkdir -p #{fetch(:nginx_log_path)}"
16
15
  puts "#{fetch(:user)} ALL=NOPASSWD: /bin/chown -R #{fetch(:user)}\\:root #{fetch(:nginx_log_path)}"
@@ -18,7 +17,6 @@ namespace :puma do
18
17
  puts "#{fetch(:user)} ALL=NOPASSWD: /bin/chown #{fetch(:user)}\\:root #{fetch(:nginx_sites_enabled_path)}"
19
18
  puts "#{fetch(:user)} ALL=NOPASSWD: /usr/sbin/service nginx *"
20
19
  puts '#---------------------------------------------------------------'
21
- info '---------------------------------------------------------------'
22
20
  end
23
21
  # info "#{fetch(:user)} ALL=NOPASSWD: /bin/chown deploy:root #{monit_monitrc_file}"
24
22
  end
@@ -117,3 +115,5 @@ end
117
115
  # nginx.restart # must restart after enable for nginx to pickup new site
118
116
  # end
119
117
  # end
118
+
119
+ after 'sudoers', 'puma:nginx:sudoers'
@@ -3,13 +3,12 @@ require 'capistrano/dsl/runit_paths'
3
3
  require 'capistrano/helpers/base'
4
4
  require 'capistrano/helpers/runit'
5
5
 
6
- include Capistrano::DSL::BasePaths
7
- include Capistrano::DSL::RunitPaths
8
- include Capistrano::Helpers::Base
9
- include Capistrano::Helpers::Runit
10
-
11
6
  # require 'capistrano/runit'
12
7
  namespace :puma do
8
+ include Capistrano::DSL::BasePaths
9
+ include Capistrano::DSL::RunitPaths
10
+ include Capistrano::Helpers::Base
11
+ include Capistrano::Helpers::Runit
13
12
  desc 'Setup Puma configuration'
14
13
  task :setup do
15
14
  on roles(:app) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-pumaio
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leif Ringstad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-26 00:00:00.000000000 Z
11
+ date: 2015-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capistrano
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 3.0.1
47
+ version: 3.0.2
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 3.0.1
54
+ version: 3.0.2
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement