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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1cab0c735883f7f277943a7f27a37e5ce8b955a
4
- data.tar.gz: 0cd390a64b985483982053edc02517828cc191e8
3
+ metadata.gz: 94f854fe06200d2eeb82f2fd956a877aa28c56fc
4
+ data.tar.gz: 9db02d78d9f30ab5f812a0c378e3d4485d32507d
5
5
  SHA512:
6
- metadata.gz: 9693dccf32d7e9a8caf7945a1b5822d5c369660a3e5629cb4b6a058801dbe2249f7e369539dfe103e990a3d0c13513e1ac56d668c3169bb8da705d65165a0c3e
7
- data.tar.gz: 5fefdee5527f610b9ce75d5661644038dea0f7a01d35fa8ce11c6ca99976f9bfec7ac85f7f053875bc3463566ee4fcfa2c6192d5e51a9d83f385a8112c22152d
6
+ metadata.gz: 57981934f8ce44d28595418027a299f912b91b38e45838d1e9e63e6d692b0537dd18da226e9ec7c100d030388bc84ac03d8a2e9898726898f66fe11ea703a426
7
+ data.tar.gz: b0322a32aeae003fc9d4db3bba7eff471003daac5fd91f35b7507c92efa5eb91950b0ee1411df31cf29ee4c7b5b37188a1cdf81ca26a244d8e747e3a0873a1c3
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
@@ -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 cmd, options={}
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
- run "#{ssh_forward} && #{user_sudo} #{shell} -c '#{cmd}'", options
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
@@ -0,0 +1,12 @@
1
+ module Capistrano
2
+ module Ext
3
+ module Superusers
4
+ module Version
5
+ MAJOR = 0
6
+ MINOR = 4
7
+ TINY = 2
8
+ STRING= [MAJOR, MINOR, TINY].join('.')
9
+ end
10
+ end
11
+ end
12
+ 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.3.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
- - Funding Circle Engineering
7
+ - Funding Circle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-30 00:00:00.000000000 Z
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 commands as an unprivileged user in a sensible
70
- manner
69
+ description: Capistrano extension to run sensible userage
71
70
  email:
72
- - engineering+capistrano-ext-superusers@fundingcircle.com
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-superusers.gemspec
78
+ - capistrano-ext-superuser.gemspec
79
79
  - lib/capistrano/ext/superusers.rb
80
- homepage: https://github.com/FundingCircle/capistrano-ext-superusers
80
+ - lib/capistrano/ext/superusers/version.rb
81
+ homepage:
81
82
  licenses:
82
- - BSD-3-Clause
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.14
101
+ rubygems_version: 2.6.13
101
102
  signing_key:
102
103
  specification_version: 4
103
- summary: Run Capistrano commands as a superuser
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