Commit cc7cf87bfe1b6fa9242de587ff6ac8539b4adb6b

Authored by Renan Fichberg
Committed by Rafael Manzo
1 parent 6121466f

Removed unnecessary files.

Signed-off-by: Diego Araújo <diegoamc90@gmail.com>
app/assets/javascripts/repositories.js.coffee
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -# Place all the behaviors and hooks related to the matching controller here.  
2 -# All this logic will automatically be available in application.js.  
3 -# You can use CoffeeScript in this file: http://coffeescript.org/  
app/assets/stylesheets/repositories.css.scss
@@ -1,3 +0,0 @@ @@ -1,3 +0,0 @@
1 -// Place all the styles related to the Repositories controller here.  
2 -// They will automatically be included in application.css.  
3 -// You can use Sass (SCSS) here: http://sass-lang.com/  
app/assets/stylesheets/scaffolds.css.scss
@@ -1,69 +0,0 @@ @@ -1,69 +0,0 @@
1 -body {  
2 - background-color: #fff;  
3 - color: #333;  
4 - font-family: verdana, arial, helvetica, sans-serif;  
5 - font-size: 13px;  
6 - line-height: 18px;  
7 -}  
8 -  
9 -p, ol, ul, td {  
10 - font-family: verdana, arial, helvetica, sans-serif;  
11 - font-size: 13px;  
12 - line-height: 18px;  
13 -}  
14 -  
15 -pre {  
16 - background-color: #eee;  
17 - padding: 10px;  
18 - font-size: 11px;  
19 -}  
20 -  
21 -a {  
22 - color: #000;  
23 - &:visited {  
24 - color: #666;  
25 - }  
26 - &:hover {  
27 - color: #fff;  
28 - background-color: #000;  
29 - }  
30 -}  
31 -  
32 -div {  
33 - &.field, &.actions {  
34 - margin-bottom: 10px;  
35 - }  
36 -}  
37 -  
38 -#notice {  
39 - color: green;  
40 -}  
41 -  
42 -.field_with_errors {  
43 - padding: 2px;  
44 - background-color: red;  
45 - display: table;  
46 -}  
47 -  
48 -#error_explanation {  
49 - width: 450px;  
50 - border: 2px solid red;  
51 - padding: 7px;  
52 - padding-bottom: 0;  
53 - margin-bottom: 20px;  
54 - background-color: #f0f0f0;  
55 - h2 {  
56 - text-align: left;  
57 - font-weight: bold;  
58 - padding: 5px 5px 5px 15px;  
59 - font-size: 12px;  
60 - margin: -7px;  
61 - margin-bottom: 0px;  
62 - background-color: #c00;  
63 - color: #fff;  
64 - }  
65 - ul li {  
66 - font-size: 12px;  
67 - list-style: square;  
68 - }  
69 -}  
app/controllers/projects_controller.rb~
@@ -1,75 +0,0 @@ @@ -1,75 +0,0 @@
1 -class ProjectsController < ApplicationController  
2 -  
3 - # GET /projects/new  
4 - def new  
5 - @project = Project.new  
6 - end  
7 -  
8 - # GET /projects  
9 - # GET /projects.json  
10 - def index  
11 - @projects = Project.all  
12 - end  
13 -  
14 - # POST /projects  
15 - # POST /projects.json  
16 - def create  
17 - @project = Project.new(project_params)  
18 -  
19 - respond_to do |format|  
20 - if @project.save  
21 - format.html { redirect_to project_path(@project.id), notice: 'Project was successfully created.' }  
22 - format.json { render action: 'show', status: :created, location: @project }  
23 - else  
24 - format.html { render action: 'new' }  
25 - format.json { render json: @project.errors, status: :unprocessable_entity }  
26 - end  
27 - end  
28 - end  
29 -  
30 - # GET /project/1  
31 - # GET /project/1.json  
32 - def show  
33 - @project_repositories = Repository.repositories_of(params[:id])  
34 - @project = Project.find(params[:id])  
35 - set_project  
36 - end  
37 -  
38 - # GET /projects/1/edit  
39 - # GET /projects/1/edit.json  
40 - def edit  
41 - set_project  
42 - end  
43 -  
44 - def update  
45 - set_project  
46 - if @project.update(params[:project])  
47 - redirect_to(project_path(@project.id))  
48 - else  
49 - render "edit"  
50 - end  
51 - end  
52 -  
53 - # DELETE /project/1  
54 - # DELETE /project/1.json  
55 - def destroy  
56 - set_project  
57 - @project.destroy  
58 - respond_to do |format|  
59 - format.html { redirect_to projects_url }  
60 - format.json { head :no_content }  
61 - end  
62 - end  
63 -  
64 - private  
65 - # Use callbacks to share common setup or constraints between actions.  
66 - def set_project  
67 - @project = Project.find(params[:id])  
68 - end  
69 -  
70 - # Never trust parameters from the scary internet, only allow the white list through.  
71 - def project_params  
72 - params[:project]  
73 - end  
74 -  
75 -end  
app/controllers/repositories_controller.rb~
@@ -1,85 +0,0 @@ @@ -1,85 +0,0 @@
1 -class RepositoriesController < ApplicationController  
2 - before_action :set_repository, only: [:show, :edit, :update, :destroy]  
3 -  
4 - # GET /repositories  
5 - # GET /repositories.json  
6 - def index  
7 - @project = Project.find(params[:project_id])  
8 - @repositories = Repository.repositories_of(params[:project_id])  
9 - end  
10 -  
11 - # GET /repositories/1  
12 - # GET /repositories/1.json  
13 - def show  
14 - @project = Project.find(params[:project_id])  
15 - end  
16 -  
17 - # GET projects/1/repositories/new  
18 - def new  
19 - @project = Project.find(params[:project_id])  
20 - @repository = Repository.new  
21 - end  
22 -  
23 - # GET /repositories/1/edit  
24 - def edit  
25 - @project = Project.find(params[:project_id])  
26 - end  
27 -  
28 - # POST /repositories  
29 - # POST /repositories.json  
30 - def create  
31 - @project = Project.find(params[:project_id])  
32 - #@repository = @project.repositories.create(params[:repository].permit(:name, :type, :address, :configuration_id))  
33 -  
34 - @repository = Repository.new  
35 -  
36 - @repository.project_id = @project.id  
37 -  
38 - redirect_to @project  
39 -  
40 - #respond_to do |format|  
41 - # if @repository.save  
42 - # format.html { redirect_to @repository, notice: 'Repository was successfully created.' }  
43 - # format.json { render action: 'show', status: :created, location: @repository }  
44 - #else  
45 - # format.html { render action: 'new' }  
46 - #format.json { render json: @repository.errors, status: :unprocessable_entity }  
47 - #end  
48 - #end  
49 - end  
50 -  
51 - # PATCH/PUT /repositories/1  
52 - # PATCH/PUT /repositories/1.json  
53 - def update  
54 - respond_to do |format|  
55 - if @repository.update(repository_params)  
56 - format.html { redirect_to @repository, notice: 'Repository was successfully updated.' }  
57 - format.json { head :no_content }  
58 - else  
59 - format.html { render action: 'edit' }  
60 - format.json { render json: @repository.errors, status: :unprocessable_entity }  
61 - end  
62 - end  
63 - end  
64 -  
65 - # DELETE /repositories/1  
66 - # DELETE /repositories/1.json  
67 - def destroy  
68 - @repository.destroy  
69 - respond_to do |format|  
70 - format.html { redirect_to repositories_url }  
71 - format.json { head :no_content }  
72 - end  
73 - end  
74 -  
75 - private  
76 - # Use callbacks to share common setup or constraints between actions.  
77 - def set_repository  
78 - @repository = Repository.find(params[:id])  
79 - end  
80 -  
81 - # Never trust parameters from the scary internet, only allow the white list through.  
82 - def repository_params  
83 - params.require(:repository).permit(:name)  
84 - end  
85 -end  
app/helpers/repositories_helper.rb
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -module RepositoriesHelper  
2 -end  
app/models/project.rb~
@@ -1,13 +0,0 @@ @@ -1,13 +0,0 @@
1 -require "validators/kalibro_uniqueness_validator.rb"  
2 -  
3 -class Project < KalibroEntities::Entities::Project  
4 - include KalibroRecord  
5 -  
6 - attr_accessor :name  
7 - validates :name, presence: true, kalibro_uniqueness: true  
8 -  
9 -  
10 - def self.latest(count = 1)  
11 - all.sort { |a,b| b.id <=> a.id }.first(count)  
12 - end  
13 -end  
app/models/repository.rb~
@@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
1 -class Repository < ActiveRecord::Base  
2 -end  
app/views/projects/index.html.erb~
@@ -1,26 +0,0 @@ @@ -1,26 +0,0 @@
1 -<h1>Listing Projects</h1>  
2 -  
3 -<table>  
4 - <thead>  
5 - <tr>  
6 - <th>Name</th>  
7 - <th>Description</th>  
8 - <th></th>  
9 - </tr>  
10 - </thead>  
11 -  
12 - <tbody>  
13 - <% @projects.each do |project| %>  
14 - <tr>  
15 - <td><%= project.name %></td>  
16 - <td><%= project.description %></td>  
17 - <td><%= link_to 'Show', project_path(project.id) %></td>  
18 - <td><%= link_to 'Edit', edit_project_path(project.id) %></td>  
19 - </tr>  
20 - <% end %>  
21 - </tbody>  
22 -</table>  
23 -  
24 -<br>  
25 -  
26 -<%= link_to 'New Project', new_project_path %>  
app/views/projects/show.html.erb~
@@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
1 -<p>  
2 - <strong>Name:</strong>  
3 - <%= @project.name %>  
4 -</p>  
5 -  
6 -<p>  
7 - <strong>Description:</strong>  
8 - <%= @project.description %>  
9 -</p>  
10 -  
11 -<h2>Repositories</h2>  
12 -  
13 -<%= link_to 'New Repository', new_project_repository_path(@project_id)%>  
14 -  
15 -<table border="1" width="30%">  
16 - <thead>  
17 - <tr>  
18 - <th>Name</th>  
19 - <th>Type</th>  
20 - </tr>  
21 - </thead>  
22 -  
23 - <tbody>  
24 - <% @project_repositories.each do |repository| %>  
25 - <tr>  
26 - <td align="center"><%= repository.name %></td>  
27 - <td align="center"><%= repository.type %></td>  
28 - </tr>  
29 - <% end %>  
30 - </tbody>  
31 -</table>  
32 -  
33 -<p>  
34 - <%= link_to 'Destroy', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure?' } %>  
35 -</p>  
36 -  
37 -<%= link_to 'Back', projects_path %>  
app/views/repositories/_form.html.erb~
@@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
1 -<%= form_for(@repository, :url => project_repositories_url(@project.id)) do |f| %>  
2 -  
3 - <% if @repository.errors.any? %>  
4 - <div id="error_explanation">  
5 - <h2><%= pluralize(@repository.errors.count, "error") %> prohibited this repository from being saved:</h2>  
6 -  
7 - <ul>  
8 - <% @repository.errors.full_messages.each do |msg| %>  
9 - <li><%= msg %></li>  
10 - <% end %>  
11 - </ul>  
12 - </div>  
13 - <% end %>  
14 -  
15 - <div class="field">  
16 - <%= f.label :name %><br>  
17 - <%= f.text_field :name %>  
18 - </div>  
19 -  
20 - <div class="field">  
21 - <%= f.label :type %><br>  
22 - <%= f.text_field :type %>  
23 - </div>  
24 -  
25 - <div class="field">  
26 - <%= f.label :addres %><br>  
27 - <%= f.text_field :address %>  
28 - </div>  
29 -  
30 - <div class="field">  
31 - <%= f.label :configuration %><br>  
32 - <%= f.text_field :configuration_id %>  
33 - </div>  
34 - <div class="actions">  
35 - <%= f.submit %>  
36 - </div>  
37 -<% end %>  
app/views/repositories/edit.html.erb~
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -<h1>Editing repository</h1>  
2 -  
3 -<%= render 'form' %>  
4 -  
5 -<%= link_to 'Show', @repository %> |  
6 -<%= link_to 'Back', repositories_path %>  
app/views/repositories/index.html.erb~
@@ -1,27 +0,0 @@ @@ -1,27 +0,0 @@
1 -<h1>Listing repositories</h1>  
2 -  
3 -<table>  
4 - <thead>  
5 - <tr>  
6 - <th>Name</th>  
7 - <th></th>  
8 - <th></th>  
9 - <th></th>  
10 - </tr>  
11 - </thead>  
12 -  
13 - <tbody>  
14 - <% @repositories.each do |repository| %>  
15 - <tr>  
16 - <td><%= repository.name %></td>  
17 - <td><%= link_to 'Show', project_repository_path(@project, repository) %></td>  
18 - <td><%= link_to 'Edit', edit_repository_path(repository) %></td>  
19 - <td><%= link_to 'Destroy', repository, method: :delete, data: { confirm: 'Are you sure?' } %></td>  
20 - </tr>  
21 - <% end %>  
22 - </tbody>  
23 -</table>  
24 -  
25 -<br>  
26 -  
27 -<%= link_to 'New Repository', new_project_repository_path(@project) %>  
app/views/repositories/new.html.erb~
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -<h1>New Repository</h1>  
2 -  
3 -<%= render 'form' %>  
4 -  
5 -<%= link_to 'Back', project_repositories_path(@project)%>  
app/views/repositories/show.html.erb~
@@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
1 -<p id="notice"><%= notice %></p>  
2 -  
3 -<p>  
4 - <strong>Name:</strong>  
5 - <%= @repository.name %>  
6 -</p>  
7 -  
8 -<%= link_to 'Edit', edit_repository_path(@repository) %> |  
9 -<%= link_to 'Back', project_repositories_path(@project) %>  
config/database.yml.sample~
@@ -1,28 +0,0 @@ @@ -1,28 +0,0 @@
1 -# SQLite version 3.x  
2 -# gem install sqlite3  
3 -#  
4 -# Ensure the SQLite 3 gem is defined in your Gemfile  
5 -# gem 'sqlite3'  
6 -development:  
7 - adapter: sqlite3  
8 - database: db/development.sqlite3  
9 - pool: 5  
10 - timeout: 5000  
11 -  
12 -# Warning: The database defined as "test" will be erased and  
13 -# re-generated from your development database when you run "rake".  
14 -# Do not set this db to the same as development or production.  
15 -test: &test  
16 - adapter: sqlite3  
17 - database: db/test.sqlite3  
18 - pool: 5  
19 - timeout: 5000  
20 -  
21 -production:  
22 - adapter: sqlite3  
23 - database: db/production.sqlite3  
24 - pool: 5  
25 - timeout: 5000  
26 -  
27 -cucumber:  
28 - <<: *test  
29 \ No newline at end of file 0 \ No newline at end of file
config/database.yml~
@@ -1,20 +0,0 @@ @@ -1,20 +0,0 @@
1 -development:  
2 -adapter: sqlite3  
3 -database: db/development.sqlite3  
4 -pool: 5  
5 -timeout: 5000  
6 -  
7 -test: &test  
8 -adapter: sqlite3  
9 -database: db/test.sqlite3  
10 -pool: 5  
11 -timeout: 5000  
12 -  
13 -production:  
14 -adapter: sqlite3  
15 -database: db/production.sqlite3  
16 -pool: 5  
17 -timeout: 5000  
18 -  
19 -cucumber:  
20 - <<: *test  
config/routes.rb~
@@ -1,62 +0,0 @@ @@ -1,62 +0,0 @@
1 -Mezuro::Application.routes.draw do  
2 - resources :repositories  
3 -  
4 - devise_for :users  
5 -  
6 - root "home#index"  
7 - resources :projects  
8 - # The priority is based upon order of creation: first created -> highest priority.  
9 - # See how all your routes lay out with "rake routes".  
10 -  
11 - # You can have the root of your site routed with "root"  
12 - # root 'welcome#index'  
13 -  
14 - # Example of regular route:  
15 - # get 'products/:id' => 'catalog#view'  
16 -  
17 - # Example of named route that can be invoked with purchase_url(id: product.id)  
18 - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase  
19 -  
20 - # Example resource route (maps HTTP verbs to controller actions automatically):  
21 - # resources :products  
22 -  
23 - # Example resource route with options:  
24 - # resources :products do  
25 - # member do  
26 - # get 'short'  
27 - # post 'toggle'  
28 - # end  
29 - #  
30 - # collection do  
31 - # get 'sold'  
32 - # end  
33 - # end  
34 -  
35 - # Example resource route with sub-resources:  
36 - # resources :products do  
37 - # resources :comments, :sales  
38 - # resource :seller  
39 - # end  
40 -  
41 - # Example resource route with more complex sub-resources:  
42 - # resources :products do  
43 - # resources :comments  
44 - # resources :sales do  
45 - # get 'recent', on: :collection  
46 - # end  
47 - # end  
48 -  
49 - # Example resource route with concerns:  
50 - # concern :toggleable do  
51 - # post 'toggle'  
52 - # end  
53 - # resources :posts, concerns: :toggleable  
54 - # resources :photos, concerns: :toggleable  
55 -  
56 - # Example resource route within a namespace:  
57 - # namespace :admin do  
58 - # # Directs /admin/products/* to Admin::ProductsController  
59 - # # (app/controllers/admin/products_controller.rb)  
60 - # resources :products  
61 - # end  
62 -end  
spec/helpers/repositories_helper_spec.rb
@@ -1,15 +0,0 @@ @@ -1,15 +0,0 @@
1 -require 'spec_helper'  
2 -  
3 -# Specs in this file have access to a helper object that includes  
4 -# the RepositoriesHelper. For example:  
5 -#  
6 -# describe RepositoriesHelper do  
7 -# describe "string concat" do  
8 -# it "concats two strings with spaces" do  
9 -# expect(helper.concat_strings("this","that")).to eq("this that")  
10 -# end  
11 -# end  
12 -# end  
13 -describe RepositoriesHelper do  
14 - pending "add some examples to (or delete) #{__FILE__}"  
15 -end