capistrano-ext-superusers 0.3.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/capistrano-ext-superuser.gemspec +24 -0
- data/lib/capistrano/ext/superusers.rb +5 -5
- data/lib/capistrano/ext/superusers/version.rb +12 -0
- metadata +12 -11
- data/capistrano-ext-superusers.gemspec +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94f854fe06200d2eeb82f2fd956a877aa28c56fc
|
4
|
+
data.tar.gz: 9db02d78d9f30ab5f812a0c378e3d4485d32507d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57981934f8ce44d28595418027a299f912b91b38e45838d1e9e63e6d692b0537dd18da226e9ec7c100d030388bc84ac03d8a2e9898726898f66fe11ea703a426
|
7
|
+
data.tar.gz: b0322a32aeae003fc9d4db3bba7eff471003daac5fd91f35b7507c92efa5eb91950b0ee1411df31cf29ee4c7b5b37188a1cdf81ca26a244d8e747e3a0873a1c3
|
data/Gemfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
require 'capistrano/ext/superusers/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'capistrano-ext-superusers'
|
7
|
+
spec.version = Capistrano::Ext::Superusers::Version::STRING
|
8
|
+
spec.platform = Gem::Platform::RUBY
|
9
|
+
spec.authors = ['Funding Circle']
|
10
|
+
spec.email = ['james.condron@fundingcircle.co.uk']
|
11
|
+
spec.summary = 'Extend out from capistrano deploy user stuff and bits'
|
12
|
+
spec.description = 'Capistrano extension to run sensible userage'
|
13
|
+
spec.license = 'Simplified BSD'
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z -- ./* ':(exclude)spec/*'`.split("\x0")
|
16
|
+
|
17
|
+
spec.require_paths = ['lib']
|
18
|
+
|
19
|
+
spec.add_dependency 'capistrano', '>=2.11.0'
|
20
|
+
spec.add_dependency 'capistrano-ext'
|
21
|
+
|
22
|
+
spec.add_development_dependency 'rspec'
|
23
|
+
spec.add_development_dependency 'capistrano-spec'
|
24
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
require 'capistrano'
|
1
|
+
require 'capistrano/all'
|
2
|
+
|
2
3
|
Capistrano::Configuration.class_eval do
|
3
|
-
def superuser
|
4
|
+
def superuser(cmd, options={})
|
4
5
|
owner = fetch(:owner, 'nobody')
|
5
6
|
|
6
7
|
user_sudo = fetch(:user_sudo, "sudo -u #{owner} -i")
|
7
8
|
ssh_forward = fetch(:ssh_forward, "setfacl -m #{owner}:rwx $(dirname $SSH_AUTH_SOCK) && setfacl -m #{owner}:rwx $SSH_AUTH_SOCK")
|
8
9
|
shell = fetch(:user_shell, :default_shell)
|
9
|
-
|
10
|
-
cmd.gsub! "\n", ""
|
11
10
|
|
12
|
-
|
11
|
+
single_line_cmd = cmd.gsub("\n", '')
|
12
|
+
run("#{ssh_forward} && #{user_sudo} #{shell} -c '#{single_line_cmd}'", options)
|
13
13
|
end
|
14
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-ext-superusers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Funding Circle
|
7
|
+
- Funding Circle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capistrano
|
@@ -66,20 +66,21 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
-
description: Capistrano extension to run
|
70
|
-
manner
|
69
|
+
description: Capistrano extension to run sensible userage
|
71
70
|
email:
|
72
|
-
-
|
71
|
+
- james.condron@fundingcircle.co.uk
|
73
72
|
executables: []
|
74
73
|
extensions: []
|
75
74
|
extra_rdoc_files: []
|
76
75
|
files:
|
76
|
+
- Gemfile
|
77
77
|
- README.md
|
78
|
-
- capistrano-ext-
|
78
|
+
- capistrano-ext-superuser.gemspec
|
79
79
|
- lib/capistrano/ext/superusers.rb
|
80
|
-
|
80
|
+
- lib/capistrano/ext/superusers/version.rb
|
81
|
+
homepage:
|
81
82
|
licenses:
|
82
|
-
- BSD
|
83
|
+
- Simplified BSD
|
83
84
|
metadata: {}
|
84
85
|
post_install_message:
|
85
86
|
rdoc_options: []
|
@@ -97,8 +98,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
98
|
version: '0'
|
98
99
|
requirements: []
|
99
100
|
rubyforge_project:
|
100
|
-
rubygems_version: 2.6.
|
101
|
+
rubygems_version: 2.6.13
|
101
102
|
signing_key:
|
102
103
|
specification_version: 4
|
103
|
-
summary:
|
104
|
+
summary: Extend out from capistrano deploy user stuff and bits
|
104
105
|
test_files: []
|
@@ -1,23 +0,0 @@
|
|
1
|
-
$:.push File.expand_path("../lib", __FILE__)
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'capistrano-ext-superusers'
|
5
|
-
spec.version = '0.3.1'
|
6
|
-
spec.platform = Gem::Platform::RUBY
|
7
|
-
spec.authors = ['Funding Circle Engineering']
|
8
|
-
spec.email = ['engineering+capistrano-ext-superusers@fundingcircle.com']
|
9
|
-
spec.summary = 'Run Capistrano commands as a superuser'
|
10
|
-
spec.description = 'Capistrano extension to run commands as an unprivileged user in a sensible manner'
|
11
|
-
spec.homepage = 'https://github.com/FundingCircle/capistrano-ext-superusers'
|
12
|
-
spec.license = 'BSD-3-Clause'
|
13
|
-
|
14
|
-
spec.files = `git ls-files -z -- ./* ':(exclude)spec/*'`.split("\x0")
|
15
|
-
|
16
|
-
spec.add_dependency 'capistrano', '>=2.11.0'
|
17
|
-
spec.add_dependency 'capistrano-ext'
|
18
|
-
|
19
|
-
spec.add_development_dependency 'rspec'
|
20
|
-
spec.add_development_dependency 'capistrano-spec'
|
21
|
-
|
22
|
-
spec.require_path = 'lib'
|
23
|
-
end
|