Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: tpo/webcdist
base: ef1441c205
...
head fork: tpo/webcdist
compare: 003c968606
  • 7 commits
  • 96 files changed
  • 0 commit comments
  • 1 contributor
Showing with 1,893 additions and 1 deletion.
  1. +15 −0 .gitignore
  2. +3 −0  app/assets/javascripts/cdist_configurations.js.coffee
  3. +3 −0  app/assets/javascripts/cdist_objects.js.coffee
  4. +3 −0  app/assets/javascripts/cdist_types.js.coffee
  5. +3 −0  app/assets/javascripts/hosts.js.coffee
  6. +3 −0  app/assets/javascripts/parameters.js.coffee
  7. +3 −0  app/assets/javascripts/tags.js.coffee
  8. +3 −0  app/assets/stylesheets/cdist_configurations.css.scss
  9. +3 −0  app/assets/stylesheets/cdist_objects.css.scss
  10. +3 −0  app/assets/stylesheets/cdist_types.css.scss
  11. +3 −0  app/assets/stylesheets/hosts.css.scss
  12. +3 −0  app/assets/stylesheets/parameters.css.scss
  13. +69 −0 app/assets/stylesheets/scaffolds.css.scss
  14. +3 −0  app/assets/stylesheets/tags.css.scss
  15. +83 −0 app/controllers/cdist_configurations_controller.rb
  16. +83 −0 app/controllers/cdist_objects_controller.rb
  17. +83 −0 app/controllers/cdist_types_controller.rb
  18. +83 −0 app/controllers/hosts_controller.rb
  19. +83 −0 app/controllers/parameters_controller.rb
  20. +83 −0 app/controllers/tags_controller.rb
  21. +2 −0  app/helpers/cdist_configurations_helper.rb
  22. +2 −0  app/helpers/cdist_objects_helper.rb
  23. +2 −0  app/helpers/cdist_types_helper.rb
  24. +2 −0  app/helpers/hosts_helper.rb
  25. +2 −0  app/helpers/parameters_helper.rb
  26. +2 −0  app/helpers/tags_helper.rb
  27. +3 −0  app/models/cdist_configuration.rb
  28. +3 −0  app/models/cdist_object.rb
  29. +3 −0  app/models/cdist_type.rb
  30. +3 −0  app/models/host.rb
  31. +3 −0  app/models/parameter.rb
  32. +3 −0  app/models/tag.rb
  33. +25 −0 app/views/cdist_configurations/_form.html.erb
  34. +6 −0 app/views/cdist_configurations/edit.html.erb
  35. +24 −0 app/views/cdist_configurations/index.html.erb
  36. +5 −0 app/views/cdist_configurations/new.html.erb
  37. +15 −0 app/views/cdist_configurations/show.html.erb
  38. +21 −0 app/views/cdist_objects/_form.html.erb
  39. +6 −0 app/views/cdist_objects/edit.html.erb
  40. +23 −0 app/views/cdist_objects/index.html.erb
  41. +5 −0 app/views/cdist_objects/new.html.erb
  42. +10 −0 app/views/cdist_objects/show.html.erb
  43. +29 −0 app/views/cdist_types/_form.html.erb
  44. +6 −0 app/views/cdist_types/edit.html.erb
  45. +27 −0 app/views/cdist_types/index.html.erb
  46. +5 −0 app/views/cdist_types/new.html.erb
  47. +20 −0 app/views/cdist_types/show.html.erb
  48. +25 −0 app/views/hosts/_form.html.erb
  49. +6 −0 app/views/hosts/edit.html.erb
  50. +25 −0 app/views/hosts/index.html.erb
  51. +5 −0 app/views/hosts/new.html.erb
  52. +15 −0 app/views/hosts/show.html.erb
  53. +25 −0 app/views/parameters/_form.html.erb
  54. +6 −0 app/views/parameters/edit.html.erb
  55. +25 −0 app/views/parameters/index.html.erb
  56. +5 −0 app/views/parameters/new.html.erb
  57. +15 −0 app/views/parameters/show.html.erb
  58. +21 −0 app/views/tags/_form.html.erb
  59. +6 −0 app/views/tags/edit.html.erb
  60. +23 −0 app/views/tags/index.html.erb
  61. +5 −0 app/views/tags/new.html.erb
  62. +10 −0 app/views/tags/show.html.erb
  63. +18 −0 config/routes.rb
  64. +10 −0 db/migrate/20130530131812_create_hosts.rb
  65. +9 −0 db/migrate/20130530131955_create_tags.rb
  66. +10 −0 db/migrate/20130530132352_create_cdist_configurations.rb
  67. +9 −0 db/migrate/20130530143436_create_cdist_objects.rb
  68. +11 −0 db/migrate/20130530144922_create_cdist_types.rb
  69. +10 −0 db/migrate/20130530145159_create_parameters.rb
  70. +57 −0 db/schema.rb
  71. +14 −1 public/index.html
  72. +241 −0 public/index.html.orig
  73. +9 −0 test/fixtures/cdist_configurations.yml
  74. +7 −0 test/fixtures/cdist_objects.yml
  75. +11 −0 test/fixtures/cdist_types.yml
  76. +9 −0 test/fixtures/hosts.yml
  77. +9 −0 test/fixtures/parameters.yml
  78. +7 −0 test/fixtures/tags.yml
  79. +49 −0 test/functional/cdist_configurations_controller_test.rb
  80. +49 −0 test/functional/cdist_objects_controller_test.rb
  81. +49 −0 test/functional/cdist_types_controller_test.rb
  82. +49 −0 test/functional/hosts_controller_test.rb
  83. +49 −0 test/functional/parameters_controller_test.rb
  84. +49 −0 test/functional/tags_controller_test.rb
  85. +7 −0 test/unit/cdist_configuration_test.rb
  86. +7 −0 test/unit/cdist_object_test.rb
  87. +7 −0 test/unit/cdist_type_test.rb
  88. +4 −0 test/unit/helpers/cdist_configurations_helper_test.rb
  89. +4 −0 test/unit/helpers/cdist_objects_helper_test.rb
  90. +4 −0 test/unit/helpers/cdist_types_helper_test.rb
  91. +4 −0 test/unit/helpers/hosts_helper_test.rb
  92. +4 −0 test/unit/helpers/parameters_helper_test.rb
  93. +4 −0 test/unit/helpers/tags_helper_test.rb
  94. +7 −0 test/unit/host_test.rb
  95. +7 −0 test/unit/parameter_test.rb
  96. +7 −0 test/unit/tag_test.rb
View
15 .gitignore
@@ -0,0 +1,15 @@
+# See http://help.github.com/ignore-files/ for more about ignoring files.
+#
+# If you find yourself ignoring temporary files generated by your text editor
+# or operating system, you probably want to add a global ignore instead:
+# git config --global core.excludesfile ~/.gitignore_global
+
+# Ignore bundler config
+/.bundle
+
+# Ignore the default SQLite database.
+/db/*.sqlite3
+
+# Ignore all logfiles and tempfiles.
+/log/*.log
+/tmp
View
3  app/assets/javascripts/cdist_configurations.js.coffee
@@ -0,0 +1,3 @@
+# 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/
View
3  app/assets/javascripts/cdist_objects.js.coffee
@@ -0,0 +1,3 @@
+# 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/
View
3  app/assets/javascripts/cdist_types.js.coffee
@@ -0,0 +1,3 @@
+# 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/
View
3  app/assets/javascripts/hosts.js.coffee
@@ -0,0 +1,3 @@
+# 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/
View
3  app/assets/javascripts/parameters.js.coffee
@@ -0,0 +1,3 @@
+# 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/
View
3  app/assets/javascripts/tags.js.coffee
@@ -0,0 +1,3 @@
+# 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/
View
3  app/assets/stylesheets/cdist_configurations.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the cdist_configurations controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3  app/assets/stylesheets/cdist_objects.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the CdistObjects controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3  app/assets/stylesheets/cdist_types.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the CdistTypes controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3  app/assets/stylesheets/hosts.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the hosts controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
3  app/assets/stylesheets/parameters.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the parameters controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
69 app/assets/stylesheets/scaffolds.css.scss
@@ -0,0 +1,69 @@
+body {
+ background-color: #fff;
+ color: #333;
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+p, ol, ul, td {
+ font-family: verdana, arial, helvetica, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+
+pre {
+ background-color: #eee;
+ padding: 10px;
+ font-size: 11px;
+}
+
+a {
+ color: #000;
+ &:visited {
+ color: #666;
+ }
+ &:hover {
+ color: #fff;
+ background-color: #000;
+ }
+}
+
+div {
+ &.field, &.actions {
+ margin-bottom: 10px;
+ }
+}
+
+#notice {
+ color: green;
+}
+
+.field_with_errors {
+ padding: 2px;
+ background-color: red;
+ display: table;
+}
+
+#error_explanation {
+ width: 450px;
+ border: 2px solid red;
+ padding: 7px;
+ padding-bottom: 0;
+ margin-bottom: 20px;
+ background-color: #f0f0f0;
+ h2 {
+ text-align: left;
+ font-weight: bold;
+ padding: 5px 5px 5px 15px;
+ font-size: 12px;
+ margin: -7px;
+ margin-bottom: 0px;
+ background-color: #c00;
+ color: #fff;
+ }
+ ul li {
+ font-size: 12px;
+ list-style: square;
+ }
+}
View
3  app/assets/stylesheets/tags.css.scss
@@ -0,0 +1,3 @@
+// Place all the styles related to the tags controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
View
83 app/controllers/cdist_configurations_controller.rb
@@ -0,0 +1,83 @@
+class CdistConfigurationsController < ApplicationController
+ # GET /cdist_configurations
+ # GET /cdist_configurations.json
+ def index
+ @cdist_configurations = CdistConfiguration.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @cdist_configurations }
+ end
+ end
+
+ # GET /cdist_configurations/1
+ # GET /cdist_configurations/1.json
+ def show
+ @cdist_configuration = CdistConfiguration.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @cdist_configuration }
+ end
+ end
+
+ # GET /cdist_configurations/new
+ # GET /cdist_configurations/new.json
+ def new
+ @cdist_configuration = CdistConfiguration.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @cdist_configuration }
+ end
+ end
+
+ # GET /cdist_configurations/1/edit
+ def edit
+ @cdist_configuration = CdistConfiguration.find(params[:id])
+ end
+
+ # POST /cdist_configurations
+ # POST /cdist_configurations.json
+ def create
+ @cdist_configuration = CdistConfiguration.new(params[:cdist_configuration])
+
+ respond_to do |format|
+ if @cdist_configuration.save
+ format.html { redirect_to @cdist_configuration, notice: 'CdistConfiguration was successfully created.' }
+ format.json { render json: @cdist_configuration, status: :created, location: @cdist_configuration }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @cdist_configuration.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /cdist_configurations/1
+ # PUT /cdist_configurations/1.json
+ def update
+ @cdist_configuration = CdistConfiguration.find(params[:id])
+
+ respond_to do |format|
+ if @cdist_configuration.update_attributes(params[:cdist_configuration])
+ format.html { redirect_to @cdist_configuration, notice: 'CdistConfiguration was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @cdist_configuration.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /cdist_configurations/1
+ # DELETE /cdist_configurations/1.json
+ def destroy
+ @cdist_configuration = CdistConfiguration.find(params[:id])
+ @cdist_configuration.destroy
+
+ respond_to do |format|
+ format.html { redirect_to cdist_configurations_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 app/controllers/cdist_objects_controller.rb
@@ -0,0 +1,83 @@
+class CdistObjectsController < ApplicationController
+ # GET /cdist_objects
+ # GET /cdist_objects.json
+ def index
+ @cdist_objects = CdistObject.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @cdist_objects }
+ end
+ end
+
+ # GET /cdist_objects/1
+ # GET /cdist_objects/1.json
+ def show
+ @cdist_object = CdistObject.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @cdist_object }
+ end
+ end
+
+ # GET /cdist_objects/new
+ # GET /cdist_objects/new.json
+ def new
+ @cdist_object = CdistObject.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @cdist_object }
+ end
+ end
+
+ # GET /cdist_objects/1/edit
+ def edit
+ @cdist_object = CdistObject.find(params[:id])
+ end
+
+ # POST /cdist_objects
+ # POST /cdist_objects.json
+ def create
+ @cdist_object = CdistObject.new(params[:cdist_object])
+
+ respond_to do |format|
+ if @cdist_object.save
+ format.html { redirect_to @cdist_object, notice: 'Cdist object was successfully created.' }
+ format.json { render json: @cdist_object, status: :created, location: @cdist_object }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @cdist_object.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /cdist_objects/1
+ # PUT /cdist_objects/1.json
+ def update
+ @cdist_object = CdistObject.find(params[:id])
+
+ respond_to do |format|
+ if @cdist_object.update_attributes(params[:cdist_object])
+ format.html { redirect_to @cdist_object, notice: 'Cdist object was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @cdist_object.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /cdist_objects/1
+ # DELETE /cdist_objects/1.json
+ def destroy
+ @cdist_object = CdistObject.find(params[:id])
+ @cdist_object.destroy
+
+ respond_to do |format|
+ format.html { redirect_to cdist_objects_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 app/controllers/cdist_types_controller.rb
@@ -0,0 +1,83 @@
+class CdistTypesController < ApplicationController
+ # GET /cdist_types
+ # GET /cdist_types.json
+ def index
+ @cdist_types = CdistType.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @cdist_types }
+ end
+ end
+
+ # GET /cdist_types/1
+ # GET /cdist_types/1.json
+ def show
+ @cdist_type = CdistType.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @cdist_type }
+ end
+ end
+
+ # GET /cdist_types/new
+ # GET /cdist_types/new.json
+ def new
+ @cdist_type = CdistType.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @cdist_type }
+ end
+ end
+
+ # GET /cdist_types/1/edit
+ def edit
+ @cdist_type = CdistType.find(params[:id])
+ end
+
+ # POST /cdist_types
+ # POST /cdist_types.json
+ def create
+ @cdist_type = CdistType.new(params[:cdist_type])
+
+ respond_to do |format|
+ if @cdist_type.save
+ format.html { redirect_to @cdist_type, notice: 'Cdist type was successfully created.' }
+ format.json { render json: @cdist_type, status: :created, location: @cdist_type }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @cdist_type.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /cdist_types/1
+ # PUT /cdist_types/1.json
+ def update
+ @cdist_type = CdistType.find(params[:id])
+
+ respond_to do |format|
+ if @cdist_type.update_attributes(params[:cdist_type])
+ format.html { redirect_to @cdist_type, notice: 'Cdist type was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @cdist_type.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /cdist_types/1
+ # DELETE /cdist_types/1.json
+ def destroy
+ @cdist_type = CdistType.find(params[:id])
+ @cdist_type.destroy
+
+ respond_to do |format|
+ format.html { redirect_to cdist_types_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 app/controllers/hosts_controller.rb
@@ -0,0 +1,83 @@
+class HostsController < ApplicationController
+ # GET /hosts
+ # GET /hosts.json
+ def index
+ @hosts = Host.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @hosts }
+ end
+ end
+
+ # GET /hosts/1
+ # GET /hosts/1.json
+ def show
+ @host = Host.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @host }
+ end
+ end
+
+ # GET /hosts/new
+ # GET /hosts/new.json
+ def new
+ @host = Host.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @host }
+ end
+ end
+
+ # GET /hosts/1/edit
+ def edit
+ @host = Host.find(params[:id])
+ end
+
+ # POST /hosts
+ # POST /hosts.json
+ def create
+ @host = Host.new(params[:host])
+
+ respond_to do |format|
+ if @host.save
+ format.html { redirect_to @host, notice: 'Host was successfully created.' }
+ format.json { render json: @host, status: :created, location: @host }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @host.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /hosts/1
+ # PUT /hosts/1.json
+ def update
+ @host = Host.find(params[:id])
+
+ respond_to do |format|
+ if @host.update_attributes(params[:host])
+ format.html { redirect_to @host, notice: 'Host was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @host.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /hosts/1
+ # DELETE /hosts/1.json
+ def destroy
+ @host = Host.find(params[:id])
+ @host.destroy
+
+ respond_to do |format|
+ format.html { redirect_to hosts_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 app/controllers/parameters_controller.rb
@@ -0,0 +1,83 @@
+class ParametersController < ApplicationController
+ # GET /parameters
+ # GET /parameters.json
+ def index
+ @parameters = Parameter.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @parameters }
+ end
+ end
+
+ # GET /parameters/1
+ # GET /parameters/1.json
+ def show
+ @parameter = Parameter.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @parameter }
+ end
+ end
+
+ # GET /parameters/new
+ # GET /parameters/new.json
+ def new
+ @parameter = Parameter.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @parameter }
+ end
+ end
+
+ # GET /parameters/1/edit
+ def edit
+ @parameter = Parameter.find(params[:id])
+ end
+
+ # POST /parameters
+ # POST /parameters.json
+ def create
+ @parameter = Parameter.new(params[:parameter])
+
+ respond_to do |format|
+ if @parameter.save
+ format.html { redirect_to @parameter, notice: 'Parameter was successfully created.' }
+ format.json { render json: @parameter, status: :created, location: @parameter }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @parameter.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /parameters/1
+ # PUT /parameters/1.json
+ def update
+ @parameter = Parameter.find(params[:id])
+
+ respond_to do |format|
+ if @parameter.update_attributes(params[:parameter])
+ format.html { redirect_to @parameter, notice: 'Parameter was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @parameter.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /parameters/1
+ # DELETE /parameters/1.json
+ def destroy
+ @parameter = Parameter.find(params[:id])
+ @parameter.destroy
+
+ respond_to do |format|
+ format.html { redirect_to parameters_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
83 app/controllers/tags_controller.rb
@@ -0,0 +1,83 @@
+class TagsController < ApplicationController
+ # GET /tags
+ # GET /tags.json
+ def index
+ @tags = Tag.all
+
+ respond_to do |format|
+ format.html # index.html.erb
+ format.json { render json: @tags }
+ end
+ end
+
+ # GET /tags/1
+ # GET /tags/1.json
+ def show
+ @tag = Tag.find(params[:id])
+
+ respond_to do |format|
+ format.html # show.html.erb
+ format.json { render json: @tag }
+ end
+ end
+
+ # GET /tags/new
+ # GET /tags/new.json
+ def new
+ @tag = Tag.new
+
+ respond_to do |format|
+ format.html # new.html.erb
+ format.json { render json: @tag }
+ end
+ end
+
+ # GET /tags/1/edit
+ def edit
+ @tag = Tag.find(params[:id])
+ end
+
+ # POST /tags
+ # POST /tags.json
+ def create
+ @tag = Tag.new(params[:tag])
+
+ respond_to do |format|
+ if @tag.save
+ format.html { redirect_to @tag, notice: 'Tag was successfully created.' }
+ format.json { render json: @tag, status: :created, location: @tag }
+ else
+ format.html { render action: "new" }
+ format.json { render json: @tag.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # PUT /tags/1
+ # PUT /tags/1.json
+ def update
+ @tag = Tag.find(params[:id])
+
+ respond_to do |format|
+ if @tag.update_attributes(params[:tag])
+ format.html { redirect_to @tag, notice: 'Tag was successfully updated.' }
+ format.json { head :no_content }
+ else
+ format.html { render action: "edit" }
+ format.json { render json: @tag.errors, status: :unprocessable_entity }
+ end
+ end
+ end
+
+ # DELETE /tags/1
+ # DELETE /tags/1.json
+ def destroy
+ @tag = Tag.find(params[:id])
+ @tag.destroy
+
+ respond_to do |format|
+ format.html { redirect_to tags_url }
+ format.json { head :no_content }
+ end
+ end
+end
View
2  app/helpers/cdist_configurations_helper.rb
@@ -0,0 +1,2 @@
+module CdistConfigurationsHelper
+end
View
2  app/helpers/cdist_objects_helper.rb
@@ -0,0 +1,2 @@
+module CdistObjectsHelper
+end
View
2  app/helpers/cdist_types_helper.rb
@@ -0,0 +1,2 @@
+module CdistTypesHelper
+end
View
2  app/helpers/hosts_helper.rb
@@ -0,0 +1,2 @@
+module HostsHelper
+end
View
2  app/helpers/parameters_helper.rb
@@ -0,0 +1,2 @@
+module ParametersHelper
+end
View
2  app/helpers/tags_helper.rb
@@ -0,0 +1,2 @@
+module TagsHelper
+end
View
3  app/models/cdist_configuration.rb
@@ -0,0 +1,3 @@
+class CdistConfiguration < ActiveRecord::Base
+ attr_accessible :description, :name
+end
View
3  app/models/cdist_object.rb
@@ -0,0 +1,3 @@
+class CdistObject < ActiveRecord::Base
+ attr_accessible :cdist_type
+end
View
3  app/models/cdist_type.rb
@@ -0,0 +1,3 @@
+class CdistType < ActiveRecord::Base
+ attr_accessible :description, :name, :readme
+end
View
3  app/models/host.rb
@@ -0,0 +1,3 @@
+class Host < ActiveRecord::Base
+ attr_accessible :name, :ssh_port
+end
View
3  app/models/parameter.rb
@@ -0,0 +1,3 @@
+class Parameter < ActiveRecord::Base
+ attr_accessible :name, :type
+end
View
3  app/models/tag.rb
@@ -0,0 +1,3 @@
+class Tag < ActiveRecord::Base
+ attr_accessible :name
+end
View
25 app/views/cdist_configurations/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@cdist_configuration) do |f| %>
+ <% if @cdist_configuration.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@cdist_configuration.errors.count, "error") %> prohibited this cdist configuration from being saved:</h2>
+
+ <ul>
+ <% @cdist_configuration.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :name %><br />
+ <%= f.text_area :name %>
+ </div>
+ <div class="field">
+ <%= f.label :description %><br />
+ <%= f.text_area :description %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
6 app/views/cdist_configurations/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing cdist configuration</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @cdist_configuration %> |
+<%= link_to 'Back', cdist_configurations_path %>
View
24 app/views/cdist_configurations/index.html.erb
@@ -0,0 +1,24 @@
+<h1>Listing cdist configurations</h1>
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @cdist_configurations.each do |cdist_configuration| %>
+ <tr>
+ <td><%= cdist_configuration.name %></td>
+ <td><%= cdist_configuration.description %></td>
+ <td><%= link_to 'Show', cdist_configuration %></td>
+ <td><%= link_to 'Edit', edit_cdist_configuration_path(cdist_configuration) %></td>
+ <td><%= link_to 'Destroy', cdist_configuration, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New cdist configuration', new_cdist_configuration_path %>
View
5 app/views/cdist_configurations/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New cdist configuration</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', cdist_configurations_path %>
View
15 app/views/cdist_configurations/show.html.erb
@@ -0,0 +1,15 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>Name:</b>
+ <%= @cdist_configuration.name %>
+</p>
+
+<p>
+ <b>Description:</b>
+ <%= @cdist_configuration.description %>
+</p>
+
+
+<%= link_to 'Edit', edit_cdist_configuration_path(@cdist_configuration) %> |
+<%= link_to 'Back', cdist_configurations_path %>
View
21 app/views/cdist_objects/_form.html.erb
@@ -0,0 +1,21 @@
+<%= form_for(@cdist_object) do |f| %>
+ <% if @cdist_object.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@cdist_object.errors.count, "error") %> prohibited this cdist_object from being saved:</h2>
+
+ <ul>
+ <% @cdist_object.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :cdist_type %><br />
+ <%= f.number_field :cdist_type %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
6 app/views/cdist_objects/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing cdist_object</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @cdist_object %> |
+<%= link_to 'Back', cdist_objects_path %>
View
23 app/views/cdist_objects/index.html.erb
@@ -0,0 +1,23 @@
+<h1>Listing cdist_objects</h1>
+
+<table>
+ <tr>
+ <th>Cdist type</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @cdist_objects.each do |cdist_object| %>
+ <tr>
+ <td><%= cdist_object.cdist_type %></td>
+ <td><%= link_to 'Show', cdist_object %></td>
+ <td><%= link_to 'Edit', edit_cdist_object_path(cdist_object) %></td>
+ <td><%= link_to 'Destroy', cdist_object, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Cdist object', new_cdist_object_path %>
View
5 app/views/cdist_objects/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New cdist_object</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', cdist_objects_path %>
View
10 app/views/cdist_objects/show.html.erb
@@ -0,0 +1,10 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>Cdist type:</b>
+ <%= @cdist_object.cdist_type %>
+</p>
+
+
+<%= link_to 'Edit', edit_cdist_object_path(@cdist_object) %> |
+<%= link_to 'Back', cdist_objects_path %>
View
29 app/views/cdist_types/_form.html.erb
@@ -0,0 +1,29 @@
+<%= form_for(@cdist_type) do |f| %>
+ <% if @cdist_type.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@cdist_type.errors.count, "error") %> prohibited this cdist_type from being saved:</h2>
+
+ <ul>
+ <% @cdist_type.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :name %><br />
+ <%= f.text_area :name %>
+ </div>
+ <div class="field">
+ <%= f.label :description %><br />
+ <%= f.text_area :description %>
+ </div>
+ <div class="field">
+ <%= f.label :readme %><br />
+ <%= f.text_area :readme %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
6 app/views/cdist_types/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing cdist_type</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @cdist_type %> |
+<%= link_to 'Back', cdist_types_path %>
View
27 app/views/cdist_types/index.html.erb
@@ -0,0 +1,27 @@
+<h1>Listing cdist_types</h1>
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Description</th>
+ <th>Readme</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @cdist_types.each do |cdist_type| %>
+ <tr>
+ <td><%= cdist_type.name %></td>
+ <td><%= cdist_type.description %></td>
+ <td><%= cdist_type.readme %></td>
+ <td><%= link_to 'Show', cdist_type %></td>
+ <td><%= link_to 'Edit', edit_cdist_type_path(cdist_type) %></td>
+ <td><%= link_to 'Destroy', cdist_type, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Cdist type', new_cdist_type_path %>
View
5 app/views/cdist_types/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New cdist_type</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', cdist_types_path %>
View
20 app/views/cdist_types/show.html.erb
@@ -0,0 +1,20 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>Name:</b>
+ <%= @cdist_type.name %>
+</p>
+
+<p>
+ <b>Description:</b>
+ <%= @cdist_type.description %>
+</p>
+
+<p>
+ <b>Readme:</b>
+ <%= @cdist_type.readme %>
+</p>
+
+
+<%= link_to 'Edit', edit_cdist_type_path(@cdist_type) %> |
+<%= link_to 'Back', cdist_types_path %>
View
25 app/views/hosts/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@host) do |f| %>
+ <% if @host.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@host.errors.count, "error") %> prohibited this host from being saved:</h2>
+
+ <ul>
+ <% @host.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :name %><br />
+ <%= f.text_area :name %>
+ </div>
+ <div class="field">
+ <%= f.label :ssh_port %><br />
+ <%= f.number_field :ssh_port %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
6 app/views/hosts/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing host</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @host %> |
+<%= link_to 'Back', hosts_path %>
View
25 app/views/hosts/index.html.erb
@@ -0,0 +1,25 @@
+<h1>Listing hosts</h1>
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Ssh port</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @hosts.each do |host| %>
+ <tr>
+ <td><%= host.name %></td>
+ <td><%= host.ssh_port %></td>
+ <td><%= link_to 'Show', host %></td>
+ <td><%= link_to 'Edit', edit_host_path(host) %></td>
+ <td><%= link_to 'Destroy', host, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Host', new_host_path %>
View
5 app/views/hosts/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New host</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', hosts_path %>
View
15 app/views/hosts/show.html.erb
@@ -0,0 +1,15 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>Name:</b>
+ <%= @host.name %>
+</p>
+
+<p>
+ <b>Ssh port:</b>
+ <%= @host.ssh_port %>
+</p>
+
+
+<%= link_to 'Edit', edit_host_path(@host) %> |
+<%= link_to 'Back', hosts_path %>
View
25 app/views/parameters/_form.html.erb
@@ -0,0 +1,25 @@
+<%= form_for(@parameter) do |f| %>
+ <% if @parameter.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@parameter.errors.count, "error") %> prohibited this parameter from being saved:</h2>
+
+ <ul>
+ <% @parameter.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :name %><br />
+ <%= f.text_area :name %>
+ </div>
+ <div class="field">
+ <%= f.label :type %><br />
+ <%= f.text_area :type %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
6 app/views/parameters/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing parameter</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @parameter %> |
+<%= link_to 'Back', parameters_path %>
View
25 app/views/parameters/index.html.erb
@@ -0,0 +1,25 @@
+<h1>Listing parameters</h1>
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @parameters.each do |parameter| %>
+ <tr>
+ <td><%= parameter.name %></td>
+ <td><%= parameter.type %></td>
+ <td><%= link_to 'Show', parameter %></td>
+ <td><%= link_to 'Edit', edit_parameter_path(parameter) %></td>
+ <td><%= link_to 'Destroy', parameter, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Parameter', new_parameter_path %>
View
5 app/views/parameters/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New parameter</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', parameters_path %>
View
15 app/views/parameters/show.html.erb
@@ -0,0 +1,15 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>Name:</b>
+ <%= @parameter.name %>
+</p>
+
+<p>
+ <b>Type:</b>
+ <%= @parameter.type %>
+</p>
+
+
+<%= link_to 'Edit', edit_parameter_path(@parameter) %> |
+<%= link_to 'Back', parameters_path %>
View
21 app/views/tags/_form.html.erb
@@ -0,0 +1,21 @@
+<%= form_for(@tag) do |f| %>
+ <% if @tag.errors.any? %>
+ <div id="error_explanation">
+ <h2><%= pluralize(@tag.errors.count, "error") %> prohibited this tag from being saved:</h2>
+
+ <ul>
+ <% @tag.errors.full_messages.each do |msg| %>
+ <li><%= msg %></li>
+ <% end %>
+ </ul>
+ </div>
+ <% end %>
+
+ <div class="field">
+ <%= f.label :name %><br />
+ <%= f.text_area :name %>
+ </div>
+ <div class="actions">
+ <%= f.submit %>
+ </div>
+<% end %>
View
6 app/views/tags/edit.html.erb
@@ -0,0 +1,6 @@
+<h1>Editing tag</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Show', @tag %> |
+<%= link_to 'Back', tags_path %>
View
23 app/views/tags/index.html.erb
@@ -0,0 +1,23 @@
+<h1>Listing tags</h1>
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th></th>
+ <th></th>
+ <th></th>
+ </tr>
+
+<% @tags.each do |tag| %>
+ <tr>
+ <td><%= tag.name %></td>
+ <td><%= link_to 'Show', tag %></td>
+ <td><%= link_to 'Edit', edit_tag_path(tag) %></td>
+ <td><%= link_to 'Destroy', tag, method: :delete, data: { confirm: 'Are you sure?' } %></td>
+ </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Tag', new_tag_path %>
View
5 app/views/tags/new.html.erb
@@ -0,0 +1,5 @@
+<h1>New tag</h1>
+
+<%= render 'form' %>
+
+<%= link_to 'Back', tags_path %>
View
10 app/views/tags/show.html.erb
@@ -0,0 +1,10 @@
+<p id="notice"><%= notice %></p>
+
+<p>
+ <b>Name:</b>
+ <%= @tag.name %>
+</p>
+
+
+<%= link_to 'Edit', edit_tag_path(@tag) %> |
+<%= link_to 'Back', tags_path %>
View
18 config/routes.rb
@@ -1,4 +1,22 @@
Webcdist::Application.routes.draw do
+ resources :parameters
+
+
+ resources :cdist_types
+
+
+ resources :cdist_objects
+
+
+ resources :cdist_configurations
+
+
+ resources :tags
+
+
+ resources :hosts
+
+
# The priority is based upon order of creation:
# first created -> highest priority.
View
10 db/migrate/20130530131812_create_hosts.rb
@@ -0,0 +1,10 @@
+class CreateHosts < ActiveRecord::Migration
+ def change
+ create_table :hosts do |t|
+ t.text :name
+ t.integer :ssh_port
+
+ t.timestamps
+ end
+ end
+end
View
9 db/migrate/20130530131955_create_tags.rb
@@ -0,0 +1,9 @@
+class CreateTags < ActiveRecord::Migration
+ def change
+ create_table :tags do |t|
+ t.text :name
+
+ t.timestamps
+ end
+ end
+end
View
10 db/migrate/20130530132352_create_cdist_configurations.rb
@@ -0,0 +1,10 @@
+class CreateCdistConfigurations < ActiveRecord::Migration
+ def change
+ create_table :cdist_configurations do |t|
+ t.text :name
+ t.text :description
+
+ t.timestamps
+ end
+ end
+end
View
9 db/migrate/20130530143436_create_cdist_objects.rb
@@ -0,0 +1,9 @@
+class CreateCdistObjects < ActiveRecord::Migration
+ def change
+ create_table :cdist_objects do |t|
+ t.integer :cdist_type_id
+
+ t.timestamps
+ end
+ end
+end
View
11 db/migrate/20130530144922_create_cdist_types.rb
@@ -0,0 +1,11 @@
+class CreateCdistTypes < ActiveRecord::Migration
+ def change
+ create_table :cdist_types do |t|
+ t.text :name
+ t.text :description
+ t.text :readme
+
+ t.timestamps
+ end
+ end
+end
View
10 db/migrate/20130530145159_create_parameters.rb
@@ -0,0 +1,10 @@
+class CreateParameters < ActiveRecord::Migration
+ def change
+ create_table :parameters do |t|
+ t.text :name
+ t.text :type
+
+ t.timestamps
+ end
+ end
+end
View
57 db/schema.rb
@@ -0,0 +1,57 @@
+# encoding: UTF-8
+# This file is auto-generated from the current state of the database. Instead
+# of editing this file, please use the migrations feature of Active Record to
+# incrementally modify your database, and then regenerate this schema definition.
+#
+# Note that this schema.rb definition is the authoritative source for your
+# database schema. If you need to create the application database on another
+# system, you should be using db:schema:load, not running all the migrations
+# from scratch. The latter is a flawed and unsustainable approach (the more migrations
+# you'll amass, the slower it'll run and the greater likelihood for issues).
+#
+# It's strongly recommended to check this file into your version control system.
+
+ActiveRecord::Schema.define(:version => 20130530145159) do
+
+ create_table "cdist_objects", :force => true do |t|
+ t.integer "cdist_type_id"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "cdist_types", :force => true do |t|
+ t.text "name"
+ t.text "description"
+ t.text "readme"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "cdist_configurations", :force => true do |t|
+ t.text "name"
+ t.text "description"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "hosts", :force => true do |t|
+ t.text "name"
+ t.integer "ssh_port"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "parameters", :force => true do |t|
+ t.text "name"
+ t.text "type"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+ create_table "tags", :force => true do |t|
+ t.text "name"
+ t.datetime "created_at", :null => false
+ t.datetime "updated_at", :null => false
+ end
+
+end
View
15 public/index.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
- <title>Ruby on Rails: Welcome aboard</title>
+ <title>WebCDist</title>
<style type="text/css" media="screen">
body {
margin: 0;
@@ -212,6 +212,19 @@
<div id="about-content" style="display: none"></div>
</div>
+ <div id="local resources">
+ <h1>Local resources</h1>
+
+ <ul>
+ <li><p><a href="parameters">parameters</a></p></li>
+ <li><p><a href="cdist_types">cdist_types</a></p></li>
+ <li><p><a href="cdist_objects">cdist_objects</a></p></li>
+ <li><p><a href="cdist_configurations">cdist_configurations</a></p></li>
+ <li><p><a href="tags">tags</a></p></li>
+ <li><p><a href="hosts">hosts</a></p></li>
+ </ul>
+ </div>
+
<div id="getting-started">
<h1>Getting started</h1>
<h2>Here&rsquo;s how to get rolling:</h2>
View
241 public/index.html.orig
@@ -0,0 +1,241 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>Ruby on Rails: Welcome aboard</title>
+ <style type="text/css" media="screen">
+ body {
+ margin: 0;
+ margin-bottom: 25px;
+ padding: 0;
+ background-color: #f0f0f0;
+ font-family: "Lucida Grande", "Bitstream Vera Sans", "Verdana";
+ font-size: 13px;
+ color: #333;
+ }
+
+ h1 {
+ font-size: 28px;
+ color: #000;
+ }
+
+ a {color: #03c}
+ a:hover {
+ background-color: #03c;
+ color: white;
+ text-decoration: none;
+ }
+
+
+ #page {
+ background-color: #f0f0f0;
+ width: 750px;
+ margin: 0;
+ margin-left: auto;
+ margin-right: auto;
+ }
+
+ #content {
+ float: left;
+ background-color: white;
+ border: 3px solid #aaa;
+ border-top: none;
+ padding: 25px;
+ width: 500px;
+ }
+
+ #sidebar {
+ float: right;
+ width: 175px;
+ }
+
+ #footer {
+ clear: both;
+ }
+
+ #header, #about, #getting-started {
+ padding-left: 75px;
+ padding-right: 30px;
+ }
+
+
+ #header {
+ background-image: url("assets/rails.png");
+ background-repeat: no-repeat;
+ background-position: top left;
+ height: 64px;
+ }
+ #header h1, #header h2 {margin: 0}
+ #header h2 {
+ color: #888;
+ font-weight: normal;
+ font-size: 16px;
+ }
+
+
+ #about h3 {
+ margin: 0;
+ margin-bottom: 10px;
+ font-size: 14px;
+ }
+
+ #about-content {
+ background-color: #ffd;
+ border: 1px solid #fc0;
+ margin-left: -55px;
+ margin-right: -10px;
+ }
+ #about-content table {
+ margin-top: 10px;
+ margin-bottom: 10px;
+ font-size: 11px;
+ border-collapse: collapse;
+ }
+ #about-content td {
+ padding: 10px;
+ padding-top: 3px;
+ padding-bottom: 3px;
+ }
+ #about-content td.name {color: #555}
+ #about-content td.value {color: #000}
+
+ #about-content ul {
+ padding: 0;
+ list-style-type: none;
+ }
+
+ #about-content.failure {
+ background-color: #fcc;
+ border: 1px solid #f00;
+ }
+ #about-content.failure p {
+ margin: 0;
+ padding: 10px;
+ }
+
+
+ #getting-started {
+ border-top: 1px solid #ccc;
+ margin-top: 25px;
+ padding-top: 15px;
+ }
+ #getting-started h1 {
+ margin: 0;
+ font-size: 20px;
+ }
+ #getting-started h2 {
+ margin: 0;
+ font-size: 14px;
+ font-weight: normal;
+ color: #333;
+ margin-bottom: 25px;
+ }
+ #getting-started ol {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #getting-started li {
+ font-size: 18px;
+ color: #888;
+ margin-bottom: 25px;
+ }
+ #getting-started li h2 {
+ margin: 0;
+ font-weight: normal;
+ font-size: 18px;
+ color: #333;
+ }
+ #getting-started li p {
+ color: #555;
+ font-size: 13px;
+ }
+
+
+ #sidebar ul {
+ margin-left: 0;
+ padding-left: 0;
+ }
+ #sidebar ul h3 {
+ margin-top: 25px;
+ font-size: 16px;
+ padding-bottom: 10px;
+ border-bottom: 1px solid #ccc;
+ }
+ #sidebar li {
+ list-style-type: none;
+ }
+ #sidebar ul.links li {
+ margin-bottom: 5px;
+ }
+
+ .filename {
+ font-style: italic;
+ }
+ </style>
+ <script type="text/javascript">
+ function about() {
+ info = document.getElementById('about-content');
+ if (window.XMLHttpRequest)
+ { xhr = new XMLHttpRequest(); }
+ else
+ { xhr = new ActiveXObject("Microsoft.XMLHTTP"); }
+ xhr.open("GET","rails/info/properties",false);
+ xhr.send("");
+ info.innerHTML = xhr.responseText;
+ info.style.display = 'block'
+ }
+ </script>
+ </head>
+ <body>
+ <div id="page">
+ <div id="sidebar">
+ <ul id="sidebar-items">
+ <li>
+ <h3>Browse the documentation</h3>
+ <ul class="links">
+ <li><a href="http://guides.rubyonrails.org/">Rails Guides</a></li>
+ <li><a href="http://api.rubyonrails.org/">Rails API</a></li>
+ <li><a href="http://www.ruby-doc.org/core/">Ruby core</a></li>
+ <li><a href="http://www.ruby-doc.org/stdlib/">Ruby standard library</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+
+ <div id="content">
+ <div id="header">
+ <h1>Welcome aboard</h1>
+ <h2>You&rsquo;re riding Ruby on Rails!</h2>
+ </div>
+
+ <div id="about">
+ <h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
+ <div id="about-content" style="display: none"></div>
+ </div>
+
+ <div id="getting-started">
+ <h1>Getting started</h1>
+ <h2>Here&rsquo;s how to get rolling:</h2>
+
+ <ol>
+ <li>
+ <h2>Use <code>rails generate</code> to create your models and controllers</h2>
+ <p>To see all available options, run it without parameters.</p>
+ </li>
+
+ <li>
+ <h2>Set up a default route and remove <span class="filename">public/index.html</span></h2>
+ <p>Routes are set up in <span class="filename">config/routes.rb</span>.</p>
+ </li>
+
+ <li>
+ <h2>Create your database</h2>
+ <p>Run <code>rake db:create</code> to create your database. If you're not using SQLite (the default), edit <span class="filename">config/database.yml</span> with your username and password.</p>
+ </li>
+ </ol>
+ </div>
+ </div>
+
+ <div id="footer">&nbsp;</div>
+ </div>
+ </body>
+</html>
View
9 test/fixtures/cdist_configurations.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ name: MyText
+ description: MyText
+
+two:
+ name: MyText
+ description: MyText
View
7 test/fixtures/cdist_objects.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ cdist_type_id: MyTypeID
+
+two:
+ cdist_type_id: MyTypeID
View
11 test/fixtures/cdist_types.yml
@@ -0,0 +1,11 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ name: MyText
+ description: MyText
+ readme: MyText
+
+two:
+ name: MyText
+ description: MyText
+ readme: MyText
View
9 test/fixtures/hosts.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ name: MyText
+ ssh_port: 1
+
+two:
+ name: MyText
+ ssh_port: 1
View
9 test/fixtures/parameters.yml
@@ -0,0 +1,9 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ name: MyText
+ type: MyText
+
+two:
+ name: MyText
+ type: MyText
View
7 test/fixtures/tags.yml
@@ -0,0 +1,7 @@
+# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
+
+one:
+ name: MyText
+
+two:
+ name: MyText
View
49 test/functional/cdist_configurations_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class CdistConfigurationsControllerTest < ActionController::TestCase
+ setup do
+ @cdist_configuration = cdist_configurations(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:cdist_configurations)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create cdist_configuration" do
+ assert_difference('CdistConfiguration.count') do
+ post :create, cdist_configuration: { description: @cdist_configuration.description, name: @cdist_configuration.name }
+ end
+
+ assert_redirected_to cdist_configuration_path(assigns(:cdist_configuration))
+ end
+
+ test "should show cdist_configuration" do
+ get :show, id: @cdist_configuration
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @cdist_configuration
+ assert_response :success
+ end
+
+ test "should update cdist_configuration" do
+ put :update, id: @cdist_configuration, cdist_configuration: { description: @cdist_configuration.description, name: @cdist_configuration.name }
+ assert_redirected_to cdist_configuration_path(assigns(:cdist_configuration))
+ end
+
+ test "should destroy cdist_configuration" do
+ assert_difference('CdistConfiguration.count', -1) do
+ delete :destroy, id: @cdist_configuration
+ end
+
+ assert_redirected_to cdist_configurations_path
+ end
+end
View
49 test/functional/cdist_objects_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class CdistObjectsControllerTest < ActionController::TestCase
+ setup do
+ @cdist_object = cdist_objects(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:cdist_objects)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create cdist_object" do
+ assert_difference('CdistObject.count') do
+ post :create, cdist_object: { cdist_type_id: @cdist_object.cdist_type_id }
+ end
+
+ assert_redirected_to cdist_object_path(assigns(:cdist_object))
+ end
+
+ test "should show cdist_object" do
+ get :show, id: @cdist_object
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @cdist_object
+ assert_response :success
+ end
+
+ test "should update cdist_object" do
+ put :update, id: @cdist_object, cdist_object: { cdist_type_id: @cdist_object.cdist_type_id }
+ assert_redirected_to cdist_object_path(assigns(:cdist_object))
+ end
+
+ test "should destroy cdist_object" do
+ assert_difference('CdistObject.count', -1) do
+ delete :destroy, id: @cdist_object
+ end
+
+ assert_redirected_to cdist_objects_path
+ end
+end
View
49 test/functional/cdist_types_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class CdistTypesControllerTest < ActionController::TestCase
+ setup do
+ @cdist_type = cdist_types(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:cdist_types)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create cdist_type" do
+ assert_difference('CdistType.count') do
+ post :create, cdist_type: { description: @cdist_type.description, name: @cdist_type.name, readme: @cdist_type.readme }
+ end
+
+ assert_redirected_to cdist_type_path(assigns(:cdist_type))
+ end
+
+ test "should show cdist_type" do
+ get :show, id: @cdist_type
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @cdist_type
+ assert_response :success
+ end
+
+ test "should update cdist_type" do
+ put :update, id: @cdist_type, cdist_type: { description: @cdist_type.description, name: @cdist_type.name, readme: @cdist_type.readme }
+ assert_redirected_to cdist_type_path(assigns(:cdist_type))
+ end
+
+ test "should destroy cdist_type" do
+ assert_difference('CdistType.count', -1) do
+ delete :destroy, id: @cdist_type
+ end
+
+ assert_redirected_to cdist_types_path
+ end
+end
View
49 test/functional/hosts_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class HostsControllerTest < ActionController::TestCase
+ setup do
+ @host = hosts(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:hosts)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create host" do
+ assert_difference('Host.count') do
+ post :create, host: { name: @host.name, ssh_port: @host.ssh_port }
+ end
+
+ assert_redirected_to host_path(assigns(:host))
+ end
+
+ test "should show host" do
+ get :show, id: @host
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @host
+ assert_response :success
+ end
+
+ test "should update host" do
+ put :update, id: @host, host: { name: @host.name, ssh_port: @host.ssh_port }
+ assert_redirected_to host_path(assigns(:host))
+ end
+
+ test "should destroy host" do
+ assert_difference('Host.count', -1) do
+ delete :destroy, id: @host
+ end
+
+ assert_redirected_to hosts_path
+ end
+end
View
49 test/functional/parameters_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class ParametersControllerTest < ActionController::TestCase
+ setup do
+ @parameter = parameters(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:parameters)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create parameter" do
+ assert_difference('Parameter.count') do
+ post :create, parameter: { name: @parameter.name, type: @parameter.type }
+ end
+
+ assert_redirected_to parameter_path(assigns(:parameter))
+ end
+
+ test "should show parameter" do
+ get :show, id: @parameter
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @parameter
+ assert_response :success
+ end
+
+ test "should update parameter" do
+ put :update, id: @parameter, parameter: { name: @parameter.name, type: @parameter.type }
+ assert_redirected_to parameter_path(assigns(:parameter))
+ end
+
+ test "should destroy parameter" do
+ assert_difference('Parameter.count', -1) do
+ delete :destroy, id: @parameter
+ end
+
+ assert_redirected_to parameters_path
+ end
+end
View
49 test/functional/tags_controller_test.rb
@@ -0,0 +1,49 @@
+require 'test_helper'
+
+class TagsControllerTest < ActionController::TestCase
+ setup do
+ @tag = tags(:one)
+ end
+
+ test "should get index" do
+ get :index
+ assert_response :success
+ assert_not_nil assigns(:tags)
+ end
+
+ test "should get new" do
+ get :new
+ assert_response :success
+ end
+
+ test "should create tag" do
+ assert_difference('Tag.count') do
+ post :create, tag: { name: @tag.name }
+ end
+
+ assert_redirected_to tag_path(assigns(:tag))
+ end
+
+ test "should show tag" do
+ get :show, id: @tag
+ assert_response :success
+ end
+
+ test "should get edit" do
+ get :edit, id: @tag
+ assert_response :success
+ end
+
+ test "should update tag" do
+ put :update, id: @tag, tag: { name: @tag.name }
+ assert_redirected_to tag_path(assigns(:tag))
+ end
+
+ test "should destroy tag" do
+ assert_difference('Tag.count', -1) do
+ delete :destroy, id: @tag
+ end
+
+ assert_redirected_to tags_path
+ end
+end
View
7 test/unit/cdist_configuration_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ConfigurationTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
7 test/unit/cdist_object_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class CdistObjectTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
7 test/unit/cdist_type_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class CdistTypeTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
4 test/unit/helpers/cdist_configurations_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class ConfigurationsHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/cdist_objects_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class CdistObjectsHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/cdist_types_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class CdistTypesHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/hosts_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class HostsHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/parameters_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class ParametersHelperTest < ActionView::TestCase
+end
View
4 test/unit/helpers/tags_helper_test.rb
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class TagsHelperTest < ActionView::TestCase
+end
View
7 test/unit/host_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class HostTest < ActiveSupport::TestCase
+ # test "the truth" do
+ # assert true
+ # end
+end
View
7 test/unit/parameter_test.rb
@@ -0,0 +1,7 @@
+require 'test_helper'
+
+class ParameterTest < ActiveSupport::TestCase