Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of git@github.com:railsrumble/giant-robots

  • Loading branch information...
commit ec3c5c9969dab04d87b52aa002794cb4ab989a5c 2 parents 8c9dfd8 + c5a5542
@mike-burns mike-burns authored
View
1  app/views/layouts/application.html.erb
@@ -15,6 +15,7 @@
<div id="header">
<h1 id="logo"><%= link_to %{<span class="invisible">Where's the Milk at?</span>}, root_url %></h1>
+ <p id="hello">Hey there, <%= user_name %></p>
<div id="menu">
<ul>
<li id="purchases-index" ><%= link_to 'Purchases', purchases_path %></li>
View
9 app/views/users/new.html.erb
@@ -1,7 +1,10 @@
<div id="account-changes">
<div class="signup-map" id="map" style="width: 475px; height: 169px;"></div>
- <% form_tag openid_path, :id => "openid_form" do %>
+ <% form_tag openid_path,
+ :id => "openid_form",
+ :style => "display: #{params[:user_type] == 'human' ? 'none' : 'block'};" do %>
+ <%= hidden_field_tag 'user_type', 'openid' %>
<div class="text_field">
<label for="openid_identifier">
Open ID <%= link_to_function "Login like a Human", "$('openid_form').hide(); $('new_user').show();" %>
@@ -18,7 +21,9 @@
</p>
<% end %>
- <% form_for @user, :html => { :style => "display: none;" } do |form| %>
+ <% form_for @user,
+ :html => { :style => "display: #{params[:user_type] == 'human' ? 'block' : 'none'};" } do |form| %>
+ <%= hidden_field_tag 'user_type', 'human' %>
<%= form.error_messages %>
<div class="text_field">
<label for="user_email">
View
2  config/environments/production.rb
@@ -16,3 +16,5 @@
# Disable delivery errors, bad email addresses will be ignored
config.action_mailer.raise_delivery_errors = false
+
+HOST = "wheresthemilkat.r08.railsrumble.com"
View
8 config/initializers/action_mailer_configs.rb
@@ -1,7 +1 @@
-ActionMailer::Base.smtp_settings = {
- :address => "smtp.thoughtbot.com",
- :port => 25,
- :domain => "thoughtbot.com"
-}
-
-DO_NOT_REPLY = "donotreply@wheresthemilk.at"
+DO_NOT_REPLY = "donotreply@wheresthemilkat.r08.railsrumble.com"
View
2  config/initializers/hoptoad.rb
@@ -1,3 +1,3 @@
HoptoadNotifier.configure do |config|
- config.api_key = 'HOPTOAD-KEY'
+ config.api_key = 'b61f9924295cd6f481cef3696870e536'
end
View
BIN  public/images/confirm-message.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
9 public/stylesheets/main.css
@@ -78,7 +78,7 @@ h1 {
padding-top: 14px;
padding-left: 30px;
width: 93px;
- height: 10px;
+ height: 6px;
padding-bottom: 12px;
background: #57999d 0 0;
margin: 0;
@@ -1073,3 +1073,10 @@ h2#login {
body.stores #map {
margin-top: 10px;
}
+
+#hello {
+ float: right;
+ margin-top: 17px;
+ margin-right: 200px;
+ color: #91cfd3;
+}
View
28 test/functional/users_controller_test.rb
@@ -15,6 +15,34 @@ class UsersControllerTest < ActionController::TestCase
should_have_map_observer map
end
end
+
+ context "POST to create as a human" do
+ setup do
+ post :create, :user_type => 'human'
+ end
+
+ should "display the human form" do
+ assert_select '#new_user[style="display: block;"]'
+ end
+
+ should "hide the openid form" do
+ assert_select '#openid_form[style="display: none;"]'
+ end
+ end
+
+ context "POST to create using openid" do
+ setup do
+ post :create, :user_type => 'openid'
+ end
+
+ should "hide the human form" do
+ assert_select '#new_user[style="display: none;"]'
+ end
+
+ should "display the openid form" do
+ assert_select '#openid_form[style="display: block;"]'
+ end
+ end
public_context do
context "with a user" do
Please sign in to comment.
Something went wrong with that request. Please try again.