From 6dcb7bbf6bb142316ebeeb1a518f75674bd19423 Mon Sep 17 00:00:00 2001 From: Serge Paquet Date: Mon, 23 Dec 2013 18:15:58 -0500 Subject: [PATCH] fixed mixed indent style (should be 2 soft spaces as per project guidelines) --- app/views/comments/_comment.html.erb | 20 ++++++++--------- app/views/comments/threads.html.erb | 2 +- app/views/filters/index.html.erb | 4 ++-- app/views/home/index.html.erb | 2 +- app/views/login/forgot_password.html.erb | 6 +++--- app/views/login/set_new_password.html.erb | 26 +++++++++++------------ app/views/messages/index.html.erb | 4 ++-- app/views/messages/show.html.erb | 2 +- app/views/moderations/index.html.erb | 6 +++--- app/views/settings/index.html.erb | 12 +++++------ app/views/stories/edit.html.erb | 12 +++++------ app/views/stories/show.html.erb | 12 +++++------ public/404.html | 2 +- spec/models/story_spec.rb | 12 +++++------ 14 files changed, 61 insertions(+), 61 deletions(-) diff --git a/app/views/comments/_comment.html.erb b/app/views/comments/_comment.html.erb index 3f8f53a..c83fc59 100644 --- a/app/views/comments/_comment.html.erb +++ b/app/views/comments/_comment.html.erb @@ -2,10 +2,10 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ? "upvoted" : "downvoted") : "" %> <%= comment.highlighted ? "highlighted" : "" %> - <%= comment.score <= 0 ? "negative" : "" %> - <%= comment.score <= -3 ? "negative_3" : "" %> - <%= comment.score <= -5 ? "negative_5" : "" %> - <%= comment.score <= -7 ? "negative_7" : "" %>"> + <%= comment.score <= 0 ? "negative" : "" %> + <%= comment.score <= -3 ? "negative_3" : "" %> + <%= comment.score <= -5 ? "negative_5" : "" %> + <%= comment.score <= -7 ? "negative_7" : "" %>"> <% if !comment.is_gone? %>
@@ -15,8 +15,8 @@ class="comment <%= comment.current_vote ? (comment.current_vote[:vote] == 1 ?
<% end %> -
- +
diff --git a/app/views/comments/threads.html.erb b/app/views/comments/threads.html.erb index fde5c02..4c8f156 100644 --- a/app/views/comments/threads.html.erb +++ b/app/views/comments/threads.html.erb @@ -13,7 +13,7 @@ <% end %> <% end %> - <%= render :partial => "comments/comment", :locals => { :story => cur_story, + <%= render :partial => "comments/comment", :locals => { :story => cur_story, :comment => comment, :show_story => (comment.indent_level == 1) } %> <% indent_level = comment.indent_level %> diff --git a/app/views/filters/index.html.erb b/app/views/filters/index.html.erb index f867a0c..dd904b0 100644 --- a/app/views/filters/index.html.erb +++ b/app/views/filters/index.html.erb @@ -1,7 +1,7 @@
- Filtered Tags -
+ Filtered Tags +

To hide stories from the home page that have been tagged with certain tags, diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index f1a6ca6..04db669 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -1,5 +1,5 @@

    - <%= render :partial => "stories/listdetail", :collection => @stories, + <%= render :partial => "stories/listdetail", :collection => @stories, :as => :story %>
diff --git a/app/views/login/forgot_password.html.erb b/app/views/login/forgot_password.html.erb index 8291b9a..fa3f4a2 100644 --- a/app/views/login/forgot_password.html.erb +++ b/app/views/login/forgot_password.html.erb @@ -1,7 +1,7 @@
-
- Reset Password -
+
+ Reset Password +

If you've forgotten your password, enter your e-mail address or username diff --git a/app/views/login/set_new_password.html.erb b/app/views/login/set_new_password.html.erb index aeece5f..291d5aa 100644 --- a/app/views/login/set_new_password.html.erb +++ b/app/views/login/set_new_password.html.erb @@ -1,24 +1,24 @@

-
- Set New Password -
+
+ Set New Password +
<%= form_tag set_new_password_url, { :autocomplete => "off" } do %> <%= error_messages_for(@reset_user) %> - <%= hidden_field_tag "token", params[:token] %> + <%= hidden_field_tag "token", params[:token] %> -

- <%= label_tag :username, "Username:" %> - <%= @reset_user.username %> -
+

+ <%= label_tag :username, "Username:" %> + <%= @reset_user.username %> +
- <%= label_tag :password, "New Password:" %> - <%= password_field_tag :password, "", :size => 30 %> -
+ <%= label_tag :password, "New Password:" %> + <%= password_field_tag :password, "", :size => 30 %> +
- <%= label_tag :password_confirmation, "(Again):" %> - <%= password_field_tag :password_confirmation, "", :size => 30 %> + <%= label_tag :password_confirmation, "(Again):" %> + <%= password_field_tag :password_confirmation, "", :size => 30 %>

diff --git a/app/views/messages/index.html.erb b/app/views/messages/index.html.erb index e476fcf..4f97f49 100644 --- a/app/views/messages/index.html.erb +++ b/app/views/messages/index.html.erb @@ -7,11 +7,11 @@ <% end %>

- Private Messages + Private Messages <% if @direction == :out %> Sent <% end %> -
+
<% if @messages.any? %> diff --git a/app/views/messages/show.html.erb b/app/views/messages/show.html.erb index 3d640f7..a4ef5e2 100644 --- a/app/views/messages/show.html.erb +++ b/app/views/messages/show.html.erb @@ -18,7 +18,7 @@ @message.recipient.username %> <%= raw(time_ago_in_words_label(@message.created_at)) %> ago - +
<%= raw @message.linkified_body %> diff --git a/app/views/moderations/index.html.erb b/app/views/moderations/index.html.erb index 8285c4c..1849e90 100644 --- a/app/views/moderations/index.html.erb +++ b/app/views/moderations/index.html.erb @@ -1,7 +1,7 @@
-
- Moderation Log -
+
+ Moderation Log +
diff --git a/app/views/settings/index.html.erb b/app/views/settings/index.html.erb index 52447e6..1a255a9 100644 --- a/app/views/settings/index.html.erb +++ b/app/views/settings/index.html.erb @@ -1,10 +1,10 @@
+
+ Account Settings
-
- Account Settings -
<%= form_for @edit_user, :url => settings_url, :method => :post do |f| %> <%= error_messages_for f.object %> @@ -166,8 +166,8 @@
- Invite a New User -
+ Invite a New User +
<%= render :partial => "users/invitationform" %> diff --git a/app/views/stories/edit.html.erb b/app/views/stories/edit.html.erb index 09f85f6..57d5274 100644 --- a/app/views/stories/edit.html.erb +++ b/app/views/stories/edit.html.erb @@ -1,11 +1,11 @@
-
- Edit Story -
+
+ Edit Story +
- <%= form_for @story, :url => story_url(@story.short_id), + <%= form_for @story, :url => story_url(@story.short_id), :method => :put do |f| %> - <%= render :partial => "stories/form", :locals => { :story => @story, + <%= render :partial => "stories/form", :locals => { :story => @story, :f => f } %> <% if @story.user_id != @user.id %> @@ -36,5 +36,5 @@ :locals => { :allow_images => true } %>
- <% end %> + <% end %> diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb index 6b90f4f..7593970 100644 --- a/app/views/stories/show.html.erb +++ b/app/views/stories/show.html.erb @@ -1,14 +1,14 @@
    - <%= render :partial => "stories/listdetail", + <%= render :partial => "stories/listdetail", :locals => { :story => @story, :single_story => true } %>
- <% if @story.markeddown_description.present? %> -
- <%= raw @story.markeddown_description %> -
- <% end %> + <% if @story.markeddown_description.present? %> +
+ <%= raw @story.markeddown_description %> +
+ <% end %>

<% if @user && !@story.is_gone? && !@story.previewing %> diff --git a/public/404.html b/public/404.html index 2d8f8a7..86724f7 100644 --- a/public/404.html +++ b/public/404.html @@ -4,6 +4,6 @@ 404 -

gone fishin'

+

gone fishin'

diff --git a/spec/models/story_spec.rb b/spec/models/story_spec.rb index e9dcfe0..1e0827e 100644 --- a/spec/models/story_spec.rb +++ b/spec/models/story_spec.rb @@ -13,7 +13,7 @@ describe Story do expect { Story.make!(:title => "hello", :description => "hi", :url => nil) }.to_not raise_error - + expect { Story.make!(:title => "hello", :url => "http://ex.com/", :description => nil) }.to_not raise_error end @@ -31,7 +31,7 @@ describe Story do it "must have at least one tag" do expect { Story.make!(:tags_a => nil) }.to raise_error expect { Story.make!(:tags_a => [ "", " " ]) }.to raise_error - + expect { Story.make!(:tags_a => [ "", "tag1" ]) }.to_not raise_error end @@ -53,7 +53,7 @@ describe Story do :url => "http://example.com/") }.to raise_error Story.count.should == 1 - + expect { Story.make!(:title => "flim flam 2", :url => "http://www.example.com/") }.to raise_error @@ -74,7 +74,7 @@ describe Story do it "converts a title to a url properly" do s = Story.make!(:title => "Hello there, this is a title") s.title_as_url.should == "hello_there_this_is_a_title" - + s = Story.make!(:title => "Hello _ underscore") s.title_as_url.should == "hello_underscore" end @@ -83,10 +83,10 @@ describe Story do u = User.make! s = Story.make!(:user_id => u.id) - s.is_editable_by_user?(u).should == true + s.is_editable_by_user?(u).should == true u = User.make! - s.is_editable_by_user?(u).should == false + s.is_editable_by_user?(u).should == false end it "can fetch its title properly" do