incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r962304 - in /incubator/deltacloud/trunk/server: ./ app/controllers/ app/stylesheets/ app/stylesheets/partials/ config/ config/compass/ config/compass/partials/ config/environments/ config/initializers/ config/locales/ lib/ lib/deltacloud/ ...
Date Thu, 08 Jul 2010 23:45:02 GMT
Author: lutter
Date: Thu Jul  8 23:45:01 2010
New Revision: 962304

URL: http://svn.apache.org/viewvc?rev=962304&view=rev
Log:
* Removed obsolete Rails controllers and config files. * Moved Compass files into config directory
* Cleanup in helpers code * Removed unused helpers and empty helpers * Moved drivers.rb into
lib folder
* Removed Rails error pages

Added:
    incubator/deltacloud/trunk/server/config/compass/
    incubator/deltacloud/trunk/server/config/compass/.gitignore
      - copied, changed from r962303, incubator/deltacloud/trunk/server/app/stylesheets/.gitignore
    incubator/deltacloud/trunk/server/config/compass/application.sass
      - copied, changed from r962303, incubator/deltacloud/trunk/server/app/stylesheets/application.sass
    incubator/deltacloud/trunk/server/config/compass/ie.sass
      - copied, changed from r962303, incubator/deltacloud/trunk/server/app/stylesheets/ie.sass
    incubator/deltacloud/trunk/server/config/compass/partials/
    incubator/deltacloud/trunk/server/config/compass/partials/_base.sass
      - copied, changed from r962303, incubator/deltacloud/trunk/server/app/stylesheets/partials/_base.sass
    incubator/deltacloud/trunk/server/config/compass/print.sass
      - copied, changed from r962303, incubator/deltacloud/trunk/server/app/stylesheets/print.sass
    incubator/deltacloud/trunk/server/config/compass/screen.sass
      - copied, changed from r962303, incubator/deltacloud/trunk/server/app/stylesheets/screen.sass
    incubator/deltacloud/trunk/server/lib/drivers.rb
      - copied, changed from r962303, incubator/deltacloud/trunk/server/drivers.rb
Removed:
    incubator/deltacloud/trunk/server/app/controllers/api_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/application_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/flavors_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/hardware_profiles_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/images_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/instance_states_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/instances_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/realms_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/root_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/storage_snapshots_controller.rb
    incubator/deltacloud/trunk/server/app/controllers/storage_volumes_controller.rb
    incubator/deltacloud/trunk/server/app/stylesheets/.gitignore
    incubator/deltacloud/trunk/server/app/stylesheets/application.sass
    incubator/deltacloud/trunk/server/app/stylesheets/ie.sass
    incubator/deltacloud/trunk/server/app/stylesheets/partials/_base.sass
    incubator/deltacloud/trunk/server/app/stylesheets/print.sass
    incubator/deltacloud/trunk/server/app/stylesheets/screen.sass
    incubator/deltacloud/trunk/server/config/boot.rb
    incubator/deltacloud/trunk/server/config/database.yml
    incubator/deltacloud/trunk/server/config/environment.rb
    incubator/deltacloud/trunk/server/config/environments/development.rb
    incubator/deltacloud/trunk/server/config/environments/production.rb
    incubator/deltacloud/trunk/server/config/environments/test.rb
    incubator/deltacloud/trunk/server/config/initializers/backtrace_silencers.rb
    incubator/deltacloud/trunk/server/config/initializers/compass.rb
    incubator/deltacloud/trunk/server/config/initializers/inflections.rb
    incubator/deltacloud/trunk/server/config/initializers/mime_types.rb
    incubator/deltacloud/trunk/server/config/initializers/new_rails_defaults.rb
    incubator/deltacloud/trunk/server/config/initializers/session_store.rb
    incubator/deltacloud/trunk/server/config/locales/en.yml
    incubator/deltacloud/trunk/server/config/routes.rb
    incubator/deltacloud/trunk/server/drivers.rb
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/driver_helper.rb
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/root_helper.rb
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/url_helper.rb
    incubator/deltacloud/trunk/server/public/404.html
    incubator/deltacloud/trunk/server/public/422.html
    incubator/deltacloud/trunk/server/public/500.html
Modified:
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers.rb
    incubator/deltacloud/trunk/server/lib/deltacloud/helpers/conversion_helper.rb
    incubator/deltacloud/trunk/server/lib/sinatra/url_for.rb

Copied: incubator/deltacloud/trunk/server/config/compass/.gitignore (from r962303, incubator/deltacloud/trunk/server/app/stylesheets/.gitignore)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/compass/.gitignore?p2=incubator/deltacloud/trunk/server/config/compass/.gitignore&p1=incubator/deltacloud/trunk/server/app/stylesheets/.gitignore&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/app/stylesheets/.gitignore (original)
+++ incubator/deltacloud/trunk/server/config/compass/.gitignore Thu Jul  8 23:45:01 2010
@@ -1,2 +1 @@
 .sass-cache
-

Copied: incubator/deltacloud/trunk/server/config/compass/application.sass (from r962303, incubator/deltacloud/trunk/server/app/stylesheets/application.sass)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/compass/application.sass?p2=incubator/deltacloud/trunk/server/config/compass/application.sass&p1=incubator/deltacloud/trunk/server/app/stylesheets/application.sass&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
    (empty)

Copied: incubator/deltacloud/trunk/server/config/compass/ie.sass (from r962303, incubator/deltacloud/trunk/server/app/stylesheets/ie.sass)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/compass/ie.sass?p2=incubator/deltacloud/trunk/server/config/compass/ie.sass&p1=incubator/deltacloud/trunk/server/app/stylesheets/ie.sass&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
    (empty)

Copied: incubator/deltacloud/trunk/server/config/compass/partials/_base.sass (from r962303,
incubator/deltacloud/trunk/server/app/stylesheets/partials/_base.sass)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/compass/partials/_base.sass?p2=incubator/deltacloud/trunk/server/config/compass/partials/_base.sass&p1=incubator/deltacloud/trunk/server/app/stylesheets/partials/_base.sass&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/app/stylesheets/partials/_base.sass (original)
+++ incubator/deltacloud/trunk/server/config/compass/partials/_base.sass Thu Jul  8 23:45:01
2010
@@ -8,4 +8,3 @@
 // Use this to calculate the width based on the total width.
 // Or you can set !blueprint_grid_width to a fixed value and unset !blueprint_container_size
-- it will be calculated for you.
 !blueprint_grid_width   = (!blueprint_container_size + !blueprint_grid_margin) / !blueprint_grid_columns
- !blueprint_grid_margin
-

Copied: incubator/deltacloud/trunk/server/config/compass/print.sass (from r962303, incubator/deltacloud/trunk/server/app/stylesheets/print.sass)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/compass/print.sass?p2=incubator/deltacloud/trunk/server/config/compass/print.sass&p1=incubator/deltacloud/trunk/server/app/stylesheets/print.sass&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
    (empty)

Copied: incubator/deltacloud/trunk/server/config/compass/screen.sass (from r962303, incubator/deltacloud/trunk/server/app/stylesheets/screen.sass)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/config/compass/screen.sass?p2=incubator/deltacloud/trunk/server/config/compass/screen.sass&p1=incubator/deltacloud/trunk/server/app/stylesheets/screen.sass&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
    (empty)

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/helpers.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/helpers.rb?rev=962304&r1=962303&r2=962304&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/helpers.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/helpers.rb Thu Jul  8 23:45:01 2010
@@ -1,6 +1,5 @@
 require 'deltacloud/helpers/application_helper'
-require 'deltacloud/helpers/url_helper'
-require 'deltacloud/helpers/driver_helper'
+require 'deltacloud/helpers/conversion_helper'
 require 'deltacloud/helpers/hardware_profiles_helper'
 
-helpers ApplicationHelper, URLHelper, DriverHelper, HardwareProfilesHelper
+helpers ApplicationHelper, ConversionHelper, HardwareProfilesHelper

Modified: incubator/deltacloud/trunk/server/lib/deltacloud/helpers/conversion_helper.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/deltacloud/helpers/conversion_helper.rb?rev=962304&r1=962303&r2=962304&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/deltacloud/helpers/conversion_helper.rb (original)
+++ incubator/deltacloud/trunk/server/lib/deltacloud/helpers/conversion_helper.rb Thu Jul
 8 23:45:01 2010
@@ -16,13 +16,23 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-load 'converters/xml_converter.rb'
+require 'deltacloud/base_driver'
+require 'converters/xml_converter'
 
 module ConversionHelper
 
-  def convert_to_xml(type, obj)
-    if ( [ :account, :image, :realm, :instance, :storage_volume, :storage_snapshot ].include?(
type ) )
-      Converters::XMLConverter.new( self, type ).convert(obj)
+  def convert_to_json(type, obj)
+    if ( [ :flavor, :account, :image, :realm, :instance, :storage_volume, :storage_snapshot
].include?( type ) )
+      if Array.eql?(obj.class)
+        data = obj.collect do |o|
+          o.to_hash.merge({ :href => self.send(:"#{type}_url", o.id ) })
+        end
+        type = type.to_s.pluralize
+      else
+        data = obj.to_hash
+        data.merge!({ :href => self.send(:"#{type}_url", data[:id]) })
+      end
+      return { :"#{type}" => data }.to_json
     end
   end
 

Copied: incubator/deltacloud/trunk/server/lib/drivers.rb (from r962303, incubator/deltacloud/trunk/server/drivers.rb)
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/drivers.rb?p2=incubator/deltacloud/trunk/server/lib/drivers.rb&p1=incubator/deltacloud/trunk/server/drivers.rb&r1=962303&r2=962304&rev=962304&view=diff
==============================================================================
    (empty)

Modified: incubator/deltacloud/trunk/server/lib/sinatra/url_for.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/lib/sinatra/url_for.rb?rev=962304&r1=962303&r2=962304&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/lib/sinatra/url_for.rb (original)
+++ incubator/deltacloud/trunk/server/lib/sinatra/url_for.rb Thu Jul  8 23:45:01 2010
@@ -32,7 +32,13 @@ module Sinatra
       end
       "#{base}#{url_fragment}"
     end
+
+    def root_url
+      url_for '/'
+    end
   end
 
+
+
   helpers UrlForHelper
 end



Mime
View raw message