deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [33/50] [abbrv] git commit: Core: Load core_ext in deltacloud_rack to make them available in all frontends
Date Tue, 22 May 2012 20:19:37 GMT
Core: Load core_ext in deltacloud_rack to make them available in all frontends


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/82333bb2
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/82333bb2
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/82333bb2

Branch: refs/heads/master
Commit: 82333bb29d60122f2e7e1af8c019f55d3a79d69f
Parents: 0b18b3f
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue May 15 23:24:21 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue May 22 22:17:36 2012 +0200

----------------------------------------------------------------------
 server/lib/deltacloud.rb         |    3 +--
 server/lib/deltacloud/helpers.rb |    6 +-----
 server/lib/deltacloud_rack.rb    |   14 ++++++++++++++
 3 files changed, 16 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/82333bb2/server/lib/deltacloud.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud.rb b/server/lib/deltacloud.rb
index 6508d8d..6160cce 100644
--- a/server/lib/deltacloud.rb
+++ b/server/lib/deltacloud.rb
@@ -14,11 +14,10 @@
 # under the License.
 
 require 'rubygems'
+require 'ostruct'
 
 load File.join(File.dirname(__FILE__), 'deltacloud/core_ext.rb')
 
-require 'ostruct'
-
 require_relative 'deltacloud/core_ext/string'
 require_relative 'deltacloud/core_ext/array'
 require_relative 'deltacloud/core_ext/hash'

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/82333bb2/server/lib/deltacloud/helpers.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers.rb b/server/lib/deltacloud/helpers.rb
index b4f859f..2109362 100644
--- a/server/lib/deltacloud/helpers.rb
+++ b/server/lib/deltacloud/helpers.rb
@@ -19,11 +19,7 @@ require_relative 'helpers/url_helper'
 require_relative 'helpers/deltacloud_helper'
 require_relative 'helpers/rabbit_helper'
 require_relative 'helpers/blob_stream_helper'
-require_relative 'core_ext/string'
-require_relative 'core_ext/array'
-require_relative 'core_ext/hash'
-require_relative 'core_ext/integer'
-require_relative 'core_ext/proc'
+
 
 module Deltacloud::Collections
   class Base < Sinatra::Base

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/82333bb2/server/lib/deltacloud_rack.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud_rack.rb b/server/lib/deltacloud_rack.rb
index 873ef29..b795731 100644
--- a/server/lib/deltacloud_rack.rb
+++ b/server/lib/deltacloud_rack.rb
@@ -13,6 +13,20 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+unless Kernel.respond_to?(:require_relative)
+  module Kernel
+    def require_relative(path)
+      require File.join(File.dirname(caller[0]), path.to_str)
+    end
+  end
+end
+
+require_relative './deltacloud/core_ext/string'
+require_relative './deltacloud/core_ext/array'
+require_relative './deltacloud/core_ext/hash'
+require_relative './deltacloud/core_ext/integer'
+require_relative './deltacloud/core_ext/proc'
+
 module Deltacloud
 
   def self.config(conf=nil)


Mime
View raw message