rename projects
authorTom Clegg <tom@clinicalfuture.com>
Mon, 15 Apr 2013 02:19:25 +0000 (19:19 -0700)
committerTom Clegg <tom@clinicalfuture.com>
Mon, 15 Apr 2013 02:45:19 +0000 (19:45 -0700)
92 files changed:
apps/workbench/Rakefile
apps/workbench/app/controllers/application_controller.rb
apps/workbench/app/controllers/collections_controller.rb
apps/workbench/app/controllers/sessions_controller.rb
apps/workbench/app/helpers/application_helper.rb
apps/workbench/app/helpers/pipeline_instances_helper.rb
apps/workbench/app/models/arvados_api_client.rb [moved from apps/workbench/app/models/orvos_api_client.rb with 72% similarity]
apps/workbench/app/models/arvados_base.rb [moved from apps/workbench/app/models/orvos_base.rb with 75% similarity]
apps/workbench/app/models/arvados_resource_list.rb [moved from apps/workbench/app/models/orvos_resource_list.rb with 81% similarity]
apps/workbench/app/models/collection.rb
apps/workbench/app/models/group.rb
apps/workbench/app/models/job.rb
apps/workbench/app/models/job_task.rb
apps/workbench/app/models/link.rb
apps/workbench/app/models/log.rb
apps/workbench/app/models/pipeline_instance.rb
apps/workbench/app/models/pipeline_template.rb
apps/workbench/app/models/specimen.rb
apps/workbench/app/models/user.rb
apps/workbench/app/views/application/_arvados_object.html.erb [moved from apps/workbench/app/views/application/_orvos_object.html.erb with 68% similarity]
apps/workbench/app/views/application/_arvados_object_attr.html.erb [moved from apps/workbench/app/views/application/_orvos_object_attr.html.erb with 85% similarity]
apps/workbench/app/views/collections/index.html.erb
apps/workbench/app/views/collections/show.html.erb
apps/workbench/app/views/groups/index.html.erb
apps/workbench/app/views/groups/show.html.erb
apps/workbench/app/views/jobs/index.html.erb
apps/workbench/app/views/jobs/show.html.erb
apps/workbench/app/views/logs/show.html.erb
apps/workbench/app/views/pipeline_instances/index.html.erb
apps/workbench/app/views/pipeline_instances/show.html.erb
apps/workbench/app/views/pipeline_templates/index.html.erb
apps/workbench/app/views/pipeline_templates/show.html.erb
apps/workbench/app/views/specimens/show.html.erb
apps/workbench/app/views/users/show.html.erb
apps/workbench/config.ru
apps/workbench/config/application.rb
apps/workbench/config/boot.rb
apps/workbench/config/environment.rb
apps/workbench/config/environments/development.rb.example
apps/workbench/config/environments/production.rb
apps/workbench/config/environments/test.rb
apps/workbench/config/initializers/arvados_api_client.rb [new file with mode: 0644]
apps/workbench/config/initializers/orvos_api_client.rb [deleted file]
apps/workbench/config/initializers/secret_token.rb
apps/workbench/config/initializers/session_store.rb
apps/workbench/config/routes.rb
doc/api/Jobs.textile
sdk/cli/wh
sdk/cli/wh-run-pipeline-instance
services/api/app/controllers/application_controller.rb
services/api/app/controllers/arvados/v1/collections_controller.rb [moved from services/api/app/controllers/orvos/v1/collections_controller.rb with 90% similarity]
services/api/app/controllers/arvados/v1/groups_controller.rb [new file with mode: 0644]
services/api/app/controllers/arvados/v1/job_tasks_controller.rb [new file with mode: 0644]
services/api/app/controllers/arvados/v1/jobs_controller.rb [moved from services/api/app/controllers/orvos/v1/jobs_controller.rb with 96% similarity]
services/api/app/controllers/arvados/v1/links_controller.rb [moved from services/api/app/controllers/orvos/v1/links_controller.rb with 79% similarity]
services/api/app/controllers/arvados/v1/logs_controller.rb [new file with mode: 0644]
services/api/app/controllers/arvados/v1/nodes_controller.rb [moved from services/api/app/controllers/orvos/v1/nodes_controller.rb with 73% similarity]
services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb [moved from services/api/app/controllers/orvos/v1/pipeline_instances_controller.rb with 56% similarity]
services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb [new file with mode: 0644]
services/api/app/controllers/arvados/v1/schema_controller.rb [moved from services/api/app/controllers/orvos/v1/schema_controller.rb with 83% similarity]
services/api/app/controllers/arvados/v1/specimens_controller.rb [new file with mode: 0644]
services/api/app/controllers/arvados/v1/users_controller.rb [moved from services/api/app/controllers/orvos/v1/users_controller.rb with 50% similarity]
services/api/app/controllers/orvos/v1/groups_controller.rb [deleted file]
services/api/app/controllers/orvos/v1/job_tasks_controller.rb [deleted file]
services/api/app/controllers/orvos/v1/logs_controller.rb [deleted file]
services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb [deleted file]
services/api/app/controllers/orvos/v1/specimens_controller.rb [deleted file]
services/api/app/controllers/user_sessions_controller.rb
services/api/app/models/arvados_model.rb [moved from services/api/app/models/orvos_model.rb with 96% similarity]
services/api/app/models/collection.rb
services/api/app/models/group.rb
services/api/app/models/job.rb
services/api/app/models/job_task.rb
services/api/app/models/link.rb
services/api/app/models/log.rb
services/api/app/models/node.rb
services/api/app/models/pipeline_instance.rb
services/api/app/models/pipeline_template.rb
services/api/app/models/specimen.rb
services/api/app/models/user.rb
services/api/app/views/layouts/application.html.erb
services/api/app/views/static/intro.html.erb
services/api/config/database.yml.sample
services/api/config/environments/development.rb.example
services/api/config/environments/production.rb
services/api/config/environments/test.rb
services/api/config/initializers/omniauth.rb.example
services/api/config/routes.rb
services/api/db/migrate/20130415020241_rename_orvos_to_arvados.rb [new file with mode: 0644]
services/api/db/schema.rb
services/api/lib/kind_and_etag.rb
services/api/test/integration/collections_api_test.rb

index 10fafae5e6d1c9a5467033797df4178d49837148..752f3d87888f0b9361c2945f88dde5197af7140b 100644 (file)
@@ -4,4 +4,4 @@
 
 require File.expand_path('../config/application', __FILE__)
 
-Vcffarm::Application.load_tasks
+ArvadosWorkbench::Application.load_tasks
index 6535888996304af716e9b12c1ab26b056960b0ff..07b7a2a1df90cb8e550ce125c4cbd567d6c0848e 100644 (file)
@@ -65,7 +65,7 @@ class ApplicationController < ActionController::Base
   end
 
   def current_user
-    if Thread.current[:orvos_api_token]
+    if Thread.current[:arvados_api_token]
       @current_user ||= User.current
     else
       logger.error "No API token in Thread"
@@ -91,11 +91,11 @@ class ApplicationController < ActionController::Base
       try_redirect_to_login = true
       if params[:api_token]
         try_redirect_to_login = false
-        Thread.current[:orvos_api_token] = params[:api_token]
+        Thread.current[:arvados_api_token] = params[:api_token]
         # Before copying the token into session[], do a simple API
         # call to verify its authenticity.
         if verify_api_token
-          session[:orvos_api_token] = params[:api_token]
+          session[:arvados_api_token] = params[:api_token]
           if !request.format.json? and request.method == 'GET'
             # Repeat this request with api_token in the (new) session
             # cookie instead of the query string.  This prevents API
@@ -109,22 +109,22 @@ class ApplicationController < ActionController::Base
           @errors = ['Invalid API token']
           self.render_error status: 401
         end
-      elsif session[:orvos_api_token]
+      elsif session[:arvados_api_token]
         # In this case, the token must have already verified at some
         # point, but it might have been revoked since.  We'll try
         # using it, and catch the exception if it doesn't work.
         try_redirect_to_login = false
-        Thread.current[:orvos_api_token] = session[:orvos_api_token]
+        Thread.current[:arvados_api_token] = session[:arvados_api_token]
         begin
           yield
-        rescue OrvosApiClient::NotLoggedInException
+        rescue ArvadosApiClient::NotLoggedInException
           try_redirect_to_login = true
         end
       end
       if try_redirect_to_login
         respond_to do |f|
           f.html {
-            redirect_to $orvos_api_client.orvos_login_url(return_to: request.url)
+            redirect_to $arvados_api_client.arvados_login_url(return_to: request.url)
           }
           f.json {
             @errors = ['No API token supplied -- can\'t really do anything.']
@@ -134,7 +134,7 @@ class ApplicationController < ActionController::Base
       end
     ensure
       # Remove token in case this Thread is used for anything else.
-      Thread.current[:orvos_api_token] = nil
+      Thread.current[:arvados_api_token] = nil
     end
   end
 
@@ -142,7 +142,7 @@ class ApplicationController < ActionController::Base
     begin
       Link.where(uuid: 'just-verifying-my-api-token')
       true
-    rescue OrvosApiClient::NotLoggedInException
+    rescue ArvadosApiClient::NotLoggedInException
       false
     end
   end
index 4ca9212959cbd781dd3778f73fe11ae903919fbc..91c146e8409d7fb92095bba7bbb53bb6e9ab7bb1 100644 (file)
@@ -7,13 +7,13 @@ class CollectionsController < ApplicationController
   end
 
   def index
-    @links = Link.eager.limit(100).where(head_kind: 'orvos#collection') |
-      Link.eager.limit(100).where(tail_kind: 'orvos#collection')
+    @links = Link.eager.limit(100).where(head_kind: 'arvados#collection') |
+      Link.eager.limit(100).where(tail_kind: 'arvados#collection')
     @collections = Collection.limit(100).to_hash
     @collections.merge!(Collection.
                         limit(100).
-                        where(uuid: @links.select{|x|x.head_kind=='orvos#collection'}.collect(&:head_uuid) |
-                              @links.select{|x|x.tail_kind=='orvos#collection'}.collect(&:tail_uuid)).
+                        where(uuid: @links.select{|x|x.head_kind=='arvados#collection'}.collect(&:head_uuid) |
+                              @links.select{|x|x.tail_kind=='arvados#collection'}.collect(&:tail_uuid)).
                         to_hash)
     @collection_info = {}
     @collections.each do |uuid, c|
@@ -21,7 +21,7 @@ class CollectionsController < ApplicationController
       ci[:created_at] = c.created_at
     end
     @links.each do |l|
-      if l.head_kind == 'orvos#collection'
+      if l.head_kind == 'arvados#collection'
         c = (@collection_info[l.head_uuid] ||= {uuid: l.head_uuid})
         if l.link_class == 'resources' and l.name == 'wants'
           if l.head.respond_to? :created_at
@@ -33,7 +33,7 @@ class CollectionsController < ApplicationController
           end
         end
       end
-      if l.tail_kind == 'orvos#collection'
+      if l.tail_kind == 'arvados#collection'
         c = (@collection_info[l.tail_uuid] ||= {uuid: l.tail_uuid})
         if l.link_class == 'group' and l.name == 'member_of'
           c[:groups] ||= {}
index 0d4e944f05db09e20863710b8adb243af0659d25..6531e3d9ed885ec6f420435222c7e41344d923e0 100644 (file)
@@ -3,9 +3,9 @@ class SessionsController < ApplicationController
   skip_before_filter :find_object_by_uuid, :only => [:destroy, :index]
   def destroy
     session.clear
-    redirect_to $orvos_api_client.orvos_logout_url(return_to: logged_out_url)
+    redirect_to $arvados_api_client.orvos_logout_url(return_to: logged_out_url)
   end
   def index
-    redirect_to root_url if session[:orvos_api_token]
+    redirect_to root_url if session[:arvados_api_token]
   end
 end
index 8422ed247ac6fa8b653ced8a45f3c5b4eac74bf1..f29c73ed3411bbfe30c1c0ace13321e56ffba2d6 100644 (file)
@@ -13,9 +13,9 @@ module ApplicationHelper
     cooked = raw + cooked
   end
 
-  def link_to_if_orvos_object(attrvalue, opts={}, style_opts={})
-    if (resource_class = OrvosBase::resource_class_for_uuid(attrvalue, opts))
-      link_uuid = attrvalue.is_a?(OrvosBase) ? attrvalue.uuid : attrvalue
+  def link_to_if_arvados_object(attrvalue, opts={}, style_opts={})
+    if (resource_class = ArvadosBase::resource_class_for_uuid(attrvalue, opts))
+      link_uuid = attrvalue.is_a?(ArvadosBase) ? attrvalue.uuid : attrvalue
       link_name = opts[:link_text]
       if !link_name
         link_name = link_uuid
index 42e1ac0d01aa88d31f3830c877a6b8ce16919fbb..c792db8512e05e4c4f9e588827079040671e6cb8 100644 (file)
@@ -58,12 +58,12 @@ module PipelineInstancesHelper
         end
       end
       pj[:job_id] = pj[:job][:uuid]
-      pj[:job_link] = link_to_if_orvos_object pj[:job][:uuid]
+      pj[:job_link] = link_to_if_arvados_object pj[:job][:uuid]
       pj[:script_version] = pj[:job][:script_version]
       pj[:output] = pj[:job][:output]
       pj[:finished_at] = (Time.parse(pj[:job][:finished_at]) rescue nil)
       pj[:progress_bar] = raw("<div class=\"progress\" style=\"width:100px\"><div class=\"bar bar-success\" style=\"width:#{pj[:percent_done]}%\"></div><div class=\"bar\" style=\"width:#{pj[:percent_running]}%\"></div></div>")
-      pj[:output_link] = link_to_if_orvos_object pj[:output]
+      pj[:output_link] = link_to_if_arvados_object pj[:output]
       ret << pj
     end
     ret
@@ -113,7 +113,7 @@ module PipelineInstancesHelper
       pj[:output] = step[:output_data_locator]
       pj[:finished_at] = (Time.parse(step[:warehousejob][:finishtime]) rescue nil)
       pj[:progress_bar] = raw("<div class=\"progress\" style=\"width:100px\"><div class=\"bar\" style=\"width:#{pj[:progress]*100}%\"></div></div>")
-      pj[:output_link] = link_to_if_orvos_object pj[:output]
+      pj[:output_link] = link_to_if_arvados_object pj[:output]
       ret << pj
     end
     ret
similarity index 72%
rename from apps/workbench/app/models/orvos_api_client.rb
rename to apps/workbench/app/models/arvados_api_client.rb
index aa73856aefd893f5d30030ff5df8e3cb3af70f22..c7faeb6f03753875b48661afbababf6072bd380b 100644 (file)
@@ -1,11 +1,11 @@
-class OrvosApiClient
+class ArvadosApiClient
   class NotLoggedInException < Exception
   end
   def api(resources_kind, action, data=nil)
-    orvos_api_token = Thread.current[:orvos_api_token]
-    orvos_api_token = '' if orvos_api_token.nil?
+    arvados_api_token = Thread.current[:arvados_api_token]
+    arvados_api_token = '' if arvados_api_token.nil?
     dataargs = ['--data-urlencode',
-                "api_token=#{orvos_api_token}",
+                "api_token=#{arvados_api_token}",
                 '--header',
                 'Accept:application/json']
     if !data.nil?
@@ -24,7 +24,7 @@ class OrvosApiClient
     end
     json = nil
     resources_kind = class_kind(resources_kind).pluralize if resources_kind.is_a? Class
-    url = "#{self.orvos_v1_base}/#{resources_kind}#{action}"
+    url = "#{self.arvados_v1_base}/#{resources_kind}#{action}"
     IO.popen([ENV,
               'curl',
               '-s',
@@ -67,11 +67,11 @@ class OrvosApiClient
     end
   end
 
-  def orvos_login_url(params={})
-    if Rails.configuration.respond_to? :orvos_login_base
-      uri = Rails.configuration.orvos_login_base
+  def arvados_login_url(params={})
+    if Rails.configuration.respond_to? :arvados_login_base
+      uri = Rails.configuration.arvados_login_base
     else
-      uri = self.orvos_v1_base.sub(%r{/orvos/v\d+.*}, '/login')
+      uri = self.arvados_v1_base.sub(%r{/arvados/v\d+.*}, '/login')
     end
     if params.size > 0
       uri += '?' << params.collect { |k,v|
@@ -80,20 +80,20 @@ class OrvosApiClient
     end
   end
 
-  def orvos_logout_url(params={})
-    orvos_login_url(params).sub('/login','/logout')
+  def arvados_logout_url(params={})
+    arvados_login_url(params).sub('/login','/logout')
   end
 
-  def orvos_v1_base
-    Rails.configuration.orvos_v1_base
+  def arvados_v1_base
+    Rails.configuration.arvados_v1_base
   end
 
-  def orvos_schema
-    @orvos_schema ||= api 'schema', ''
+  def arvados_schema
+    @arvados_schema ||= api 'schema', ''
   end
 
   def kind_class(kind)
-    kind.match(/^orvos\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil
+    kind.match(/^arvados\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil
   end
 
   def class_kind(resource_class)
similarity index 75%
rename from apps/workbench/app/models/orvos_base.rb
rename to apps/workbench/app/models/arvados_base.rb
index 8e04ea7fe8a6a168de69cfce44317cda7dfb1e67..e6d10f0eeb7cba2fe03cfa980684bcb11872aa35 100644 (file)
@@ -1,22 +1,22 @@
-class OrvosBase < ActiveRecord::Base
+class ArvadosBase < ActiveRecord::Base
   self.abstract_class = true
   attr_accessor :attribute_sortkey
 
   def self.uuid_infix_object_kind
     @@uuid_infix_object_kind ||= {
-      '4zz18' => 'orvos#collection',
-      'tpzed' => 'orvos#user',
-      'ozdt8' => 'orvos#api_client',
-      '8i9sb' => 'orvos#job',
-      'o0j2j' => 'orvos#link',
-      '57u5n' => 'orvos#log',
-      'j58dm' => 'orvos#specimen',
-      'p5p6p' => 'orvos#pipeline_template',
-      'mxsvm' => 'orvos#pipeline_template', # legacy Pipeline objects
-      'd1hrv' => 'orvos#pipeline_instance',
-      'uo14g' => 'orvos#pipeline_instance', # legacy PipelineInstance objects
-      'j7d0g' => 'orvos#group',
-      'ldvyl' => 'orvos#group' # only needed for legacy Project objects
+      '4zz18' => 'arvados#collection',
+      'tpzed' => 'arvados#user',
+      'ozdt8' => 'arvados#api_client',
+      '8i9sb' => 'arvados#job',
+      'o0j2j' => 'arvados#link',
+      '57u5n' => 'arvados#log',
+      'j58dm' => 'arvados#specimen',
+      'p5p6p' => 'arvados#pipeline_template',
+      'mxsvm' => 'arvados#pipeline_template', # legacy Pipeline objects
+      'd1hrv' => 'arvados#pipeline_instance',
+      'uo14g' => 'arvados#pipeline_instance', # legacy PipelineInstance objects
+      'j7d0g' => 'arvados#group',
+      'ldvyl' => 'arvados#group' # only needed for legacy Project objects
     }
   end
 
@@ -43,8 +43,8 @@ class OrvosBase < ActiveRecord::Base
   def self.columns
     return @columns unless @columns.nil?
     @columns = []
-    return @columns if $orvos_api_client.orvos_schema[self.to_s.to_sym].nil?
-    $orvos_api_client.orvos_schema[self.to_s.to_sym].each do |coldef|
+    return @columns if $arvados_api_client.arvados_schema[self.to_s.to_sym].nil?
+    $arvados_api_client.arvados_schema[self.to_s.to_sym].each do |coldef|
       k = coldef[:name].to_sym
       if coldef[:type] == coldef[:type].downcase
         @columns << column(k, coldef[:type].to_sym)
@@ -68,16 +68,16 @@ class OrvosBase < ActiveRecord::Base
     new.private_reload(uuid)
   end
   def self.where(*args)
-    OrvosResourceList.new(self).where(*args)
+    ArvadosResourceList.new(self).where(*args)
   end
   def self.limit(*args)
-    OrvosResourceList.new(self).limit(*args)
+    ArvadosResourceList.new(self).limit(*args)
   end
   def self.eager(*args)
-    OrvosResourceList.new(self).eager(*args)
+    ArvadosResourceList.new(self).eager(*args)
   end
   def self.all(*args)
-    OrvosResourceList.new(self).all(*args)
+    ArvadosResourceList.new(self).all(*args)
   end
   def save
     obdata = {}
@@ -89,9 +89,9 @@ class OrvosBase < ActiveRecord::Base
     if etag
       postdata['_method'] = 'PUT'
       obdata.delete :uuid
-      resp = $orvos_api_client.api(self.class, '/' + uuid, postdata)
+      resp = $arvados_api_client.api(self.class, '/' + uuid, postdata)
     else
-      resp = $orvos_api_client.api(self.class, '', postdata)
+      resp = $arvados_api_client.api(self.class, '', postdata)
     end
     return false if !resp[:etag] || !resp[:uuid]
 
@@ -133,12 +133,12 @@ class OrvosBase < ActiveRecord::Base
         ok
       end
     end
-    @links = $orvos_api_client.api Link, '', { _method: 'GET', where: o, eager: true }
-    @links = $orvos_api_client.unpack_api_response(@links)
+    @links = $arvados_api_client.api Link, '', { _method: 'GET', where: o, eager: true }
+    @links = $arvados_api_client.unpack_api_response(@links)
   end
   def all_links
     return @all_links if @all_links
-    res = $orvos_api_client.api Link, '', {
+    res = $arvados_api_client.api Link, '', {
       _method: 'GET',
       where: {
         tail_kind: self.kind,
@@ -146,7 +146,7 @@ class OrvosBase < ActiveRecord::Base
       },
       eager: true
     }
-    @all_links = $orvos_api_client.unpack_api_response(res)
+    @all_links = $arvados_api_client.unpack_api_response(res)
   end
   def reload
     private_reload(self.uuid)
@@ -156,13 +156,13 @@ class OrvosBase < ActiveRecord::Base
     if uuid_or_hash.is_a? Hash
       hash = uuid_or_hash
     else
-      hash = $orvos_api_client.api(self.class, '/' + uuid_or_hash)
+      hash = $arvados_api_client.api(self.class, '/' + uuid_or_hash)
     end
     hash.each do |k,v|
       if self.respond_to?(k.to_s + '=')
         self.send(k.to_s + '=', v)
       else
-        # When OrvosApiClient#schema starts telling us what to expect
+        # When ArvadosApiClient#schema starts telling us what to expect
         # in API responses (not just the server side database
         # columns), this sort of awfulness can be avoided:
         self.instance_variable_set('@' + k.to_s, v)
@@ -188,7 +188,7 @@ class OrvosBase < ActiveRecord::Base
   end
 
   def self.resource_class_for_uuid(uuid, opts={})
-    if uuid.is_a? OrvosBase
+    if uuid.is_a? ArvadosBase
       return uuid.class
     end
     unless uuid.is_a? String
@@ -202,13 +202,13 @@ class OrvosBase < ActiveRecord::Base
     end
     resource_class = nil
     uuid.match /^[0-9a-z]{5}-([0-9a-z]{5})-[0-9a-z]{15}$/ do |re|
-      resource_class ||= $orvos_api_client.
+      resource_class ||= $arvados_api_client.
         kind_class(self.uuid_infix_object_kind[re[1]])
     end
     if opts[:referring_object] and
         opts[:referring_attr] and
         opts[:referring_attr].match /_uuid$/
-      resource_class ||= $orvos_api_client.
+      resource_class ||= $arvados_api_client.
         kind_class(opts[:referring_object].
                    attributes[opts[:referring_attr].
                               sub(/_uuid$/, '_kind')])
similarity index 81%
rename from apps/workbench/app/models/orvos_resource_list.rb
rename to apps/workbench/app/models/arvados_resource_list.rb
index aa6961e369c905157a49f4593349750889d95b97..a3032a67f295e88943d5987cca5c7fa2ace40b57 100644 (file)
@@ -1,4 +1,4 @@
-class OrvosResourceList
+class ArvadosResourceList
   include Enumerable
 
   def initialize(resource_class)
@@ -19,7 +19,7 @@ class OrvosResourceList
     cond = cond.dup
     cond.keys.each do |uuid_key|
       if cond[uuid_key] and (cond[uuid_key].is_a? Array or
-                             cond[uuid_key].is_a? OrvosBase)
+                             cond[uuid_key].is_a? ArvadosBase)
         # Coerce cond[uuid_key] to an array of uuid strings.  This
         # allows caller the convenience of passing an array of real
         # objects and uuids in cond[uuid_key].
@@ -27,7 +27,7 @@ class OrvosResourceList
           cond[uuid_key] = [cond[uuid_key]]
         end
         cond[uuid_key] = cond[uuid_key].collect do |item|
-          if item.is_a? OrvosBase
+          if item.is_a? ArvadosBase
             item.uuid
           else
             item
@@ -37,7 +37,7 @@ class OrvosResourceList
     end
     cond.keys.select { |x| x.match /_kind$/ }.each do |kind_key|
       if cond[kind_key].is_a? Class
-        cond = cond.merge({ kind_key => 'orvos#' + $orvos_api_client.class_kind(cond[kind_key]) })
+        cond = cond.merge({ kind_key => 'arvados#' + $arvados_api_client.class_kind(cond[kind_key]) })
       end
     end
     api_params = {
@@ -46,8 +46,8 @@ class OrvosResourceList
     }
     api_params[:eager] = '1' if @eager
     api_params[:limit] = @limit if @limit
-    res = $orvos_api_client.api @resource_class, '', api_params
-    @results = $orvos_api_client.unpack_api_response res
+    res = $arvados_api_client.api @resource_class, '', api_params
+    @results = $arvados_api_client.unpack_api_response res
     self
   end
 
index ee3a7883e3e0dab39173069340078fe401fd07fc..d96146143df0c1eaf7eb8ba01178dd1e8bb458fc 100644 (file)
@@ -1,4 +1,4 @@
-class Collection < OrvosBase
+class Collection < ArvadosBase
   def total_bytes
     if files
       tot = 0
index 2a500a58e0964138cd1c2effe727d06a5acba1e9..dd04c005900eab7d7e45b2c49f4fd53db791ceb9 100644 (file)
@@ -1,2 +1,2 @@
-class Group < OrvosBase
+class Group < ArvadosBase
 end
index a779d8d236f183f5bf14baa9b2047f1aa8ed15d4..e716df75f9105bcecfeb61618465343e33d73019 100644 (file)
@@ -1,2 +1,2 @@
-class Job < OrvosBase
+class Job < ArvadosBase
 end
index 9d147b173a67206e1044867ecdccd694a72a4c67..15fc7fdae39a8fc30d9a4750e4ed022dcc6bd936 100644 (file)
@@ -1,2 +1,2 @@
-class JobTask < OrvosBase
+class JobTask < ArvadosBase
 end
index 9c86e3171f778292578bc9e0dbaccd39c0890a88..899a80022ced45b28ce618f2fc847f268550750a 100644 (file)
@@ -1,4 +1,4 @@
-class Link < OrvosBase
+class Link < ArvadosBase
   attr_accessor :head
   attr_accessor :tail
   def self.by_tail(t, opts={})
index f6280e3016cb2eb1cf5b1c1da07bb347c3874794..c804bf7b7150a2df90796114d792f3970cbdae43 100644 (file)
@@ -1,3 +1,3 @@
-class Log < OrvosBase
+class Log < ArvadosBase
   attr_accessor :object
 end
index 7fe88c62a8b0a28b02664d0aa2984dcf96d7b328..b8c74dfa57ce739cd9014eb57d139d0a4a1404d3 100644 (file)
@@ -1,4 +1,4 @@
-class PipelineInstance < OrvosBase
+class PipelineInstance < ArvadosBase
   attr_accessor :pipeline_template
 
   def update_job_parameters(new_params)
index b68aa57319e56e9d15a306b14747d5139a0601f1..f5dfb6a2f5e68931822faae917898990d74dc502 100644 (file)
@@ -1,2 +1,2 @@
-class PipelineTemplate < OrvosBase
+class PipelineTemplate < ArvadosBase
 end
index e379a0846c99b6e5ecca78331394f594aae37a39..fa7fbbf09008a2f0df62d3a5db0949048aac3ea8 100644 (file)
@@ -1,2 +1,2 @@
-class Specimen < OrvosBase
+class Specimen < ArvadosBase
 end
index 3c85c2d9520432580209a1860abebf02c98cf7a7..65d201a64d9c78cdb2793a445a36adcf94285dfe 100644 (file)
@@ -1,6 +1,6 @@
-class User < OrvosBase
+class User < ArvadosBase
   def self.current
-    res = $orvos_api_client.api self, '/current'
-    $orvos_api_client.unpack_api_response(res)
+    res = $arvados_api_client.api self, '/current'
+    $arvados_api_client.unpack_api_response(res)
   end
 end
similarity index 68%
rename from apps/workbench/app/views/application/_orvos_object.html.erb
rename to apps/workbench/app/views/application/_arvados_object.html.erb
index 5702d30cb8a0c2a40a847dbebb67ccc720e04180..77d236efb986d309757a15b15967c7ec8d70fc34 100644 (file)
@@ -3,7 +3,7 @@
   </thead>
   <tbody>
     <% @object.attributes_for_display.each do |attr, attrvalue| %>
-    <%= render partial: 'application/orvos_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+    <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
     <% end %>
   </tbody>
 </table>
similarity index 85%
rename from apps/workbench/app/views/application/_orvos_object_attr.html.erb
rename to apps/workbench/app/views/application/_arvados_object_attr.html.erb
index e8d2a999f0fc4fa4ecd574610342a7b59707ccc1..cb296c58de9b3a399f2f3ef9dbfafeeff8089933 100644 (file)
@@ -20,7 +20,7 @@
   <% if attr == 'uuid' and (uuid = attrvalue.split('-')).size == 3 %>
   <td><%= uuid[0..-2].join('-') %>-<b><%= uuid[-1] %></b></td>
   <% else %>
-  <td><%= link_to_if_orvos_object attrvalue, {referring_attr: attr, referring_object: @object, with_prefixes: true, with_class_name: true} %></td>
+  <td><%= link_to_if_arvados_object attrvalue, {referring_attr: attr, referring_object: @object, with_prefixes: true, with_class_name: true} %></td>
   <% end %>
 </tr>
 <% end %>
index 1bd64309367a4e84b3d66a5603cd64aa978d9c5b..76b6c245ea05b5061b5efd02c38f76e0dc3a472a 100644 (file)
@@ -23,7 +23,7 @@
     <tr class="collection">
       <td>
        <% if @collections.has_key? uuid %>
-       <%= link_to_if_orvos_object uuid %>
+       <%= link_to_if_arvados_object uuid %>
        <% else %>
        <%= uuid %>
        <% end %>
index d9d06b3172dfc6470f08509d7c1b7de4a08f4e19..e7c0990fd942d9a69f3e9660b93a18b589696ce5 100644 (file)
     </table>
   </div>
   <div id="owner-groups-resources" class="tab-pane fade">
-    <%= render :partial => 'application/orvos_object' %>
+    <%= render :partial => 'application/arvados_object' %>
   </div>
 </div>
index 51e66d87a49e49fa878ca6aefa9564eee2778238..bd8a33bf99601f66d8f8ef7a77bb9a2701a767c1 100644 (file)
@@ -22,7 +22,7 @@
 
     <tr>
       <td>
-        <%= link_to_if_orvos_object g %>
+        <%= link_to_if_arvados_object g %>
       </td><td>
         <%= g.name %>
       </td><td>
index 9a3b85f00c7e94bc04420ba168203f31d9f8b4dc..3b3a9dff3b6a670301a62d0e387903dfcff7b289 100644 (file)
@@ -5,7 +5,7 @@
 
 <div class="tab-content">
   <div id="properties" class="tab-pane fade in active">
-    <%= render partial: 'application/orvos_object' %>
+    <%= render partial: 'application/arvados_object' %>
   </div>
   <div id="collections" class="tab-pane fade">
     <table class="table table-condensed table-hover">
@@ -29,7 +29,7 @@
             <%= name %><br />
             <% end %>
           </td><td>
-            <%= link_to_if_orvos_object collection %>
+            <%= link_to_if_arvados_object collection %>
           </td><td>
             <% if @keep_flag[collection.uuid] %>
             <span class="badge badge-success">&#x2714;</span>
index 0de45abc602fa2eec5d4c0cae6db48e496952004..efbd14677324c005517119d1394cba78397db210 100644 (file)
@@ -39,7 +39,7 @@
               <% else %>
               <span class="badge" title="queued">&#x2709;</span>
               <% end %>
-             <%= link_to_if_orvos_object j.uuid %>
+             <%= link_to_if_arvados_object j.uuid %>
             </td>
             <td>
               <% if j.started_at and not j.finished_at %>
           </td></tr>
           <% j.script_parameters.sort.each do |k,v| %>
           <tr>
-            <td><%= k %></td><td><%= link_to_if_orvos_object v %></td>
+            <td><%= k %></td><td><%= link_to_if_arvados_object v %></td>
           </tr>
           <% end %>
           <tr>
-            <td>output</td><td><%= link_to_if_orvos_object j.output %></td>
+            <td>output</td><td><%= link_to_if_arvados_object j.output %></td>
           </tr>
         </table>
       </td><td>
index 68f5fa9a549ca3c88602de47015223ed711475f1..90790856ae17f155e1b9ffb9e0492951e732c3e6 100644 (file)
@@ -1 +1 @@
-<%= render :partial => 'application/orvos_object' %>
+<%= render :partial => 'application/arvados_object' %>
index 68f5fa9a549ca3c88602de47015223ed711475f1..90790856ae17f155e1b9ffb9e0492951e732c3e6 100644 (file)
@@ -1 +1 @@
-<%= render :partial => 'application/orvos_object' %>
+<%= render :partial => 'application/arvados_object' %>
index 8d6073cc3d607809d9b8d0aa12f9ece18047fe53..3b73fb198ea1e1ca0e67f05b387e249d9745cb8d 100644 (file)
         <span class="label label-info">active</span>
         <% end %>
       </td><td>
-        <%= link_to_if_orvos_object ob %>
+        <%= link_to_if_arvados_object ob %>
       </td><td>
         <%= ob.name %>
       </td><td>
-        <%= link_to_if_orvos_object ob.pipeline_template_uuid %>
+        <%= link_to_if_arvados_object ob.pipeline_template_uuid %>
       </td><td>
-        <%= link_to_if_orvos_object ob.owner %>
+        <%= link_to_if_arvados_object ob.owner %>
       </td><td>
         <% ob.components.each do |cname, c| %>
         <% status = if !c[:job] then nil elsif c[:job][:success] then 'success' elsif c[:job][:running] then 'info' else 'warning' end %>
index d278c808aa154da52da403b39a9292231506b273..74c090de024b4bfee8bfb3efdf4bfa6b982db071 100644 (file)
@@ -23,7 +23,7 @@
     </td></tr>
 
     <% else %>
-    <%= render partial: 'application/orvos_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+    <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
     <% end %>
     <% end %>
   </tbody>
index 4879a0b1dc12decca8cb8d5d57572ebfedf2e866..15caf7a3f530252e9b60f3910c8320919a21e2ee 100644 (file)
 
     <tr>
       <td>
-        <%= link_to_if_orvos_object ob %>
+        <%= link_to_if_arvados_object ob %>
       </td><td>
         <%= ob.name %>
       </td><td>
-        <%= link_to_if_orvos_object ob.owner %>
+        <%= link_to_if_arvados_object ob.owner %>
       </td><td>
         <%= ob.components.collect { |k,v| k.to_s }.join(", ") %>
       </td>
index 6af7f4eb6247234f61706274819f1e9880b7447e..097347bd73690a26b8b6e2c04d003d06166abaac 100644 (file)
@@ -32,7 +32,7 @@
     </td></tr>
 
     <% else %>
-    <%= render partial: 'application/orvos_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
+    <%= render partial: 'application/arvados_object_attr', locals: { attr: attr, attrvalue: attrvalue } %>
     <% end %>
     <% end %>
   </tbody>
index 68f5fa9a549ca3c88602de47015223ed711475f1..90790856ae17f155e1b9ffb9e0492951e732c3e6 100644 (file)
@@ -1 +1 @@
-<%= render :partial => 'application/orvos_object' %>
+<%= render :partial => 'application/arvados_object' %>
index 68f5fa9a549ca3c88602de47015223ed711475f1..90790856ae17f155e1b9ffb9e0492951e732c3e6 100644 (file)
@@ -1 +1 @@
-<%= render :partial => 'application/orvos_object' %>
+<%= render :partial => 'application/arvados_object' %>
index 0ba0161dc12030f62c717697f9f9997504cf894f..c0b36964ec3c6e5746dd13e067d7cbd185a08cdf 100644 (file)
@@ -1,4 +1,4 @@
 # This file is used by Rack-based servers to start the application.
 
 require ::File.expand_path('../config/environment',  __FILE__)
-run Vcffarm::Application
+run ArvadosWorkbench::Application
index 107c0cd9e02c5e5ca5f29b2078fc42f3c1c51066..0e1ec9604c319c392a58b912886fa487a0a2838a 100644 (file)
@@ -9,7 +9,7 @@ if defined?(Bundler)
   # Bundler.require(:default, :assets, Rails.env)
 end
 
-module Vcffarm
+module ArvadosWorkbench
   class Application < Rails::Application
     # Settings in config/environments/* take precedence over those specified here.
     # Application configuration should go into files in config/initializers
index f6d584d5611222a520085f2868b2bfb50ecf97e7..13513bd5e4590b37057b16412192d291e25a5a99 100644 (file)
@@ -5,12 +5,12 @@ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
 
 require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
 
-# Use ORVOS_API_TOKEN environment variable (if set) in console
+# Use ARVADOS_API_TOKEN environment variable (if set) in console
 require 'rails'
-module OrvosApiClientConsoleMode
+module ArvadosApiClientConsoleMode
   class Railtie < Rails::Railtie
     console do
-      Thread.current[:orvos_api_token] ||= ENV['ORVOS_API_TOKEN']
+      Thread.current[:arvados_api_token] ||= ENV['ARVADOS_API_TOKEN']
     end
   end
 end
index 8f73935cf8b690ba4b1a5d15fc9c8392bc81c447..c6d838678702277d2a736d9042fd318dff4ee341 100644 (file)
@@ -2,4 +2,4 @@
 require File.expand_path('../application', __FILE__)
 
 # Initialize the rails application
-Vcffarm::Application.initialize!
+ArvadosWorkbench::Application.initialize!
index cbbe35e14f7a1fe346cf72227bbe092528a66695..4ef934aa729cd7775bc02e9ddbea45fb43d51399 100644 (file)
@@ -1,4 +1,4 @@
-Vcffarm::Application.configure do
+ArvadosWorkbench::Application.configure do
   # Settings specified here will take precedence over those in config/application.rb
 
   # In the development environment your application's code is reloaded on
@@ -35,13 +35,13 @@ Vcffarm::Application.configure do
   # Expands the lines which load the assets
   config.assets.debug = true
 
-  config.orvos_login_base = 'http://orvos.local/login'
-  config.orvos_v1_base = 'http://orvos.local/orvos/v1'
+  config.arvados_login_base = 'http://arvados.local/login'
+  config.arvados_v1_base = 'http://arvados.local/arvados/v1'
 
-  config.data_import_dir = '/tmp/vcffarm-upload'
-  config.data_export_dir = '/tmp/vcffarm-download'
+  config.data_import_dir = '/tmp/arvados-workbench-upload'
+  config.data_export_dir = '/tmp/arvados-workbench-download'
 
   config.secret_token = File.read('config/.secret_token') if File.exist? 'config/.secret_token'
 
-  config.site_name = 'vcffarm.example.com'
+  config.site_name = 'arvados-workbench.example.com'
 end
index c7d6aa78c4d845fa51ee8e74e6d682a4aecff74b..85f3e886284a2bf020888f03b7898a33e2f8cd99 100644 (file)
@@ -1,4 +1,4 @@
-Vcffarm::Application.configure do
+ArvadosWorkbench::Application.configure do
   # Settings specified here will take precedence over those in config/application.rb
 
   # Code is not reloaded between requests
@@ -65,11 +65,11 @@ Vcffarm::Application.configure do
   # with SQLite, MySQL, and PostgreSQL)
   # config.active_record.auto_explain_threshold_in_seconds = 0.5
 
-  config.orvos_login_base = 'https://9ujm1.orvosapi.com/login'
-  config.orvos_v1_base = 'https://9ujm1.orvosapi.com/orvos/v1'
+  config.arvados_login_base = 'https://arvados.local/login'
+  config.arvados_v1_base = 'https://arvados.local/arvados/v1'
 
-  config.data_import_dir = '/data/vcffarm-upload/data'
-  config.data_export_dir = '/data/vcffarm-download/data'
+  config.data_import_dir = '/data/arvados-workbench-upload/data'
+  config.data_export_dir = '/data/arvados-workbench-download/data'
 
   # Authentication stub: hard code pre-approved API tokens.
   # config.accept_api_token = { rand(2**256).to_s(36) => true }
@@ -77,5 +77,5 @@ Vcffarm::Application.configure do
 
   config.vcf_pipeline_uuid = '9ujm1-mxsvm-o62u4mdoxvs0ckp'
 
-  config.site_name = 'vcffarm.example.com'
+  config.site_name = 'arvados-workbench.example.com'
 end
index 93ee59c3746ca87f9e91556f069ced0c41fcbbbd..5fbcba3738e4c6a8970318437fd430dd10b346c7 100644 (file)
@@ -1,4 +1,4 @@
-Vcffarm::Application.configure do
+ArvadosWorkbench::Application.configure do
   # Settings specified here will take precedence over those in config/application.rb
 
   # The test environment is used exclusively to run your application's
@@ -35,11 +35,11 @@ Vcffarm::Application.configure do
   # Print deprecation notices to the stderr
   config.active_support.deprecation = :stderr
 
-  config.orvos_login_base = 'http://orvos/login'
-  config.orvos_v1_base = 'https://orvos/orvos/v1'
+  config.arvados_login_base = 'http://arvados.local/login'
+  config.arvados_v1_base = 'https://arvados.local/arvados/v1'
 
-  config.data_import_dir = '/data/vcffarm-upload'
-  config.data_export_dir = '/data/vcffarm-download'
+  config.data_import_dir = '/data/arvados-workbench-upload'
+  config.data_export_dir = '/data/arvados-workbench-download'
 
   # Authentication stub: hard code pre-approved API tokens.
   # config.accept_api_token = { rand(2**256).to_s(36) => true }
@@ -47,5 +47,5 @@ Vcffarm::Application.configure do
 
   config.vcf_pipeline_uuid = '9ujm1-mxsvm-o62u4mdoxvs0ckp'
 
-  config.site_name = 'vcffarm.example.com'
+  config.site_name = 'arvados-workbench.example.com'
 end
diff --git a/apps/workbench/config/initializers/arvados_api_client.rb b/apps/workbench/config/initializers/arvados_api_client.rb
new file mode 100644 (file)
index 0000000..6222ab5
--- /dev/null
@@ -0,0 +1 @@
+$arvados_api_client = ArvadosApiClient.new
diff --git a/apps/workbench/config/initializers/orvos_api_client.rb b/apps/workbench/config/initializers/orvos_api_client.rb
deleted file mode 100644 (file)
index 0da9d21..0000000
+++ /dev/null
@@ -1 +0,0 @@
-$orvos_api_client = OrvosApiClient.new
index b72b50db29adc914ac0c9af6b4adc1a1f98cf83b..fb1c1c1645b57cbefcb0c2dd6b7d656f6153aafe 100644 (file)
@@ -4,4 +4,4 @@
 # If you change this key, all old signed cookies will become invalid!
 # Make sure the secret is at least 30 characters and all random,
 # no regular words or you'll be exposed to dictionary attacks.
-Vcffarm::Application.config.secret_token ||= rand(2**256).to_s(36)
+ArvadosWorkbench::Application.config.secret_token ||= rand(2**256).to_s(36)
index 32d8443a5e48efac05c75a7a05dbe3dd19734199..2d49dca0ed3fb67eb5d529896f95ac01bab64e06 100644 (file)
@@ -1,8 +1,8 @@
 # Be sure to restart your server when you modify this file.
 
-Vcffarm::Application.config.session_store :cookie_store, key: '_vcffarm_session'
+ArvadosWorkbench::Application.config.session_store :cookie_store, key: '_arvados_workbench_session'
 
 # Use the database for sessions instead of the cookie-based default,
 # which shouldn't be used to store highly confidential information
 # (create the session table with "rails generate session_migration")
-# Vcffarm::Application.config.session_store :active_record_store
+# ArvadosWorkbench::Application.config.session_store :active_record_store
index b927bd88d72fd5c0ccad69e232737f1145cef3cb..dec161d6c58e9810f4b2be87f7115b1ccead2138 100644 (file)
@@ -1,4 +1,4 @@
-Vcffarm::Application.routes.draw do
+ArvadosWorkbench::Application.routes.draw do
   resources :job_tasks
 
 
index 08ac010f55657712237a23d0e69553657ece9b9d..8de25030c9484737f93879df6fb94cb88b53322e 100644 (file)
@@ -14,7 +14,7 @@ Applications submit compute jobs when:
 
 h2. Methods
 
-See "REST methods for working with Orvos resources":methods.html
+See "REST methods for working with Arvados resources":methods.html
 
 API endpoint base: @https://xyzzy.arvados.org/arvados/v1/jobs@
 
index 55131b78b5c7b11fdbc06128c55b21920332a74c..e22c9ab3a3c77c1cb95eb163e0139fcd2ea5e782 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/env ruby
 
-# Orvos cli client
+# Arvados cli client
 #
 # Ward Vandewege <ward@clinicalfuture.com>
 
@@ -10,11 +10,11 @@ if RUBY_VERSION < '1.9.3' then
   EOS
 end
 
-ENV['ORVOS_API_VERSION'] ||= 'v1'
+ENV['ARVADOS_API_VERSION'] ||= 'v1'
 
-if not ENV.include?('ORVOS_API_HOST') or not ENV.include?('ORVOS_API_TOKEN') then
+if not ENV.include?('ARVADOS_API_HOST') or not ENV.include?('ARVADOS_API_TOKEN') then
   abort <<-EOS
-ORVOS_API_HOST and ORVOS_API_TOKEN need to be defined as environment variables.
+ARVADOS_API_HOST and ARVADOS_API_TOKEN need to be defined as environment variables.
   EOS
 end
 
@@ -63,8 +63,8 @@ class Google::APIClient
  end
 end
 
-client = Google::APIClient.new(:host => ENV['ORVOS_API_HOST'], :application_name => 'wh-cli', :application_version => '1.0')
-orvos = client.discovered_api('orvos', ENV['ORVOS_API_VERSION'])
+client = Google::APIClient.new(:host => ENV['ARVADOS_API_HOST'], :application_name => 'wh-cli', :application_version => '1.0')
+arvados = client.discovered_api('arvados', ENV['ARVADOS_API_VERSION'])
 
 def to_boolean(s)
   !!(s =~ /^(true|t|yes|y|1)$/i)
@@ -78,7 +78,7 @@ def parse_arguments(discovery_document)
   end
 
   global_opts = Trollop::options do
-    banner "orvos cli client"
+    banner "arvados cli client"
     opt :dry_run, "Don't actually do anything", :short => "-n"
     stop_on sub_commands
   end
@@ -136,7 +136,7 @@ def parse_arguments(discovery_document)
     end
     
   else
-    banner = "\nThis Orvos cluster supports the following api commands:\n\n"
+    banner = "\nThis Arvados cluster supports the following api commands:\n\n"
     discovery_document["resources"].each do |k,v|
       description = ''
       if discovery_document["schemas"].include?(k.singularize.capitalize) and 
@@ -159,13 +159,13 @@ def parse_arguments(discovery_document)
   return cmd, method, method_opts, ARGV
 end
 
-cmd, method, method_opts, remaining_opts = parse_arguments(orvos.discovery_document)
+cmd, method, method_opts, remaining_opts = parse_arguments(arvados.discovery_document)
 
-api_method = 'orvos.' + cmd + '.' + method
+api_method = 'arvados.' + cmd + '.' + method
 
 m_o = method_opts.reject {|key,value| key =~ /_given$|^json$|^jsonhuman$|^help$/ or value == nil }
 
-result = client.execute :api_method => eval(api_method), :parameters => { :api_token => ENV['ORVOS_API_TOKEN'] }.merge(m_o), :authenticated => false
+result = client.execute :api_method => eval(api_method), :parameters => { :api_token => ENV['ARVADOS_API_TOKEN'] }.merge(m_o), :authenticated => false
 results = JSON.parse result.body
 
 if results["errors"] then
index fd7e6a2243e244835e8449308ddd4ceecc8c7bdc..a3e2c4b8205b0464833fbde20fe57c9d70beca57 100755 (executable)
@@ -60,11 +60,11 @@ if RUBY_VERSION < '1.9.3' then
   EOS
 end
 
-$orvos_api_version = ENV['ORVOS_API_VERSION'] || 'v1'
-$orvos_api_host = ENV['ORVOS_API_HOST'] or
-  abort "#{$0}: fatal: ORVOS_API_HOST environment variable not set."
-$orvos_api_token = ENV['ORVOS_API_TOKEN'] or
-  abort "#{$0}: fatal: ORVOS_API_TOKEN environment variable not set."
+$arvados_api_version = ENV['ARVADOS_API_VERSION'] || 'v1'
+$arvados_api_host = ENV['ARVADOS_API_HOST'] or
+  abort "#{$0}: fatal: ARVADOS_API_HOST environment variable not set."
+$arvados_api_token = ENV['ARVADOS_API_TOKEN'] or
+  abort "#{$0}: fatal: ARVADOS_API_TOKEN environment variable not set."
 
 begin
   require 'rubygems'
@@ -93,7 +93,7 @@ module Kernel
   end
 end
 
-if $orvos_api_host.match /local/
+if $arvados_api_host.match /local/
   # You probably don't care about SSL certificate checks if you're
   # testing with a dev server.
   suppress_warnings { OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE }
@@ -174,17 +174,17 @@ end
 # Set up the API client.
 
 $client ||= Google::APIClient.
-  new(:host => $orvos_api_host,
+  new(:host => $arvados_api_host,
       :application_name => File.split($0).last,
       :application_version => $application_version.to_s)
-$orvos = $client.discovered_api('orvos', $orvos_api_version)
+$arvados = $client.discovered_api('arvados', $arvados_api_version)
 
 
 class PipelineInstance
   def self.find(uuid)
-    result = $client.execute(:api_method => $orvos.pipeline_instances.get,
+    result = $client.execute(:api_method => $arvados.pipeline_instances.get,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :uuid => uuid
                              },
                              :authenticated => false)
@@ -198,9 +198,9 @@ class PipelineInstance
     end
   end
   def self.create(attributes)
-    result = $client.execute(:api_method => $orvos.pipeline_instances.create,
+    result = $client.execute(:api_method => $arvados.pipeline_instances.create,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :pipeline_instance => attributes.to_json
                              },
                              :authenticated => false)
@@ -212,9 +212,9 @@ class PipelineInstance
     self.new(j)
   end
   def save
-    result = $client.execute(:api_method => $orvos.pipeline_instances.update,
+    result = $client.execute(:api_method => $arvados.pipeline_instances.update,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :uuid => @pi[:uuid],
                                :pipeline_instance => @attributes_to_update.to_json
                              },
@@ -245,18 +245,18 @@ end
 class JobCache
   def self.get(uuid)
     @cache ||= {}
-    result = $client.execute(:api_method => $orvos.jobs.get,
+    result = $client.execute(:api_method => $arvados.jobs.get,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :uuid => uuid
                              },
                              :authenticated => false)
     @cache[uuid] = JSON.parse result.body, :symbolize_names => true
   end
   def self.where(conditions)
-    result = $client.execute(:api_method => $orvos.jobs.list,
+    result = $client.execute(:api_method => $arvados.jobs.list,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :limit => 10000,
                                :where => conditions.to_json
                              },
@@ -270,9 +270,9 @@ class JobCache
   end
   def self.create(attributes)
     @cache ||= {}
-    result = $client.execute(:api_method => $orvos.jobs.create,
+    result = $client.execute(:api_method => $arvados.jobs.create,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :job => attributes.to_json
                              },
                              :authenticated => false)
@@ -294,9 +294,9 @@ class WhRunPipelineInstance
   end
 
   def fetch_template(template_uuid)
-    result = $client.execute(:api_method => $orvos.pipeline_templates.get,
+    result = $client.execute(:api_method => $arvados.pipeline_templates.get,
                              :parameters => {
-                               :api_token => ENV['ORVOS_API_TOKEN'],
+                               :api_token => ENV['ARVADOS_API_TOKEN'],
                                :uuid => template_uuid
                              },
                              :authenticated => false)
index a80d93e42feb9b07c69589bf38b20b3f65799b6e..fb4c7adfbd98e435c126415764daac3a4fa7ba99 100644 (file)
@@ -275,7 +275,7 @@ class ApplicationController < ActionController::Base
 
   def render_list
     @object_list = {
-      :kind  => "orvos##{resource_name}List",
+      :kind  => "arvados##{resource_name}List",
       :etag => "",
       :self_link => "",
       :next_page_token => "",
similarity index 90%
rename from services/api/app/controllers/orvos/v1/collections_controller.rb
rename to services/api/app/controllers/arvados/v1/collections_controller.rb
index a1afd1e7155f748e6282771d928d92321ccb1e56..a719de928333ad61604199d8c12f5ba2c8e39c9e 100644 (file)
@@ -1,4 +1,4 @@
-class Orvos::V1::CollectionsController < ApplicationController
+class Arvados::V1::CollectionsController < ApplicationController
   def create
     # It's not an error for a client to re-register a manifest that we
     # already know about.
diff --git a/services/api/app/controllers/arvados/v1/groups_controller.rb b/services/api/app/controllers/arvados/v1/groups_controller.rb
new file mode 100644 (file)
index 0000000..f742fa9
--- /dev/null
@@ -0,0 +1,2 @@
+class Arvados::V1::GroupsController < ApplicationController
+end
diff --git a/services/api/app/controllers/arvados/v1/job_tasks_controller.rb b/services/api/app/controllers/arvados/v1/job_tasks_controller.rb
new file mode 100644 (file)
index 0000000..d291624
--- /dev/null
@@ -0,0 +1,2 @@
+class Arvados::V1::JobTasksController < ApplicationController
+end
similarity index 96%
rename from services/api/app/controllers/orvos/v1/jobs_controller.rb
rename to services/api/app/controllers/arvados/v1/jobs_controller.rb
index 6b14db9ecb6215c3622ff4d492ea9fe843d46053..6fbf0fb1bb1c7f30341450ce269eeb7a8a2c3e8b 100644 (file)
@@ -1,4 +1,4 @@
-class Orvos::V1::JobsController < ApplicationController
+class Arvados::V1::JobsController < ApplicationController
   accept_attribute_as_json :script_parameters, Hash
   accept_attribute_as_json :resource_limits, Hash
   accept_attribute_as_json :tasks_summary, Hash
similarity index 79%
rename from services/api/app/controllers/orvos/v1/links_controller.rb
rename to services/api/app/controllers/arvados/v1/links_controller.rb
index 046f6838f27851df2add5dd975016c1c42a4fa1c..deeda2869b3e494f20f02a1d25a324b9ef5531aa 100644 (file)
@@ -1,4 +1,4 @@
-class Orvos::V1::LinksController < ApplicationController
+class Arvados::V1::LinksController < ApplicationController
   def index
     if params[:tail_uuid]
       params[:where] = Oj.load(params[:where]) if params[:where].is_a?(String)
diff --git a/services/api/app/controllers/arvados/v1/logs_controller.rb b/services/api/app/controllers/arvados/v1/logs_controller.rb
new file mode 100644 (file)
index 0000000..dffe662
--- /dev/null
@@ -0,0 +1,2 @@
+class Arvados::V1::LogsController < ApplicationController
+end
similarity index 73%
rename from services/api/app/controllers/orvos/v1/nodes_controller.rb
rename to services/api/app/controllers/arvados/v1/nodes_controller.rb
index 105fe95a47ec63cb8b93fd3d0f185b65cd973e9f..67a5fab6ad75185a023dd7e2d06e19495ae5a053 100644 (file)
@@ -1,10 +1,10 @@
-class Orvos::V1::NodesController < ApplicationController
+class Arvados::V1::NodesController < ApplicationController
   skip_before_filter :login_required, :only => :ping
 
   def create
     @object = Node.new
     @object.save!
-    @object.start!(lambda { |h| orvos_v1_ping_node_url(h) })
+    @object.start!(lambda { |h| arvados_v1_ping_node_url(h) })
     show
   end
 
similarity index 56%
rename from services/api/app/controllers/orvos/v1/pipeline_instances_controller.rb
rename to services/api/app/controllers/arvados/v1/pipeline_instances_controller.rb
index af68503ee1da5c083a29f495aa3d2ff115624310..8f0b93f432e5916c3705aba56f8324174299ea6e 100644 (file)
@@ -1,4 +1,4 @@
-class Orvos::V1::PipelineInstancesController < ApplicationController
+class Arvados::V1::PipelineInstancesController < ApplicationController
   accept_attribute_as_json :components, Hash
   accept_attribute_as_json :properties, Hash
 end
diff --git a/services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb b/services/api/app/controllers/arvados/v1/pipeline_templates_controller.rb
new file mode 100644 (file)
index 0000000..a2c6d0b
--- /dev/null
@@ -0,0 +1,3 @@
+class Arvados::V1::PipelineTemplatesController < ApplicationController
+  accept_attribute_as_json :components, Hash
+end
similarity index 83%
rename from services/api/app/controllers/orvos/v1/schema_controller.rb
rename to services/api/app/controllers/arvados/v1/schema_controller.rb
index 166ab5fad0b3d873a718f2436712f3df341d451f..6721b444320d755156306d8c6aceebffe456bd04 100644 (file)
@@ -1,9 +1,9 @@
-class Orvos::V1::SchemaController < ApplicationController
+class Arvados::V1::SchemaController < ApplicationController
   skip_before_filter :find_object_by_uuid
   skip_before_filter :login_required
 
   def show
-    classes = Rails.cache.fetch 'orvos_v1_schema' do
+    classes = Rails.cache.fetch 'arvados_v1_schema' do
       Rails.application.eager_load!
       classes = {}
       ActiveRecord::Base.descendants.reject(&:abstract_class?).each do |k|
@@ -23,23 +23,23 @@ class Orvos::V1::SchemaController < ApplicationController
   end
 
   def discovery_rest_description
-    discovery = Rails.cache.fetch 'orvos_v1_rest_discovery' do
+    discovery = Rails.cache.fetch 'arvados_v1_rest_discovery' do
       Rails.application.eager_load!
       discovery = {
         kind: "discovery#restDescription",
         discoveryVersion: "v1",
-        id: "orvos:v1",
-        name: "orvos",
+        id: "arvados:v1",
+        name: "arvados",
         version: "v1",
         revision: "20130226",
-        title: "Orvos API",
-        description: "The API to interact with Orvos.",
-        documentationLink: "https://redmine.clinicalfuture.com/projects/orvos/",
+        title: "Arvados API",
+        description: "The API to interact with Arvados.",
+        documentationLink: "https://redmine.clinicalfuture.com/projects/arvados/",
         protocol: "rest",
-        baseUrl: root_url + "/orvos/v1/",
-        basePath: "/orvos/v1/",
+        baseUrl: root_url + "/arvados/v1/",
+        basePath: "/arvados/v1/",
         rootUrl: root_url,
-        servicePath: "orvos/v1/",
+        servicePath: "arvados/v1/",
         batchPath: "batch",
         parameters: {
           alt: {
@@ -73,10 +73,10 @@ class Orvos::V1::SchemaController < ApplicationController
         auth: {
           oauth2: {
             scopes: {
-              "https://api.clinicalfuture.com/auth/orvos" => {
+              "https://api.clinicalfuture.com/auth/arvados" => {
                 description: "View and manage objects"
               },
-              "https://api.clinicalfuture.com/auth/orvos.readonly" => {
+              "https://api.clinicalfuture.com/auth/arvados.readonly" => {
                 description: "View objects"
               }
             }
@@ -110,8 +110,8 @@ class Orvos::V1::SchemaController < ApplicationController
           properties: {
             kind: {
               type: "string",
-              description: "Object type. Always orvos##{k.to_s.camelcase(:lower)}List.",
-              default: "orvos##{k.to_s.camelcase(:lower)}List"
+              description: "Object type. Always arvados##{k.to_s.camelcase(:lower)}List.",
+              default: "arvados##{k.to_s.camelcase(:lower)}List"
             },
             etag: {
               type: "string",
@@ -156,7 +156,7 @@ class Orvos::V1::SchemaController < ApplicationController
         discovery[:resources][k.to_s.underscore.pluralize] = {
           methods: {
             get: {
-              id: "orvos.#{k.to_s.underscore.pluralize}.get",
+              id: "arvados.#{k.to_s.underscore.pluralize}.get",
               path: "#{k.to_s.underscore.pluralize}/{uuid}",
               httpMethod: "GET",
               description: "Gets a #{k.to_s}'s metadata by UUID.",
@@ -175,12 +175,12 @@ class Orvos::V1::SchemaController < ApplicationController
                 "$ref" => k.to_s
               },
               scopes: [
-                       "https://api.clinicalfuture.com/auth/orvos",
-                       "https://api.clinicalfuture.com/auth/orvos.readonly"
+                       "https://api.clinicalfuture.com/auth/arvados",
+                       "https://api.clinicalfuture.com/auth/arvados.readonly"
                       ]
             },
             list: {
-              id: "orvos.#{k.to_s.underscore.pluralize}.list",
+              id: "arvados.#{k.to_s.underscore.pluralize}.list",
               path: k.to_s.underscore.pluralize,
               httpMethod: "GET",
               description: "List #{k.to_s.underscore.pluralize}.",
@@ -208,12 +208,12 @@ class Orvos::V1::SchemaController < ApplicationController
                 "$ref" => "#{k.to_s}List"
               },
               scopes: [
-                       "https://api.clinicalfuture.com/auth/orvos",
-                       "https://api.clinicalfuture.com/auth/orvos.readonly"
+                       "https://api.clinicalfuture.com/auth/arvados",
+                       "https://api.clinicalfuture.com/auth/arvados.readonly"
                       ]
             },
             create: {
-              id: "orvos.#{k.to_s.underscore.pluralize}.create",
+              id: "arvados.#{k.to_s.underscore.pluralize}.create",
               path: "#{k.to_s.underscore.pluralize}",
               httpMethod: "POST",
               description: "Create a new #{k.to_s}.",
@@ -232,11 +232,11 @@ class Orvos::V1::SchemaController < ApplicationController
                 "$ref" => k.to_s
               },
               scopes: [
-                       "https://api.clinicalfuture.com/auth/orvos"
+                       "https://api.clinicalfuture.com/auth/arvados"
                       ]
             },
             update: {
-              id: "orvos.#{k.to_s.underscore.pluralize}.update",
+              id: "arvados.#{k.to_s.underscore.pluralize}.update",
               path: "#{k.to_s.underscore.pluralize}/{uuid}",
               httpMethod: "PUT",
               description: "Update attributes of an existing #{k.to_s}.",
@@ -261,11 +261,11 @@ class Orvos::V1::SchemaController < ApplicationController
                 "$ref" => k.to_s
               },
               scopes: [
-                       "https://api.clinicalfuture.com/auth/orvos"
+                       "https://api.clinicalfuture.com/auth/arvados"
                       ]
             },
             delete: {
-              id: "orvos.#{k.to_s.underscore.pluralize}.delete",
+              id: "arvados.#{k.to_s.underscore.pluralize}.delete",
               path: "#{k.to_s.underscore.pluralize}/{uuid}",
               httpMethod: "DELETE",
               description: "Delete an existing #{k.to_s}.",
@@ -281,7 +281,7 @@ class Orvos::V1::SchemaController < ApplicationController
                 "$ref" => k.to_s
               },
               scopes: [
-                       "https://api.clinicalfuture.com/auth/orvos"
+                       "https://api.clinicalfuture.com/auth/arvados"
                       ]
             }
           }
diff --git a/services/api/app/controllers/arvados/v1/specimens_controller.rb b/services/api/app/controllers/arvados/v1/specimens_controller.rb
new file mode 100644 (file)
index 0000000..24d3830
--- /dev/null
@@ -0,0 +1,2 @@
+class Arvados::V1::SpecimensController < ApplicationController
+end
similarity index 50%
rename from services/api/app/controllers/orvos/v1/users_controller.rb
rename to services/api/app/controllers/arvados/v1/users_controller.rb
index 7fc0f47d4989784622bf2615622d508367ac1faa..b6266f7047d0fcbf560ab4ea3653cafb529cf715 100644 (file)
@@ -1,4 +1,4 @@
-class Orvos::V1::UsersController < ApplicationController
+class Arvados::V1::UsersController < ApplicationController
   def current
     @object = current_user
     show
diff --git a/services/api/app/controllers/orvos/v1/groups_controller.rb b/services/api/app/controllers/orvos/v1/groups_controller.rb
deleted file mode 100644 (file)
index 019318a..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-class Orvos::V1::GroupsController < ApplicationController
-end
diff --git a/services/api/app/controllers/orvos/v1/job_tasks_controller.rb b/services/api/app/controllers/orvos/v1/job_tasks_controller.rb
deleted file mode 100644 (file)
index 1ba0f6c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-class Orvos::V1::JobTasksController < ApplicationController
-end
diff --git a/services/api/app/controllers/orvos/v1/logs_controller.rb b/services/api/app/controllers/orvos/v1/logs_controller.rb
deleted file mode 100644 (file)
index 1860e5d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-class Orvos::V1::LogsController < ApplicationController
-end
diff --git a/services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb b/services/api/app/controllers/orvos/v1/pipeline_templates_controller.rb
deleted file mode 100644 (file)
index 626c44b..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-class Orvos::V1::PipelineTemplatesController < ApplicationController
-  accept_attribute_as_json :components, Hash
-end
diff --git a/services/api/app/controllers/orvos/v1/specimens_controller.rb b/services/api/app/controllers/orvos/v1/specimens_controller.rb
deleted file mode 100644 (file)
index 22620df..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-class Orvos::V1::SpecimensController < ApplicationController
-end
index 28e7e795cd83307f66a32f2a130016dea8dfcc9a..537c1aa4110e9fecf2a4b06a8238899a048288ca 100644 (file)
@@ -35,7 +35,7 @@ class UserSessionsController < ApplicationController
       user.last_name = omniauth['info']['last_name']
     end
 
-    # prevent OrvosModel#before_create and _update from throwing
+    # prevent ArvadosModel#before_create and _update from throwing
     # "unauthorized":
     Thread.current[:user] = user
 
similarity index 96%
rename from services/api/app/models/orvos_model.rb
rename to services/api/app/models/arvados_model.rb
index 271b8fd2ba5510767d9ccd0e35a617ea480ba07a..a4a0148d845f95f9ddbcffe0bed048c45747c246 100644 (file)
@@ -1,4 +1,4 @@
-class OrvosModel < ActiveRecord::Base
+class ArvadosModel < ActiveRecord::Base
   self.abstract_class = true
 
   include CurrentApiClient      # current_user, current_api_client, etc.
@@ -14,7 +14,7 @@ class OrvosModel < ActiveRecord::Base
   validate :ensure_serialized_attribute_type
 
   def self.kind_class(kind)
-    kind.match(/^orvos\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil
+    kind.match(/^arvados\#(.+?)(_list|List)?$/)[1].pluralize.classify.constantize rescue nil
   end
 
   def eager_load_associations
index 76dd60fb0a36c2a5dc9c14c55673eff57e55c61a..7403b9a15abfab21650f93b3779349cad063a8d1 100644 (file)
@@ -1,4 +1,4 @@
-class Collection < OrvosModel
+class Collection < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index f57cf0d58d8deba2562d0cbdd39068f98e3e81f4..94a392d5eb172ebc2a59de333bdfeb00c53283d7 100644 (file)
@@ -1,4 +1,4 @@
-class Group < OrvosModel
+class Group < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index e13446b4aecc80684f6bdc9a806b5feb3fc19679..a50c43c3e0bcb07273edad0279c9694b6c21ebf3 100644 (file)
@@ -1,4 +1,4 @@
-class Job < OrvosModel
+class Job < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index dde1b2f9f9648bbd0bd4e139b91bd2703bf62829..86f649531dbdbc3228f4ac458679a673e2b630f6 100644 (file)
@@ -1,4 +1,4 @@
-class JobTask < OrvosModel
+class JobTask < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index 5ca5f36004273d8411fcdd5ea44ce3a0d32f40b3..b685bb6d75cff206a4d9d6652a4f1c0846f799b9 100644 (file)
@@ -1,4 +1,4 @@
-class Link < OrvosModel
+class Link < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index 58a8734e5b041fd1c5b0cbf0867ed4a579b6e818..d856455f4dadc5b9ce20d9a91a9d1f09223482fe 100644 (file)
@@ -1,4 +1,4 @@
-class Log < OrvosModel
+class Log < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index 725344d826d354bd3baf4342576ccd7dd993835f..e79f976260bce717ded130383fb138e7b72852c3 100644 (file)
@@ -1,4 +1,4 @@
-class Node < OrvosModel
+class Node < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
@@ -61,7 +61,7 @@ class Node < OrvosModel
     end
     self.last_ping_at = Time.now
 
-    @bypass_orvos_authorization = true
+    @bypass_arvados_authorization = true
 
     # Record IP address
     if self.ip_address.nil?
@@ -184,7 +184,7 @@ class Node < OrvosModel
   end
 
   def permission_to_update
-    @bypass_orvos_authorization or super
+    @bypass_arvados_authorization or super
   end
 
   def permission_to_create
index 6de861d00547297688fdba19aee5c72d2d05e83e..05027939718d751842162652a07c448b81685b73 100644 (file)
@@ -1,4 +1,4 @@
-class PipelineInstance < OrvosModel
+class PipelineInstance < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index 97e1426f023018cd7a15e15ecf0d07d8f80aa2e6..205ce696faddfe80d0fbf6ec5aa88611af4b21de 100644 (file)
@@ -1,4 +1,4 @@
-class PipelineTemplate < OrvosModel
+class PipelineTemplate < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index 15a0c3bf414031357e5cd6d50d806b4404a02530..ea97fa012aee74c5c258a1e9ea15cc484c522759 100644 (file)
@@ -1,4 +1,4 @@
-class Specimen < OrvosModel
+class Specimen < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
index 0c3eaf1a8348615eed80ac8f02216252de1f62fe..08a19cb8d071f8dade56a23be84759b8f741891b 100644 (file)
@@ -1,4 +1,4 @@
-class User < OrvosModel
+class User < ArvadosModel
   include AssignUuid
   include KindAndEtag
   include CommonApiTemplate
@@ -80,7 +80,7 @@ class User < OrvosModel
         Link.where('tail_uuid in (?) and link_class = ? and head_kind = ?',
                    lookup_uuids,
                    'permission',
-                   'orvos#group').each do |link|
+                   'arvados#group').each do |link|
           unless done.has_key? link.head_uuid
             todo[link.head_uuid] = true
           end
index 63bc7dc842288fe9b63f4f2125758c4f1def310a..5e64cda420569a77449f4ae3d5462e86e16de40a 100644 (file)
@@ -8,7 +8,7 @@
 </head>
 <body>
 <div id="header">
-  <div class="apptitle">ORVOS <span class="beta"><span>BETA</span></span></div>
+  <div class="apptitle">ARVADOS <span class="beta"><span>BETA</span></span></div>
   <div style="float:right">
     <% if current_user %>
     <%= current_user.full_name %>
@@ -36,7 +36,7 @@
 
 <% if current_user or session['invite_code'] %>
 <div id="footer">
-  <div style="float:right">Questions &rarr; <a href="mailto:orvos@clinicalfuture.com">orvos@clinicalfuture.com</a></div>
+  <div style="float:right">Questions &rarr; <a href="mailto:arvados@clinicalfuture.com">arvados@clinicalfuture.com</a></div>
   <div style="clear:both"></div>
 </div>
 <% end %>
index 94187e800a6192af6c5b17fdb1411d015c6bb67d..66605df1be7afdcc1eb172ee7f3063def6206d7f 100644 (file)
@@ -7,11 +7,11 @@ $(function(){
   <img class="clinicalfuture-logo" src="<%= asset_path('logo.png') %>" style="display:block; margin:2em auto"/>
   <div style="width:30em; margin:2em auto 0 auto">
     <h1>Welcome</h1>
-    <h4>Clinical Future ORVOS</h4>
+    <h4>Clinical Future ARVADOS</h4>
 
     <% if !current_user and session['invite_code'] %>
 
-    <p>Clinical Future Orvos lets you manage and process human genomes and exomes.  You can start using the private beta
+    <p>Clinical Future Arvados lets you manage and process human genomes and exomes.  You can start using the private beta
     now with your Google account.</p>
     <p style="float:right;margin-top:1em">
       <button class="login" href="/auth/joshid">Log in and get started</button>
@@ -19,11 +19,11 @@ $(function(){
 
     <% else %>
 
-    <p>Clinical Future ORVOS is transforming how researchers and
+    <p>Clinical Future ARVADOS is transforming how researchers and
     clinical geneticists use whole genome sequences. </p>
     <p>If you&rsquo;re interested in learning more, we&rsquo;d love to hear
     from you &mdash;
-    contact <a href="mailto:orvos@clinicalfuture.com">orvos@clinicalfuture.com</a>.</p>
+    contact <a href="mailto:arvados@clinicalfuture.com">arvados@clinicalfuture.com</a>.</p>
 
     <% if !current_user %>
     <p style="float:right;margin-top:1em">
index 51f1028072430e32c7eb522b35716a969695b6e6..62edd8431e74c86c7598c733c8bd1067c79ea7f3 100644 (file)
@@ -1,24 +1,24 @@
 development:
   adapter: mysql
   encoding: utf8
-  database: orvos_development
-  username: orvos
+  database: arvados_development
+  username: arvados
   password: ********
   host: localhost
 
 test:
   adapter: mysql
   encoding: utf8
-  database: orvos_test
-  username: orvos
+  database: arvados_test
+  username: arvados
   password: ********
   host: localhost
 
 production:
   adapter: mysql
   encoding: utf8
-  database: orvos_production
-  username: orvos
+  database: arvados_production
+  username: arvados
   password: ********
   host: localhost
 
index ca2836285500fbd79f8b044d1f774550391f8ac9..ba8d2d43c4363cee01ccb7c0652af2d236b97cee 100644 (file)
@@ -37,7 +37,7 @@ Server::Application.configure do
   # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
 
   # config.compute_node_ami = 'ami-cbca41a2'
-  # config.compute_node_security_group = 'orvos-compute'
+  # config.compute_node_security_group = 'arvados-compute'
   # config.compute_node_spot_bid = 0.11
 
   # config.compute_node_domain = `hostname --domain`.strip
index 7ae0d812676aef503ddd480d801e4ba42545e73d..a3c154d364dcb907f543f37af65ba04b2de95614 100644 (file)
@@ -65,7 +65,7 @@ Server::Application.configure do
   # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
 
   # config.compute_node_ami = 'ami-cbca41a2'
-  # config.compute_node_security_group = 'orvos-compute'
+  # config.compute_node_security_group = 'arvados-compute'
   # config.compute_node_spot_bid = 0.11
 
   # config.compute_node_domain = `hostname --domain`.strip
index f63b5b3e9345552f9cc66f26bf50634480c4767f..9c3afdeda5ca35c916d79daddf96bb373642a679 100644 (file)
@@ -44,7 +44,7 @@ Server::Application.configure do
   # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
 
   # config.compute_node_ami = 'ami-cbca41a2'
-  # config.compute_node_security_group = 'orvos-compute'
+  # config.compute_node_security_group = 'arvados-compute'
   # config.compute_node_spot_bid = 0.11
 
   # config.compute_node_domain = `hostname --domain`.strip
index e7025545a16dd573e091c98691fdcc4294bc51c0..6c1b67bac01cff75ec10e4ac3a51a81752d0a8e3 100644 (file)
@@ -1,6 +1,6 @@
 # Change this omniauth configuration to point to your registered provider
 # Since this is a registered application, add the app id and secret here
-APP_ID = 'orvos-server'
+APP_ID = 'arvados-server'
 APP_SECRET = rand(2**512).to_s(36) # CHANGE ME!
 
 # Update your custom Omniauth provider URL here
index c3d2fd197f2809603d211cab5fd8a933b5c5c1f1..67f6a24646ac3664af4ebc5385629f1cd7367b25 100644 (file)
@@ -73,11 +73,11 @@ Server::Application.routes.draw do
   # Note: This route will make all actions in every controller accessible via GET requests.
   # match ':controller(/:action(/:id(.:format)))'
 
-  namespace :orvos do
+  namespace :arvados do
     namespace :v1 do
       match '/schema' => 'schema#show'
       match '/nodes/:uuid/ping' => 'nodes#ping', :as => :ping_node
-      match '/links/from/:tail_uuid' => 'links#index', :as => :orvos_v1_links_from
+      match '/links/from/:tail_uuid' => 'links#index', :as => :arvados_v1_links_from
       match '/users/current' => 'users#current'
       resources :collections
       resources :links
@@ -101,11 +101,11 @@ Server::Application.routes.draw do
   match '/login', :to => 'user_sessions#login'
   match '/logout', :to => 'user_sessions#logout'
 
-  match '/discovery/v1/apis/orvos/v1/rest', :to => 'orvos/v1/schema#discovery_rest_description'
+  match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#discovery_rest_description'
 
   # Send unroutable requests to an arbitrary controller
   # (ends up at ApplicationController#render_not_found)
-  match '*a', :to => 'orvos/v1/links#render_not_found'
+  match '*a', :to => 'arvados/v1/links#render_not_found'
 
   root :to => 'static#home'
 end
diff --git a/services/api/db/migrate/20130415020241_rename_orvos_to_arvados.rb b/services/api/db/migrate/20130415020241_rename_orvos_to_arvados.rb
new file mode 100644 (file)
index 0000000..d11bba8
--- /dev/null
@@ -0,0 +1,13 @@
+class RenameOrvosToArvados < ActiveRecord::Migration
+  def up
+    Link.update_all("head_kind=replace(head_kind,'orvos','arvados')")
+    Link.update_all("tail_kind=replace(tail_kind,'orvos','arvados')")
+    Log.update_all("object_kind=replace(object_kind,'orvos','arvados')")
+  end
+
+  def down
+    Link.update_all("head_kind=replace(head_kind,'arvados','orvos')")
+    Link.update_all("tail_kind=replace(tail_kind,'arvados','orvos')")
+    Log.update_all("object_kind=replace(object_kind,'arvados','orvos')")
+  end
+end
index 986528b9091f50139ea77a412146355c38bb63c7..f71fcaf354b638e2cec8e4a1b52e4e30c0f648ee 100644 (file)
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20130326182917) do
+ActiveRecord::Schema.define(:version => 20130415020241) do
 
   create_table "api_client_authorizations", :force => true do |t|
     t.string   "api_token",               :null => false
index 93f69f5bc5fb34dab3f7c5e83deb0d6a3d8d0719..38a9288d0ad987584a48198c14830c22298c54c5 100644 (file)
@@ -8,7 +8,7 @@ module KindAndEtag
   end
 
   def kind
-    'orvos#' + self.class.to_s.underscore
+    'arvados#' + self.class.to_s.underscore
   end
 
   def etag
index 7051c4cfd7cbdc584de5685e14be28e231649b23..1f825526805aae458d936cdfef0862ce8b94a7c0 100644 (file)
@@ -4,10 +4,10 @@ class CollectionsApiTest < ActionDispatch::IntegrationTest
   fixtures :all
 
   test "should get index" do
-    get "/orvos/v1/collections", :format => :json
+    get "/arvados/v1/collections", :format => :json
     @json_response ||= ActiveSupport::JSON.decode @response.body
     assert_response :success
-    assert_equal "orvos#collectionList", @json_response['kind']
+    assert_equal "arvados#collectionList", @json_response['kind']
   end
 
 end