rorchado 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/lib/rails/generators/rorchado/USAGE +16 -0
  3. data/lib/rails/generators/rorchado/rorchado_generator.rb +259 -0
  4. data/lib/rails/generators/rorchado/templates/controllers/contact_controller.rb +83 -0
  5. data/lib/rails/generators/rorchado/templates/controllers/contact_controller.rb~ +83 -0
  6. data/lib/rails/generators/rorchado/templates/controllers/cv_controller.rb +83 -0
  7. data/lib/rails/generators/rorchado/templates/controllers/cv_controller.rb~ +83 -0
  8. data/lib/rails/generators/rorchado/templates/controllers/cvterm_controller.rb +83 -0
  9. data/lib/rails/generators/rorchado/templates/controllers/cvterm_controller.rb~ +83 -0
  10. data/lib/rails/generators/rorchado/templates/controllers/stock_controller.rb +83 -0
  11. data/lib/rails/generators/rorchado/templates/db_schemas/chado_schema.xml +697 -0
  12. data/lib/rails/generators/rorchado/templates/migrations/generic_migration_create.erb +18 -0
  13. data/lib/rails/generators/rorchado/templates/models/generic_model.erb +5 -0
  14. data/lib/rails/generators/rorchado/templates/views/contact/_form.html.erb +29 -0
  15. data/lib/rails/generators/rorchado/templates/views/contact/edit.html.erb +6 -0
  16. data/lib/rails/generators/rorchado/templates/views/contact/index.html.erb +27 -0
  17. data/lib/rails/generators/rorchado/templates/views/contact/new.html.erb +5 -0
  18. data/lib/rails/generators/rorchado/templates/views/contact/show.html.erb +20 -0
  19. data/lib/rails/generators/rorchado/templates/views/cv/_form.html.erb +25 -0
  20. data/lib/rails/generators/rorchado/templates/views/cv/edit.html.erb +6 -0
  21. data/lib/rails/generators/rorchado/templates/views/cv/index.html.erb +25 -0
  22. data/lib/rails/generators/rorchado/templates/views/cv/new.html.erb +5 -0
  23. data/lib/rails/generators/rorchado/templates/views/cv/show.html.erb +15 -0
  24. data/lib/rails/generators/rorchado/templates/views/cvterm/_form.html.erb +41 -0
  25. data/lib/rails/generators/rorchado/templates/views/cvterm/edit.html.erb +6 -0
  26. data/lib/rails/generators/rorchado/templates/views/cvterm/index.html.erb +33 -0
  27. data/lib/rails/generators/rorchado/templates/views/cvterm/new.html.erb +5 -0
  28. data/lib/rails/generators/rorchado/templates/views/cvterm/show.html.erb +35 -0
  29. data/lib/rails/generators/rorchado/templates/views/stock/_form.html.erb +45 -0
  30. data/lib/rails/generators/rorchado/templates/views/stock/edit.html.erb +6 -0
  31. data/lib/rails/generators/rorchado/templates/views/stock/index.html.erb +35 -0
  32. data/lib/rails/generators/rorchado/templates/views/stock/new.html.erb +5 -0
  33. data/lib/rails/generators/rorchado/templates/views/stock/show.html.erb +40 -0
  34. metadata +105 -0
@@ -0,0 +1,18 @@
1
+ class Create<%= @class_name %> < ActiveRecord::Migration
2
+ def change
3
+ suppress_messages do
4
+ create_table :<%= @table_name %>, :primary_key => "<%= @table_key %>", :force => true do |t|
5
+ <%= @field_items %>
6
+
7
+ end
8
+ end
9
+
10
+ say "Table '<%= @table_name %>' created! "
11
+
12
+
13
+ <%= @constraint_items %>
14
+
15
+ <%= @index_items %>
16
+
17
+ end
18
+ end
@@ -0,0 +1,5 @@
1
+ class <%= @class_name %> < ActiveRecord::Base
2
+ <%= @orm_items %>
3
+
4
+ attr_accessible <%= @column_items %>
5
+ end
@@ -0,0 +1,29 @@
1
+ <%= form_for @contact do |f| %>
2
+ <% if @contact.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @contact.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :type_id %><br />
16
+ <%= f.number_field :type_id %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :name %><br />
20
+ <%= f.text_field :name %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :description %><br />
24
+ <%= f.text_field :description %>
25
+ </div>
26
+ <div class="actions">
27
+ <%= f.submit %>
28
+ </div>
29
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing contact</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @contact %> |
6
+ <%= link_to 'Back', "/contact" %>
@@ -0,0 +1,27 @@
1
+ <h1>Listing contacts</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Type</th>
6
+ <th>Name</th>
7
+ <th>Description</th>
8
+ <th></th>
9
+ <th></th>
10
+ <th></th>
11
+ </tr>
12
+
13
+ <% @contacts.each do |contact| %>
14
+ <tr>
15
+ <td><%= contact.type_id %></td>
16
+ <td><%= contact.name %></td>
17
+ <td><%= contact.description %></td>
18
+ <td><%= link_to 'Show', "/contact/#{contact.id}" %></td>
19
+ <td><%= link_to 'Edit', "/contact/#{contact.id}/edit" %></td>
20
+ <td><%= link_to 'Destroy', contact, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
21
+ </tr>
22
+ <% end %>
23
+ </table>
24
+
25
+ <br />
26
+
27
+ <%= link_to 'New Contact', "/contact/new" %>
@@ -0,0 +1,5 @@
1
+ <h1>New contact</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', "/contact/" %>
@@ -0,0 +1,20 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Type:</b>
5
+ <%= @contact.type_id %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Name:</b>
10
+ <%= @contact.name %>
11
+ </p>
12
+
13
+ <p>
14
+ <b>Description:</b>
15
+ <%= @contact.description %>
16
+ </p>
17
+
18
+
19
+ <%= link_to 'Edit', "/contact/#{@contact.id}/edit" %> |
20
+ <%= link_to 'Back', "/contact" %>
@@ -0,0 +1,25 @@
1
+ <%= form_for(@cv) do |f| %>
2
+ <% if @cv.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@cv.errors.count, "error") %> prohibited this cv from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @cv.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :name %><br />
16
+ <%= f.text_field :name %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :definition %><br />
20
+ <%= f.text_area :definition %>
21
+ </div>
22
+ <div class="actions">
23
+ <%= f.submit %>
24
+ </div>
25
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing cv</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @cv %> |
6
+ <%= link_to 'Back', cvs_path %>
@@ -0,0 +1,25 @@
1
+ <h1>Listing cvs</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Name</th>
6
+ <th>Definition</th>
7
+ <th></th>
8
+ <th></th>
9
+ <th></th>
10
+ </tr>
11
+
12
+ <% @cvs.each do |cv| %>
13
+ <tr>
14
+ <td><%= cv.name %></td>
15
+ <td><%= cv.definition %></td>
16
+ <td><%= link_to 'Show', cv %></td>
17
+ <td><%= link_to 'Edit', edit_cv_path(cv) %></td>
18
+ <td><%= link_to 'Destroy', cv, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
19
+ </tr>
20
+ <% end %>
21
+ </table>
22
+
23
+ <br />
24
+
25
+ <%= link_to 'New Cv', new_cv_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New cv</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', cvs_path %>
@@ -0,0 +1,15 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Name:</b>
5
+ <%= @cv.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Definition:</b>
10
+ <%= @cv.definition %>
11
+ </p>
12
+
13
+
14
+ <%= link_to 'Edit', edit_cv_path(@cv) %> |
15
+ <%= link_to 'Back', cvs_path %>
@@ -0,0 +1,41 @@
1
+ <%= form_for(@cvterm) do |f| %>
2
+ <% if @cvterm.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@cvterm.errors.count, "error") %> prohibited this cvterm from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @cvterm.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :name %><br />
16
+ <%= f.text_field :name %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :definition %><br />
20
+ <%= f.text_area :definition %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :is_obsolete %><br />
24
+ <%= f.number_field :is_obsolete %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :is_relationshiptype %><br />
28
+ <%= f.number_field :is_relationshiptype %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :cv_id %><br />
32
+ <%= f.number_field :cv_id %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :dbxref_id %><br />
36
+ <%= f.number_field :dbxref_id %>
37
+ </div>
38
+ <div class="actions">
39
+ <%= f.submit %>
40
+ </div>
41
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing cvterm</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @cvterm %> |
6
+ <%= link_to 'Back', cvterms_path %>
@@ -0,0 +1,33 @@
1
+ <h1>Listing cvterms</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Name</th>
6
+ <th>Definition</th>
7
+ <th>Is obsolete</th>
8
+ <th>Is relationshiptype</th>
9
+ <th>Cv</th>
10
+ <th>Dbxref</th>
11
+ <th></th>
12
+ <th></th>
13
+ <th></th>
14
+ </tr>
15
+
16
+ <% @cvterms.each do |cvterm| %>
17
+ <tr>
18
+ <td><%= cvterm.name %></td>
19
+ <td><%= cvterm.definition %></td>
20
+ <td><%= cvterm.is_obsolete %></td>
21
+ <td><%= cvterm.is_relationshiptype %></td>
22
+ <td><%= cvterm.cv_id %></td>
23
+ <td><%= cvterm.dbxref_id %></td>
24
+ <td><%= link_to 'Show', cvterm %></td>
25
+ <td><%= link_to 'Edit', edit_cvterm_path(cvterm) %></td>
26
+ <td><%= link_to 'Destroy', cvterm, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
27
+ </tr>
28
+ <% end %>
29
+ </table>
30
+
31
+ <br />
32
+
33
+ <%= link_to 'New Cvterm', new_cvterm_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New cvterm</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', cvterms_path %>
@@ -0,0 +1,35 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Name:</b>
5
+ <%= @cvterm.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Definition:</b>
10
+ <%= @cvterm.definition %>
11
+ </p>
12
+
13
+ <p>
14
+ <b>Is obsolete:</b>
15
+ <%= @cvterm.is_obsolete %>
16
+ </p>
17
+
18
+ <p>
19
+ <b>Is relationshiptype:</b>
20
+ <%= @cvterm.is_relationshiptype %>
21
+ </p>
22
+
23
+ <p>
24
+ <b>Cv:</b>
25
+ <%= @cvterm.cv_id %>
26
+ </p>
27
+
28
+ <p>
29
+ <b>Dbxref:</b>
30
+ <%= @cvterm.dbxref_id %>
31
+ </p>
32
+
33
+
34
+ <%= link_to 'Edit', edit_cvterm_path(@cvterm) %> |
35
+ <%= link_to 'Back', cvterms_path %>
@@ -0,0 +1,45 @@
1
+ <%= form_for(@stock) do |f| %>
2
+ <% if @stock.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@stock.errors.count, "error") %> prohibited this stock from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @stock.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :type_id %><br />
16
+ <%= f.number_field :type_id %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :name %><br />
20
+ <%= f.text_field :name %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :uniquename %><br />
24
+ <%= f.text_area :uniquename %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :description %><br />
28
+ <%= f.text_area :description %>
29
+ </div>
30
+ <div class="field">
31
+ <%= f.label :organism_id %><br />
32
+ <%= f.number_field :organism_id %>
33
+ </div>
34
+ <div class="field">
35
+ <%= f.label :dbxref_id %><br />
36
+ <%= f.number_field :dbxref_id %>
37
+ </div>
38
+ <div class="field">
39
+ <%= f.label :is_obsolete %><br />
40
+ <%= f.check_box :is_obsolete %>
41
+ </div>
42
+ <div class="actions">
43
+ <%= f.submit %>
44
+ </div>
45
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing stock</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @stock %> |
6
+ <%= link_to 'Back', stocks_path %>
@@ -0,0 +1,35 @@
1
+ <h1>Listing stocks</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Type</th>
6
+ <th>Name</th>
7
+ <th>Uniquename</th>
8
+ <th>Description</th>
9
+ <th>Organism</th>
10
+ <th>Dbxref</th>
11
+ <th>Is obsolete</th>
12
+ <th></th>
13
+ <th></th>
14
+ <th></th>
15
+ </tr>
16
+
17
+ <% @stocks.each do |stock| %>
18
+ <tr>
19
+ <td><%= stock.type_id %></td>
20
+ <td><%= stock.name %></td>
21
+ <td><%= stock.uniquename %></td>
22
+ <td><%= stock.description %></td>
23
+ <td><%= stock.organism_id %></td>
24
+ <td><%= stock.dbxref_id %></td>
25
+ <td><%= stock.is_obsolete %></td>
26
+ <td><%= link_to 'Show', stock %></td>
27
+ <td><%= link_to 'Edit', edit_stock_path(stock) %></td>
28
+ <td><%= link_to 'Destroy', stock, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
29
+ </tr>
30
+ <% end %>
31
+ </table>
32
+
33
+ <br />
34
+
35
+ <%= link_to 'New Stock', new_stock_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New stock</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', stocks_path %>
@@ -0,0 +1,40 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Type:</b>
5
+ <%= @stock.type_id %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Name:</b>
10
+ <%= @stock.name %>
11
+ </p>
12
+
13
+ <p>
14
+ <b>Uniquename:</b>
15
+ <%= @stock.uniquename %>
16
+ </p>
17
+
18
+ <p>
19
+ <b>Description:</b>
20
+ <%= @stock.description %>
21
+ </p>
22
+
23
+ <p>
24
+ <b>Organism:</b>
25
+ <%= @stock.organism_id %>
26
+ </p>
27
+
28
+ <p>
29
+ <b>Dbxref:</b>
30
+ <%= @stock.dbxref_id %>
31
+ </p>
32
+
33
+ <p>
34
+ <b>Is obsolete:</b>
35
+ <%= @stock.is_obsolete %>
36
+ </p>
37
+
38
+
39
+ <%= link_to 'Edit', edit_stock_path(@stock) %> |
40
+ <%= link_to 'Back', stocks_path %>
metadata ADDED
@@ -0,0 +1,105 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rorchado
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.5
5
+ platform: ruby
6
+ authors:
7
+ - John Marountas
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-08-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 3.2.13
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 3.2.13
27
+ - !ruby/object:Gem::Dependency
28
+ name: hpricot
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0.8'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0.8'
41
+ description: With this gem you can create all the models and controllers to handle
42
+ the data for the Chado DB schema inside a RoR application.
43
+ email:
44
+ - unclearbit@gmail.com
45
+ executables: []
46
+ extensions: []
47
+ extra_rdoc_files: []
48
+ files:
49
+ - lib/rails/generators/rorchado/USAGE
50
+ - lib/rails/generators/rorchado/rorchado_generator.rb
51
+ - lib/rails/generators/rorchado/templates/controllers/contact_controller.rb
52
+ - lib/rails/generators/rorchado/templates/controllers/contact_controller.rb~
53
+ - lib/rails/generators/rorchado/templates/controllers/cv_controller.rb
54
+ - lib/rails/generators/rorchado/templates/controllers/cv_controller.rb~
55
+ - lib/rails/generators/rorchado/templates/controllers/cvterm_controller.rb
56
+ - lib/rails/generators/rorchado/templates/controllers/cvterm_controller.rb~
57
+ - lib/rails/generators/rorchado/templates/controllers/stock_controller.rb
58
+ - lib/rails/generators/rorchado/templates/db_schemas/chado_schema.xml
59
+ - lib/rails/generators/rorchado/templates/migrations/generic_migration_create.erb
60
+ - lib/rails/generators/rorchado/templates/models/generic_model.erb
61
+ - lib/rails/generators/rorchado/templates/views/contact/_form.html.erb
62
+ - lib/rails/generators/rorchado/templates/views/contact/edit.html.erb
63
+ - lib/rails/generators/rorchado/templates/views/contact/index.html.erb
64
+ - lib/rails/generators/rorchado/templates/views/contact/new.html.erb
65
+ - lib/rails/generators/rorchado/templates/views/contact/show.html.erb
66
+ - lib/rails/generators/rorchado/templates/views/cv/_form.html.erb
67
+ - lib/rails/generators/rorchado/templates/views/cv/edit.html.erb
68
+ - lib/rails/generators/rorchado/templates/views/cv/index.html.erb
69
+ - lib/rails/generators/rorchado/templates/views/cv/new.html.erb
70
+ - lib/rails/generators/rorchado/templates/views/cv/show.html.erb
71
+ - lib/rails/generators/rorchado/templates/views/cvterm/_form.html.erb
72
+ - lib/rails/generators/rorchado/templates/views/cvterm/edit.html.erb
73
+ - lib/rails/generators/rorchado/templates/views/cvterm/index.html.erb
74
+ - lib/rails/generators/rorchado/templates/views/cvterm/new.html.erb
75
+ - lib/rails/generators/rorchado/templates/views/cvterm/show.html.erb
76
+ - lib/rails/generators/rorchado/templates/views/stock/_form.html.erb
77
+ - lib/rails/generators/rorchado/templates/views/stock/edit.html.erb
78
+ - lib/rails/generators/rorchado/templates/views/stock/index.html.erb
79
+ - lib/rails/generators/rorchado/templates/views/stock/new.html.erb
80
+ - lib/rails/generators/rorchado/templates/views/stock/show.html.erb
81
+ homepage: https://www.elance.com/s/safebits/10183/
82
+ licenses:
83
+ - GPL-3.0
84
+ metadata: {}
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ required_rubygems_version: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ requirements: []
100
+ rubyforge_project:
101
+ rubygems_version: 2.5.1
102
+ signing_key:
103
+ specification_version: 4
104
+ summary: A RoR implementation of the Chado Schema.
105
+ test_files: []