Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Current live state

  • Loading branch information...
commit 31c60ec59711105673f971b464bda60afce8e017 1 parent 1548fd4
James Harton authored
View
2  app/controllers/definitions_controller.rb
@@ -1,5 +1,7 @@
class DefinitionsController < ApplicationController
+ monitor_with_munin :actions => [ :index ]
+
def index
@wordnik ||= Wordnik.new(YAML.load_file(RAILS_ROOT+"/config/wordnik.yml")['api_key'])
@word = Word.find_by_word(params[:word_id])
View
2  app/controllers/links_controller.rb
@@ -1,5 +1,7 @@
class LinksController < ApplicationController
+ monitor_with_munin :actions => [ :index, :new, :create ]
+
protect_from_forgery :except => :create
def index
View
3  app/controllers/stats_controller.rb
@@ -1,4 +1,7 @@
class StatsController < ApplicationController
+
+ monitor_with_munin :actions => [:show ]
+
def show
@word = Word.find_by_word(params[:id])
@link = @word.link
View
2  app/controllers/words_controller.rb
@@ -1,5 +1,7 @@
class WordsController < ApplicationController
+ monitor_with_munin :actions => [ :index, :show ]
+
def index
if Word.available.count < 1000
base = Word.not_composite
View
10 app/views/common/_analytics.html.erb
@@ -0,0 +1,10 @@
+<script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try {
+ var pageTracker = _gat._getTracker("UA-4396183-7");
+ pageTracker._trackPageview();
+ } catch(err) {}</script>
+
View
2  app/views/stats/show.html.erb
@@ -1,5 +1,5 @@
<div id="link_info" class="box">
- <%= link_to "<h3>#{word_url(@word)}</h3>", world_url(@word) %>
+ <%= link_to "<h3>#{word_url(@word)}</h3>", word_url(@word) %>
<br />
<input type="text" value="<%= @link.url %>" class="large" />
<a href="http://twitter.com/home?status=<%= CGI.escape(word_url(@word)) %>" target="_blank">Post to twitter.</a>
View
13 config/database.yml
@@ -1,10 +1,15 @@
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
- adapter: sqlite3
- database: db/development.sqlite3
- pool: 5
- timeout: 5000
+#adapter: sqlite3
+# database: db/development.sqlite3
+# pool: 5
+# timeout: 5000
+ adapter: postgresql
+ database: shorty_production
+ encoding: utf8
+ schema_search_path: public
+ template: template0
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
View
2  config/environment.rb
@@ -38,5 +38,5 @@
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
# config.i18n.default_locale = :de
+ config.log_level = :error
end
-
View
7 vendor/plugins/Muninator/TODO
@@ -1,7 +0,0 @@
-TODO
-====
-
- - Add table size information via acts_as_munin_plugin
- - Add query time information via acts_as_munin_plugin
- - Add plugin for template rendering statistics
- - Various plugins to time controller actions

0 comments on commit 31c60ec

Please sign in to comment.
Something went wrong with that request. Please try again.