app_maint 0.0.3 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module AppMaint
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.7"
3
3
  end
data/lib/recipes/base.rb CHANGED
@@ -18,7 +18,9 @@ Capistrano::Configuration.instance.load do
18
18
  set :deploy_user, "#{user}"
19
19
  with_user "#{sudo_user}" do
20
20
  if capture( "#{sudo} cat /etc/passwd | grep #{deploy_user} | wc -l" ).to_i == 0
21
- run "#{sudo} addgroup admin"
21
+ if capture( "cat /etc/group | grep '^admin:' | wc -l" ).to_i == 0
22
+ run "#{sudo} addgroup admin"
23
+ end
22
24
  run "#{sudo} useradd #{deploy_user} -m -s /bin/bash -g admin"
23
25
  upload "#{Dir.home}/.ssh/id_rsa.pub", "/tmp/id_rsa.pub"
24
26
  run "#{sudo} mkdir -p /home/#{deploy_user}/.ssh"
@@ -42,10 +44,10 @@ Capistrano::Configuration.instance.load do
42
44
 
43
45
  desc "Installs up-to-date ruby version from sources"
44
46
  task :install_ruby do
45
- version = (defined? ruby_version) ? ruby_version : '1.9.3'
46
- patch = (defined? ruby_patch) ? ruby_patch : 'p362'
47
+ version = (exists? :ruby_version) ? ruby_version : '1.9.3'
48
+ patch = (exists? :ruby_patch) ? ruby_patch : 'p374'
47
49
  with_user "#{sudo_user}" do
48
- if capture( "dpkg --list ruby-#{version}#{patch} 2>&1 | grep 'No packages found' | wc -l" ).to_i == 1
50
+ if capture( "LANGUAGE=e dpkg --list ruby-#{version}#{patch} 2>&1 | grep 'No packages found' | wc -l" ).to_i == 1
49
51
  run [
50
52
  "wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-#{version}-#{patch}.tar.gz --quiet",
51
53
  "tar -xzf ruby-#{version}-#{patch}.tar.gz",
@@ -66,9 +68,9 @@ Capistrano::Configuration.instance.load do
66
68
 
67
69
  desc "Make shared keys and sudo work together"
68
70
  task :pam_ssh_agent_auth do
69
- version = (defined? pam_ssh_agent_auth_version) ? pam_ssh_agent_auth : '0.9.4'
71
+ version = (exists? :pam_ssh_agent_auth_version) ? pam_ssh_agent_auth_version : '0.9.4'
70
72
  with_user "#{sudo_user}" do
71
- if capture( "dpkg --list pam-ssh-agent-auth-#{version} 2>&1 | grep 'No packages found' | wc -l" ).to_i == 1
73
+ if capture( "LANGUAGE=e dpkg --list pam-ssh-agent-auth-#{version} 2>&1 | grep 'No packages found' | wc -l" ).to_i == 1
72
74
  run [
73
75
  "wget http://downloads.sourceforge.net/project/pamsshagentauth/pam_ssh_agent_auth/v#{version}/pam_ssh_agent_auth-#{version}.tar.bz2 --quiet",
74
76
  "tar -xjf pam_ssh_agent_auth-#{version}.tar.bz2",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_maint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-17 00:00:00.000000000 Z
12
+ date: 2013-01-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  segments:
112
112
  - 0
113
- hash: -3945106699859961047
113
+ hash: 115306283248371607
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  none: false
116
116
  requirements:
@@ -119,10 +119,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: -3945106699859961047
122
+ hash: 115306283248371607
123
123
  requirements: []
124
124
  rubyforge_project:
125
- rubygems_version: 1.8.24
125
+ rubygems_version: 1.8.23
126
126
  signing_key:
127
127
  specification_version: 3
128
128
  summary: Application maintenance with capistrano