Change underscores to camelcase in "kind" strings as documented.
authorTom Clegg <tom@curoverse.com>
Fri, 24 Jan 2014 22:54:38 +0000 (14:54 -0800)
committerTom Clegg <tom@curoverse.com>
Fri, 24 Jan 2014 22:54:38 +0000 (14:54 -0800)
apps/admin/setup-new-user.rb
apps/workbench/app/models/arvados_base.rb
doc/admin/cheat_sheet.textile
doc/api/resources.textile
services/api/db/migrate/20140124222114_fix_link_kind_underscores.rb [new file with mode: 0644]
services/api/db/schema.rb

index 61c711f57d0686819932a894dcfc8e52687cf822..09fd8a76d9ebfc88023c132dc17afa8dabab7031 100755 (executable)
@@ -151,7 +151,7 @@ log.info { "repo permission: " + repo_perm[:uuid] }
 login_perm = arv.link.create(link: {
                                tail_kind: 'arvados#user',
                                tail_uuid: user[:uuid],
-                               head_kind: 'arvados#virtual_machine',
+                               head_kind: 'arvados#virtualMachine',
                                head_uuid: vm[:uuid],
                                link_class: 'permission',
                                name: 'can_login',
index a648a8f07d26ffee805a9577cdd4e21c95b915fa..02e7bce8368ceab071edd6d011f45afbddb14ace 100644 (file)
@@ -6,15 +6,15 @@ class ArvadosBase < ActiveRecord::Base
     @@uuid_infix_object_kind ||= {
       '4zz18' => 'arvados#collection',
       'tpzed' => 'arvados#user',
-      'ozdt8' => 'arvados#api_client',
+      'ozdt8' => 'arvados#apiClient',
       '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
+      'p5p6p' => 'arvados#pipelineTemplate',
+      'mxsvm' => 'arvados#pipelineTemplate', # legacy Pipeline objects
+      'd1hrv' => 'arvados#pipelineInstance',
+      'uo14g' => 'arvados#pipelineInstance', # legacy PipelineInstance objects
       'j7d0g' => 'arvados#group',
       'ldvyl' => 'arvados#group' # only needed for legacy Project objects
     }
index 4c26877ff47a05c3ff3112cc04d2479e9d58b474..78841f434914a8212b0dcfcef5d5eb66bbcd1674 100644 (file)
@@ -41,7 +41,7 @@ read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
 {
 "tail_kind":"arvados#user",
 "tail_uuid":"$user_uuid",
-"head_kind":"arvados#virtual_machine",
+"head_kind":"arvados#virtualMachine",
 "head_uuid":"$vm_uuid",
 "link_class":"permission",
 "name":"can_login",
index f7c1e690e7bd414a1ae685e99d980d2176fd2090..2783af695d907bd3eee2864a03b34db96060ddfc 100644 (file)
@@ -35,7 +35,7 @@ h2. Attributes of resource lists
 
 table(table table-bordered table-condensed).
 |*Attribute*|*Type*|*Description*|*Example*|
-|kind|string|@arvados#{resource_type}_list@|@arvados#project_list@|
+|kind|string|@arvados#{resource_type}List@|@arvados#projectList@|
 |etag|string|The ETag[1] of the resource list|@cd3o1wi9sf934saajykawrz2e@|
 |self_link|string|||
 |next_page_token|string|||
diff --git a/services/api/db/migrate/20140124222114_fix_link_kind_underscores.rb b/services/api/db/migrate/20140124222114_fix_link_kind_underscores.rb
new file mode 100644 (file)
index 0000000..3d13c00
--- /dev/null
@@ -0,0 +1,17 @@
+class FixLinkKindUnderscores < ActiveRecord::Migration
+  def up
+    update_sql <<-EOS
+UPDATE links
+ SET head_kind = 'arvados#virtualMachine'
+ WHERE head_kind = 'arvados#virtual_machine'
+EOS
+  end
+
+  def down
+    update_sql <<-EOS
+UPDATE links
+ SET head_kind = 'arvados#virtual_machine'
+ WHERE head_kind = 'arvados#virtualMachine'
+EOS
+  end
+end
index 99b612915a097ff5c46acf9db13d4e3afc780bce..62d41f67f47d0f64138d91ece7be8bcac69e3f2d 100644 (file)
@@ -11,7 +11,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version => 20140117231056) do
+ActiveRecord::Schema.define(:version => 20140124222114) do
 
   create_table "api_client_authorizations", :force => true do |t|
     t.string   "api_token",                                           :null => false