--- /dev/null
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
--- /dev/null
+// Place all the styles related to the Specimens controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
--- /dev/null
+class Orvos::V1::SpecimensController < ApplicationController
+end
--- /dev/null
+module SpecimensHelper
+end
--- /dev/null
+class Specimen < ActiveRecord::Base
+ include AssignUuid
+ include KindAndEtag
+ include CommonApiTemplate
+
+ api_accessible :superuser, :extend => :common do |t|
+ t.add :material
+ end
+end
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end
+
+ActiveSupport::Inflector.inflections do |inflect|
+ inflect.plural /^(specimen)$/i, '\1s'
+ inflect.singular /^(specimen)s/i, '\1'
+end
Server::Application.routes.draw do
+ resources :specimens
resources :collections
resources :metadata
resources :nodes
resources :pipelines
resources :pipeline_invocations
resources :pipelineInvocations
+ resources :specimens
match '/schema' => 'schema#show'
match '/nodes/:uuid/ping' => 'nodes#ping', :as => :ping_node
match '/metadata/:target_kind/:target_uuid' => 'metadata#index'
--- /dev/null
+class CreateSpecimens < ActiveRecord::Migration
+ def up
+ create_table :specimens do |t|
+ t.string :uuid
+ t.string :created_by_client
+ t.string :created_by_user
+ t.datetime :created_at
+ t.string :modified_by_client
+ t.string :modified_by_user
+ t.datetime :modified_at
+ t.string :material
+
+ t.timestamps
+ end
+ add_index :specimens, :uuid, :unique => true
+ end
+ def down
+ drop_table :specimens
+ end
+end
#
# It's strongly recommended to check this file into your version control system.
-ActiveRecord::Schema.define(:version => 20130113214204) do
+ActiveRecord::Schema.define(:version => 20130116024233) do
create_table "collections", :force => true do |t|
t.string "locator"
add_index "pipelines", ["uuid"], :name => "index_pipelines_on_uuid", :unique => true
+ create_table "specimens", :force => true do |t|
+ t.string "uuid"
+ t.string "created_by_client"
+ t.string "created_by_user"
+ t.datetime "created_at"
+ t.string "modified_by_client"
+ t.string "modified_by_user"
+ t.datetime "modified_at"
+ t.string "material"
+ t.datetime "updated_at"
+ end
+
+ add_index "specimens", ["uuid"], :name => "index_specimens_on_uuid", :unique => true
+
end
--- /dev/null
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ uuid: MyString
+ created_at: 2013-01-15 18:42:33
+ created_by_client: MyString
+ created_by_user: MyString
+ modified_at: 2013-01-15 18:42:33
+ modified_by_client: MyString
+ modified_by_user: MyString
+ material: MyString
+
+two:
+ uuid: MyString
+ created_at: 2013-01-15 18:42:33
+ created_by_client: MyString
+ created_by_user: MyString
+ modified_at: 2013-01-15 18:42:33
+ modified_by_client: MyString
+ modified_by_user: MyString
+ material: MyString
--- /dev/null
+require 'test_helper'
+
+class SpecimensControllerTest < ActionController::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
--- /dev/null
+require 'test_helper'
+
+class SpecimensHelperTest < ActionView::TestCase
+end
--- /dev/null
+require 'test_helper'
+
+class SpecimenTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end