Lipsiasoft-exception-notifier 1.1 → 1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/rdoctask'
4
4
  require 'rake/gempackagetask'
5
5
 
6
6
  PKG_NAME = 'exception-notifier'
7
- PKG_VERSION = "1.1"
7
+ PKG_VERSION = "1.3"
8
8
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
9
9
 
10
10
  $LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
@@ -50,9 +50,14 @@ Rake::GemPackageTask.new(spec) do |p|
50
50
  end
51
51
 
52
52
  desc "Install the gem locally"
53
- task :install => [:repackage] do
53
+ task :install => [:uninstall, :repackage] do
54
54
  sh %{sudo gem install pkg/#{PKG_FILE_NAME}.gem}
55
55
  end
56
+
57
+ desc "Unistall the gem from local"
58
+ task :uninstall => [:clean] do
59
+ sh %{sudo gem uninstall #{PKG_NAME}}
60
+ end
56
61
 
57
62
  desc "Generate a gemspec file for GitHub"
58
63
  task :gemspec do
@@ -1,7 +1,7 @@
1
1
  A <%= @exception.class %> occurred in <%= @controller.controller_name %>#<%= @controller.action_name %>:
2
2
 
3
- <%= @exception.message %>
4
- <%= @backtrace.join("\n") %>
3
+ <%=h @exception.message %>
4
+ <%=h @backtrace.join("\n") %>
5
5
 
6
6
  * URL : <%= @request.protocol %><%= @host %><%= @request.request_uri %>
7
7
  * IP address: <%= @request.env["HTTP_X_FORWARDED_FOR"] || @request.env["REMOTE_ADDR"] %>
@@ -22,7 +22,7 @@ module Lipsiadmin
22
22
  def exception(exception, controller, request)
23
23
  content_type "text/plain"
24
24
 
25
- subject "#{email_prefix} #{exception.message.inspect}"
25
+ subject "#{email_prefix} A #{exception.class} occurred in #{controller.controller_name}##{controller.action_name}"
26
26
 
27
27
  recipients recipients_addresses
28
28
  from sender_address
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Lipsiasoft-exception-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.1"
4
+ version: "1.3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Davide D'Agostino