joshuaclayton-watchtower 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/Manifest CHANGED
@@ -8,7 +8,7 @@ app/views/watchtower/destroy_multiple.js.rjs
8
8
  app/views/watchtower/index.html.erb
9
9
  app/views/watchtower/index.js.rjs
10
10
  app/views/watchtower/show.html.erb
11
- config/routes.rb
11
+ config/watchtower_routes.rb
12
12
  generators/watchtower/templates/migrations/create_watched_exceptions.rb
13
13
  generators/watchtower/templates/README
14
14
  generators/watchtower/USAGE
@@ -53,6 +53,7 @@ generators/watchtower_assets/USAGE
53
53
  generators/watchtower_assets/watchtower_assets_generator.rb
54
54
  lib/watchtower/application_controller_base.rb
55
55
  lib/watchtower/controller_base.rb
56
+ lib/watchtower/routes.rb
56
57
  lib/watchtower/watched_exception_base.rb
57
58
  lib/watchtower/watched_exceptions_presenter.rb
58
59
  lib/watchtower.rb
@@ -62,5 +63,3 @@ rails/init.rb
62
63
  Rakefile
63
64
  README.textile
64
65
  tasks/watchtower_tasks.rake
65
- test/test_helper.rb
66
- watchtower.gemspec
data/Rakefile CHANGED
@@ -1,9 +1,9 @@
1
- require 'rake'
2
- require 'rake/testtask'
3
- require 'rake/rdoctask'
4
- require 'echoe'
1
+ require "rake"
2
+ require "rake/testtask"
3
+ require "rake/rdoctask"
4
+ require "echoe"
5
5
 
6
- Echoe.new("watchtower", "0.1.2") do |p|
6
+ Echoe.new("watchtower", "0.1.3") do |p|
7
7
  p.description = "An exception logger for Rails 2.3"
8
8
  p.url = "http://github.com/joshuaclayton/watchtower"
9
9
  p.author = "Joshua Clayton"
@@ -12,24 +12,55 @@ Echoe.new("watchtower", "0.1.2") do |p|
12
12
  p.development_dependencies = ["activesupport >= 2.3.0", "will_paginate >= 2.3.4"]
13
13
  end
14
14
 
15
- desc 'Default: run unit tests.'
16
- task :default => :test
15
+ namespace :test do
16
+ Rake::TestTask.new(:all => ["generator:cleanup",
17
+ "generator:generate"]) do |task|
18
+ task.libs << "lib"
19
+ task.libs << "test"
20
+ task.pattern = "test/**/*_test.rb"
21
+ task.verbose = false
22
+ end
23
+ end
24
+
25
+ desc "Run the test suite"
26
+ task :default => "test:all"
27
+
28
+ generators = %w(watchtower watchtower_assets)
29
+
30
+ namespace :generator do
31
+ desc "Cleans up the test app before running the generator"
32
+ task :cleanup do
33
+ generators.each do |generator|
34
+ FileList["generators/#{generator}/templates/**/*.*"].each do |f|
35
+ file = "test/rails_root/#{f.gsub("generators/#{generator}/templates/","")}"
36
+ File.delete(file) if File.exists?(file)
37
+ end
38
+ end
39
+
40
+ FileList["test/rails_root/db/**/*"].each do |each|
41
+ FileUtils.rm_rf(each)
42
+ end
43
+
44
+ FileUtils.rm_rf("test/rails_root/vendor/plugins/watchtower")
45
+ FileUtils.mkdir_p("test/rails_root/vendor/plugins")
46
+ watchtower_root = File.expand_path(File.dirname(__FILE__))
47
+ system("ln -s #{watchtower_root} test/rails_root/vendor/plugins/watchtower")
48
+ end
17
49
 
18
- desc 'Test the watchtower plugin.'
19
- Rake::TestTask.new(:test) do |t|
20
- t.libs << 'lib'
21
- t.libs << 'test'
22
- t.pattern = 'test/**/*_test.rb'
23
- t.verbose = true
50
+ desc "Run the generator on the tests"
51
+ task :generate do
52
+ system "cd test/rails_root && ./script/generate watchtower && rake db:migrate db:test:prepare"
53
+ system "cd test/rails_root && ./script/generate watchtower_assets"
54
+ end
24
55
  end
25
56
 
26
- desc 'Generate documentation for the watchtower plugin.'
57
+ desc "Generate documentation for the watchtower plugin."
27
58
  Rake::RDocTask.new(:rdoc) do |rdoc|
28
- rdoc.rdoc_dir = 'rdoc'
29
- rdoc.title = 'Watchtower'
30
- rdoc.options << '--line-numbers' << '--inline-source'
31
- rdoc.rdoc_files.include('README')
32
- rdoc.rdoc_files.include('lib/**/*.rb')
59
+ rdoc.rdoc_dir = "rdoc"
60
+ rdoc.title = "Watchtower"
61
+ rdoc.options << "--line-numbers" << "--inline-source"
62
+ rdoc.rdoc_files.include("README")
63
+ rdoc.rdoc_files.include("lib/**/*.rb")
33
64
  end
34
65
 
35
66
  Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each {|rakefile| load rakefile }
@@ -0,0 +1,5 @@
1
+ ActionController::Routing::Routes.draw do |map|
2
+ map.resources :watchtower,
3
+ :only => [:index, :show, :destroy, :destroy_multiple],
4
+ :collection => {:destroy_multiple => :delete}
5
+ end
@@ -40,7 +40,7 @@
40
40
  });
41
41
 
42
42
  $("ul.watched-exceptions li a").live("click", function(e) {
43
- $(this).stopImmediatePropagation()
43
+ $(this).stopImmediatePropagation();
44
44
  });
45
45
 
46
46
  $("#watchtower-search").submit(function(evt) {
@@ -46,8 +46,9 @@ module Watchtower
46
46
  @show_by_key = true
47
47
  return
48
48
  end
49
- @watched_exception = WatchedException.find(key)
49
+ @watched_exception = WatchedException.find_by_id(key)
50
50
  @show_by_id = true if @watched_exception
51
+ raise ActiveRecord::RecordNotFound unless @watched_exception
51
52
  end
52
53
  end
53
54
  end
@@ -0,0 +1,12 @@
1
+ class ActionController::Routing::RouteSet
2
+ def load_routes_with_watchtower!
3
+ lib_path = File.dirname(__FILE__)
4
+ custom_routes = File.join(lib_path, *%w[.. .. config watchtower_routes.rb])
5
+ unless configuration_files.include?(custom_routes)
6
+ add_configuration_file(custom_routes)
7
+ end
8
+ load_routes_without_watchtower!
9
+ end
10
+
11
+ alias_method_chain :load_routes!, :watchtower
12
+ end
@@ -11,7 +11,7 @@ module Watchtower
11
11
  module Callbacks
12
12
  def self.included(base)
13
13
  base.send :include, InstanceMethods
14
- base.before_validation_on_create :generate_key
14
+ base.before_validation_on_create :generate_key, :if => lambda {|watched_exception| watched_exception.key.blank? }
15
15
  base.before_save :generate_controller_action, :clean_backtrace
16
16
  end
17
17
 
@@ -40,11 +40,11 @@ module Watchtower
40
40
  base.class_eval do
41
41
  default_scope :order => "#{WatchedException.quoted_table_name}.created_at DESC"
42
42
  named_scope :recent, lambda {|*ct| ct = ct.first || 5; { :limit => ct }}
43
- named_scope :search, lambda { |query| {
43
+ named_scope :search, lambda {|query| {
44
44
  :conditions => [
45
45
  [ :controller_name, :action_name,
46
46
  :controller_action, :exception_class,
47
- :parameters, :message].map { |attribute| "#{WatchedException.quoted_table_name}.#{attribute} LIKE :query"}.join(" OR "), {:query => query}
47
+ :parameters, :message].map {|attribute| "#{WatchedException.quoted_table_name}.#{attribute} LIKE :query"}.join(" OR "), {:query => query}
48
48
  ]
49
49
  }}
50
50
 
data/lib/watchtower.rb CHANGED
@@ -1,5 +1,5 @@
1
- # Watchtower
2
1
  require "watchtower/watched_exception_base"
3
2
  require "watchtower/controller_base"
4
3
  require "watchtower/application_controller_base"
5
- require "watchtower/watched_exceptions_presenter"
4
+ require "watchtower/watched_exceptions_presenter"
5
+ require "watchtower/routes"
@@ -0,0 +1,41 @@
1
+ require "test_helper"
2
+
3
+ class WatchtowerControllerTest < ActionController::TestCase
4
+ context "on GET to :index" do
5
+ setup do
6
+ WatchedExceptionsPresenter.expects(:new).with(has_entries("query" => "term", "page" => "3")).returns([].paginate)
7
+ get :index, :query => "term", :page => "3"
8
+ end
9
+ should_respond_with :success
10
+ end
11
+
12
+ context "on GET to :show" do
13
+ context "with an existing ID" do
14
+ setup do
15
+ @exception = Factory :watched_exception
16
+ get :show, :id => @exception.id
17
+ end
18
+
19
+ should_respond_with :success
20
+ should_render_template :show
21
+ end
22
+
23
+ context "with an existing key" do
24
+ setup do
25
+ @exception = Factory :watched_exception, :key => "my-key"
26
+ get :show, :id => "my-key"
27
+ end
28
+
29
+ should_respond_with :success
30
+ should_render_template :show
31
+ end
32
+
33
+ context "with invalid id" do
34
+ should "raise a not found error" do
35
+ assert_raise ActiveRecord::RecordNotFound do
36
+ get :show, :id => "key doesn't exist"
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,46 @@
1
+ require 'test_helper'
2
+
3
+ class WatchedExceptionTest < ActiveSupport::TestCase
4
+ should_have_named_scope :recent, :limit => 5
5
+ should_have_named_scope "recent(20)", :limit => 20
6
+ should_have_default_scope :order => "#{WatchedException.quoted_table_name}.created_at DESC"
7
+
8
+ context "A watched exception instance" do
9
+ setup { @watched_exception = Factory(:watched_exception) }
10
+ should_validate_uniqueness_of :key
11
+ should_validate_presence_of :key
12
+
13
+ should "generate the controller_action attribute on save" do
14
+ @watched_exception.controller_name = "test"
15
+ @watched_exception.action_name = "test"
16
+ assert_not_equal @watched_exception.controller_action, "test/test"
17
+
18
+ @watched_exception.save
19
+ assert_equal @watched_exception.controller_action, "test/test"
20
+ end
21
+
22
+ should "generate a key when created" do
23
+ @watched_exception = Factory.build(:watched_exception, :key => nil)
24
+ ActiveSupport::SecureRandom.expects(:hex).with(12).returns("new key")
25
+ @watched_exception.save
26
+ assert_equal "new key", @watched_exception.key
27
+ end
28
+
29
+ should "know how to generate its name attribute" do
30
+ @watched_exception.exception_class = "My Exception"
31
+ @watched_exception.stubs(:controller_action).returns("Controller Action")
32
+ assert_equal "My Exception in Controller Action", @watched_exception.name
33
+ end
34
+ end
35
+
36
+ should "list all exception classes" do
37
+ WatchedException.expects(:all).with(:select => "DISTINCT exception_class", :order => "exception_class").returns([])
38
+ WatchedException.exception_classes
39
+ end
40
+
41
+ should "list all controller actions" do
42
+ WatchedException.expects(:all).with(:select => "DISTINCT controller_action", :order => "controller_action").returns([])
43
+ WatchedException.controller_actions
44
+ end
45
+
46
+ end
@@ -0,0 +1,58 @@
1
+ require 'test_helper'
2
+
3
+ class WatchedExceptionsPresenterTest < ActiveSupport::TestCase
4
+ context "generating correct scope" do
5
+ should "search if passed :query" do
6
+ WatchedException.expects(:search).with("%term%").returns([])
7
+ WatchedExceptionsPresenter.new(:query => "term")
8
+ end
9
+
10
+ should "filter by :action_name" do
11
+ WatchedException.expects(:scoped_by_action_name).with("action").returns([])
12
+ WatchedExceptionsPresenter.new(:action_name => "action")
13
+ end
14
+
15
+ should "filter by :controller_name" do
16
+ WatchedException.expects(:scoped_by_controller_name).with("controller").returns([])
17
+ WatchedExceptionsPresenter.new(:controller_name => "controller")
18
+ end
19
+
20
+ should "filter by :controller_action" do
21
+ WatchedException.expects(:scoped_by_controller_action).with("controller/action").returns([])
22
+ WatchedExceptionsPresenter.new(:controller_action => "controller/action")
23
+ end
24
+
25
+ should "filter by :exception_class" do
26
+ WatchedException.expects(:scoped_by_exception_class).with("NoMethodError").returns([])
27
+ WatchedExceptionsPresenter.new(:exception_class => "NoMethodError")
28
+ end
29
+
30
+ should "filter by :start_at" do
31
+ WatchedException.expects(:scoped).with({:conditions => ["DATE(#{WatchedException.quoted_table_name}.created_at) >= ?", Date.parse("01/01/2009").to_s(:db)]}).returns([])
32
+ WatchedExceptionsPresenter.new(:start_at => "01/01/2009")
33
+ end
34
+
35
+ should "filter by :end_at" do
36
+ WatchedException.expects(:scoped).with({:conditions => ["DATE(#{WatchedException.quoted_table_name}.created_at) <= ?", Date.parse("01/01/2009").to_s(:db)]}).returns([])
37
+ WatchedExceptionsPresenter.new(:end_at => "01/01/2009")
38
+ end
39
+
40
+ should "paginate results" do
41
+ WatchedException.expects(:paginate).with({:page => 1, :per_page => 10}).returns([])
42
+ WatchedExceptionsPresenter.new(:page => 1)
43
+ end
44
+ end
45
+
46
+ context "method delegation" do
47
+ should "pass any extra methods to WatchedException" do
48
+ (result = []).expects(:my_method)
49
+ WatchedExceptionsPresenter.stubs(:new).returns(result)
50
+ WatchedExceptionsPresenter.new({}).my_method
51
+ end
52
+
53
+ should "allow iteration" do
54
+ WatchedExceptionsPresenter.stubs(:new).returns([1,2,3])
55
+ assert_equal ["1", "2", "3"], WatchedExceptionsPresenter.new({}).map(&:to_s)
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,38 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
3
+ require 'test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Transactional fixtures accelerate your tests by wrapping each test method
7
+ # in a transaction that's rolled back on completion. This ensures that the
8
+ # test database remains unchanged so your fixtures don't have to be reloaded
9
+ # between every test method. Fewer database queries means faster tests.
10
+ #
11
+ # Read Mike Clark's excellent walkthrough at
12
+ # http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
13
+ #
14
+ # Every Active Record database supports transactions except MyISAM tables
15
+ # in MySQL. Turn off transactional fixtures in this case; however, if you
16
+ # don't care one way or the other, switching from MyISAM to InnoDB tables
17
+ # is recommended.
18
+ #
19
+ # The only drawback to using transactional fixtures is when you actually
20
+ # need to test transactions. Since your test is bracketed by a transaction,
21
+ # any transactions started in your code will be automatically rolled back.
22
+ self.use_transactional_fixtures = true
23
+
24
+ # Instantiated fixtures are slow, but give you @david where otherwise you
25
+ # would need people(:david). If you don't want to migrate your existing
26
+ # test cases which use the @david style and don't mind the speed hit (each
27
+ # instantiated fixtures translates to a database query per test method),
28
+ # then set this back to true.
29
+ self.use_instantiated_fixtures = false
30
+
31
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
32
+ #
33
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
34
+ # -- they do not yet inherit this setting
35
+ fixtures :all
36
+
37
+ # Add more helper methods to be used by all tests here...
38
+ end
data/test/test_helper.rb CHANGED
@@ -1,3 +1,28 @@
1
- require 'rubygems'
2
- require 'active_support'
3
- require 'active_support/test_case'
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path(File.dirname(__FILE__) +
3
+ "/rails_root/config/environment")
4
+ require 'test_help'
5
+ $: << File.expand_path(File.dirname(__FILE__) + '/..')
6
+ require "watchtower"
7
+
8
+ gem "thoughtbot-factory_girl" # from github
9
+ require "factory_girl"
10
+
11
+ require "test/factories/watched_exception"
12
+
13
+ require "redgreen" rescue LoadError
14
+ require "mocha"
15
+
16
+ class ActiveSupport::TestCase
17
+ self.use_transactional_fixtures = true
18
+ self.use_instantiated_fixtures = false
19
+ end
20
+
21
+ class Test::Unit::TestCase
22
+ def self.should_have_default_scope(options = {})
23
+ klass = self.name.gsub(/Test$/, '').constantize
24
+ should "have the default scope #{options.inspect}" do
25
+ assert klass.default_scoping.any? {|scope| scope[:find] == options }
26
+ end
27
+ end
28
+ end
data/watchtower.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{watchtower}
5
- s.version = "0.1.2"
5
+ s.version = "0.1.3"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Joshua Clayton"]
9
- s.date = %q{2009-05-01}
9
+ s.date = %q{2009-05-18}
10
10
  s.description = %q{An exception logger for Rails 2.3}
11
11
  s.email = %q{joshua.clayton@gmail.com}
12
- s.extra_rdoc_files = ["lib/watchtower/application_controller_base.rb", "lib/watchtower/controller_base.rb", "lib/watchtower/watched_exception_base.rb", "lib/watchtower/watched_exceptions_presenter.rb", "lib/watchtower.rb", "README.textile", "tasks/watchtower_tasks.rake"]
13
- s.files = ["app/controllers/watchtower_controller.rb", "app/helpers/watchtower_helper.rb", "app/models/watched_exception.rb", "app/views/layouts/watchtower.erb", "app/views/watchtower/_recordset.erb", "app/views/watchtower/destroy.js.rjs", "app/views/watchtower/destroy_multiple.js.rjs", "app/views/watchtower/index.html.erb", "app/views/watchtower/index.js.rjs", "app/views/watchtower/show.html.erb", "config/routes.rb", "generators/watchtower/templates/migrations/create_watched_exceptions.rb", "generators/watchtower/templates/README", "generators/watchtower/USAGE", "generators/watchtower/watchtower_generator.rb", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery-1.3.2.min.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery-ui-1.7.1.custom.min.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.bindings.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.events.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.js", "generators/watchtower_assets/templates/public/stylesheets/watchtower/admin.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/ajax-loader.gif", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/bullet-black.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/buttons/sprite-gray.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/buttons/x.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign-red.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign-sm.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/edit-template.gif", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/success-badge.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/nav-admin-shadow.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/extras.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/forms.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/ie.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_flat_0_aaaaaa_40x100.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_55_fbf9ee_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_65_ffffff_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_dadada_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_e6e6e6_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_ffffff_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_highlight-soft_75_cccccc_1x100.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_inset-soft_95_fef1ec_1x100.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_222222_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_2e83ff_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_454545_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_888888_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_cd0a0a_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/jquery-ui-1.7.1.custom.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/reset.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/screen.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/watchtower.css", "generators/watchtower_assets/USAGE", "generators/watchtower_assets/watchtower_assets_generator.rb", "lib/watchtower/application_controller_base.rb", "lib/watchtower/controller_base.rb", "lib/watchtower/watched_exception_base.rb", "lib/watchtower/watched_exceptions_presenter.rb", "lib/watchtower.rb", "Manifest", "MIT-LICENSE", "rails/init.rb", "Rakefile", "README.textile", "tasks/watchtower_tasks.rake", "test/test_helper.rb", "watchtower.gemspec"]
12
+ s.extra_rdoc_files = ["lib/watchtower/application_controller_base.rb", "lib/watchtower/controller_base.rb", "lib/watchtower/routes.rb", "lib/watchtower/watched_exception_base.rb", "lib/watchtower/watched_exceptions_presenter.rb", "lib/watchtower.rb", "README.textile", "tasks/watchtower_tasks.rake"]
13
+ s.files = ["app/controllers/watchtower_controller.rb", "app/helpers/watchtower_helper.rb", "app/models/watched_exception.rb", "app/views/layouts/watchtower.erb", "app/views/watchtower/_recordset.erb", "app/views/watchtower/destroy.js.rjs", "app/views/watchtower/destroy_multiple.js.rjs", "app/views/watchtower/index.html.erb", "app/views/watchtower/index.js.rjs", "app/views/watchtower/show.html.erb", "config/watchtower_routes.rb", "generators/watchtower/templates/migrations/create_watched_exceptions.rb", "generators/watchtower/templates/README", "generators/watchtower/USAGE", "generators/watchtower/watchtower_generator.rb", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery-1.3.2.min.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery-ui-1.7.1.custom.min.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.bindings.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.events.js", "generators/watchtower_assets/templates/public/javascripts/watchtower/jquery.watchtower.js", "generators/watchtower_assets/templates/public/stylesheets/watchtower/admin.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/ajax-loader.gif", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/bullet-black.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/buttons/sprite-gray.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/buttons/x.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign-red.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign-sm.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/caution-sign.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/edit-template.gif", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/icons/success-badge.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/assets/images/nav-admin-shadow.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/extras.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/forms.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/ie.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_flat_0_aaaaaa_40x100.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_55_fbf9ee_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_65_ffffff_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_dadada_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_e6e6e6_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_glass_75_ffffff_1x400.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_highlight-soft_75_cccccc_1x100.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-bg_inset-soft_95_fef1ec_1x100.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_222222_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_2e83ff_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_454545_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_888888_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/images/ui-icons_cd0a0a_256x240.png", "generators/watchtower_assets/templates/public/stylesheets/watchtower/jquery-ui-1.7.1.custom.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/reset.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/screen.css", "generators/watchtower_assets/templates/public/stylesheets/watchtower/watchtower.css", "generators/watchtower_assets/USAGE", "generators/watchtower_assets/watchtower_assets_generator.rb", "lib/watchtower/application_controller_base.rb", "lib/watchtower/controller_base.rb", "lib/watchtower/routes.rb", "lib/watchtower/watched_exception_base.rb", "lib/watchtower/watched_exceptions_presenter.rb", "lib/watchtower.rb", "Manifest", "MIT-LICENSE", "rails/init.rb", "Rakefile", "README.textile", "tasks/watchtower_tasks.rake", "watchtower.gemspec", "test/controllers/watchtower_controller_test.rb", "test/models/watched_exception_test.rb", "test/models/watched_exceptions_presenter_test.rb", "test/rails_root/test/test_helper.rb", "test/test_helper.rb"]
14
14
  s.has_rdoc = true
15
15
  s.homepage = %q{http://github.com/joshuaclayton/watchtower}
16
16
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Watchtower", "--main", "README.textile"]
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.rubyforge_project = %q{watchtower}
19
19
  s.rubygems_version = %q{1.3.2}
20
20
  s.summary = %q{An exception logger for Rails 2.3}
21
- s.test_files = ["test/test_helper.rb"]
21
+ s.test_files = ["test/controllers/watchtower_controller_test.rb", "test/models/watched_exception_test.rb", "test/models/watched_exceptions_presenter_test.rb", "test/rails_root/test/test_helper.rb", "test/test_helper.rb"]
22
22
 
23
23
  if s.respond_to? :specification_version then
24
24
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: joshuaclayton-watchtower
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Clayton
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-01 00:00:00 -07:00
12
+ date: 2009-05-18 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -47,6 +47,7 @@ extensions: []
47
47
  extra_rdoc_files:
48
48
  - lib/watchtower/application_controller_base.rb
49
49
  - lib/watchtower/controller_base.rb
50
+ - lib/watchtower/routes.rb
50
51
  - lib/watchtower/watched_exception_base.rb
51
52
  - lib/watchtower/watched_exceptions_presenter.rb
52
53
  - lib/watchtower.rb
@@ -63,7 +64,7 @@ files:
63
64
  - app/views/watchtower/index.html.erb
64
65
  - app/views/watchtower/index.js.rjs
65
66
  - app/views/watchtower/show.html.erb
66
- - config/routes.rb
67
+ - config/watchtower_routes.rb
67
68
  - generators/watchtower/templates/migrations/create_watched_exceptions.rb
68
69
  - generators/watchtower/templates/README
69
70
  - generators/watchtower/USAGE
@@ -108,6 +109,7 @@ files:
108
109
  - generators/watchtower_assets/watchtower_assets_generator.rb
109
110
  - lib/watchtower/application_controller_base.rb
110
111
  - lib/watchtower/controller_base.rb
112
+ - lib/watchtower/routes.rb
111
113
  - lib/watchtower/watched_exception_base.rb
112
114
  - lib/watchtower/watched_exceptions_presenter.rb
113
115
  - lib/watchtower.rb
@@ -117,8 +119,12 @@ files:
117
119
  - Rakefile
118
120
  - README.textile
119
121
  - tasks/watchtower_tasks.rake
120
- - test/test_helper.rb
121
122
  - watchtower.gemspec
123
+ - test/controllers/watchtower_controller_test.rb
124
+ - test/models/watched_exception_test.rb
125
+ - test/models/watched_exceptions_presenter_test.rb
126
+ - test/rails_root/test/test_helper.rb
127
+ - test/test_helper.rb
122
128
  has_rdoc: true
123
129
  homepage: http://github.com/joshuaclayton/watchtower
124
130
  post_install_message:
@@ -151,4 +157,8 @@ signing_key:
151
157
  specification_version: 3
152
158
  summary: An exception logger for Rails 2.3
153
159
  test_files:
160
+ - test/controllers/watchtower_controller_test.rb
161
+ - test/models/watched_exception_test.rb
162
+ - test/models/watched_exceptions_presenter_test.rb
163
+ - test/rails_root/test/test_helper.rb
154
164
  - test/test_helper.rb
data/config/routes.rb DELETED
@@ -1,3 +0,0 @@
1
- ActionController::Routing::Routes.draw do |map|
2
- map.resources :watchtower, :only => [:index, :show, :destroy, :destroy_multiple], :collection => {:destroy_multiple => :delete}
3
- end