Sha256: ec93176779e19fd729512773040301f88d769f517de34a0b2200a25a886ae752

Contents?: true

Size: 1.22 KB

Versions: 12

Compression:

Stored size: 1.22 KB

Contents

#!/usr/bin/ruby

#    This file is part of EC2 on Rails.
#    http://rubyforge.org/projects/ec2onrails/
#
#    Copyright 2007 Paul Dowman, http://pauldowman.com/
#
#    EC2 on Rails is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    EC2 on Rails is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.


# This script updates the value of "environment" in the the mongrel_cluster
# config file.

require "yaml"
require "erb"

if ARGV.length != 1
  puts "usage: set_rails_env <value>"
  exit 1
end

@rails_env = ARGV[0]

# update mongrel_cluster config
config = YAML::load_file("/etc/mongrel_cluster/app.yml")
config["environment"] = @rails_env
File.open("/etc/mongrel_cluster/app.yml", 'w') do |f|
  YAML.dump(config, f)
end

Version data entries

12 entries across 12 versions & 9 rubygems

Version Path
Agiley-ec2onrails-0.9.10 server/files/usr/local/ec2onrails/bin/set_rails_env
ScholarNexus-ec2onrails-0.9.10 server/files/usr/local/ec2onrails/bin/set_rails_env
ScholarNexus-ec2onrails-0.9.11 server/files/usr/local/ec2onrails/bin/set_rails_env
arpitjain11-ec2onrails-0.9.10 server/files/usr/local/ec2onrails/bin/set_rails_env
hennk-ec2onrails-0.9.9.1 server/files/usr/local/ec2onrails/bin/set_rails_env
hennk-hennk-ec2onrails-0.9.9.2 server/files/usr/local/ec2onrails/bin/set_rails_env
hennk-hennk-ec2onrails-0.9.9.3 server/files/usr/local/ec2onrails/bin/set_rails_env
mdh-ec2onrails-0.9.10 server/files/usr/local/ec2onrails/bin/set_rails_env
pauldowman-ec2onrails-0.9.10 server/files/usr/local/ec2onrails/bin/set_rails_env
rsanheim-ec2onrails-0.9.11.1 server/files/usr/local/ec2onrails/bin/set_rails_env
skippy-ec2onrails-0.9.10 server/files/usr/local/ec2onrails/bin/set_rails_env
skippy-ec2onrails-0.9.11 server/files/usr/local/ec2onrails/bin/set_rails_env