diff --git a/web/app/assets/javascripts/application.js b/web/app/assets/javascripts/application.js index a245878..d13bc15 100644 --- a/web/app/assets/javascripts/application.js +++ b/web/app/assets/javascripts/application.js @@ -13,6 +13,5 @@ //= require jquery //= require jquery_ujs //= require turbolinks -//= require_tree . //= require active_scaffold //= require bootstrap-sprockets diff --git a/web/app/assets/javascripts/template_select_form.js b/web/app/assets/javascripts/template_select_form.js new file mode 100644 index 0000000..5ad245b --- /dev/null +++ b/web/app/assets/javascripts/template_select_form.js @@ -0,0 +1,7 @@ +$(document).ready(function() { + $(".template-selection").click( function(event) { + var templateId = event.target.id.match(/\d/g).join(""); + $("#template_id").val(templateId); + $("#create_from_template_form").submit(); + }); +}); diff --git a/web/app/assets/stylesheets/application.css.scss b/web/app/assets/stylesheets/application.css.scss index 52fe79b..c597c83 100644 --- a/web/app/assets/stylesheets/application.css.scss +++ b/web/app/assets/stylesheets/application.css.scss @@ -18,12 +18,48 @@ color: green; } .server-thumbnail { - margin: 15px; + padding: 15px; cursor: pointer; + } + +.server-icon:hover { + border-style: solid; + border-width: 1px; + border-color: gray; +} + +.server-icon { + border-style: none; + border-width: 0px; +} + .server-name { margin-top: 5px; text-transform: uppercase; font-size: 16px !important; text-align: center; + +} + +.template-description { + vertical-align: middle; +} + +.template-selection { + cursor: pointer; + border-style: none; + border-width: 0px; +} + +.template-selection:hover { + cursor: pointer; + border-style: solid; + border-width: 1px; + border-color: gray; +} + +body { + margin-right: 5px; + margin-left: 5px; } diff --git a/web/app/controllers/configuration_files_controller.rb b/web/app/controllers/configuration_files_controller.rb new file mode 100644 index 0000000..5b052b1 --- /dev/null +++ b/web/app/controllers/configuration_files_controller.rb @@ -0,0 +1,16 @@ +class ConfigurationFilesController < ApplicationController + before_filter :selected_server, only: [:new, :edit] + + active_scaffold :"configuration_file" do |conf| + conf.columns[:file_type].form_ui = :select + end + + def selected_server + @server = Server.find(params[:server_id]) + @templates = ConfigurationTemplate.order(:name).all + end + + def create_from_template + template = ConfigurationTemplate.find(params[:template_id]) + end +end diff --git a/web/app/controllers/configuration_templates_controller.rb b/web/app/controllers/configuration_templates_controller.rb new file mode 100644 index 0000000..70d1be2 --- /dev/null +++ b/web/app/controllers/configuration_templates_controller.rb @@ -0,0 +1,4 @@ +class ConfigurationTemplatesController < ApplicationController + active_scaffold :"configuration_template" do |conf| + end +end diff --git a/web/app/controllers/file_types_controller.rb b/web/app/controllers/file_types_controller.rb new file mode 100644 index 0000000..a71d942 --- /dev/null +++ b/web/app/controllers/file_types_controller.rb @@ -0,0 +1,4 @@ +class FileTypesController < ApplicationController + active_scaffold :"file_type" do |conf| + end +end diff --git a/web/app/controllers/file_versions_controller.rb b/web/app/controllers/file_versions_controller.rb new file mode 100644 index 0000000..5ffcb7f --- /dev/null +++ b/web/app/controllers/file_versions_controller.rb @@ -0,0 +1,4 @@ +class FileVersionsController < ApplicationController + active_scaffold :"file_version" do |conf| + end +end diff --git a/web/app/helpers/configuration_files_helper.rb b/web/app/helpers/configuration_files_helper.rb new file mode 100644 index 0000000..352f74f --- /dev/null +++ b/web/app/helpers/configuration_files_helper.rb @@ -0,0 +1,2 @@ +module ConfigurationFilesHelper +end \ No newline at end of file diff --git a/web/app/helpers/configuration_templates_helper.rb b/web/app/helpers/configuration_templates_helper.rb new file mode 100644 index 0000000..1b75c17 --- /dev/null +++ b/web/app/helpers/configuration_templates_helper.rb @@ -0,0 +1,2 @@ +module ConfigurationTemplatesHelper +end \ No newline at end of file diff --git a/web/app/helpers/file_types_helper.rb b/web/app/helpers/file_types_helper.rb new file mode 100644 index 0000000..6c5eef5 --- /dev/null +++ b/web/app/helpers/file_types_helper.rb @@ -0,0 +1,2 @@ +module FileTypesHelper +end \ No newline at end of file diff --git a/web/app/helpers/file_versions_helper.rb b/web/app/helpers/file_versions_helper.rb new file mode 100644 index 0000000..ac99757 --- /dev/null +++ b/web/app/helpers/file_versions_helper.rb @@ -0,0 +1,2 @@ +module FileVersionsHelper +end \ No newline at end of file diff --git a/web/app/models/concerns/iconizable.rb b/web/app/models/concerns/iconizable.rb new file mode 100644 index 0000000..1b20312 --- /dev/null +++ b/web/app/models/concerns/iconizable.rb @@ -0,0 +1,5 @@ +module Iconizable + def safe_icon + icon or 'chub.png' + end +end diff --git a/web/app/models/configuration_file.rb b/web/app/models/configuration_file.rb new file mode 100644 index 0000000..dc0804d --- /dev/null +++ b/web/app/models/configuration_file.rb @@ -0,0 +1,5 @@ +class ConfigurationFile < ActiveRecord::Base + belongs_to :server + belongs_to :file_type + has_many :file_versions +end diff --git a/web/app/models/configuration_template.rb b/web/app/models/configuration_template.rb new file mode 100644 index 0000000..bc0f818 --- /dev/null +++ b/web/app/models/configuration_template.rb @@ -0,0 +1,6 @@ +class ConfigurationTemplate < ActiveRecord::Base + belongs_to :operating_system + belongs_to :file_type + + include Iconizable +end diff --git a/web/app/models/file_type.rb b/web/app/models/file_type.rb new file mode 100644 index 0000000..2366c29 --- /dev/null +++ b/web/app/models/file_type.rb @@ -0,0 +1,3 @@ +class FileType < ActiveRecord::Base + has_many :configuration_files +end diff --git a/web/app/models/file_version.rb b/web/app/models/file_version.rb new file mode 100644 index 0000000..e68ca8f --- /dev/null +++ b/web/app/models/file_version.rb @@ -0,0 +1,3 @@ +class FileVersion < ActiveRecord::Base + belongs_to :configuration_file +end diff --git a/web/app/models/operating_system.rb b/web/app/models/operating_system.rb index f034e25..62e1ed8 100644 --- a/web/app/models/operating_system.rb +++ b/web/app/models/operating_system.rb @@ -1,3 +1,5 @@ class OperatingSystem < ActiveRecord::Base has_many :servers + has_many :configuration_templates + include Iconizable end diff --git a/web/app/models/server.rb b/web/app/models/server.rb index 6733cad..58a7424 100644 --- a/web/app/models/server.rb +++ b/web/app/models/server.rb @@ -1,8 +1,13 @@ class Server < ActiveRecord::Base belongs_to :operating_system before_create :generate_hash + has_many :configuration_files def generate_hash self.namehash = SecureRandom.hex end + + def to_s + "#{name} - #{namehash}" + end end diff --git a/web/app/views/configuration_files/create.html.erb b/web/app/views/configuration_files/create.html.erb new file mode 100644 index 0000000..56604f0 --- /dev/null +++ b/web/app/views/configuration_files/create.html.erb @@ -0,0 +1,33 @@ +<% content_for :javascript_includes do %> + <%= javascript_include_tag "template_select_form.js" %> +<% end %> + +
+

Create New File

+
+ +
+

for <%= @server %>

+
+ + +<% @templates.each do |template| %> +
+
+
+ <%= image_tag(template.safe_icon, size: '128', class:"img-responsive" ) %> +
+

<%= template.name %>

+
+
+
+ +
+ <%= template.description %> +
+
+<% end %> + +<%= form_tag(create_from_template_configuration_files_url, method: :post, id: "create_from_template_form") do %> + <%= hidden_field_tag('template_id','', id: 'template_id') %> +<% end %> diff --git a/web/app/views/configuration_files/edit.html.erb b/web/app/views/configuration_files/edit.html.erb new file mode 100644 index 0000000..15f23ad --- /dev/null +++ b/web/app/views/configuration_files/edit.html.erb @@ -0,0 +1,12 @@ +
+ +
+ + +
+
+
+ <%= @record.content %> +
+
+
diff --git a/web/app/views/layouts/application.html.erb b/web/app/views/layouts/application.html.erb index aca93f4..910626b 100644 --- a/web/app/views/layouts/application.html.erb +++ b/web/app/views/layouts/application.html.erb @@ -4,6 +4,7 @@ Confighub <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> + <%= yield :javascript_includes %> <%= csrf_meta_tags %> diff --git a/web/app/views/servers/list.html.erb b/web/app/views/servers/list.html.erb index e019a2b..7a385d7 100644 --- a/web/app/views/servers/list.html.erb +++ b/web/app/views/servers/list.html.erb @@ -1,23 +1,26 @@
-
+

Servers

- <%= link_to(new_server_path) do %> - + <%= button_to(new_server_path, method: :get, class: "btn btn-default pull-right") do %> + Add Server <% end %>
<% @page.items.each do |server| %> -
+
+ <%= link_to(server_path(server)) do %>
<%= image_tag('ubuntu.png', size: '128', class:"img-responsive" ) %> -
+

<%= server.name %>

+ <% end %>
+

<% end %>
diff --git a/web/app/views/servers/show.html.erb b/web/app/views/servers/show.html.erb new file mode 100644 index 0000000..7a9124c --- /dev/null +++ b/web/app/views/servers/show.html.erb @@ -0,0 +1,30 @@ +
+
+

<%= @record.name %>

+
<%= @record.namehash %> + - + <%= @record.operating_system.name %>
+
+
+
+
+
+ <% if @record.configuration_files.blank? %> +
+

There are no configuration files from this server in CHUB. You can create file now and pull it to the server later:

+ +

<%= button_to(new_configuration_file_path, method: :get, params: { server_id: @record.id}, class: "btn btn-success") do %> + Create New Configuration File + <% end %>

+

+ +

Or you can initialize server with chub and upload the existing files from server by pasting this into your server's terminal:

+ + <% command = "sudo wget -O /usr/local/bin/chub http://chub.saburly.com/chub && sudo chub init #{@record.namehash}" %> + +

<%= text_field_tag 'command', command, readonly: true, class: 'form-control-sm', size: command.length %>

+
+ + <% end %> + +
diff --git a/web/config/initializers/assets.rb b/web/config/initializers/assets.rb index e8b03f6..ac54a58 100644 --- a/web/config/initializers/assets.rb +++ b/web/config/initializers/assets.rb @@ -10,3 +10,4 @@ Rails.application.config.assets.version = '1.0' # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. # Rails.application.config.assets.precompile += %w( search.js ) Rails.application.config.assets.precompile += %w( active_scaffold/indicator.gif ) +Rails.application.config.assets.precompile += %w( template_select_form.js ) diff --git a/web/config/routes.rb b/web/config/routes.rb index 83441d0..b62b431 100644 --- a/web/config/routes.rb +++ b/web/config/routes.rb @@ -1,4 +1,13 @@ Rails.application.routes.draw do + resources :configuration_templates do as_routes end + resources :file_versions do as_routes end + resources :file_types do as_routes end + resources :configuration_files do + as_routes + collection do + post 'create_from_template' + end + end resources :operating_systems do as_routes end resources :servers do as_routes end # The priority is based upon order of creation: first created -> highest priority. diff --git a/web/db/migrate/20160220121556_create_configuration_files.rb b/web/db/migrate/20160220121556_create_configuration_files.rb new file mode 100644 index 0000000..771df5b --- /dev/null +++ b/web/db/migrate/20160220121556_create_configuration_files.rb @@ -0,0 +1,10 @@ +class CreateConfigurationFiles < ActiveRecord::Migration + def change + create_table :configuration_files do |t| + t.string :namehash, null: false + t.integer :server_id, null: false + t.integer :file_type_id, null: false + t.timestamps null: false + end + end +end diff --git a/web/db/migrate/20160220123353_create_file_types.rb b/web/db/migrate/20160220123353_create_file_types.rb new file mode 100644 index 0000000..81a8b22 --- /dev/null +++ b/web/db/migrate/20160220123353_create_file_types.rb @@ -0,0 +1,8 @@ +class CreateFileTypes < ActiveRecord::Migration + def change + create_table :file_types do |t| + t.string :name, null: false + t.timestamps null: false + end + end +end diff --git a/web/db/migrate/20160220125727_create_file_versions.rb b/web/db/migrate/20160220125727_create_file_versions.rb new file mode 100644 index 0000000..d14a47e --- /dev/null +++ b/web/db/migrate/20160220125727_create_file_versions.rb @@ -0,0 +1,11 @@ +class CreateFileVersions < ActiveRecord::Migration + def change + create_table :file_versions do |t| + t.integer :number, null: false, default: 1 + t.boolean :pulled, null: false, default: false + t.integer :configuration_file_id, null: false + t.binary :content, :limit => 10.megabyte + t.timestamps null: false + end + end +end diff --git a/web/db/migrate/20160221052623_create_configuration_templates.rb b/web/db/migrate/20160221052623_create_configuration_templates.rb new file mode 100644 index 0000000..ebbfec5 --- /dev/null +++ b/web/db/migrate/20160221052623_create_configuration_templates.rb @@ -0,0 +1,11 @@ +class CreateConfigurationTemplates < ActiveRecord::Migration + def change + create_table :configuration_templates do |t| + t.string :name, null: false + t.integer :operating_system_id, null: false + t.text :content, null: false + t.integer :file_type_id, null: false + t.timestamps null: false + end + end +end diff --git a/web/db/migrate/20160221055750_add_configuration_template_id_to_configuration_file.rb b/web/db/migrate/20160221055750_add_configuration_template_id_to_configuration_file.rb new file mode 100644 index 0000000..57db7dc --- /dev/null +++ b/web/db/migrate/20160221055750_add_configuration_template_id_to_configuration_file.rb @@ -0,0 +1,5 @@ +class AddConfigurationTemplateIdToConfigurationFile < ActiveRecord::Migration + def change + add_column :configuration_files, :configuration_template_id, :integer + end +end diff --git a/web/db/migrate/20160221061040_add_icon_to_configuration_template.rb b/web/db/migrate/20160221061040_add_icon_to_configuration_template.rb new file mode 100644 index 0000000..34b4591 --- /dev/null +++ b/web/db/migrate/20160221061040_add_icon_to_configuration_template.rb @@ -0,0 +1,6 @@ +class AddIconToConfigurationTemplate < ActiveRecord::Migration + def change + add_column :configuration_templates, :icon, :string + add_column :operating_systems, :icon, :string + end +end diff --git a/web/db/migrate/20160221062053_add_description_to_configuration_template.rb b/web/db/migrate/20160221062053_add_description_to_configuration_template.rb new file mode 100644 index 0000000..e018252 --- /dev/null +++ b/web/db/migrate/20160221062053_add_description_to_configuration_template.rb @@ -0,0 +1,5 @@ +class AddDescriptionToConfigurationTemplate < ActiveRecord::Migration + def change + add_column :configuration_templates, :description, :text, null: false, default: "Empty description" + end +end diff --git a/web/db/migrate/20160221101719_add_file_path_to_configuration_template.rb b/web/db/migrate/20160221101719_add_file_path_to_configuration_template.rb new file mode 100644 index 0000000..b5d2ec0 --- /dev/null +++ b/web/db/migrate/20160221101719_add_file_path_to_configuration_template.rb @@ -0,0 +1,5 @@ +class AddFilePathToConfigurationTemplate < ActiveRecord::Migration + def change + add_column :configuration_templates, :file_path, :string, null: false, default: '/tmp/configuration.txt' + end +end diff --git a/web/db/schema.rb b/web/db/schema.rb index f1ca930..79e84c2 100644 --- a/web/db/schema.rb +++ b/web/db/schema.rb @@ -11,20 +11,59 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20_160_220_091_225) do - create_table 'operating_systems', force: :cascade do |t| - t.string 'name', null: false - t.datetime 'created_at', null: false - t.datetime 'updated_at', null: false +ActiveRecord::Schema.define(version: 20160221101719) do + + create_table "configuration_files", force: :cascade do |t| + t.string "namehash", null: false + t.integer "server_id", null: false + t.integer "file_type_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.integer "configuration_template_id" end - create_table 'servers', force: :cascade do |t| - t.string 'name', null: false - t.string 'namehash', null: false - t.integer 'operating_system_id', null: false - t.boolean 'initialized', default: false, null: false - t.string 'hostname' - t.datetime 'created_at', null: false - t.datetime 'updated_at', null: false + create_table "configuration_templates", force: :cascade do |t| + t.string "name", null: false + t.integer "operating_system_id", null: false + t.text "content", null: false + t.integer "file_type_id", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "icon" + t.text "description", default: "Empty description", null: false + t.string "file_path", default: "/tmp/configuration.txt", null: false end + + create_table "file_types", force: :cascade do |t| + t.string "name", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "file_versions", force: :cascade do |t| + t.integer "number", default: 1, null: false + t.boolean "pulled", default: false, null: false + t.integer "configuration_file_id", null: false + t.binary "content" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "operating_systems", force: :cascade do |t| + t.string "name", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "icon" + end + + create_table "servers", force: :cascade do |t| + t.string "name", null: false + t.string "namehash", null: false + t.integer "operating_system_id", null: false + t.boolean "initialized", default: false, null: false + t.string "hostname" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + end diff --git a/web/test/controllers/configuration_files_controller_test.rb b/web/test/controllers/configuration_files_controller_test.rb new file mode 100644 index 0000000..d2363df --- /dev/null +++ b/web/test/controllers/configuration_files_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class ConfigurationFilesControllerTest < ActionController::TestCase + setup do + @configuration_file = configuration_files(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:configuration_files) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create configuration_file" do + assert_difference('ConfigurationFile.count') do + post :create, configuration_file: { } + end + + assert_redirected_to configuration_file_path(assigns(:configuration_file)) + end + + test "should show configuration_file" do + get :show, id: @configuration_file + assert_response :success + end + + test "should get edit" do + get :edit, id: @configuration_file + assert_response :success + end + + test "should update configuration_file" do + patch :update, id: @configuration_file, configuration_file: { } + assert_redirected_to configuration_file_path(assigns(:configuration_file)) + end + + test "should destroy configuration_file" do + assert_difference('ConfigurationFile.count', -1) do + delete :destroy, id: @configuration_file + end + + assert_redirected_to configuration_files_path + end +end diff --git a/web/test/controllers/configuration_templates_controller_test.rb b/web/test/controllers/configuration_templates_controller_test.rb new file mode 100644 index 0000000..46f239c --- /dev/null +++ b/web/test/controllers/configuration_templates_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class ConfigurationTemplatesControllerTest < ActionController::TestCase + setup do + @configuration_template = configuration_templates(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:configuration_templates) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create configuration_template" do + assert_difference('ConfigurationTemplate.count') do + post :create, configuration_template: { } + end + + assert_redirected_to configuration_template_path(assigns(:configuration_template)) + end + + test "should show configuration_template" do + get :show, id: @configuration_template + assert_response :success + end + + test "should get edit" do + get :edit, id: @configuration_template + assert_response :success + end + + test "should update configuration_template" do + patch :update, id: @configuration_template, configuration_template: { } + assert_redirected_to configuration_template_path(assigns(:configuration_template)) + end + + test "should destroy configuration_template" do + assert_difference('ConfigurationTemplate.count', -1) do + delete :destroy, id: @configuration_template + end + + assert_redirected_to configuration_templates_path + end +end diff --git a/web/test/controllers/file_types_controller_test.rb b/web/test/controllers/file_types_controller_test.rb new file mode 100644 index 0000000..00b0a78 --- /dev/null +++ b/web/test/controllers/file_types_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class FileTypesControllerTest < ActionController::TestCase + setup do + @file_type = file_types(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:file_types) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create file_type" do + assert_difference('FileType.count') do + post :create, file_type: { } + end + + assert_redirected_to file_type_path(assigns(:file_type)) + end + + test "should show file_type" do + get :show, id: @file_type + assert_response :success + end + + test "should get edit" do + get :edit, id: @file_type + assert_response :success + end + + test "should update file_type" do + patch :update, id: @file_type, file_type: { } + assert_redirected_to file_type_path(assigns(:file_type)) + end + + test "should destroy file_type" do + assert_difference('FileType.count', -1) do + delete :destroy, id: @file_type + end + + assert_redirected_to file_types_path + end +end diff --git a/web/test/controllers/file_versions_controller_test.rb b/web/test/controllers/file_versions_controller_test.rb new file mode 100644 index 0000000..47bc760 --- /dev/null +++ b/web/test/controllers/file_versions_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class FileVersionsControllerTest < ActionController::TestCase + setup do + @file_version = file_versions(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:file_versions) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create file_version" do + assert_difference('FileVersion.count') do + post :create, file_version: { } + end + + assert_redirected_to file_version_path(assigns(:file_version)) + end + + test "should show file_version" do + get :show, id: @file_version + assert_response :success + end + + test "should get edit" do + get :edit, id: @file_version + assert_response :success + end + + test "should update file_version" do + patch :update, id: @file_version, file_version: { } + assert_redirected_to file_version_path(assigns(:file_version)) + end + + test "should destroy file_version" do + assert_difference('FileVersion.count', -1) do + delete :destroy, id: @file_version + end + + assert_redirected_to file_versions_path + end +end diff --git a/web/test/fixtures/configuration_files.yml b/web/test/fixtures/configuration_files.yml new file mode 100644 index 0000000..937a0c0 --- /dev/null +++ b/web/test/fixtures/configuration_files.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/web/test/fixtures/configuration_templates.yml b/web/test/fixtures/configuration_templates.yml new file mode 100644 index 0000000..937a0c0 --- /dev/null +++ b/web/test/fixtures/configuration_templates.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/web/test/fixtures/file_types.yml b/web/test/fixtures/file_types.yml new file mode 100644 index 0000000..937a0c0 --- /dev/null +++ b/web/test/fixtures/file_types.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/web/test/fixtures/file_versions.yml b/web/test/fixtures/file_versions.yml new file mode 100644 index 0000000..937a0c0 --- /dev/null +++ b/web/test/fixtures/file_versions.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +# This model initially had no columns defined. If you add columns to the +# model remove the '{}' from the fixture names and add the columns immediately +# below each fixture, per the syntax in the comments below +# +one: {} +# column: value +# +two: {} +# column: value diff --git a/web/test/models/configuration_file_test.rb b/web/test/models/configuration_file_test.rb new file mode 100644 index 0000000..b2e618a --- /dev/null +++ b/web/test/models/configuration_file_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ConfigurationFileTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/web/test/models/configuration_template_test.rb b/web/test/models/configuration_template_test.rb new file mode 100644 index 0000000..ebcb4db --- /dev/null +++ b/web/test/models/configuration_template_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ConfigurationTemplateTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/web/test/models/file_type_test.rb b/web/test/models/file_type_test.rb new file mode 100644 index 0000000..7aa35b7 --- /dev/null +++ b/web/test/models/file_type_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class FileTypeTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/web/test/models/file_version_test.rb b/web/test/models/file_version_test.rb new file mode 100644 index 0000000..ce0e0a8 --- /dev/null +++ b/web/test/models/file_version_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class FileVersionTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end