Skip to content

Commit

Permalink
Creation of projects feature complete
Browse files Browse the repository at this point in the history
  • Loading branch information
wycats committed Apr 22, 2011
1 parent b2bb21c commit 8bc8839
Show file tree
Hide file tree
Showing 37 changed files with 431 additions and 3 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -30,5 +30,6 @@ end
group :test do
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
end

2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -99,6 +99,7 @@ GEM
nokogiri (>= 1.4.4)
rack-test (>= 0.5.7)
culerity (0.2.15)
database_cleaner (0.6.7)
diff-lcs (1.1.2)
erubis (2.7.0)
execjs (0.2.0)
Expand Down Expand Up @@ -166,6 +167,7 @@ DEPENDENCIES
capybara
coffee-script
cucumber-rails
database_cleaner
rack!
rails!
rspec-rails (~> 2.3)
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/projects.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/
5 changes: 5 additions & 0 deletions app/assets/stylesheets/projects.css.scss
@@ -0,0 +1,5 @@
/*
Place all the styles related to the matching controller here.
They will automatically be included in application.css.
You can use Sass (SCSS) here: http://sass-lang.com/
*/
18 changes: 18 additions & 0 deletions app/controllers/projects_controller.rb
@@ -0,0 +1,18 @@
class ProjectsController < ApplicationController
def index
end

def new
@project = Project.new
end

def create
@project = Project.new(params[:project])
@project.save
redirect_to @project, :notice => "Project has been created."
end

def show
@project = Project.find(params[:id])
end
end
2 changes: 2 additions & 0 deletions app/helpers/projects_helper.rb
@@ -0,0 +1,2 @@
module ProjectsHelper
end
2 changes: 2 additions & 0 deletions app/models/project.rb
@@ -0,0 +1,2 @@
class Project < ActiveRecord::Base
end
9 changes: 6 additions & 3 deletions app/views/layouts/application.html.erb
Expand Up @@ -7,8 +7,11 @@
<%= csrf_meta_tags %>
</head>
<body>

<%= yield %>

<% flash.each do |key, value| %>
<div class='flash' id='<%= key %>'>
<%= value %>
</div>
<% end %>
<%= yield %>
</body>
</html>
8 changes: 8 additions & 0 deletions app/views/projects/_form.html.erb
@@ -0,0 +1,8 @@
<%= form_for(@project) do |f| %>
<p>
<%= f.label :name %>
<%= f.text_field :name %>
</p>
<%= f.submit %>
<% end %>

1 change: 1 addition & 0 deletions app/views/projects/index.html.erb
@@ -0,0 +1 @@
<%= link_to "New Project", new_project_path %>
2 changes: 2 additions & 0 deletions app/views/projects/new.html.erb
@@ -0,0 +1,2 @@
<h1>New Project</h1>
<%= render "form" %>
1 change: 1 addition & 0 deletions app/views/projects/show.html.erb
@@ -0,0 +1 @@
<h2><%= @project.name %></h2>
16 changes: 16 additions & 0 deletions bin/autospec
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'autospec' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rspec-core', 'autospec')
16 changes: 16 additions & 0 deletions bin/cdiff
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'cdiff' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('term-ansicolor', 'cdiff')
16 changes: 16 additions & 0 deletions bin/cucumber
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'cucumber' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('cucumber', 'cucumber')
16 changes: 16 additions & 0 deletions bin/decolor
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'decolor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('term-ansicolor', 'decolor')
16 changes: 16 additions & 0 deletions bin/edit_json.rb
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'edit_json.rb' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('json', 'edit_json.rb')
16 changes: 16 additions & 0 deletions bin/erubis
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'erubis' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('erubis', 'erubis')
16 changes: 16 additions & 0 deletions bin/htmldiff
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'htmldiff' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('diff-lcs', 'htmldiff')
16 changes: 16 additions & 0 deletions bin/ldiff
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'ldiff' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('diff-lcs', 'ldiff')
16 changes: 16 additions & 0 deletions bin/nokogiri
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'nokogiri' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('nokogiri', 'nokogiri')
16 changes: 16 additions & 0 deletions bin/prettify_json.rb
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'prettify_json.rb' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('json', 'prettify_json.rb')
16 changes: 16 additions & 0 deletions bin/rackup
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rackup' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rack', 'rackup')
16 changes: 16 additions & 0 deletions bin/rails
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rails' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rails', 'rails')
16 changes: 16 additions & 0 deletions bin/rake
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rake' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rake', 'rake')
16 changes: 16 additions & 0 deletions bin/rake2thor
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rake2thor' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('thor', 'rake2thor')
16 changes: 16 additions & 0 deletions bin/rspec
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'rspec' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('rspec-core', 'rspec')
16 changes: 16 additions & 0 deletions bin/run_celerity_server.rb
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'run_celerity_server.rb' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('culerity', 'run_celerity_server.rb')
16 changes: 16 additions & 0 deletions bin/sass
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'sass' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('sass', 'sass')
16 changes: 16 additions & 0 deletions bin/sass-convert
@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
#
# This file was generated by Bundler.
#
# The application 'sass-convert' is installed as part of a gem, and
# this file is here to facilitate running it.
#

require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)

require 'rubygems'
require 'bundler/setup'

load Gem.bin_path('sass', 'sass-convert')

0 comments on commit 8bc8839

Please sign in to comment.