crossroads_capistrano 1.4.34 → 1.4.35

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.
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "crossroads_capistrano"
6
- s.version = "1.4.34"
6
+ s.version = "1.4.35"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Steve Kenworthy", "Ben Tillman", "Nathan Broadbent"]
9
9
  s.email = ["it_dept@crossroads.org.hk"]
@@ -59,13 +59,16 @@ namespace :passenger do
59
59
  end
60
60
  # httpd conf
61
61
  sudo "cp -f #{release_path}/config/httpd-rails.conf #{httpd_site_conf_path}"
62
- sed httpd_site_conf_path, {"DEPLOY_TO" => deploy_to,
63
- "IP_ADDR" => ip_address,
64
- "SERVER_NAME" => site_domain_name,
65
- "SITE_DOMAIN_NAME" => site_domain_name,
66
- "HTTP_PORT" => http_port,
67
- "HTTPS_PORT" => https_port,
68
- "RAILS_ENV" => rails_env}
62
+ httpd_settings = {}
63
+ httpd_settings["DEPLOY_TO"] = deploy_to if exists?(:deploy_to)
64
+ httpd_settings["IP_ADDR"] = ip_address if exists?(:ip_address)
65
+ httpd_settings["SERVER_NAME"] = site_domain_name if exists?(:site_domain_name)
66
+ httpd_settings["SITE_DOMAIN_NAME"] = site_domain_name if exists?(:site_domain_name)
67
+ httpd_settings["HTTP_PORT"] = http_port if exists?(:http_port)
68
+ httpd_settings["HTTPS_PORT"] = https_port if exists?(:https_port)
69
+ httpd_settings["RAILS_ENV"] = rails_env if exists?(:rails_env)
70
+ sed httpd_site_conf_path, httpd_settings
71
+
69
72
  # passenger conf
70
73
  sudo "cp -f #{release_path}/config/passenger.conf #{passenger_conf_path}"
71
74
  sed passenger_conf_path, {"PASSENGER_ROOT" => passenger_root,
@@ -13,7 +13,12 @@ namespace :rvm do
13
13
  yum.install( {:base => %w(curl git gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2)}, :stable, :shell => 'sh' )
14
14
  end
15
15
 
16
+ desc "Trust the application rvmrc file that is deployed"
17
+ task :trust do
18
+ run "rvm rvmrc trust #{current_path}"
19
+ end
20
+
16
21
  end
17
22
 
18
23
  before "stack", "rvm:install"
19
-
24
+ before "deploy:restart", "rvm:trust"
@@ -7,10 +7,8 @@ before "deploy:cold", "stack:setup"
7
7
  namespace :stack do
8
8
  desc "Setup operating system and rails environment"
9
9
  task :setup do
10
- if exists?(:yum_packages)
11
- yum.update
12
- yum.install({:base => yum_packages}, :stable)
13
- end
10
+ package.update
11
+ package.install
14
12
  gemrc.setup
15
13
  bundler.setup
16
14
  deploy.setup
@@ -30,6 +28,29 @@ namespace :stack do
30
28
  end
31
29
  end
32
30
 
31
+ # yum wrapper
32
+ namespace :package do
33
+
34
+ desc "Installs yum packages required for the app"
35
+ task :install do
36
+ yum.install({:base => yum_packages}, :stable) if exists?(:yum_packages)
37
+ end
38
+
39
+ desc "Updates all yum packages installed"
40
+ task :update do
41
+ yum.update
42
+ end
43
+
44
+ desc "Takes a list of yum packages and determines if they need updating. This is useful for determining whether to apply security updates."
45
+ task :list_installed_yum_packages do
46
+ prompt_with_default("Enter comma seperated list of yum pacakges (e.g. qspice, lftp).\nIf you leave this blank then it will list all installed packages:", :packages, "")
47
+ packages.gsub!(/,\s*/, "\\|")
48
+ sudo "yum -C list | grep '#{packages}' | grep installed"
49
+ puts "The packages listed above are installed on the system"
50
+ end
51
+
52
+ end
53
+
33
54
  namespace :shared do
34
55
  # This task can be extended by the application via an :after hook.
35
56
  desc "Setup shared directory"
@@ -59,12 +59,3 @@ private
59
59
  end
60
60
 
61
61
  Capistrano.plugin :yum, Yum
62
-
63
- desc "Takes a list of yum packages and determines if they need updating. This is useful for determining whether to apply security updates."
64
- task :list_installed_yum_packages do
65
- prompt_with_default("Enter comma seperated list of yum pacakges (e.g. qspice, lftp).\nIf you leave this blank then it will list all installed packages:", :packages, "")
66
- packages.gsub!(/,\s*/, "\\|")
67
- sudo "yum -C list | grep '#{packages}' | grep installed"
68
- puts "The packages listed above are installed on the system"
69
- end
70
-
metadata CHANGED
@@ -1,69 +1,98 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: crossroads_capistrano
3
- version: !ruby/object:Gem::Version
4
- version: 1.4.34
3
+ version: !ruby/object:Gem::Version
4
+ hash: 65
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 4
9
+ - 35
10
+ version: 1.4.35
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Steve Kenworthy
9
14
  - Ben Tillman
10
15
  - Nathan Broadbent
11
16
  autorequire:
12
17
  bindir: bin
13
18
  cert_chain: []
14
- date: 2011-08-30 00:00:00.000000000Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
19
+
20
+ date: 2011-08-30 00:00:00 Z
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
17
23
  name: capistrano
18
- requirement: &80967830 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
19
26
  none: false
20
- requirements:
21
- - - ! '>='
22
- - !ruby/object:Gem::Version
27
+ requirements:
28
+ - - ">="
29
+ - !ruby/object:Gem::Version
30
+ hash: 23
31
+ segments:
32
+ - 2
33
+ - 6
34
+ - 0
23
35
  version: 2.6.0
24
36
  type: :runtime
25
- prerelease: false
26
- version_requirements: *80967830
27
- - !ruby/object:Gem::Dependency
37
+ version_requirements: *id001
38
+ - !ruby/object:Gem::Dependency
28
39
  name: capistrano-ext
29
- requirement: &80967590 !ruby/object:Gem::Requirement
40
+ prerelease: false
41
+ requirement: &id002 !ruby/object:Gem::Requirement
30
42
  none: false
31
- requirements:
32
- - - ! '>='
33
- - !ruby/object:Gem::Version
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ hash: 29
47
+ segments:
48
+ - 1
49
+ - 2
50
+ - 1
34
51
  version: 1.2.1
35
52
  type: :runtime
36
- prerelease: false
37
- version_requirements: *80967590
38
- - !ruby/object:Gem::Dependency
53
+ version_requirements: *id002
54
+ - !ruby/object:Gem::Dependency
39
55
  name: capistrano_colors
40
- requirement: &80967360 !ruby/object:Gem::Requirement
56
+ prerelease: false
57
+ requirement: &id003 !ruby/object:Gem::Requirement
41
58
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ hash: 3
63
+ segments:
64
+ - 0
65
+ - 5
66
+ - 4
45
67
  version: 0.5.4
46
68
  type: :runtime
47
- prerelease: false
48
- version_requirements: *80967360
49
- - !ruby/object:Gem::Dependency
69
+ version_requirements: *id003
70
+ - !ruby/object:Gem::Dependency
50
71
  name: rvm
51
- requirement: &80967130 !ruby/object:Gem::Requirement
72
+ prerelease: false
73
+ requirement: &id004 !ruby/object:Gem::Requirement
52
74
  none: false
53
- requirements:
54
- - - ! '>='
55
- - !ruby/object:Gem::Version
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 29
79
+ segments:
80
+ - 1
81
+ - 6
82
+ - 9
56
83
  version: 1.6.9
57
84
  type: :runtime
58
- prerelease: false
59
- version_requirements: *80967130
85
+ version_requirements: *id004
60
86
  description: A Crossroads Foundation collection of generic capistrano recipes.
61
- email:
87
+ email:
62
88
  - it_dept@crossroads.org.hk
63
89
  executables: []
90
+
64
91
  extensions: []
92
+
65
93
  extra_rdoc_files: []
66
- files:
94
+
95
+ files:
67
96
  - .gitignore
68
97
  - Gemfile
69
98
  - README.textile
@@ -93,26 +122,36 @@ files:
93
122
  - lib/crossroads_capistrano/recipes/yum.rb
94
123
  homepage: http://www.crossroads.org.hk
95
124
  licenses: []
125
+
96
126
  post_install_message:
97
127
  rdoc_options: []
98
- require_paths:
128
+
129
+ require_paths:
99
130
  - lib
100
- required_ruby_version: !ruby/object:Gem::Requirement
131
+ required_ruby_version: !ruby/object:Gem::Requirement
101
132
  none: false
102
- requirements:
103
- - - ! '>='
104
- - !ruby/object:Gem::Version
105
- version: '0'
106
- required_rubygems_version: !ruby/object:Gem::Requirement
133
+ requirements:
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ hash: 3
137
+ segments:
138
+ - 0
139
+ version: "0"
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
141
  none: false
108
- requirements:
109
- - - ! '>='
110
- - !ruby/object:Gem::Version
111
- version: '0'
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
147
+ - 0
148
+ version: "0"
112
149
  requirements: []
150
+
113
151
  rubyforge_project: crossroads_capistrano
114
- rubygems_version: 1.8.6
152
+ rubygems_version: 1.8.10
115
153
  signing_key:
116
154
  specification_version: 3
117
155
  summary: Crossroads capistrano recipes
118
156
  test_files: []
157
+