Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9dd9005
Showing
158 changed files
with
2,435 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Add your own tasks in files placed in lib/tasks ending in .rake, | ||
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. | ||
|
||
require(File.join(File.dirname(__FILE__), 'config', 'boot')) | ||
|
||
require 'rake' | ||
require 'rake/testtask' | ||
require 'rake/rdoctask' | ||
|
||
require 'tasks/rails' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
8 | ||
|
||
dir | ||
365 | ||
svn://errtheblog.com/svn/projects/counter/app | ||
svn://errtheblog.com/svn/projects | ||
|
||
|
||
|
||
2007-06-20T21:23:52.510167Z | ||
177 | ||
pj | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
cf301c5b-d72e-0410-996c-ed4829982077 | ||
|
||
helpers | ||
dir | ||
|
||
models | ||
dir | ||
|
||
controllers | ||
dir | ||
|
||
views | ||
dir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
8 | ||
|
||
dir | ||
365 | ||
svn://errtheblog.com/svn/projects/counter/app/controllers | ||
svn://errtheblog.com/svn/projects | ||
|
||
|
||
|
||
2007-06-20T21:04:19.042538Z | ||
176 | ||
pj | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
cf301c5b-d72e-0410-996c-ed4829982077 | ||
|
||
application.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-02-15T21:05:41.000000Z | ||
ddeef0afed8a42a883e767f0afc2266e | ||
2007-06-18T20:19:38.886950Z | ||
147 | ||
pj | ||
|
||
sites_controller.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-02-15T21:05:41.000000Z | ||
e813f046881395b55611729dbee5fe72 | ||
2007-06-20T21:04:19.042538Z | ||
176 | ||
pj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class ApplicationController < ActionController::Base | ||
session :off | ||
end |
33 changes: 33 additions & 0 deletions
33
app/controllers/.svn/text-base/sites_controller.rb.svn-base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class SitesController < ApplicationController | ||
def index | ||
@sites = Site.find_active | ||
respond_to do |wants| | ||
wants.html | ||
wants.json { render :json => @sites.to_json } | ||
wants.xml { render :xml => @sites.to_xml } | ||
end | ||
end | ||
|
||
def show | ||
@site = Site.find(params[:id]) | ||
respond_to do |wants| | ||
wants.html | ||
wants.json { render :json => @site.to_json } | ||
wants.xml { render :xml => @site.to_xml } | ||
end | ||
end | ||
|
||
def create | ||
url = sanitize(params[:url]) | ||
@site = Site.find_by_url(url) | ||
@site = Site.create!(:url => url) unless @site | ||
redirect_to site_path(@site) | ||
rescue | ||
redirect_to '/' | ||
end | ||
|
||
private | ||
def sanitize(url) | ||
url.gsub(/^www\./, '').gsub(/\/$/, '') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class ApplicationController < ActionController::Base | ||
session :off | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
class SitesController < ApplicationController | ||
def index | ||
@sites = Site.find_active | ||
respond_to do |wants| | ||
wants.html | ||
wants.json { render :json => @sites.to_json } | ||
wants.xml { render :xml => @sites.to_xml } | ||
end | ||
end | ||
|
||
def show | ||
@site = Site.find(params[:id]) | ||
respond_to do |wants| | ||
wants.html | ||
wants.json { render :json => @site.to_json } | ||
wants.xml { render :xml => @site.to_xml } | ||
end | ||
end | ||
|
||
def create | ||
url = sanitize(params[:url]) | ||
@site = Site.find_by_url(url) | ||
@site = Site.create!(:url => url) unless @site | ||
redirect_to site_path(@site) | ||
rescue | ||
redirect_to '/' | ||
end | ||
|
||
private | ||
def sanitize(url) | ||
url.gsub(/^www\./, '').gsub(/\/$/, '') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
8 | ||
|
||
dir | ||
365 | ||
svn://errtheblog.com/svn/projects/counter/app/helpers | ||
svn://errtheblog.com/svn/projects | ||
|
||
|
||
|
||
2007-06-18T20:34:01.236006Z | ||
150 | ||
pj | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
cf301c5b-d72e-0410-996c-ed4829982077 | ||
|
||
application_helper.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-02-15T21:05:41.000000Z | ||
7b9ebb8b67ebd491bc8e091b4d757357 | ||
2007-06-18T20:34:01.236006Z | ||
150 | ||
pj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module ApplicationHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module ApplicationHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
8 | ||
|
||
dir | ||
365 | ||
svn://errtheblog.com/svn/projects/counter/app/models | ||
svn://errtheblog.com/svn/projects | ||
|
||
|
||
|
||
2007-06-20T21:23:52.510167Z | ||
177 | ||
pj | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
cf301c5b-d72e-0410-996c-ed4829982077 | ||
|
||
site.rb | ||
file | ||
|
||
|
||
|
||
|
||
2008-02-15T21:05:41.000000Z | ||
77b6b78938b314e742abc743f865538f | ||
2007-06-20T21:23:52.510167Z | ||
177 | ||
pj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Site < ActiveRecord::Base | ||
validates_format_of :url, :with => /^\w+\.[a-z0-9.:]+$/i | ||
def self.find_active | ||
find(:all, :conditions => 'hits > 0', :order => 'hits desc') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Site < ActiveRecord::Base | ||
validates_format_of :url, :with => /^\w+\.[a-z0-9.:]+$/i | ||
def self.find_active | ||
find(:all, :conditions => 'hits > 0', :order => 'hits desc') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
8 | ||
|
||
dir | ||
365 | ||
svn://errtheblog.com/svn/projects/counter/app/views | ||
svn://errtheblog.com/svn/projects | ||
|
||
|
||
|
||
2007-06-20T21:04:19.042538Z | ||
176 | ||
pj | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
cf301c5b-d72e-0410-996c-ed4829982077 | ||
|
||
layouts | ||
dir | ||
|
||
sites | ||
dir | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
8 | ||
|
||
dir | ||
365 | ||
svn://errtheblog.com/svn/projects/counter/app/views/layouts | ||
svn://errtheblog.com/svn/projects | ||
|
||
|
||
|
||
2007-06-20T21:04:19.042538Z | ||
176 | ||
pj | ||
|
||
|
||
svn:special svn:externals svn:needs-lock | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
cf301c5b-d72e-0410-996c-ed4829982077 | ||
|
||
application.rhtml | ||
file | ||
|
||
|
||
|
||
|
||
2008-02-15T21:05:41.000000Z | ||
4b4de96b435e8a0731569345f1224965 | ||
2007-06-20T21:04:19.042538Z | ||
176 | ||
pj | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8 |
16 changes: 16 additions & 0 deletions
16
app/views/layouts/.svn/text-base/application.rhtml.svn-base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<html> | ||
<head> | ||
<title>ErrCount</title> | ||
<%= stylesheet_link_tag 'screen' %> | ||
</head> | ||
<body> | ||
<h1><%= link_to 'ErrCount' ,'/' %></h1> | ||
<h2>keeping you honest. <span class="tight"><%= link_to 'look here', sites_path %>.</span></h2> | ||
|
||
<%= yield %> | ||
|
||
<div id="footer"> | ||
an <span class="tight"><%= link_to 'Err the Blog', 'http://errtheblog.com' %></span> production. | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.