rails_pwnerer 0.6.41 → 0.6.42

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ v0.6.42. Support for multiple DNS names.
2
+
1
3
  v0.6.41. Reduced output during scaffolding.
2
4
 
3
5
  v0.6.40. Added rake to the scaffold, so rails 2.3 can use it.
data/README CHANGED
@@ -122,8 +122,8 @@ creating some files in your application directory (so the
122
122
  overrides will be version-controlled). In your Rails directory
123
123
  (on your devbox), use rpwndev as follows:
124
124
 
125
- * Set the DNS name that your app responds to:
126
- rpwndev set dns_name your.dns.name
125
+ * Set the DNS name(s) that your app responds to:
126
+ rpwndev set dns_name your.dns.name,www.your.dns.name
127
127
 
128
128
  * Tweak the number of frontends per CPU core for an instance:
129
129
  rpwndev setnum frontends_per_core 4 your_instance
@@ -8,7 +8,12 @@ class RailsPwnage::App::Gems
8
8
 
9
9
  # Phase 1: app-directed install
10
10
  if app_config[:gems]
11
- install_gems = app_config[:gems].split(',')
11
+ # Can be specified as comma-separated string or array.
12
+ if app_config[:gems].respond_to? :to_str
13
+ install_gems = app_config[:gems].split(',')
14
+ else
15
+ install_gems = app_config[:gems]
16
+ end
12
17
  install_gems.each do |gem_name|
13
18
  #begin
14
19
  install_gem gem_name unless gem_exists? gem_name
@@ -7,7 +7,14 @@ class RailsPwnage::App::NginxConfig
7
7
  def config_nginx(app_name, instance_name)
8
8
  app_config = RailsPwnage::Config[app_name, instance_name]
9
9
  first_port = app_config[:port0]
10
- dns_name = app_config[:dns_name]
10
+
11
+ # Can be specified as comma-separated string or array.
12
+ if app_config[:dns_name].respond_to? :to_str
13
+ dns_names = app_config[:dns_name].split(',')
14
+ else
15
+ dns_names = app_config[:dns_name]
16
+ end
17
+
11
18
  app_port = app_config[:port] || 80
12
19
 
13
20
  nginx_config = File.join(RailsPwnage::Config.path_to(:nginx_configs),
@@ -24,7 +31,7 @@ class RailsPwnage::App::NginxConfig
24
31
  f << <<NGINX_CONFIG
25
32
  server {
26
33
  listen #{app_port};
27
- #{(dns_name.empty? ? '' : "server_name " + dns_name + ";")}
34
+ #{(dns_names.empty? ? '' : "server_name " + dns_names.join(' ') + ";")}
28
35
  root #{app_config[:app_path]}/public;
29
36
  client_max_body_size #{app_config[:max_request_mb]}M;
30
37
  location / {
@@ -9,7 +9,7 @@ class RailsPwnage::Scaffolds::Gems
9
9
  end
10
10
 
11
11
  def install_servers
12
- install_gems %w(rack rails thin)
12
+ install_gems %w(rack rails thin mongrel)
13
13
  end
14
14
 
15
15
  def install_dbi
@@ -27,7 +27,7 @@ class RailsPwnage::Scaffolds::Gems
27
27
  install_gems %w(highline termios)
28
28
 
29
29
  # useful for building gems and debugging
30
- install_gems %w(echoe)
30
+ install_gems %w(echoe ruby-debug-ide)
31
31
 
32
32
  # some code can use this instead of Net::HTTP and be faster
33
33
  install_gems %w(curb)
@@ -5,7 +5,7 @@ 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
- #
8
+ # needed to play with the configuration database
9
9
  install_packages %w(debconf debconf-utils)
10
10
 
11
11
  # dpkg-dev allows building from source
@@ -40,6 +40,9 @@ class RailsPwnage::Scaffolds::Packages
40
40
  # needed by sqlite-3 ruby gem in tools
41
41
  install_packages %w(libsqlite3-0 libsqlite3-dev sqlite3), :source => true
42
42
 
43
+ # needed for solr and other java-based services
44
+ install_packages %w(openjdk-6-jdk)
45
+
43
46
  # useful to be able to work with compressed data
44
47
  install_packages %w(tar zip bzip2 gzip)
45
48
  end
@@ -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.41"
5
+ s.version = "0.6.42"
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-04-04}
9
+ s.date = %q{2009-04-17}
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.41
4
+ version: 0.6.42
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-04-04 00:00:00 -04:00
12
+ date: 2009-04-17 00:00:00 -04:00
13
13
  default_executable: bin/rpwn
14
14
  dependencies: []
15
15