Permalink
Browse files

Merging, and cleaning up changes from achiu, what a hero!

  • Loading branch information...
1 parent 896ba07 commit 5d65a4cb9d96828c4bb270bfcc28cfdbedcba612 @leehambley leehambley committed Jul 21, 2010
View
@@ -22,22 +22,13 @@ Note: since 0.2.0 this will use the asynchronous google tracker code, for the tr
If you are not sure what's best, go with the defaults, and read here if you should opt-out
-## Environments
-
-There is a Rails-only (send a patch!) feature for only enabling this in certain environments, you can specify which by sending the `:env => 'some-env'` option when initializing the code. (Right now this conditionally requires the `Rails` constant.) The default is `production`.
-
## Thread Safety
This middleware *should* be thread safe. Although my experience in such areas is limited, having taken the advice of those with more experience; I defer the call to a shallow copy of the environment, if this is of consequence to you please review the implementation.
-## Bugs & Feedback
-
-More than welcome, of course please see the notes below for contributor's tips, otherwise drop me a mail or open an issue.
-
-This was of course software to scratch my itch; but I'd love to build on it and learn from the experiences of others using it.
-
## Change Log
+* 22-07-2010 Major re-write from Arthur Chiu, now correctly writes the Content-Length leader, and comes with tests (High five to @achiu) - this patch also backs-out the changes from @cimm - but they were un-tested (I intend to bring these back as soon as possible; this will probably constitute a 1.0 release when it happens)
* 19-01-2010 Second Release, patch from github.com/ralph - makes the default snippet the async version from google. Use regular synchronous code with: `:async => false`
* 27-12-2009 First Release, extracted from the Capistrano-Website project and packaged with Jeweler.
@@ -54,4 +45,4 @@ This was of course software to scratch my itch; but I'd love to build on it and
## Copyright
Copyright (c) 2009 Lee Hambley. See LICENSE for details.
-With thanks to Ralph von der Heyden http://github.com/ralph/ and Simon `cimm` Schoeters http://github.com/cimm/
+With thanks to Ralph von der Heyden http://github.com/ralph/ and Simon `cimm` Schoeters http://github.com/cimm/ - And the biggest hand to Arthur `achiu` Chiu for the huge work that went into the massive 0.9 re-factor.
View
@@ -1,24 +1,6 @@
require 'rubygems'
require 'rake'
-begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "rack-google-analytics"
- gem.summary = %Q{Rack middleware to insert google analytics tracking code into the footer of HTML documents as served}
- gem.description = %Q{A simple Rack middleware compatible with Rails, Merb, Sinatra, etc. Easily installed inserts the google tracking code directly before the </body> of your Content-Type="*html" documents}
- gem.email = "lee.hambley@gmail.com"
- gem.homepage = "http://github.com/leehambley/rack-google-analytics"
- gem.authors = ["Lee Hambley"]
- gem.add_development_dependency "shoulda", ">= 0"
- gem.add_development_dependency "yard", ">= 0"
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
-end
-
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'lib' << 'test'
@@ -39,8 +21,6 @@ rescue LoadError
end
end
-task :test => :check_dependencies
-
task :default => :test
begin
View
@@ -1 +1 @@
-0.6.1
+0.9.0
View
@@ -0,0 +1,91 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta name="Content-Type" content="text/html; charset=utf-8" />
+<title>Module: Rack</title>
+<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
+<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
+
+<script type="text/javascript" charset="utf-8">
+ relpath = '';
+ if (relpath != '') relpath += '/';
+</script>
+<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
+<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
+
+ </head>
+ <body>
+ <script type="text/javascript" charset="utf-8">
+ if (window.top.frames.main) document.body.className = 'frames';
+ </script>
+
+ <div id="header">
+ <div id="menu">
+
+ <a href="_index.html">Index (R)</a> &raquo;
+
+
+ <span class="title">Rack</span>
+
+
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
+</div>
+
+ <div id="search">
+ <a id="class_list_link" href="#">Class List</a>
+ <a id="method_list_link" href="#">Method List</a>
+ <a id ="file_list_link" href="#">File List</a>
+</div>
+
+ <div class="clear"></div>
+ </div>
+
+ <iframe id="search_frame"></iframe>
+
+ <div id="content"><h1>Module: Rack
+
+
+
+</h1>
+
+<dl class="box">
+
+
+
+
+
+
+
+
+ <dt class="r1 last">Defined in:</dt>
+ <dd class="r1 last">lib/rack-google-analytics.rb</dd>
+
+</dl>
+<div class="clear"></div>
+
+<h2>Defined Under Namespace</h2>
+<p class="children">
+
+
+
+
+ <strong class="classes">Classes:</strong> <a href="Rack/GoogleAnalytics.html" title="Rack::GoogleAnalytics (class)">GoogleAnalytics</a>
+
+
+</p>
+
+
+
+
+
+</div>
+
+ <div id="footer">
+ Generated on Wed Jul 21 16:46:02 2010 by
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
+ 0.5.8 (ruby-1.9.2).
+</div>
+
+ </body>
+</html>
Oops, something went wrong.

0 comments on commit 5d65a4c

Please sign in to comment.