Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix all whitespace issues now so upcoming commits aren't littered wit…

…h them
  • Loading branch information...
commit 53d0295e1f85a4a5c03e957279fca522993b780f 1 parent a0f335b
@bensie bensie authored
View
2  app/controllers/events_controller.rb
@@ -41,7 +41,7 @@ def update
#redirect_to(events_url)
#end
-
+
protected
def find_event
View
14 app/controllers/pages_controller.rb
@@ -1,24 +1,24 @@
class PagesController < ApplicationController
-
+
def about
end
-
+
def index
@podcast = Podcast.published.first
end
-
+
def sponsors
end
-
+
def team
@organizer = User.find_by_full_name("Patrick Crowley")
@team = User.where(:admin => true).order(:sort)
end
-
+
def thanks
end
-
+
def tshirts
end
-
+
end
View
2  app/controllers/photos_controller.rb
@@ -1,5 +1,5 @@
class PhotosController < ApplicationController
-
+
def index
@photos = Photo::meetup
end
View
6 app/controllers/podcasts_controller.rb
@@ -1,7 +1,7 @@
class PodcastsController < ApplicationController
before_filter :require_admin, :except => [:index, :show, :search]
before_filter :find_podcast, :except => [:index, :new, :create, :search]
-
+
def index
@podcasts = Podcast.published.all
@@ -51,13 +51,13 @@ def destroy
flash[:notice] = 'Podcast was successfully destroyed.'
redirect_to podcasts_path
end
-
+
def search
@episodes = Podcast.search do
fulltext params[:q]
order_by :id, :desc
end
-
+
respond_to do |format|
format.html
format.json { render :json => @episodes.results, :only => [:id] }
View
2  app/controllers/projects_controller.rb
@@ -5,7 +5,7 @@ def index
@featured_project = Project.featured
@users = User.all(:order => "full_name ASC", :include => :projects)
end
-
+
def featured
@featured_project = Project.featured
render :partial => "project"
View
2  app/controllers/user_sessions_controller.rb
@@ -28,7 +28,7 @@ def destroy
private
-
+
def require_not_logged_in
if current_user
redirect_to user_path(current_user)
View
6 app/controllers/users_controller.rb
@@ -6,7 +6,7 @@ class UsersController < ApplicationController
def index
@users = User.all(:order => "full_name ASC", :include => :projects)
end
-
+
def new
if current_user
redirect_to user_path(current_user)
@@ -61,7 +61,7 @@ def update
render :action => "edit"
end
end
-
+
def destroy
@user.destroy
flash[:notice] = "Member profile deleted."
@@ -74,7 +74,7 @@ def destroy
def find_user
@user = User.find_by_id(params[:id])
-
+
unless @user
flash[:notice] = "No such user."
redirect_to root_path
View
6 app/helpers/podcasts_helper.rb
@@ -1,11 +1,11 @@
module PodcastsHelper
-
+
def size_for(podcast)
if podcast.id > 40
"345x267"
- else
+ else
"345x266"
end
end
-
+
end
View
6 app/models/event.rb
@@ -1,11 +1,11 @@
class Event < ActiveRecord::Base
-
+
def self.types
['Event', 'Meeting']
end
-
+
def self.next
self.find(:first, :conditions => ["starts_at > ? AND is_private = ?", Time.now, false ], :order => "starts_at ASC")
end
-
+
end
View
2  app/models/photo.rb
@@ -1,4 +1,4 @@
-class Photo
+class Photo
def self.meetup
RMeetup::Client.api_key = '28593fc521913722bc11a60253a29'
View
2  app/models/podcast.rb
@@ -7,7 +7,7 @@ class Podcast < ActiveRecord::Base
integer :id
text :name, :description
end
-
+
has_attached_file :screenshot,
:styles => {
:large => ["345x267!", :png],
View
14 app/models/user.rb
@@ -11,16 +11,16 @@ class User < ActiveRecord::Base
validate :avatar_is_valid
- has_attached_file :avatar,
- :styles => { :small => "48x48#", :medium => "128x128#", :large => "256x256#" },
+ has_attached_file :avatar,
+ :styles => { :small => "48x48#", :medium => "128x128#", :large => "256x256#" },
:path => ":rails_root/public/images/users/avatars/:id/:style.:extension",
:url => "/images/users/avatars/:id/:style.:extension",
:default_url => "/images/users/avatar_:style.png"
-
+
def to_s
full_name
end
-
+
def is_admin?
self.id == 1 ? true : false
end
@@ -37,7 +37,7 @@ def grab_projects
unless self.github_username.blank?
# Destroy existing projects
self.projects.destroy_all
-
+
# Grab new projects
begin
api_uri = URI("https://api.github.com/users/#{self.github_username.strip}/repos")
@@ -89,7 +89,7 @@ def twitter
end
protected
-
+
def avatar_is_valid
if self.avatar_file_name?
unless ["image/gif", "image/jpeg", "image/png"].include?(self.avatar_content_type)
@@ -104,5 +104,5 @@ def self.random_string(len)
1.upto(len) { |i| newpass << chars[rand(chars.size-1)] }
return newpass
end
-
+
end
View
6 config/routes.rb
@@ -2,7 +2,7 @@
# Homepage
root to: 'pages#index'
-
+
# Custom routes
match "/forgot" => "users#forgot_password", as: :password_reset
match "/login" => "user_sessions#new", as: :login
@@ -16,9 +16,9 @@
# Resources
resources :podcasts, :path => :podcast do
- get :search, on: :collection
+ get :search, on: :collection
end
-
+
resources :projects do
get :featured, on: :collection
end
View
8 db/migrate/20090312210342_user_auth.rb
@@ -14,10 +14,10 @@ def self.up
t.string :crypted_password, :null => false
t.string :password_salt, :null => false
t.string :persistence_token, :null => false
- t.string :single_access_token, :null => false
- t.string :perishable_token, :null => false
- t.integer :login_count, :null => false, :default => 0
- t.integer :failed_login_count, :null => false, :default => 0
+ t.string :single_access_token, :null => false
+ t.string :perishable_token, :null => false
+ t.integer :login_count, :null => false, :default => 0
+ t.integer :failed_login_count, :null => false, :default => 0
t.timestamps
end
View
8 lib/metadata.rb
@@ -1,14 +1,14 @@
class Metadata
-
+
def self.get(file)
command = "mplayer -vo null -ao null -frames 0 -identify #{file}"
metadata = nil
-
+
output = `#{command}`
metadata = output.grep(/ID_.*/).collect {|name| name[3..name.length].split('=')}
metadata = metadata.inject({}) {|hash, (key, value)| hash[key.to_sym] = value.chomp; hash}
-
+
return metadata
end
-
+
end
View
2  spec/controllers/users_controller_spec.rb
@@ -131,7 +131,7 @@
context "when valid" do
before do
lambda { post :create, :user => FactoryGirl.attributes_for(:user) }.should change {
- User.count
+ User.count
}.by(1)
end
View
2  spec/factories/podcast.rb
@@ -4,6 +4,6 @@
f.description { Faker::Lorem.paragraph }
f.movie_link "http://sdruby.org"
f.publish true
- f.screenshot { Rack::Test::UploadedFile.new(Rails.root.join("spec", "fixtures", "files", "podcast_screenshot.png").to_s, "image/png") }
+ f.screenshot { Rack::Test::UploadedFile.new(Rails.root.join("spec", "fixtures", "files", "podcast_screenshot.png").to_s, "image/png") }
end
end
View
2  spec/factories/user.rb
@@ -13,7 +13,7 @@
end
factory :user_with_avatar, :parent => :user do |f|
- f.avatar { Rack::Test::UploadedFile.new(Rails.root.join("spec", "fixtures", "files", "user_avatar.jpg").to_s, "image/jpeg") }
+ f.avatar { Rack::Test::UploadedFile.new(Rails.root.join("spec", "fixtures", "files", "user_avatar.jpg").to_s, "image/jpeg") }
end
factory :admin, :parent => :user do |f|
View
4 spec/models/user_spec.rb
@@ -12,14 +12,14 @@
it "should be valid" do
@user.should be_valid
end
-
+
it "should expose #first_name" do
@user.first_name.should == "Snoop"
end
it "should expose #last_name" do
@user.last_name.should == "Dog"
- end
+ end
describe "validations" do
it "should be invalid when full_name is nil, blank, or too short" do
View
4 spec/spec_helper.rb
@@ -36,9 +36,9 @@
# Includes
config.include(FactoryGirl::Syntax::Methods)
-
+
# Stubing Solr
- Sunspot.session = Sunspot::Rails::StubSessionProxy.new(Sunspot.session)
+ Sunspot.session = Sunspot::Rails::StubSessionProxy.new(Sunspot.session)
end
end
View
12 vendor/plugins/enkoder/lib/enkoder.rb
@@ -1,20 +1,20 @@
# Copyright (c) 2006, Automatic Corp.
# All rights reserved.
-#
+#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
-#
+#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
-#
+#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
-#
+#
# 3. Neither the name of AUTOMATIC CORP. nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
-#
+#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -94,7 +94,7 @@ def enkode( html, max_length=1024 )
result
end
-
+
def enkode_mail( email, link_text, title_text=nil, subject=nil )
str = String.new
str << '<a href="mailto:' + email
View
6 vendor/plugins/headliner/lib/headliner.rb
@@ -1,5 +1,5 @@
module Headliner
-
+
def title(options, headline='')
if options.is_a? String
save_title(options, headline)
@@ -38,7 +38,7 @@ def display_title(options)
else
suffix = ' '
end
-
+
# Lowercase title?
if options[:lowercase] == true
@title = @title.downcase unless @title.blank?
@@ -54,7 +54,7 @@ def display_title(options)
return content_tag(:title, options[:site] + prefix + separator + suffix + @title)
end
end
-
+
# If title is blank, return only website name
content_tag :title, options[:site]
end
View
22 vendor/plugins/headliner/test/headliner_test.rb
@@ -9,7 +9,7 @@ class HeadlinerTest < Test::Unit::TestCase
include Headliner
# Make the blank? method available without loading Rails
- Object.class_eval do
+ Object.class_eval do
def blank?
if respond_to?(:empty?) && respond_to?(:strip)
empty? or strip.empty?
@@ -18,7 +18,7 @@ def blank?
else
!self
end
- end
+ end
end
def test_title_is_saved
@@ -31,7 +31,7 @@ def test_title_is_saved_with_headline
assert_equal "Headliner", @title
assert_equal "Headliner: a plugin for setting page titles", headline
end
-
+
def test_title_is_site_when_empty
title :site => "the.railsi.st"
assert_equal nil, @title
@@ -53,13 +53,13 @@ def test_title_is_lowercase
full_title = display_title :site => "the.railsi.st", :lowercase => true
assert_equal "<title>the.railsi.st | headliner</title>", full_title
end
-
+
def test_title_is_reversed
@title = "Headliner"
full_title = display_title :site => "the.railsi.st", :reverse => true
assert_equal "<title>Headliner | the.railsi.st</title>", full_title
end
-
+
def test_title_has_custom_separator
@title = "Headliner"
full_title = display_title :site => "the.railsi.st", :separator => "&mdash;"
@@ -86,18 +86,18 @@ def test_title_has_no_suffix_and_has_custom_separator
def test_title_has_no_prefix_and_suffix_and_has_custom_separator
@title = "Headliner"
- full_title = display_title :site => "the.railsi.st",
- :prefix => false,
- :suffix => false,
+ full_title = display_title :site => "the.railsi.st",
+ :prefix => false,
+ :suffix => false,
:separator => "&mdash;"
assert_equal "<title>the.railsi.st&mdash;Headliner</title>", full_title
end
def test_title_has_all_custom_options
@title = "Headliner"
- full_title = display_title :site => "the.railsi.st",
- :prefix => " ",
- :suffix => " ",
+ full_title = display_title :site => "the.railsi.st",
+ :prefix => " ",
+ :suffix => " ",
:separator => ".:.",
:lowercase => true,
:reverse => true
Please sign in to comment.
Something went wrong with that request. Please try again.