Permalink
Browse files

Merge branch 'release/0.1.4'

  • Loading branch information...
2 parents 7d005e6 + a600c8e commit 4a828ddc360a86d074e1ad950351f41c5d7a53a4 @jeffkreeftmeijer jeffkreeftmeijer committed Jun 22, 2011
View
@@ -23,7 +23,7 @@ gem 'gravtastic'
gem 'gust', :path => 'vendor/gems/gust'
-gem 'newrelic_rpm'
+gem 'rpm_contrib'
gem 'hoptoad_notifier'
group :test do
View
@@ -189,6 +189,8 @@ GEM
rake (0.9.2)
rest-client (1.6.1)
mime-types (>= 1.16)
+ rpm_contrib (1.0.13)
+ newrelic_rpm (>= 2.13.1)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
@@ -264,9 +266,9 @@ DEPENDENCIES
mocha
mongoid (~> 2.0)
mongoid_slug
- newrelic_rpm
omniauth
rails (= 3.1.0.rc1)
+ rpm_contrib
rspec-rails
sass
spork (~> 0.9.0.rc)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -50,7 +50,7 @@ img.gravatar
border: 1px solid #ddd
vertical-align: middle
-p, img.contestant
+p
margin: 10px 0
form
@@ -143,10 +143,13 @@ form
#contests li, #entry
padding: 20px 10px
-#entries li.entry
+.contestants
+ margin-top: 10px
+
+#entries li.entry, .contestants li
padding: 10px
-#contests li, #entries li.entry, #entry
+#contests li, #entries li.entry, #entry, .contestants li
background-color: #ddd
border-radius: 2px
box-shadow: 0 -1px 0 #ccc, 0 1px 0 #fff
@@ -1,2 +1,7 @@
module ApplicationHelper
+
+ def avatar_url
+ "http://#{request.domain}#{request.local? ? ":#{request.port}" : ''}#{asset_path('avatar.png')}"
+ end
+
end
@@ -6,7 +6,10 @@
%h3 Contestants
- @contest.entries.map(&:user).each do |contestant|
- = image_tag(contestant.gravatar_url, :class => 'gravatar contestant', :alt => contestant.login, :title => contestant.login)
+ %ul.contestants
+ %li
+ = image_tag(contestant.gravatar_url(:default => avatar_url), :class => 'gravatar', :alt => contestant.login, :title => contestant.login)
+ = link_to contestant.login, "https://github.com/#{contestant.login}"
- unless @contest.open?
@@ -1,7 +1,7 @@
%li{ :id => dom_id(entry), :class => entry.contest.closed? ? [%w{gold silver bronze}[entry_counter], 'entry'].join(' ') : 'entry' }
- if entry.contest.closed? || @voted_entries.include?(entry)
.owner
- = image_tag entry.user.gravatar_url(:size => 20), :class => 'gravatar'
+ = image_tag entry.user.gravatar_url(:size => 20, :default => avatar_url), :class => 'gravatar'
= entry.user.login
- entry.files.each do |name, file|
@@ -19,7 +19,7 @@
#menu
%span
- if current_user
- = image_tag current_user.gravatar_url(:size => 20), :class => 'gravatar'
+ = image_tag current_user.gravatar_url(:size => 20, :default => avatar_url), :class => 'gravatar'
//= link_to current_user.login, user_path(current_user.login)
= current_user.login
:erb
@@ -1,6 +1,6 @@
%h2= @user.name
-= image_tag @user.gravatar_url(:size => 220)
+= image_tag @user.gravatar_url(:size => 220, :default => avatar_url)
%ul
- @contests.reject{ |contest| contest.open? }.each do |contest|
@@ -89,14 +89,13 @@
page.should have_no_content 'README'
end
- it_should_behave_like 'a contest with hidden contestant names'
-
scenario 'be able to enter' do
page.should have_link 'Enter'
end
- scenario 'see the contestant box' do
+ scenario 'see the contestants list' do
within'#main' do
+ page.should have_content 'charlie'
body.should include 'http://gravatar.com/avatar/1dae832a3c5ae2702f34ed50a40010e8.png'
end
end
@@ -30,7 +30,7 @@
end
scenario 'see the user gravatar' do
- body.should include 'http://gravatar.com/avatar/1dae832a3c5ae2702f34ed50a40010e8.png?r=PG&s=220'
+ body.should include 'http://gravatar.com/avatar/1dae832a3c5ae2702f34ed50a40010e8.png'
end
scenario 'see the list of entered contests' do

0 comments on commit 4a828dd

Please sign in to comment.