Change default_url_options settings. Stub brutal hack. Refs #2261
This commit is contained in:
parent
165b146787
commit
4bd9b81f65
|
@ -133,7 +133,8 @@ class Platform < ActiveRecord::Base
|
||||||
FileUtils.rm_rf "#{ Rails.root.join('tmp', 'umount', self.unixname) }" if File.exist? "#{ Rails.root.join('tmp', 'umount', unixname) }"
|
FileUtils.rm_rf "#{ Rails.root.join('tmp', 'umount', self.unixname) }" if File.exist? "#{ Rails.root.join('tmp', 'umount', unixname) }"
|
||||||
FileUtils.mkdir_p "#{ Rails.root.join('tmp', 'mount', unixname) }"
|
FileUtils.mkdir_p "#{ Rails.root.join('tmp', 'mount', unixname) }"
|
||||||
Arch.all.each do |arch|
|
Arch.all.each do |arch|
|
||||||
url = "http://#{EventLog.current_controller.request.host_with_port}/downloads/#{unixname}/repository/" # TODO REDO ?
|
host = EventLog.current_controller.request.host_with_port rescue ::Rosa::Application.config.action_mailer.default_url_options[:host]
|
||||||
|
url = "http://#{host}/downloads/#{unixname}/repository/"
|
||||||
str = "country=Russian Federation,city=Moscow,latitude=52.18,longitude=48.88,bw=1GB,version=2011,arch=#{arch.name},type=distrib,url=#{url}\n"
|
str = "country=Russian Federation,city=Moscow,latitude=52.18,longitude=48.88,bw=1GB,version=2011,arch=#{arch.name},type=distrib,url=#{url}\n"
|
||||||
File.open(Rails.root.join('tmp', 'mount', unixname, "#{unixname}.#{arch.name}.list"), 'w') {|f| f.write(str) }
|
File.open(Rails.root.join('tmp', 'mount', unixname, "#{unixname}.#{arch.name}.list"), 'w') {|f| f.write(str) }
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,6 +41,5 @@ module Rosa
|
||||||
|
|
||||||
# Configure sensitive parameters which will be filtered from the log file.
|
# Configure sensitive parameters which will be filtered from the log file.
|
||||||
config.filter_parameters += [:password]
|
config.filter_parameters += [:password]
|
||||||
config.action_mailer.default_url_options = { :host => 'npp-build.rosalab.ru' }
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -16,14 +16,13 @@ Rosa::Application.configure do
|
||||||
|
|
||||||
# Don't care if the mailer can't send
|
# Don't care if the mailer can't send
|
||||||
config.action_mailer.raise_delivery_errors = false
|
config.action_mailer.raise_delivery_errors = false
|
||||||
|
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
||||||
|
|
||||||
# Print deprecation notices to the Rails logger
|
# Print deprecation notices to the Rails logger
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
# Only use best-standards-support built into browsers
|
# Only use best-standards-support built into browsers
|
||||||
config.action_dispatch.best_standards_support = :builtin
|
config.action_dispatch.best_standards_support = :builtin
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Uncomment this to stub XML RPC calls
|
# Uncomment this to stub XML RPC calls
|
||||||
|
|
|
@ -36,6 +36,7 @@ Rosa::Application.configure do
|
||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
# Disable delivery errors, bad email addresses will be ignored
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
|
config.action_mailer.default_url_options = { :host => 'npp-build.rosalab.ru' }
|
||||||
|
|
||||||
# Enable threaded mode
|
# Enable threaded mode
|
||||||
# config.threadsafe!
|
# config.threadsafe!
|
||||||
|
|
|
@ -24,6 +24,7 @@ Rosa::Application.configure do
|
||||||
# The :test delivery method accumulates sent emails in the
|
# The :test delivery method accumulates sent emails in the
|
||||||
# ActionMailer::Base.deliveries array.
|
# ActionMailer::Base.deliveries array.
|
||||||
config.action_mailer.delivery_method = :test
|
config.action_mailer.delivery_method = :test
|
||||||
|
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
||||||
|
|
||||||
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
# Use SQL instead of Active Record's schema dumper when creating the test database.
|
||||||
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
||||||
|
|
Loading…
Reference in New Issue