These changes update the base rails framework to v3.0.x. No deltacloud-specific sources are modified here --- src/db/seeds.rb | 7 ++++++ src/public/401.html | 40 ------------------------------------ src/public/404.html | 34 +++++++++++++----------------- src/public/422.html | 26 +++++++++++++++++++++++ src/public/500.html | 36 ++++++++++++++------------------ src/public/dispatch.cgi | 10 --------- src/public/dispatch.fcgi | 24 --------------------- src/public/dispatch.rb | 29 -------------------------- src/public/javascripts/controls.js | 8 ++++-- src/public/javascripts/dragdrop.js | 13 ++++++----- src/public/javascripts/effects.js | 21 +++++++----------- src/public/robots.txt | 6 ++++- src/script/about | 3 -- src/script/autospec | 6 ----- src/script/breakpointer | 3 -- src/script/console | 3 -- src/script/dbconsole | 3 -- src/script/destroy | 3 -- src/script/generate | 3 -- src/script/performance/benchmarker | 3 -- src/script/performance/profiler | 3 -- src/script/performance/request | 3 -- src/script/plugin | 3 -- src/script/process/inspector | 3 -- src/script/process/reaper | 3 -- src/script/process/spawner | 3 -- src/script/rails | 6 +++++ src/script/runner | 3 -- src/script/server | 9 -------- src/script/spec | 10 --------- 30 files changed, 95 insertions(+), 232 deletions(-) create mode 100644 src/db/seeds.rb delete mode 100644 src/public/401.html create mode 100644 src/public/422.html delete mode 100755 src/public/dispatch.cgi delete mode 100755 src/public/dispatch.fcgi delete mode 100755 src/public/dispatch.rb delete mode 100755 src/script/about delete mode 100755 src/script/autospec delete mode 100755 src/script/breakpointer delete mode 100755 src/script/console delete mode 100755 src/script/dbconsole delete mode 100755 src/script/destroy delete mode 100755 src/script/generate delete mode 100755 src/script/performance/benchmarker delete mode 100755 src/script/performance/profiler delete mode 100755 src/script/performance/request delete mode 100755 src/script/plugin delete mode 100755 src/script/process/inspector delete mode 100755 src/script/process/reaper delete mode 100755 src/script/process/spawner create mode 100755 src/script/rails delete mode 100755 src/script/runner delete mode 100755 src/script/server delete mode 100755 src/script/spec
diff --git a/src/db/seeds.rb b/src/db/seeds.rb new file mode 100644 index 0000000..664d8c7 --- /dev/null +++ b/src/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). +# +# Examples: +# +# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) +# Mayor.create(:name => 'Daley', :city => cities.first) diff --git a/src/public/401.html b/src/public/401.html deleted file mode 100644 index ffcfc9b..0000000 --- a/src/public/401.html +++ /dev/null @@ -1,40 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head> - <meta http-equiv="content-type" content="text/html;charset=UTF-8" /> - <title>Authorization Required</title> - <link href="/ovirt/stylesheets/default.css" media="screen" rel="Stylesheet" type="text/css" /> - <script src="/ovirt/javascripts/prototype.js" type="text/javascript"></script> -</head> -<body> - -<div id="top_bar"></div> -<div id="content"> - <div id="header"> -<a href="/"><img alt="Ovirt" class="logo" src="/ovirt/images/ovirt-red-logo133x56.png" /></a> -</div> - - <div class = "alertbox"></div> - <div id="main"> - <div id="left"> - <!-- fill in main page content --> - <h1 class="page-title">Authorization Required</h1> -<p> -This server could not verify that you are authorized to access the -document requested. Either you supplied the wrong credentials (e.g., -bad password), or your browser doesn't understand how to supply the -credentials required. -</p> - </div> - <div id="right"> - </div> - </div> - <br clear="both" /> - <div id="footer"> -ET Group. Copyright Red Hat, Inc. 2007 -</div> -</div> -</body> -</html> diff --git a/src/public/404.html b/src/public/404.html index eff660b..9a48320 100644 --- a/src/public/404.html +++ b/src/public/404.html @@ -1,23 +1,19 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - +<!DOCTYPE html> +<html> <head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>The page you were looking for doesn't exist (404)</title> - <style type="text/css"> - body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } - div.dialog { - width: 25em; - padding: 0 4em; - margin: 4em auto 0 auto; - border: 1px solid #ccc; - border-right-color: #999; - border-bottom-color: #999; - } - h1 { font-size: 100%; color: #f00; line-height: 1.5em; } - </style> + <style type="text/css"> + body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } + div.dialog { + width: 25em; + padding: 0 4em; + margin: 4em auto 0 auto; + border: 1px solid #ccc; + border-right-color: #999; + border-bottom-color: #999; + } + h1 { font-size: 100%; color: #f00; line-height: 1.5em; } + </style> </head>
<body> @@ -27,4 +23,4 @@ <p>You may have mistyped the address or the page may have moved.</p> </div> </body> -</html> \ No newline at end of file +</html> diff --git a/src/public/422.html b/src/public/422.html new file mode 100644 index 0000000..83660ab --- /dev/null +++ b/src/public/422.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html> +<head> + <title>The change you wanted was rejected (422)</title> + <style type="text/css"> + body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } + div.dialog { + width: 25em; + padding: 0 4em; + margin: 4em auto 0 auto; + border: 1px solid #ccc; + border-right-color: #999; + border-bottom-color: #999; + } + h1 { font-size: 100%; color: #f00; line-height: 1.5em; } + </style> +</head> + +<body> + <!-- This file lives in public/422.html --> + <div class="dialog"> + <h1>The change you wanted was rejected.</h1> + <p>Maybe you tried to change something you didn't have access to.</p> + </div> +</body> +</html> diff --git a/src/public/500.html b/src/public/500.html index f0aee0e..b80307f 100644 --- a/src/public/500.html +++ b/src/public/500.html @@ -1,23 +1,19 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> - +<!DOCTYPE html> +<html> <head> - <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> - <title>We're sorry, but something went wrong</title> - <style type="text/css"> - body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } - div.dialog { - width: 25em; - padding: 0 4em; - margin: 4em auto 0 auto; - border: 1px solid #ccc; - border-right-color: #999; - border-bottom-color: #999; - } - h1 { font-size: 100%; color: #f00; line-height: 1.5em; } - </style> + <title>We're sorry, but something went wrong (500)</title> + <style type="text/css"> + body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } + div.dialog { + width: 25em; + padding: 0 4em; + margin: 4em auto 0 auto; + border: 1px solid #ccc; + border-right-color: #999; + border-bottom-color: #999; + } + h1 { font-size: 100%; color: #f00; line-height: 1.5em; } + </style> </head>
<body> @@ -27,4 +23,4 @@ <p>We've been notified about this issue and we'll take a look at it shortly.</p> </div> </body> -</html> \ No newline at end of file +</html> diff --git a/src/public/dispatch.cgi b/src/public/dispatch.cgi deleted file mode 100755 index 9730473..0000000 --- a/src/public/dispatch.cgi +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/ruby - -require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) - -# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: -# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require "dispatcher" - -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) -Dispatcher.dispatch \ No newline at end of file diff --git a/src/public/dispatch.fcgi b/src/public/dispatch.fcgi deleted file mode 100755 index f934b30..0000000 --- a/src/public/dispatch.fcgi +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/ruby -# -# You may specify the path to the FastCGI crash log (a log of unhandled -# exceptions which forced the FastCGI instance to exit, great for debugging) -# and the number of requests to process before running garbage collection. -# -# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log -# and the GC period is nil (turned off). A reasonable number of requests -# could range from 10-100 depending on the memory footprint of your app. -# -# Example: -# # Default log path, normal GC behavior. -# RailsFCGIHandler.process! -# -# # Default log path, 50 requests between GC. -# RailsFCGIHandler.process! nil, 50 -# -# # Custom log path, normal GC behavior. -# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log' -# -require File.dirname(__FILE__) + "/../config/environment" -require 'fcgi_handler' - -RailsFCGIHandler.process! diff --git a/src/public/dispatch.rb b/src/public/dispatch.rb deleted file mode 100755 index a82be08..0000000 --- a/src/public/dispatch.rb +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/ruby -# -# Copyright (C) 2008 Red Hat, Inc. -# Written by Scott Seago sseago@redhat.com -# -# This program 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; version 2 of the License. -# -# This program 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, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, -# MA 02110-1301, USA. A copy of the GNU General Public License is -# also available at http://www.gnu.org/copyleft/gpl.html. - - -require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) - -# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like: -# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired -require "dispatcher" - -ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) -Dispatcher.dispatch \ No newline at end of file diff --git a/src/public/javascripts/controls.js b/src/public/javascripts/controls.js index ca29aef..7392fb6 100644 --- a/src/public/javascripts/controls.js +++ b/src/public/javascripts/controls.js @@ -1,6 +1,8 @@ -// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005-2008 Ivan Krstic (http://blogs.law.harvard.edu/ivan) -// (c) 2005-2008 Jon Tirsen (http://www.tirsen.com) +// script.aculo.us controls.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// (c) 2005-2009 Ivan Krstic (http://blogs.law.harvard.edu/ivan) +// (c) 2005-2009 Jon Tirsen (http://www.tirsen.com) // Contributors: // Richard Livsey // Rahul Bhargava diff --git a/src/public/javascripts/dragdrop.js b/src/public/javascripts/dragdrop.js index 07229f9..15c6dbc 100644 --- a/src/public/javascripts/dragdrop.js +++ b/src/public/javascripts/dragdrop.js @@ -1,5 +1,6 @@ -// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) -// (c) 2005-2008 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz) +// script.aculo.us dragdrop.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // // script.aculo.us is freely distributable under the terms of an MIT-style license. // For details, see the script.aculo.us web site: http://script.aculo.us/ @@ -311,7 +312,7 @@ var Draggable = Class.create({ tag_name=='TEXTAREA')) return;
var pointer = [Event.pointerX(event), Event.pointerY(event)]; - var pos = Position.cumulativeOffset(this.element); + var pos = this.element.cumulativeOffset(); this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
Draggables.activate(this); @@ -454,7 +455,7 @@ var Draggable = Class.create({ },
draw: function(point) { - var pos = Position.cumulativeOffset(this.element); + var pos = this.element.cumulativeOffset(); if(this.options.ghosting) { var r = Position.realOffset(this.element); pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY; @@ -730,7 +731,7 @@ var Sortable = { }
// keep reference - this.sortables[element.id] = options; + this.sortables[element.identify()] = options;
// for onupdate Draggables.addObserver(new SortableObserver(element, options.onUpdate)); @@ -825,7 +826,7 @@ var Sortable = { hide().addClassName('dropmarker').setStyle({position:'absolute'}); document.getElementsByTagName("body").item(0).appendChild(Sortable._marker); } - var offsets = Position.cumulativeOffset(dropon); + var offsets = dropon.cumulativeOffset(); Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
if(position=='after') diff --git a/src/public/javascripts/effects.js b/src/public/javascripts/effects.js index 5a639d2..c81e6c7 100644 --- a/src/public/javascripts/effects.js +++ b/src/public/javascripts/effects.js @@ -1,4 +1,6 @@ -// Copyright (c) 2005-2008 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) +// script.aculo.us effects.js v1.8.3, Thu Oct 08 11:23:33 +0200 2009 + +// Copyright (c) 2005-2009 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us) // Contributors: // Justin Palmer (http://encytemedia.com/) // Mark Pilgrim (http://diveintomark.org/) @@ -145,14 +147,13 @@ var Effect = { 'blind': ['BlindDown','BlindUp'], 'appear': ['Appear','Fade'] }, - toggle: function(element, effect) { + toggle: function(element, effect, options) { element = $(element); - effect = (effect || 'appear').toLowerCase(); - var options = Object.extend({ + effect = (effect || 'appear').toLowerCase(); + + return Effect[ Effect.PAIRS[ effect ][ element.visible() ? 1 : 0 ] ](element, Object.extend({ queue: { position:'end', scope:(element.id || 'global'), limit: 1 } - }, arguments[2] || { }); - Effect[element.visible() ? - Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options); + }, options || {})); } };
@@ -228,12 +229,6 @@ Effect.Queue = Effect.Queues.get('global'); Effect.Base = Class.create({ position: null, start: function(options) { - function codeForEvent(options,eventName){ - return ( - (options[eventName+'Internal'] ? 'this.options.'+eventName+'Internal(this);' : '') + - (options[eventName] ? 'this.options.'+eventName+'(this);' : '') - ); - } if (options && options.transition === false) options.transition = Effect.Transitions.linear; this.options = Object.extend(Object.extend({ },Effect.DefaultOptions), options || { }); this.currentFrame = 0; diff --git a/src/public/robots.txt b/src/public/robots.txt index 4ab9e89..085187f 100644 --- a/src/public/robots.txt +++ b/src/public/robots.txt @@ -1 +1,5 @@ -# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file \ No newline at end of file +# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file +# +# To ban all spiders from the entire site uncomment the next two lines: +# User-Agent: * +# Disallow: / diff --git a/src/script/about b/src/script/about deleted file mode 100755 index 7b07d46..0000000 --- a/src/script/about +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/about' \ No newline at end of file diff --git a/src/script/autospec b/src/script/autospec deleted file mode 100755 index 837bbd7..0000000 --- a/src/script/autospec +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env ruby -gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 -ENV['RSPEC'] = 'true' # allows autotest to discover rspec -ENV['AUTOTEST'] = 'true' # allows autotest to run w/ color on linux -system((RUBY_PLATFORM =~ /mswin|mingw/ ? 'autotest.bat' : 'autotest'), *ARGV) || - $stderr.puts("Unable to find autotest. Please install ZenTest or fix your PATH") diff --git a/src/script/breakpointer b/src/script/breakpointer deleted file mode 100755 index 64af76e..0000000 --- a/src/script/breakpointer +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/breakpointer' \ No newline at end of file diff --git a/src/script/console b/src/script/console deleted file mode 100755 index 42f28f7..0000000 --- a/src/script/console +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/console' \ No newline at end of file diff --git a/src/script/dbconsole b/src/script/dbconsole deleted file mode 100755 index caa60ce..0000000 --- a/src/script/dbconsole +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/dbconsole' diff --git a/src/script/destroy b/src/script/destroy deleted file mode 100755 index fa0e6fc..0000000 --- a/src/script/destroy +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/destroy' \ No newline at end of file diff --git a/src/script/generate b/src/script/generate deleted file mode 100755 index ef976e0..0000000 --- a/src/script/generate +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/generate' \ No newline at end of file diff --git a/src/script/performance/benchmarker b/src/script/performance/benchmarker deleted file mode 100755 index c842d35..0000000 --- a/src/script/performance/benchmarker +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/performance/benchmarker' diff --git a/src/script/performance/profiler b/src/script/performance/profiler deleted file mode 100755 index d855ac8..0000000 --- a/src/script/performance/profiler +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/performance/profiler' diff --git a/src/script/performance/request b/src/script/performance/request deleted file mode 100755 index ae3f38c..0000000 --- a/src/script/performance/request +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/performance/request' diff --git a/src/script/plugin b/src/script/plugin deleted file mode 100755 index 26ca64c..0000000 --- a/src/script/plugin +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/plugin' \ No newline at end of file diff --git a/src/script/process/inspector b/src/script/process/inspector deleted file mode 100755 index bf25ad8..0000000 --- a/src/script/process/inspector +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/process/inspector' diff --git a/src/script/process/reaper b/src/script/process/reaper deleted file mode 100755 index c77f045..0000000 --- a/src/script/process/reaper +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/process/reaper' diff --git a/src/script/process/spawner b/src/script/process/spawner deleted file mode 100755 index 7118f39..0000000 --- a/src/script/process/spawner +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../../config/boot' -require 'commands/process/spawner' diff --git a/src/script/rails b/src/script/rails new file mode 100755 index 0000000..f8da2cf --- /dev/null +++ b/src/script/rails @@ -0,0 +1,6 @@ +#!/usr/bin/env ruby +# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application. + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require 'rails/commands' diff --git a/src/script/runner b/src/script/runner deleted file mode 100755 index ccc30f9..0000000 --- a/src/script/runner +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env ruby -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/runner' \ No newline at end of file diff --git a/src/script/server b/src/script/server deleted file mode 100755 index e9b183a..0000000 --- a/src/script/server +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby - -if Process.uid == 0 or Process.gid == 0 - puts "Deltacloud aggregator cannot be run as root" - exit(1) -end - -require File.dirname(__FILE__) + '/../config/boot' -require 'commands/server' diff --git a/src/script/spec b/src/script/spec deleted file mode 100755 index 46fdbe6..0000000 --- a/src/script/spec +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env ruby -if ARGV.any? {|arg| %w[--drb -X --generate-options -G --help -h --version -v].include?(arg)} - require 'rubygems' unless ENV['NO_RUBYGEMS'] -else - gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9 - ENV["RAILS_ENV"] ||= 'test' - require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT) -end -require 'spec/autorun' -exit ::Spec::Runner::CommandLine.run