Skip to content

Commit

Permalink
Merge branch 'master' of github.com:lyonrb/lyonrb
Browse files Browse the repository at this point in the history
  • Loading branch information
franckverrot committed Aug 25, 2010
2 parents 0173296 + 9f76681 commit 9fc3753
Show file tree
Hide file tree
Showing 45 changed files with 231 additions and 141 deletions.
2 changes: 2 additions & 0 deletions .rvmrc
@@ -0,0 +1,2 @@
rvm use 1.9.2@lyonrb
rvm_gemset_create_on_use_flag=1
41 changes: 26 additions & 15 deletions Gemfile
Expand Up @@ -2,25 +2,36 @@ source 'http://rubygems.org'

gem 'rails', '3.0.0.rc'

group :production do
gem 'pg', '0.9.0'
end
group :development do
gem 'sqlite3-ruby', :require => 'sqlite3'
end

gem 'warden'
gem 'devise', "1.1.rc2"
gem 'pg', '0.9.0'
gem 'devise', "1.1.2"

gem 'haml'
gem 'rdiscount'

# Camille est pas fan de Rack::Offline (comme je balance! :p)
#gem 'rack-offline', :git => "http://github.com/wycats/rack-offline.git"

gem 'sqlite3-ruby', :require => "sqlite3"
gem "rspec-rails", :git => "git://github.com/rspec/rspec-rails.git"
gem "rspec", :git => "git://github.com/rspec/rspec.git"
gem "rspec-core", :git => "git://github.com/rspec/rspec-core.git"
gem "rspec-expectations", :git => "git://github.com/rspec/rspec-expectations.git"
gem "rspec-mocks", :git => "git://github.com/rspec/rspec-mocks.git"

gem 'capybara'
gem 'database_cleaner'
gem 'cucumber-rails'
gem 'cucumber'
gem 'spork'
gem 'launchy' # So you can do Then show me the page

gem 'launchy' # So you can do Then show me the page

group :test do
gem "rspec", '2.0.0.beta.20'
gem "rspec-rails", '2.0.0.beta.20'

gem 'spork'
gem 'capybara'
gem 'cucumber'
gem 'cucumber-rails'

gem 'database_cleaner'
gem 'factory_girl', :git => "http://github.com/thoughtbot/factory_girl.git"
gem 'fakeweb'
gem 'timecop', :git => 'http://github.com/jtrupiano/timecop.git'
end
65 changes: 24 additions & 41 deletions Gemfile.lock
@@ -1,38 +1,14 @@
GIT
remote: git://github.com/rspec/rspec-core.git
revision: fae5db0
remote: http://github.com/jtrupiano/timecop.git
revision: 4acf2e0
specs:
rspec-core (2.0.0.beta.19)
timecop (0.3.5)

GIT
remote: git://github.com/rspec/rspec-expectations.git
revision: c1ce142
remote: http://github.com/thoughtbot/factory_girl.git
revision: 52d85d1
specs:
rspec-expectations (2.0.0.beta.19)
diff-lcs (>= 1.1.2)

GIT
remote: git://github.com/rspec/rspec-mocks.git
revision: 20194cf
specs:
rspec-mocks (2.0.0.beta.19)

GIT
remote: git://github.com/rspec/rspec-rails.git
revision: 72ecc03
specs:
rspec-rails (2.0.0.beta.19)
rspec (= 2.0.0.beta.19)
webrat (>= 0.7.2.beta.1)

GIT
remote: git://github.com/rspec/rspec.git
revision: 329df9a
specs:
rspec (2.0.0.beta.19)
rspec-core (= 2.0.0.beta.19)
rspec-expectations (= 2.0.0.beta.19)
rspec-mocks (= 2.0.0.beta.19)
factory_girl (1.3.1)

GEM
remote: http://rubygems.org/
Expand Down Expand Up @@ -86,12 +62,13 @@ GEM
cucumber (>= 0.8.0)
culerity (0.2.10)
database_cleaner (0.5.2)
devise (1.1.rc2)
devise (1.1.2)
bcrypt-ruby (~> 2.1.2)
warden (~> 0.10.7)
diff-lcs (1.1.2)
erubis (2.6.6)
abstract (>= 1.0.0)
fakeweb (1.3.0)
ffi (0.6.3)
rake (>= 0.8.7)
gherkin (2.1.5)
Expand Down Expand Up @@ -130,6 +107,16 @@ GEM
thor (~> 0.14.0)
rake (0.8.7)
rdiscount (1.6.5)
rspec (2.0.0.beta.20)
rspec-core (= 2.0.0.beta.20)
rspec-expectations (= 2.0.0.beta.20)
rspec-mocks (= 2.0.0.beta.20)
rspec-core (2.0.0.beta.20)
rspec-expectations (2.0.0.beta.20)
diff-lcs (>= 1.1.2)
rspec-mocks (2.0.0.beta.20)
rspec-rails (2.0.0.beta.20)
rspec (= 2.0.0.beta.20)
rubyzip (0.9.4)
selenium-webdriver (0.0.27)
ffi (>= 0.6.1)
Expand All @@ -145,10 +132,6 @@ GEM
tzinfo (0.3.22)
warden (0.10.7)
rack (>= 1.0.0)
webrat (0.7.2.beta.1)
nokogiri (>= 1.2.0)
rack (>= 1.0)
rack-test (>= 0.5.3)

PLATFORMS
ruby
Expand All @@ -158,17 +141,17 @@ DEPENDENCIES
cucumber
cucumber-rails
database_cleaner
devise (= 1.1.rc2)
devise (= 1.1.2)
factory_girl!
fakeweb
haml
launchy
pg (= 0.9.0)
rails (= 3.0.0.rc)
rdiscount
rspec!
rspec-core!
rspec-expectations!
rspec-mocks!
rspec-rails!
rspec (= 2.0.0.beta.20)
rspec-rails (= 2.0.0.beta.20)
spork
sqlite3-ruby
timecop!
warden
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -7,4 +7,4 @@ require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'

Rails::Application.load_tasks
Lyonrb::Application.load_tasks
5 changes: 3 additions & 2 deletions app/controllers/companies_controller.rb
@@ -1,5 +1,6 @@
class CompaniesController < ApplicationController
def list

def index

end

end
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
@@ -1,5 +1,5 @@
class EventsController < ApplicationController
def list
def index
@events = Event.all
end

Expand Down
5 changes: 3 additions & 2 deletions app/controllers/people_controller.rb
@@ -1,5 +1,6 @@
class PeopleController < ApplicationController
def list

def index

end

end
5 changes: 3 additions & 2 deletions app/controllers/projects_controller.rb
@@ -1,5 +1,6 @@
class ProjectsController < ApplicationController
def list

def index

end

end
2 changes: 0 additions & 2 deletions app/helpers/admin/events_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/companies_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/events_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/members/index_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/people_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/projects_helper.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/helpers/welcome_helper.rb

This file was deleted.

File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion app/views/layouts/admin/base.html.haml
@@ -1,5 +1,5 @@
!!!
%html{:manifest=>"application.manifest"}
%html
%head
%meta{:charset=>"utf-8"}/
%title= yield :page_title
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
@@ -1,5 +1,5 @@
!!!
%html{:manifest=>"application.manifest"}
%html
%head
%meta{:charset=>"utf-8"}/
%title= page_title
Expand Down
2 changes: 0 additions & 2 deletions app/views/members/index/index.html.erb

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions config/environments/development.rb
Expand Up @@ -17,4 +17,5 @@
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.active_support.deprecation = :log
end
1 change: 1 addition & 0 deletions config/environments/production.rb
Expand Up @@ -28,6 +28,7 @@
# Disable delivery errors, bad email addresses will be ignored
# config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.active_support.deprecation = :notify

# Enable threaded mode
# config.threadsafe!
Expand Down
1 change: 1 addition & 0 deletions config/environments/test.rb
Expand Up @@ -21,6 +21,7 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test
config.active_support.deprecation = :stderr

# Use SQL instead of Active Record's schema dumper when creating the test database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
Expand Down
10 changes: 5 additions & 5 deletions config/routes.rb
@@ -1,14 +1,14 @@
Lyonrb::Application.routes.draw do |map|
Lyonrb::Application.routes.draw do

namespace 'admin' do
resources :events
root :to => "index#index"
end

get "events/list"
get "projects/list"
get "companies/list"
get "people/list"
get "/events" => "events#index"
get "/projects" => "projects#index"
get "/companies" => "companies#index"
get "/people" => "people#index"

devise_for :members

Expand Down
56 changes: 54 additions & 2 deletions spec/controllers/admin/events_controller_spec.rb
@@ -1,12 +1,64 @@
require 'spec_helper'

describe Admin::EventsController do

include Devise::TestHelpers
before :each do
@user = member_login Factory(:member)
@event = Factory(:event)
end

describe "GET 'index'" do
it "should be successful" do
get 'index'
get :index
response.should be_success
end
end

describe 'show' do
it 'should succeed' do
get :show, :id => @event.to_param
response.should be_success
end
end

describe 'new' do
it 'should succeed' do
get :new
response.should be_success
end
end

describe 'create' do
it 'should create a new event' do
lambda do
post :create, :event => Factory.attributes_for(:event)
end.should change(Event, :count).by(1)
response.should be_success
end
end

describe 'edit' do
it 'should succeed' do
get :edit, :id => @event.to_param
end
end

describe 'update' do
it 'should update an event' do
put :update, :id => @event.to_param, :event => {:name => 'RubyCamp'}
response.should be_success
@event.reload
@event.name.should eql('RubyCamp')
end
end

describe 'destroy' do
it 'should destroy an event' do
lambda do
delete :destroy, :id => @event.to_param
end.should change(Event, :count).by(-1)
response.should be_redirect
end
end

end
15 changes: 15 additions & 0 deletions spec/controllers/admin/index_controller_spec.rb
@@ -0,0 +1,15 @@
require 'spec_helper'

describe Admin::IndexController do
include Devise::TestHelpers
before :each do
@user = member_login Factory(:member)
end

describe 'index' do
it 'should succeed' do
get :index
response.should be_success
end
end
end
12 changes: 12 additions & 0 deletions spec/controllers/companies_controller_spec.rb
@@ -0,0 +1,12 @@
require 'spec_helper'

describe CompaniesController do
include Devise::TestHelpers

describe 'index' do
it 'should succeed' do
get :index
response.should be_success
end
end
end
12 changes: 12 additions & 0 deletions spec/controllers/events_controller_spec.rb
@@ -0,0 +1,12 @@
require 'spec_helper'

describe EventsController do
include Devise::TestHelpers

describe 'index' do
it 'should succeed' do
get :index
response.should be_success
end
end
end

2 comments on commit 9fc3753

@dmathieu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know when pulling after having committed locally, you can do :

git pull --rebase origin master

This will fetch and rebase instead of merging. That avoids those weirds merge logs :)

@franckverrot
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I know... I've been a bit lazy on that one :)

Please sign in to comment.