rails_pwnerer 0.6.40 → 0.6.41

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.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.41. Reduced output during scaffolding.
2
+
1
3
  v0.6.40. Added rake to the scaffold, so rails 2.3 can use it.
2
4
 
3
5
  v0.6.39. More permissive restore to allow moving data across instances.
data/bin/rpwnctl CHANGED
@@ -8,13 +8,17 @@
8
8
  # Should-Stop: $remote_fs $network $named $time mysql nginx
9
9
  # Default-Start: 2 3 4 5
10
10
  # Default-Stop: 0 1 6
11
- # Short-Description: Starts rails_pwnerer's control daemon.
11
+ # Short-Description: Starts rails_pwnerer's control daemon
12
12
  # Description: rails_pwnerer's control daemon configures and starts up
13
- # the Rails applications deployed on the machine
13
+ # the Rails applications deployed on the machine.
14
14
  ### END INIT INFO
15
15
  #
16
16
 
17
17
  require 'rubygems'
18
18
  require 'rails_pwnerer'
19
19
 
20
+ # The debian checker wants to see LSB actions here. It can't comprehend that
21
+ # we might launch another script. So, there, let's make it happy.
22
+ # start stop restart force-reload reload status
23
+
20
24
  RailsPwnage::CtlExecutor.new.run ARGV
@@ -7,11 +7,19 @@ module RailsPwnage::Base
7
7
 
8
8
  # Builds apt-get parameters for a set of options.
9
9
  def apt_params_for(options = {})
10
+ # try to make debconf shut up for the general case
11
+ # HACK: this getter has side-effects because it's used for
12
+ # install_package_impl and update_package_impl, and they don't have
13
+ # handy command-line flags for these options that we'd like
14
+ ENV['DEBIAN_FRONTEND'] = 'noninteractive'
15
+ ENV['DEBIAN_PRIORITY'] = 'critical'
16
+ ENV['DEBCONF_TERSE'] = 'yes'
17
+
10
18
  params = ""
11
19
  params << "-o Acquire::http::Proxy=false" if options[:no_proxy]
12
20
  end
13
21
 
14
- def install_package_impl(package_name, options)
22
+ def install_package_impl(package_name, options)
15
23
  apt_params = apt_params_for options
16
24
  if options[:source]
17
25
  with_temp_dir(:root => true) do
@@ -19,11 +27,11 @@ module RailsPwnage::Base
19
27
  return false unless $CHILD_STATUS.success?
20
28
  Kernel.system "apt-get source -b #{apt_params} #{package_name}"
21
29
  return false unless $CHILD_STATUS.success?
22
- Kernel.system "dpkg -i #{Dir.glob('*.deb', File::FNM_DOTMATCH).join(' ')} < /dev/null"
30
+ Kernel.system "dpkg -i #{Dir.glob('*.deb', File::FNM_DOTMATCH).join(' ')}"
23
31
  return false unless $CHILD_STATUS.success?
24
32
  end
25
33
  else
26
- Kernel.system "apt-get install -y #{apt_params} #{package_name} < /dev/null"
34
+ Kernel.system "apt-get install -y #{apt_params} #{package_name}"
27
35
  return false unless $CHILD_STATUS.success?
28
36
  end
29
37
  return true
@@ -54,7 +62,7 @@ module RailsPwnage::Base
54
62
 
55
63
  def upgrade_package_impl(package_name, options)
56
64
  apt_params = apt_params_for options
57
- Kernel.system "apt-get upgrade -y #{apt_params} #{package_name.nil ? '' : package_name} < /dev/null"
65
+ Kernel.system "apt-get upgrade -y #{apt_params} #{package_name.nil ? '' : package_name}"
58
66
  return $CHILD_STATUS.success?
59
67
  end
60
68
 
@@ -5,6 +5,9 @@ class RailsPwnage::Scaffolds::Packages
5
5
 
6
6
  # the packages needed to manage the server remotely and install applications
7
7
  def install_management
8
+ #
9
+ install_packages %w(debconf debconf-utils)
10
+
8
11
  # dpkg-dev allows building from source
9
12
  # openssh-server allows us to ssh into the box
10
13
  # build-essential is needed to install some gems
@@ -16,17 +19,17 @@ class RailsPwnage::Scaffolds::Packages
16
19
 
17
20
  # rpwn doesn't deal with git yet, but we'd like to offer that, so we'll
18
21
  # bring in the git infrastructure during scaffolding
19
- install_packages %w(git-core), :source => true
22
+ install_packages %w(git-core)
20
23
 
21
24
  # ddclient does dynamic DNS
22
25
  # avahi-daemon does mDNS, a.k.a. Bonjour (makes "ping hostname.local" work)
23
- install_packages %w(ddclient avahi-daemon), :source => true
26
+ install_packages %w(ddclient avahi-daemon)
24
27
  end
25
28
 
26
29
  # packages that are needed by popular gems
27
30
  def install_tools
28
31
  # needed by rmagick which does image processing
29
- install_packages %w(libmagick9-dev), :source => true
32
+ install_packages %w(libmagick9-dev)
30
33
 
31
34
  # needed by xml parsers
32
35
  install_packages %w(libxml2-dev libxslt1-dev)
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{rails_pwnerer}
5
- s.version = "0.6.40"
5
+ s.version = "0.6.41"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Victor Costan"]
9
- s.date = %q{2009-03-28}
9
+ s.date = %q{2009-04-04}
10
10
  s.default_executable = %q{bin/rpwn}
11
11
  s.description = %q{Rails deployment tool/hack.}
12
12
  s.email = %q{victor@costan.us}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_pwnerer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.40
4
+ version: 0.6.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Costan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-03-28 00:00:00 -04:00
12
+ date: 2009-04-04 00:00:00 -04:00
13
13
  default_executable: bin/rpwn
14
14
  dependencies: []
15
15