Merge branch 'master' into 5682-download-file-error
authorRadhika Chippada <radhika@curoverse.com>
Mon, 11 May 2015 15:01:21 +0000 (11:01 -0400)
committerRadhika Chippada <radhika@curoverse.com>
Mon, 11 May 2015 15:01:21 +0000 (11:01 -0400)
apps/workbench/Gemfile
apps/workbench/Gemfile.lock
sdk/ruby/lib/arvados/keep.rb

index 3c925f924c17ba3e3dee2b945f663b5cef613e15..b390c266126584d57a32616542856bbe8f575ceb 100644 (file)
@@ -1,7 +1,7 @@
 source 'https://rubygems.org'
 
 gem 'rails', '~> 4.1.0'
-gem 'arvados', '>= 0.1.20150421171838'
+gem 'arvados', '>= 0.1.20150507210654'
 
 gem 'activerecord-nulldb-adapter'
 gem 'multi_json'
index 9311bfaa51d68abbb0ae31c22a0180f2bfc74895..7574b8d47238d2dd93a161b9b0a258a8867c402b 100644 (file)
@@ -42,7 +42,7 @@ GEM
     andand (1.3.3)
     angularjs-rails (1.3.8)
     arel (5.0.1.20140414130214)
-    arvados (0.1.20150421171838)
+    arvados (0.1.20150507210654)
       activesupport (>= 3.2.13)
       andand (~> 1.3, >= 1.3.3)
       google-api-client (~> 0.6.3, >= 0.6.3)
@@ -260,7 +260,7 @@ DEPENDENCIES
   activerecord-nulldb-adapter
   andand
   angularjs-rails
-  arvados (>= 0.1.20150421171838)
+  arvados (>= 0.1.20150507210654)
   bootstrap-sass (~> 3.1.0)
   bootstrap-tab-history-rails
   bootstrap-x-editable-rails
index a1f418b2b5b6eb5756695e078e77cd88256b06cb..422dab5f5372c05d177d69a381a82b7e7f8ab1e1 100644 (file)
@@ -154,7 +154,16 @@ module Keep
             stream_name = unescape token
           elsif in_file_tokens or not Locator.valid? token
             in_file_tokens = true
-            yield [stream_name] + split_file_token(token)
+
+            file_tokens = split_file_token(token)
+            stream_name_adjuster = ''
+            if file_tokens[2].include?('/')                # '/' in filename
+              parts = file_tokens[2].rpartition('/')
+              stream_name_adjuster = parts[1] + parts[0]   # /dir_parts
+              file_tokens[2] = parts[2]
+            end
+
+            yield [stream_name + stream_name_adjuster] + file_tokens
           end
         end
       end
@@ -165,11 +174,6 @@ module Keep
       if @files.nil?
         file_sizes = Hash.new(0)
         each_file_spec do |streamname, _, filesize, filename|
-          if filename.include?('/')
-            parts = filename.rpartition('/')
-            streamname = streamname + parts[1] + parts[0]   # ./dir_parts
-            filename = parts[2]
-          end
           file_sizes[[streamname, filename]] += filesize
         end
         @files = file_sizes.each_pair.map do |(streamname, filename), size|