rename Project to Group
authorTom Clegg <tom@clinicalfuture.com>
Wed, 13 Mar 2013 23:25:27 +0000 (16:25 -0700)
committerTom Clegg <tom@clinicalfuture.com>
Wed, 13 Mar 2013 23:25:27 +0000 (16:25 -0700)
17 files changed:
app/assets/javascripts/groups.js.coffee [moved from app/assets/javascripts/projects.js.coffee with 100% similarity]
app/assets/stylesheets/groups.css.scss [moved from app/assets/stylesheets/projects.css.scss with 63% similarity]
app/controllers/collections_controller.rb
app/controllers/groups_controller.rb [moved from app/controllers/projects_controller.rb with 50% similarity]
app/helpers/groups_helper.rb [new file with mode: 0644]
app/helpers/projects_helper.rb [deleted file]
app/helpers/vcf_pipeline_helper.rb
app/models/group.rb [new file with mode: 0644]
app/models/orvos_base.rb
app/models/project.rb [deleted file]
app/views/collections/index.html.erb
app/views/groups/show.html.erb [moved from app/views/projects/show.html.erb with 100% similarity]
config/routes.rb
test/fixtures/groups.yml [moved from test/fixtures/projects.yml with 100% similarity]
test/functional/groups_controller_test.rb [moved from test/functional/projects_controller_test.rb with 100% similarity]
test/unit/group_test.rb [moved from test/unit/project_test.rb with 100% similarity]
test/unit/helpers/groups_helper_test.rb [moved from test/unit/helpers/projects_helper_test.rb with 100% similarity]

similarity index 63%
rename from app/assets/stylesheets/projects.css.scss
rename to app/assets/stylesheets/groups.css.scss
index 7b9c6ec3962bc303dc9c113449782bc7cf3c05ed..679563657b554e17f8d3332641df4e06bcd4ce6c 100644 (file)
@@ -1,3 +1,3 @@
-// Place all the styles related to the Projects controller here.
+// Place all the styles related to the Groups controller here.
 // They will automatically be included in application.css.
 // You can use Sass (SCSS) here: http://sass-lang.com/
index 7b1ea6de9d12c3de00a1c50087f3aad2f252241a..4ca9212959cbd781dd3778f73fe11ae903919fbc 100644 (file)
@@ -36,8 +36,8 @@ class CollectionsController < ApplicationController
       if l.tail_kind == 'orvos#collection'
         c = (@collection_info[l.tail_uuid] ||= {uuid: l.tail_uuid})
         if l.link_class == 'group' and l.name == 'member_of'
-          c[:projects] ||= {}
-          c[:projects][l.tail_uuid] = true
+          c[:groups] ||= {}
+          c[:groups][l.tail_uuid] = true
         end
         if l.link_class == 'data_origin'
           c[:origin] = l
similarity index 50%
rename from app/controllers/projects_controller.rb
rename to app/controllers/groups_controller.rb
index bd290c4e2b28f43f2394f210c077285532dfa5ba..4dc56c4a86fcb8126fb16380d6c3bb8cc8eba35d 100644 (file)
@@ -1,3 +1,3 @@
-class ProjectsController < ApplicationController
+class GroupsController < ApplicationController
   before_filter :ensure_current_user_is_admin
 end
diff --git a/app/helpers/groups_helper.rb b/app/helpers/groups_helper.rb
new file mode 100644 (file)
index 0000000..c091b2f
--- /dev/null
@@ -0,0 +1,2 @@
+module GroupsHelper
+end
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
deleted file mode 100644 (file)
index db5c5ce..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module ProjectsHelper
-end
index 02d837f599bceab0f3df77e9f5f0b48303c4d1d1..9a27a4be1bb46ef8afbe885958e37d379c8bbb33 100644 (file)
@@ -43,10 +43,10 @@ module VcfPipelineHelper
     end
     if stats[:collection_uuid]
       Link.where(tail_uuid: stats[:collection_uuid],
-                 head_kind: Project)[0..0].each do |c2p|
+                 head_kind: Group)[0..0].each do |c2p|
         stats[:project_uuid] = c2p.head_uuid
-        project = Project.find stats[:project_uuid]
-        stats[:project_name] = project.name rescue nil
+        group = Group.find stats[:project_uuid]
+        stats[:project_name] = group.name rescue nil
       end
       Link.where(tail_uuid: stats[:collection_uuid],
                  head_kind: Specimen)[0..0].each do |c2s|
diff --git a/app/models/group.rb b/app/models/group.rb
new file mode 100644 (file)
index 0000000..2a500a5
--- /dev/null
@@ -0,0 +1,2 @@
+class Group < OrvosBase
+end
index 7abbc88d8f33363b1b0bbedd99e70f91d238ea46..365b51db9a2643a88c946d284d770d8107b2f41f 100644 (file)
@@ -11,7 +11,8 @@ class OrvosBase < ActiveRecord::Base
       'j58dm' => 'orvos#specimen',
       'mxsvm' => 'orvos#pipeline',
       'uo14g' => 'orvos#pipeline_invocation',
-      'ldvyl' => 'orvos#project'
+      'j7d0g' => 'orvos#group',
+      'ldvyl' => 'orvos#group' # only needed for legacy Project objects
     }
   end
 
diff --git a/app/models/project.rb b/app/models/project.rb
deleted file mode 100644 (file)
index 1ee3b14..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-class Project < OrvosBase
-end
index 80d27f877d68b1069df2f32cf682d589e889d8cd..f4b4c43fec90f044b0c17229eeb708b929985a9f 100644 (file)
@@ -10,7 +10,7 @@
       </th><th>
        protected
       </th><th>
-       projects
+       groups
       </th><th>
        origin
       </th>
@@ -32,7 +32,7 @@
       </td><td>
        <%= ('Y' if c[:wanted_by_me]) or ('y' if c[:wanted]) %>
       </td><td>
-       <%= c[:projects].size if c[:projects] %>
+       <%= c[:groups].size if c[:groups] %>
       </td><td>
        <% if c[:origin] %>
        <span class="deemphasize"><%= c[:origin].name %></span>
index 2e019a7c4e3d20ef52221fd286655336c13ed169..21df9e6a391c0149fc42d2d5698b4d08be2c7109 100644 (file)
@@ -22,7 +22,7 @@ Vcffarm::Application.routes.draw do
   resources :uploaded_datasets
 
 
-  resources :projects
+  resources :groups
 
 
   resources :specimens