Commits

Michael Granger committed 7ec3313

Several small fixes.

Comments (0)

Files changed (4)

 	self.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
 	self.license "BSD"
 
-	self.dependency 'pluggability',    '~> 1.0'
-	self.dependency 'loggability',     '~> 1.0'
+	self.dependency 'pluggability',    '~> 0.3'
+	self.dependency 'loggability',     '~> 0.8'
 	self.dependency 'configurability', '~> 2.1'
 	self.dependency 'pg',              '~> 0.16'
-	self.dependency 'strelka',         '~> 0.6'
+	self.dependency 'strelka',         '~> 0.7.pre'
 	self.dependency 'sequel',          '~> 4.1'
 	self.dependency 'sequel_pg',       '~> 1.6'
 
 			uri = base_uri.dup
 			uri.path += uuid
 
-			metadata = self.metastore.fetch( uuid, *OPERATIONAL_METADATA_KEYS )
+			metadata = self.metastore.fetch( uuid )
 			metadata['uri'] = uri.to_s
+			metadata['uuid'] = uuid
 
 			metadata
 		end
 	protected
 	#########
 
+
+	### Overridden from the base handler class to allow spooled uploads.
+	def handle_async_upload_start( request )
+		self.log.info "Starting asynchronous upload: %s" %
+			[ request.headers.x_mongrel2_upload_start ]
+	end
+
+
 	### Return a Hash of default metadata extracted from the given +request+.
 	def extract_default_metadata( request )
 		return {

lib/thingfish/metastore/memory.rb

 
 		if order_fields = criteria[:order]
 			fields = order_fields.split( /\s*,\s*/ )
-			ds = ds.order_by {|uuid| @storage[uuid].values_at(*fields) }
+			ds = ds.to_a.sort_by {|uuid| @storage[uuid].values_at(*fields) }
 		end
 
 		ds = ds.reverse if criteria[:direction] && criteria[:direction] == 'desc'

spec/constants.rb

 	TEST_SEND_SPEC    = 'tcp://127.0.0.1:9999'
 	TEST_RECV_SPEC    = 'tcp://127.0.0.1:9998'
 
-	UUID_PATTERN      = /(?<uuid>[[:xdigit:]]{8}(?:-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12})/i
+	UUID_PATTERN      = /[[:xdigit:]]{8}(?:-[[:xdigit:]]{4}){3}-[[:xdigit:]]{12}/i
 
 	TEST_UUID         = 'E5DFEEAB-3525-4F14-B4DB-2772D0B9987F'