Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Major update.

Updated bunch of gems, jquery, plugins, etc.
  • Loading branch information...
commit 27ca7346818b893ba00f6a3749f807b371f0bf6a 1 parent 1f88fd4
Tammer Saleh authored
Showing with 20,622 additions and 11,010 deletions.
  1. +0 −1  assets/app/controllers/application_controller.rb.fragment
  2. +1 −1  assets/app/views/layouts/_javascript.html.haml
  3. +8 −7 gold/.gems
  4. +1 −1  gold/app/controllers/application_controller.rb
  5. +1 −1  gold/app/views/layouts/_javascript.html.haml
  6. +10 −9 gold/config/environment.rb
  7. +1 −1  gold/public/stylesheets/blueprint/ie.css
  8. +9 −9 gold/public/stylesheets/blueprint/plugins/buttons/readme.txt
  9. +27 −27 gold/public/stylesheets/blueprint/plugins/fancy-type/screen.css
  10. +1 −1  gold/public/stylesheets/blueprint/plugins/link-icons/readme.txt
  11. +16 −16 gold/public/stylesheets/blueprint/plugins/link-icons/screen.css
  12. +1 −1  gold/public/stylesheets/blueprint/plugins/rtl/readme.txt
  13. +7 −7 gold/public/stylesheets/blueprint/plugins/rtl/screen.css
  14. +2 −2 gold/public/stylesheets/blueprint/screen.css
  15. +3 −3 gold/public/stylesheets/blueprint/src/grid.css
  16. BIN  gold/public/stylesheets/blueprint/src/grid.png
  17. +21 −21 gold/public/stylesheets/blueprint/src/ie.css
  18. +6 −6 gold/public/stylesheets/blueprint/src/print.css
  19. +10 −10 gold/public/stylesheets/blueprint/src/typography.css
  20. +0 −137 gold/public/stylesheets/formtastic.css
  21. +4 −1 gold/vendor/plugins/blue-ridge/CONTRIBUTORS
  22. +1 −1  gold/vendor/plugins/blue-ridge/lib/blue-ridge.js
  23. +1 −1  gold/vendor/plugins/blue-ridge/lib/blue_ridge.rb
  24. +18 −5 gold/vendor/plugins/blue-ridge/lib/consoleReportForRake.js
  25. +1 −1  gold/vendor/plugins/blue-ridge/lib/shell.js
  26. +8 −4 gold/vendor/plugins/blue-ridge/lib/test_runner.js
  27. +7 −0 gold/vendor/plugins/blue-ridge/vendor/README
  28. BIN  gold/vendor/plugins/blue-ridge/vendor/env-js.jar
  29. +8,111 −6,820 gold/vendor/plugins/blue-ridge/vendor/env.rhino.js
  30. +6,078 −0 gold/vendor/plugins/blue-ridge/vendor/jquery-1.4.1.js
  31. +6,240 −0 gold/vendor/plugins/blue-ridge/vendor/jquery-1.4.2.js
  32. BIN  gold/vendor/plugins/blue-ridge/vendor/js.jar
  33. +0 −3  gold/vendor/plugins/hoptoad_notifier/.yardopts
  34. +0 −25 gold/vendor/plugins/hoptoad_notifier/INSTALL
  35. +0 −22 gold/vendor/plugins/hoptoad_notifier/MIT-LICENSE
  36. +0 −227 gold/vendor/plugins/hoptoad_notifier/README.rdoc
  37. +0 −29 gold/vendor/plugins/hoptoad_notifier/Rakefile
  38. +0 −8 gold/vendor/plugins/hoptoad_notifier/TESTING.rdoc
  39. +0 −32 gold/vendor/plugins/hoptoad_notifier/ginger_scenarios.rb
  40. +0 −1  gold/vendor/plugins/hoptoad_notifier/init.rb
  41. +0 −1  gold/vendor/plugins/hoptoad_notifier/install.rb
  42. +0 −146 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier.rb
  43. +0 −99 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/backtrace.rb
  44. +0 −95 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/catcher.rb
  45. +0 −232 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/configuration.rb
  46. +0 −295 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/notice.rb
  47. +0 −16 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/rails_initializer.rb
  48. +0 −63 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/sender.rb
  49. +0 −37 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_tasks.rb
  50. +0 −91 gold/vendor/plugins/hoptoad_notifier/lib/templates/rescue.erb
  51. +0 −11 gold/vendor/plugins/hoptoad_notifier/rails/init.rb
  52. +0 −24 gold/vendor/plugins/hoptoad_notifier/recipes/hoptoad.rb
  53. +0 −38 gold/vendor/plugins/hoptoad_notifier/script/integration_test.rb
  54. +0 −89 gold/vendor/plugins/hoptoad_notifier/tasks/hoptoad_notifier_tasks.rake
  55. +0 −94 gold/vendor/plugins/hoptoad_notifier/test/backtrace_test.rb
  56. +0 −314 gold/vendor/plugins/hoptoad_notifier/test/catcher_test.rb
  57. +0 −207 gold/vendor/plugins/hoptoad_notifier/test/configuration_test.rb
  58. +0 −237 gold/vendor/plugins/hoptoad_notifier/test/helper.rb
  59. +0 −76 gold/vendor/plugins/hoptoad_notifier/test/hoptoad_2_0.xsd
  60. +0 −138 gold/vendor/plugins/hoptoad_notifier/test/hoptoad_tasks_test.rb
  61. +0 −85 gold/vendor/plugins/hoptoad_notifier/test/logger_test.rb
  62. +0 −363 gold/vendor/plugins/hoptoad_notifier/test/notice_test.rb
  63. +0 −222 gold/vendor/plugins/hoptoad_notifier/test/notifier_test.rb
  64. +0 −35 gold/vendor/plugins/hoptoad_notifier/test/rails_initializer_test.rb
  65. +0 −123 gold/vendor/plugins/hoptoad_notifier/test/sender_test.rb
  66. +0 −1  gold/vendor/plugins/hoptoad_notifier/vendor/ginger/.gitignore
  67. +0 −20 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/LICENCE
  68. +0 −50 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/README.textile
  69. +0 −57 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/Rakefile
  70. +0 −42 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/bin/ginger
  71. +0 −33 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/ginger.gemspec
  72. +0 −21 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger.rb
  73. +0 −20 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger/configuration.rb
  74. +0 −56 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger/kernel.rb
  75. +0 −24 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/lib/ginger/scenario.rb
  76. +0 −7 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger/configuration_spec.rb
  77. +0 −7 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger/kernel_spec.rb
  78. +0 −50 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger/scenario_spec.rb
  79. +0 −14 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/spec/ginger_spec.rb
  80. +0 −7 gold/vendor/plugins/hoptoad_notifier/vendor/ginger/spec/spec_helper.rb
  81. +28 −29 template.rb
View
1  assets/app/controllers/application_controller.rb.fragment
@@ -1,4 +1,3 @@
- include HoptoadNotifier::Catcher
include MasterMayI::ControllerExtensions
filter_parameter_logging :password, :password_confirmation
View
2  assets/app/views/layouts/_javascript.html.haml
@@ -1,4 +1,4 @@
-= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
+= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
= javascript_include_tag "application"
= yield :javascript
View
15 gold/.gems
@@ -1,7 +1,8 @@
-master_may_i --version '>= 0.6.0'
-will_paginate --version '>= 2.3.11'
-paperclip --version '>= 2.3.1'
-inherited_resources --version '>= 0.8.5'
-formtastic --version '>= 0.2.2'
-authlogic --version '>= 2.1.1'
-ambethia-smtp-tls --version '>= 1.1.2' --source http://gems.github.com
+hoptoad_notifier --version '~> 2.2.0'
+master_may_i --version '~> 0.6.0'
+will_paginate --version '~> 2.3.0'
+paperclip --version '~> 2.3.0'
+inherited_resources --version '~> 0.9.0'
+formtastic --version '~> 0.9.0'
+authlogic --version '~> 2.1.0'
+ambethia-smtp-tls --version '~> 1.1.0' --source http://gems.github.com
View
2  gold/app/controllers/application_controller.rb
@@ -7,7 +7,6 @@ class ApplicationController < ActionController::Base
# Scrub sensitive parameters from your log
# filter_parameter_logging :password
- include HoptoadNotifier::Catcher
include MasterMayI::ControllerExtensions
filter_parameter_logging :password, :password_confirmation
@@ -19,4 +18,5 @@ class ApplicationController < ActionController::Base
def interpolation_options
{ :resource_name => resource.to_s }
end
+
end
View
2  gold/app/views/layouts/_javascript.html.haml
@@ -1,4 +1,4 @@
-= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"
+= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
= javascript_include_tag "application"
= yield :javascript
View
19 gold/config/environment.rb
@@ -11,15 +11,16 @@
load(heroku_env) if File.exists?(heroku_env)
Rails::Initializer.run do |config|
- config.gem 'haml', :version => '>= 2.2.3'
- config.gem 'master_may_i', :version => '>= 0.6.0'
- config.gem 'will_paginate', :version => '>= 2.3.11'
- config.gem 'paperclip', :version => '>= 2.3.1'
- config.gem 'inherited_resources', :version => '>= 0.8.5'
- config.gem 'formtastic', :version => '>= 0.2.2'
- config.gem 'authlogic', :version => '>= 2.1.1'
- config.gem 'RedCloth', :version => '>= 4.0.0'
- config.gem 'ambethia-smtp-tls', :lib => 'smtp-tls', :source => 'http://gems.github.com', :version => '>= 1.1.2'
+ config.gem 'hoptoad_notifier', :version => '~> 2.2.0'
+ config.gem 'haml', :version => '~> 2.2.0'
+ config.gem 'master_may_i', :version => '~> 0.6.0'
+ config.gem 'will_paginate', :version => '~> 2.3.0'
+ config.gem 'paperclip', :version => '~> 2.3.0'
+ config.gem 'inherited_resources', :version => '~> 0.9.0'
+ config.gem 'formtastic', :version => '~> 0.9.0'
+ config.gem 'authlogic', :version => '~> 2.1.0'
+ config.gem 'RedCloth', :version => '~> 4.1.0'
+ config.gem 'ambethia-smtp-tls', :lib => 'smtp-tls', :source => 'http://gems.github.com', :version => '~> 1.1.0'
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
View
2  gold/public/stylesheets/blueprint/ie.css
@@ -14,7 +14,7 @@
/* ie.css */
body {text-align:center;}
.container {text-align:left;}
-* html .column, * html div.span-1, * html div.span-2, * html div.span-3, * html div.span-4, * html div.span-5, * html div.span-6, * html div.span-7, * html div.span-8, * html div.span-9, * html div.span-10, * html div.span-11, * html div.span-12, * html div.span-13, * html div.span-14, * html div.span-15, * html div.span-16, * html div.span-17, * html div.span-18, * html div.span-19, * html div.span-20, * html div.span-21, * html div.span-22, * html div.span-23, * html div.span-24 {display:inline;overflow-x:hidden;}
+* html .column, * html .span-1, * html .span-2, * html .span-3, * html .span-4, * html .span-5, * html .span-6, * html .span-7, * html .span-8, * html .span-9, * html .span-10, * html .span-11, * html .span-12, * html .span-13, * html .span-14, * html .span-15, * html .span-16, * html .span-17, * html .span-18, * html .span-19, * html .span-20, * html .span-21, * html .span-22, * html .span-23, * html .span-24 {display:inline;overflow-x:hidden;}
* html legend {margin:0px -8px 16px 0;padding:0;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
View
18 gold/public/stylesheets/blueprint/plugins/buttons/readme.txt
@@ -19,14 +19,14 @@ Usage
2) Use the following HTML code to place the buttons on your site:
- <button type="submit" class="button positive">
- <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
- </button>
+ <button type="submit" class="button positive">
+ <img src="css/blueprint/plugins/buttons/icons/tick.png" alt=""/> Save
+ </button>
- <a class="button" href="/password/reset/">
- <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
- </a>
+ <a class="button" href="/password/reset/">
+ <img src="css/blueprint/plugins/buttons/icons/key.png" alt=""/> Change Password
+ </a>
- <a href="#" class="button negative">
- <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
- </a>
+ <a href="#" class="button negative">
+ <img src="css/blueprint/plugins/buttons/icons/cross.png" alt=""/> Cancel
+ </a>
View
54 gold/public/stylesheets/blueprint/plugins/fancy-type/screen.css
@@ -1,8 +1,8 @@
-/* --------------------------------------------------------------
-
+/* --------------------------------------------------------------
+
fancy-type.css
* Lots of pretty advanced classes for manipulating text.
-
+
See the Readme file in this folder for additional instructions.
-------------------------------------------------------------- */
@@ -10,15 +10,15 @@
/* Indentation instead of line shifts for sibling paragraphs. */
p + p { text-indent:2em; margin-top:-1.5em; }
form p + p { text-indent: 0; } /* Don't want this in forms. */
-
-/* For great looking type, use this code instead of asdf:
- <span class="alt">asdf</span>
+
+/* For great looking type, use this code instead of asdf:
+ <span class="alt">asdf</span>
Best used on prepositions and ampersands. */
-
-.alt {
- color: #666;
- font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
+
+.alt {
+ color: #666;
+ font-family: "Warnock Pro", "Goudy Old Style","Palatino","Book Antiqua", Georgia, serif;
font-style: italic;
font-weight: normal;
}
@@ -26,19 +26,19 @@
/* For great looking quote marks in titles, replace "asdf" with:
<span class="dquo">&#8220;</span>asdf&#8221;
- (That is, when the title starts with a quote mark).
- (You may have to change this value depending on your font size). */
-
-.dquo { margin-left: -.5em; }
+ (That is, when the title starts with a quote mark).
+ (You may have to change this value depending on your font size). */
+
+.dquo { margin-left: -.5em; }
/* Reduced size type with incremental leading
(http://www.markboulton.co.uk/journal/comments/incremental_leading/)
- This could be used for side notes. For smaller type, you don't necessarily want to
- follow the 1.5x vertical rhythm -- the line-height is too much.
-
- Using this class, it reduces your font size and line-height so that for
+ This could be used for side notes. For smaller type, you don't necessarily want to
+ follow the 1.5x vertical rhythm -- the line-height is too much.
+
+ Using this class, it reduces your font size and line-height so that for
every four lines of normal sized type, there is five lines of the sidenote. eg:
New type size in em's:
@@ -46,24 +46,24 @@
New line-height value:
12px x 1.5 = 18px (old line-height)
- 18px x 4 = 72px
+ 18px x 4 = 72px
72px / 5 = 14.4px (new line height)
14.4px / 10px = 1.44 (new line height in em's) */
p.incr, .incr p {
- font-size: 10px;
- line-height: 1.44em;
- margin-bottom: 1.5em;
+ font-size: 10px;
+ line-height: 1.44em;
+ margin-bottom: 1.5em;
}
/* Surround uppercase words and abbreviations with this class.
Based on work by Jørgen Arnor Gårdsø Lom [http://twistedintellect.com/] */
-
-.caps {
- font-variant: small-caps;
- letter-spacing: 1px;
- text-transform: lowercase;
+
+.caps {
+ font-variant: small-caps;
+ letter-spacing: 1px;
+ text-transform: lowercase;
font-size:1.2em;
line-height:1%;
font-weight:bold;
View
2  gold/public/stylesheets/blueprint/plugins/link-icons/readme.txt
@@ -15,4 +15,4 @@ Usage
----------------------------------------------------------------
1) Add this line to your HTML:
- <link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="css/blueprint/plugins/link-icons/screen.css" type="text/css" media="screen, projection">
View
32 gold/public/stylesheets/blueprint/plugins/link-icons/screen.css
@@ -1,22 +1,22 @@
-/* --------------------------------------------------------------
-
+/* --------------------------------------------------------------
+
link-icons.css
* Icons for links based on protocol or file type.
-
+
See the Readme file in this folder for additional instructions.
-------------------------------------------------------------- */
/* Use this class if a link gets an icon when it shouldn't. */
-body a.noicon {
- background:transparent none !important;
- padding:0 !important;
- margin:0 !important;
+body a.noicon {
+ background:transparent none !important;
+ padding:0 !important;
+ margin:0 !important;
}
/* Make sure the icons are not cut */
-a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
-a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
+a[href^="http:"], a[href^="mailto:"], a[href^="http:"]:visited,
+a[href$=".pdf"], a[href$=".doc"], a[href$=".xls"], a[href$=".rss"],
a[href$=".rdf"], a[href^="aim:"] {
padding:2px 22px 2px 0;
margin:-2px 0;
@@ -25,16 +25,16 @@ a[href$=".rdf"], a[href^="aim:"] {
}
/* External links */
-a[href^="http:"] { background-image: url(icons/external.png); }
+a[href^="http:"] { background-image: url(icons/external.png); }
a[href^="mailto:"] { background-image: url(icons/email.png); }
a[href^="http:"]:visited { background-image: url(icons/visited.png); }
/* Files */
-a[href$=".pdf"] { background-image: url(icons/pdf.png); }
-a[href$=".doc"] { background-image: url(icons/doc.png); }
-a[href$=".xls"] { background-image: url(icons/xls.png); }
-
+a[href$=".pdf"] { background-image: url(icons/pdf.png); }
+a[href$=".doc"] { background-image: url(icons/doc.png); }
+a[href$=".xls"] { background-image: url(icons/xls.png); }
+
/* Misc */
-a[href$=".rss"],
+a[href$=".rss"],
a[href$=".rdf"] { background-image: url(icons/feed.png); }
-a[href^="aim:"] { background-image: url(icons/im.png); }
+a[href^="aim:"] { background-image: url(icons/im.png); }
View
2  gold/public/stylesheets/blueprint/plugins/rtl/readme.txt
@@ -7,4 +7,4 @@ Usage
----------------------------------------------------------------
1) Add this line to your HTML:
- <link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection">
+ <link rel="stylesheet" href="css/blueprint/plugins/rtl/screen.css" type="text/css" media="screen, projection">
View
14 gold/public/stylesheets/blueprint/plugins/rtl/screen.css
@@ -2,23 +2,23 @@
rtl.css
* Mirrors Blueprint for left-to-right languages
-
+
By Ran Yaniv Hartstein [ranh.co.il]
-
+
-------------------------------------------------------------- */
body .container { direction: rtl; }
-body .column, body div.span-1, body div.span-2, body div.span-3, body div.span-4, body div.span-5, body div.span-6, body div.span-7, body div.span-8, body div.span-9, body div.span-10, body div.span-11, body div.span-12, body div.span-13, body div.span-14, body div.span-15, body div.span-16, body div.span-17, body div.span-18, body div.span-19, body div.span-20, body div.span-21, body div.span-22, body div.span-23, body div.span-24 {
+body .column, body .span-1, body .span-2, body .span-3, body .span-4, body .span-5, body .span-6, body .span-7, body .span-8, body .span-9, body .span-10, body .span-11, body .span-12, body .span-13, body .span-14, body .span-15, body .span-16, body .span-17, body .span-18, body .span-19, body .span-20, body .span-21, body .span-22, body .span-23, body .span-24 {
float: right;
margin-right: 0;
margin-left: 10px;
- text-align:right;
+ text-align:right;
}
body div.last { margin-left: 0; }
body table .last { padding-left: 0; }
-body .append-1 { padding-right: 0; padding-left: 40px; }
+body .append-1 { padding-right: 0; padding-left: 40px; }
body .append-2 { padding-right: 0; padding-left: 80px; }
body .append-3 { padding-right: 0; padding-left: 120px; }
body .append-4 { padding-right: 0; padding-left: 160px; }
@@ -42,7 +42,7 @@ body .append-21 { padding-right: 0; padding-left: 840px; }
body .append-22 { padding-right: 0; padding-left: 880px; }
body .append-23 { padding-right: 0; padding-left: 920px; }
-body .prepend-1 { padding-left: 0; padding-right: 40px; }
+body .prepend-1 { padding-left: 0; padding-right: 40px; }
body .prepend-2 { padding-left: 0; padding-right: 80px; }
body .prepend-3 { padding-left: 0; padding-right: 120px; }
body .prepend-4 { padding-left: 0; padding-right: 160px; }
@@ -107,4 +107,4 @@ body pre,body code,body tt { font-family: monospace; }
/* Mirror floats and margins on typographic elements */
body p img { float: right; margin: 1.5em 0 1.5em 1.5em; }
body dd, body ul, body ol { margin-left: 0; margin-right: 1.5em;}
-body td, body th { text-align:right; }
+body td, body th { text-align:right; }
View
4 gold/public/stylesheets/blueprint/screen.css
@@ -196,8 +196,8 @@ input.span-24, textarea.span-24 {width:938px!important;}
.prepend-21 {padding-left:840px;}
.prepend-22 {padding-left:880px;}
.prepend-23 {padding-left:920px;}
-div.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
-div.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
+.border {padding-right:4px;margin-right:5px;border-right:1px solid #eee;}
+.colborder {padding-right:24px;margin-right:25px;border-right:1px solid #eee;}
.pull-1 {margin-left:-40px;}
.pull-2 {margin-left:-80px;}
.pull-3 {margin-left:-120px;}
View
6 gold/public/stylesheets/blueprint/src/grid.css
@@ -17,7 +17,7 @@
margin: 0 auto;
}
-/* Use this class on any div.span / container to see the grid. */
+/* Use this class on any .span / container to see the grid. */
.showgrid {
background: url(src/grid.png);
}
@@ -149,14 +149,14 @@ input.span-24, textarea.span-24 { width: 938px!important; }
/* Border on right hand side of a column. */
-div.border {
+.border {
padding-right: 4px;
margin-right: 5px;
border-right: 1px solid #eee;
}
/* Border with more whitespace, spans one column. */
-div.colborder {
+.colborder {
padding-right: 24px;
margin-right: 25px;
border-right: 1px solid #eee;
View
BIN  gold/public/stylesheets/blueprint/src/grid.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
42 gold/public/stylesheets/blueprint/src/ie.css
@@ -1,10 +1,10 @@
-/* --------------------------------------------------------------
-
+/* --------------------------------------------------------------
+
ie.css
-
+
Contains every hack for Internet Explorer,
so that our core files stay sweet and nimble.
-
+
-------------------------------------------------------------- */
/* Make sure the layout is centered in IE5 */
@@ -12,15 +12,15 @@ body { text-align: center; }
.container { text-align: left; }
/* Fixes IE margin bugs */
-* html .column, * html div.span-1, * html div.span-2,
-* html div.span-3, * html div.span-4, * html div.span-5,
-* html div.span-6, * html div.span-7, * html div.span-8,
-* html div.span-9, * html div.span-10, * html div.span-11,
-* html div.span-12, * html div.span-13, * html div.span-14,
-* html div.span-15, * html div.span-16, * html div.span-17,
-* html div.span-18, * html div.span-19, * html div.span-20,
-* html div.span-21, * html div.span-22, * html div.span-23,
-* html div.span-24 { display:inline; overflow-x: hidden; }
+* html .column, * html .span-1, * html .span-2,
+* html .span-3, * html .span-4, * html .span-5,
+* html .span-6, * html .span-7, * html .span-8,
+* html .span-9, * html .span-10, * html .span-11,
+* html .span-12, * html .span-13, * html .span-14,
+* html .span-15, * html .span-16, * html .span-17,
+* html .span-18, * html .span-19, * html .span-20,
+* html .span-21, * html .span-22, * html .span-23,
+* html .span-24 { display:inline; overflow-x: hidden; }
/* Elements
@@ -34,7 +34,7 @@ sup { vertical-align:text-top; }
sub { vertical-align:text-bottom; }
/* Fixes IE7 missing wrapping of code elements. */
-html>body p code { *white-space: normal; }
+html>body p code { *white-space: normal; }
/* IE 6&7 has problems with setting proper <hr> margins. */
hr { margin:-8px auto 11px; }
@@ -42,16 +42,16 @@ hr { margin:-8px auto 11px; }
/* Explicitly set interpolation, allowing dynamically resized images to not look horrible */
img { -ms-interpolation-mode:bicubic; }
-/* Clearing
+/* Clearing
-------------------------------------------------------------- */
-/* Makes clearfix actually work in IE */
+/* Makes clearfix actually work in IE */
.clearfix, .container { display:inline-block; }
* html .clearfix,
* html .container { height:1%; }
-/* Forms
+/* Forms
-------------------------------------------------------------- */
/* Fixes padding on fieldset */
@@ -66,11 +66,11 @@ input.text:focus, input.title:focus { border-color:#666; }
input.text, input.title, textarea, select { margin:0.5em 0; }
input.checkbox, input.radio { position:relative; top:.25em; }
-/* Fixes alignment of inline form elements */
+/* Fixes alignment of inline form elements */
form.inline div, form.inline p { vertical-align:middle; }
form.inline label { position:relative;top:-0.25em; }
form.inline input.checkbox, form.inline input.radio,
-form.inline input.button, form.inline button {
- margin:0.5em 0;
+form.inline input.button, form.inline button {
+ margin:0.5em 0;
}
-button, input.button { position:relative;top:0.25em; }
+button, input.button { position:relative;top:0.25em; }
View
12 gold/public/stylesheets/blueprint/src/print.css
@@ -1,12 +1,12 @@
-/* --------------------------------------------------------------
+/* --------------------------------------------------------------
print.css
* Gives you some sensible styles for printing pages.
* See Readme file in this directory for further instructions.
-
+
Some additions you'll want to make, customized to your markup:
#header, #footer, #navigation { display:none; }
-
+
-------------------------------------------------------------- */
body {
@@ -25,8 +25,8 @@ body {
background: none;
}
-hr {
- background:#ccc;
+hr {
+ background:#ccc;
color:#ccc;
width:100%;
height:2px;
@@ -45,7 +45,7 @@ hr.space {
-------------------------------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-family: "Helvetica Neue", Arial, "Lucida Grande", sans-serif; }
-code { font:.9em "Courier New", Monaco, Courier, monospace; }
+code { font:.9em "Courier New", Monaco, Courier, monospace; }
a img { border:none; }
p img.top { margin-top: 0; }
View
20 gold/public/stylesheets/blueprint/src/typography.css
@@ -1,16 +1,16 @@
-/* --------------------------------------------------------------
+/* --------------------------------------------------------------
typography.css
* Sets up some sensible default typography.
-
+
-------------------------------------------------------------- */
-/* Default font settings.
+/* Default font settings.
The font-size percentage is of 16px. (0.75 * 16px = 12px) */
html { font-size:100.01%; }
-body {
+body {
font-size: 75%;
- color: #222;
+ color: #222;
background: #fff;
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
}
@@ -28,7 +28,7 @@ h4 { font-size: 1.2em; line-height: 1.25; margin-bottom: 1.25em; }
h5 { font-size: 1em; font-weight: bold; margin-bottom: 1.5em; }
h6 { font-size: 1em; font-weight: bold; }
-h1 img, h2 img, h3 img,
+h1 img, h2 img, h3 img,
h4 img, h5 img, h6 img {
margin: 0;
}
@@ -41,7 +41,7 @@ p { margin: 0 0 1.5em; }
p img.left { float: left; margin: 1.5em 1.5em 1.5em 0; padding: 0; }
p img.right { float: right; margin: 1.5em 0 1.5em 1.5em; }
-a:focus,
+a:focus,
a:hover { color: #000; }
a { color: #009; text-decoration: underline; }
@@ -51,12 +51,12 @@ em,dfn { font-style: italic; }
dfn { font-weight: bold; }
sup, sub { line-height: 0; }
-abbr,
+abbr,
acronym { border-bottom: 1px dotted #666; }
address { margin: 0 0 1.5em; font-style: italic; }
del { color:#666; }
-pre { margin: 1.5em 0; white-space: pre; }
+pre { margin: 1.5em 0; white-space: pre; }
pre,code,tt { font: 1em 'andale mono', 'lucida console', monospace; line-height: 1.5; }
@@ -80,7 +80,7 @@ dd { margin-left: 1.5em;}
table { margin-bottom: 1.4em; width:100%; }
th { font-weight: bold; }
-thead th { background: #c3d9ff; }
+thead th { background: #c3d9ff; }
th,td,caption { padding: 4px 10px 4px 5px; }
tr.even td { background: #e5ecf9; }
tfoot { font-style: italic; }
View
137 gold/public/stylesheets/formtastic.css
@@ -1,137 +0,0 @@
-/* -------------------------------------------------------------------------------------------------
-
-It's *strongly* suggested that you don't modify this file. Instead, load a new stylesheet after
-this one in your layouts (eg formtastic_changes.css) and override the styles to suit your needs.
-This will allow you to update formtastic.css with new releases without clobbering your own changes.
-
-This stylesheet forms part of the Formtastic Rails Plugin
-(c) 2008 Justin French
-
---------------------------------------------------------------------------------------------------*/
-
-
-/* NORMALIZE AND RESET - obviously inspired by Yahoo's reset.css, but scoped to just form.formtastic
---------------------------------------------------------------------------------------------------*/
-form.formtastic, form.formtastic ul, form.formtastic ol, form.formtastic li, form.formtastic fieldset, form.formtastic legend, form.formtastic input, form.formtastic textarea, form.formtastic select, form.formtastic p { margin:0; padding:0; }
-form.formtastic fieldset { border:0; }
-form.formtastic em, form.formtastic strong { font-style:normal; font-weight:normal; }
-form.formtastic ol, form.formtastic ul { list-style:none; }
-form.formtastic abbr, form.formtastic acronym { border:0; font-variant:normal; }
-form.formtastic input, form.formtastic textarea, form.formtastic select { font-family:inherit; font-size:inherit; font-weight:inherit; }
-form.formtastic input, form.formtastic textarea, form.formtastic select { font-size:100%; }
-form.formtastic legend { color:#000; }
-
-
-/* FIELDSETS & LISTS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset { }
-form.formtastic fieldset.inputs { }
-form.formtastic fieldset.buttons { padding-left:25%; }
-form.formtastic fieldset ol { }
-form.formtastic fieldset.buttons li { float:left; padding-right:0.5em; }
-
-/* clearfixing the fieldsets */
-form.formtastic fieldset { display: inline-block; }
-form.formtastic fieldset:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-html[xmlns] form.formtastic fieldset { display: block; }
-* html form.formtastic fieldset { height: 1%; }
-
-
-/* INPUT LIs
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li { margin-bottom:1.5em; }
-
-/* clearfixing the li's */
-form.formtastic fieldset ol li { display: inline-block; }
-form.formtastic fieldset ol li:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-html[xmlns] form.formtastic fieldset ol li { display: block; }
-* html form.formtastic fieldset ol li { height: 1%; }
-
-form.formtastic fieldset ol li.required { }
-form.formtastic fieldset ol li.optional { }
-form.formtastic fieldset ol li.error { }
-
-
-/* LABELS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li label { display:block; width:25%; float:left; padding-top:.2em; }
-form.formtastic fieldset ol li li label { line-height:100%; padding-top:0; }
-form.formtastic fieldset ol li li label input { line-height:100%; vertical-align:middle; margin-top:-0.1em;}
-
-
-/* NESTED FIELDSETS AND LEGENDS (radio, check boxes and date/time inputs use nested fieldsets)
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li fieldset { position:relative; }
-form.formtastic fieldset ol li fieldset legend { position:absolute; width:25%; padding-top:0.1em; }
-form.formtastic fieldset ol li fieldset legend span { position:absolute; }
-form.formtastic fieldset ol li fieldset ol { float:left; width:74%; margin:0; padding:0 0 0 25%; }
-form.formtastic fieldset ol li fieldset ol li { padding:0; border:0; }
-
-
-/* INLINE HINTS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li p.inline-hints { color:#666; margin:0.5em 0 0 25%; }
-
-
-/* INLINE ERRORS
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li p.inline-errors { color:#cc0000; margin:0.5em 0 0 25%; }
-form.formtastic fieldset ol li ul.errors { color:#cc0000; margin:0.5em 0 0 25%; list-style:square; }
-form.formtastic fieldset ol li ul.errors li { padding:0; border:none; display:list-item; }
-
-
-/* STRING & NUMERIC OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.string input { width:74%; }
-form.formtastic fieldset ol li.password input { width:74%; }
-form.formtastic fieldset ol li.numeric input { width:74%; }
-
-
-/* TEXTAREA OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.text textarea { width:74%; }
-
-
-/* HIDDEN OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.hidden { display:none; }
-
-
-/* BOOLEAN OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.boolean label { padding-left:25%; width:auto; }
-form.formtastic fieldset ol li.boolean label input { margin:0 0.5em 0 0.2em; }
-
-
-/* RADIO OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.radio { }
-form.formtastic fieldset ol li.radio fieldset ol { margin-bottom:-0.6em; }
-form.formtastic fieldset ol li.radio fieldset ol li { margin:0.1em 0 0.5em 0; }
-form.formtastic fieldset ol li.radio fieldset ol li label { float:none; width:100%; }
-form.formtastic fieldset ol li.radio fieldset ol li label input { margin-right:0.2em; }
-
-
-/* CHECK BOXES (COLLECTION) OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.check_boxes { }
-form.formtastic fieldset ol li.check_boxes fieldset ol { margin-bottom:-0.6em; }
-form.formtastic fieldset ol li.check_boxes fieldset ol li { margin:0.1em 0 0.5em 0; }
-form.formtastic fieldset ol li.check_boxes fieldset ol li label { float:none; width:100%; }
-form.formtastic fieldset ol li.check_boxes fieldset ol li label input { margin-right:0.2em; }
-
-
-
-/* DATE & TIME OVERRIDES
---------------------------------------------------------------------------------------------------*/
-form.formtastic fieldset ol li.date fieldset ol li,
-form.formtastic fieldset ol li.time fieldset ol li,
-form.formtastic fieldset ol li.datetime fieldset ol li { float:left; width:auto; margin:0 .3em 0 0; }
-
-form.formtastic fieldset ol li.date fieldset ol li label,
-form.formtastic fieldset ol li.time fieldset ol li label,
-form.formtastic fieldset ol li.datetime fieldset ol li label { display:none; }
-
-form.formtastic fieldset ol li.date fieldset ol li label input,
-form.formtastic fieldset ol li.time fieldset ol li label input,
-form.formtastic fieldset ol li.datetime fieldset ol li label input { display:inline; margin:0; padding:0; }
View
5 gold/vendor/plugins/blue-ridge/CONTRIBUTORS
@@ -30,4 +30,7 @@ Contributors
- For fixing the nested-describe command-line output.
* Chris Redinger (redinger)
- - For pairing & refactoring on the nested-describe command-line fix.
+ - For pairing & refactoring on the nested-describe command-line fix.
+
+* Corey Haines (coreyhaines)
+ - For colorizing output.
View
2  gold/vendor/plugins/blue-ridge/lib/blue-ridge.js
@@ -68,7 +68,7 @@ if(BlueRidge.loaded != true) {
var BLUE_RIDGE_PREFIX = BLUE_RIDGE_PREFIX || "../../vendor/plugins/blue-ridge/";
var BLUE_RIDGE_VENDOR_PREFIX = BLUE_RIDGE_PREFIX + "/vendor/";
- require(BLUE_RIDGE_VENDOR_PREFIX + "jquery-1.3.2.js", {system: true});
+ require(BLUE_RIDGE_VENDOR_PREFIX + "jquery-1.4.2.js", {system: true});
require(BLUE_RIDGE_VENDOR_PREFIX + "jquery.fn.js", {system: true});
require(BLUE_RIDGE_VENDOR_PREFIX + "jquery.print.js", {system: true});
require(BLUE_RIDGE_VENDOR_PREFIX + "screw.builder.js", {system: true});
View
2  gold/vendor/plugins/blue-ridge/lib/blue_ridge.rb
@@ -6,7 +6,7 @@ def self.plugin_prefix
end
def self.rhino_command
- "java -Dblue.ridge.prefix=\"#{plugin_prefix}\" -jar #{plugin_prefix}/vendor/env-js.jar -w -debug"
+ "java -Dblue.ridge.prefix=\"#{plugin_prefix}\" -jar #{plugin_prefix}/vendor/js.jar -w -debug -opt -1"
end
def self.test_runner_command
View
23 gold/vendor/plugins/blue-ridge/lib/consoleReportForRake.js
@@ -1,12 +1,18 @@
(function($) {
+ var colors = {'pass': '32', 'fail': '31'};
+
+ function colorize(text, status){
+ return "\u001B[" + colors[status] + "m" + text + "\u001B[0m";
+ }
+
$(Screw).bind("before", function(){
$('.it')
.bind('passed', function(){
- java.lang.System.out.print(".");
+ java.lang.System.out.print(colorize('.', 'pass'));
})
.bind('failed', function(e, reason){
- print("\nFAILED: " + BlueRidge.CommandLine.exampleName(this));
- print(" " + reason + "\n");
+ print(colorize("\nFAILED: " + BlueRidge.CommandLine.exampleName(this), 'fail'));
+ print(colorize(" " + reason + "\n", 'fail'));
});
});
@@ -14,10 +20,17 @@
var testCount = $('.passed').length + $('.failed').length;
var failures = $('.failed').length;
var elapsedTime = ((new Date() - Screw.suite_start_time)/1000.0);
+ var status_to_colorize;
+
+ if(failures > 0){
+ status_to_colorize = 'fail';
+ }else{
+ status_to_colorize = 'pass';
+ };
print("\n")
- print(testCount + ' test(s), ' + failures + ' failure(s)');
- print(elapsedTime.toString() + " seconds elapsed");
+ print(colorize(testCount + ' test(s), ' + failures + ' failure(s)', status_to_colorize));
+ print(colorize(elapsedTime.toString() + " seconds elapsed",status_to_colorize));
if(failures > 0) { java.lang.System.exit(1) };
});
View
2  gold/vendor/plugins/blue-ridge/lib/shell.js
@@ -16,7 +16,7 @@
window.location = fixture_file;
print(" - sample DOM loaded");
- load(plugin_prefix + "/vendor/jquery-1.3.2.js");
+ load(plugin_prefix + "/vendor/jquery-1.4.1.js");
print(" - jQuery-1.3.2 loaded");
load(plugin_prefix + "/vendor/jquery.print.js");
View
12 gold/vendor/plugins/blue-ridge/lib/test_runner.js
@@ -79,8 +79,10 @@ if(BlueRidge.loaded != true) {
loadInlineScript: function(){},
log: function(){}
});
-
- require(BLUE_RIDGE_VENDOR_PREFIX + "jquery-1.3.2.js");
+
+ Envjs.wait();
+
+ require(BLUE_RIDGE_VENDOR_PREFIX + "jquery-1.4.2.js");
require(BLUE_RIDGE_VENDOR_PREFIX + "jquery.fn.js");
require(BLUE_RIDGE_VENDOR_PREFIX + "jquery.print.js");
require(BLUE_RIDGE_VENDOR_PREFIX + "screw.builder.js");
@@ -92,10 +94,12 @@ if(BlueRidge.loaded != true) {
require(BLUE_RIDGE_VENDOR_PREFIX + "smoke.stub.js");
require(BLUE_RIDGE_VENDOR_PREFIX + "screw.mocking.js");
require(BLUE_RIDGE_LIB_PREFIX + "consoleReportForRake.js");
-
+
print("Running " + BlueRidge.CommandLine.specFile + " with fixture '" + BlueRidge.CommandLine.fixtureFile + "'...");
BlueRidge.loaded = true;
-
+
load(BlueRidge.CommandLine.specFile);
jQuery(window).trigger("load");
+
+ Envjs.wait();
}
View
7 gold/vendor/plugins/blue-ridge/vendor/README
@@ -0,0 +1,7 @@
+env.rhino.js:
+* Version: 1.2.0.6
+* Modifications: removed the Env.js header log message
+
+js.jar:
+* Version: (not sure)
+* Origin: pulled from the "rhino" directory from env.js (v1.2.0.2)
View
BIN  gold/vendor/plugins/blue-ridge/vendor/env-js.jar
Binary file not shown
View
14,931 gold/vendor/plugins/blue-ridge/vendor/env.rhino.js
8,111 additions, 6,820 deletions not shown
View
6,078 gold/vendor/plugins/blue-ridge/vendor/jquery-1.4.1.js
6,078 additions, 0 deletions not shown
View
6,240 gold/vendor/plugins/blue-ridge/vendor/jquery-1.4.2.js
6,240 additions, 0 deletions not shown
View
BIN  gold/vendor/plugins/blue-ridge/vendor/js.jar
Binary file not shown
View
3  gold/vendor/plugins/hoptoad_notifier/.yardopts
@@ -1,3 +0,0 @@
--
-TESTING.rdoc
-MIT-LICENSE
View
25 gold/vendor/plugins/hoptoad_notifier/INSTALL
@@ -1,25 +0,0 @@
-=== Configuration
-
-You should have something like this in config/initializers/hoptoad.rb.
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- end
-
-(Please note that this configuration should be in a global configuration, and
-is *not* environment-specific. Hoptoad is smart enough to know what errors are
-caused by what environments, so your staging errors don't get mixed in with
-your production errors.)
-
-You can test that Hoptoad is working in your production environment by using
-this rake task (from RAILS_ROOT):
-
- rake hoptoad:test
-
-If everything is configured properly, that task will send a notice to Hoptoad
-which will be visible immediately.
-
-NOTE FOR RAILS 1.2.* USERS:
-
-You will need to copy the hoptoad_notifier_tasks.rake file into your
-RAILS_ROOT/lib/tasks directory in order for the rake hoptoad:test task to work.
View
22 gold/vendor/plugins/hoptoad_notifier/MIT-LICENSE
@@ -1,22 +0,0 @@
-Copyright (c) 2007, Tammer Saleh, Thoughtbot, Inc.
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
View
227 gold/vendor/plugins/hoptoad_notifier/README.rdoc
@@ -1,227 +0,0 @@
-= HoptoadNotifier
-
-This is the notifier plugin for integrating apps with Hoptoad.
-
-When an uncaught exception occurs, HoptoadNotifier will POST the relevant data
-to the Hoptoad server specified in your environment.
-
-== Help
-
-* {IRC}[irc://irc.freenode.net/thoughtbot]
-* {mailing list}[http://groups.google.com/group/hoptoad-notifier-dev]
-
-== Installation
-
-=== Remove exception_notifier
-
-in your ApplicationController, REMOVE this line:
-
- include ExceptionNotifiable
-
-In your config/environment* files, remove all references to ExceptionNotifier
-
-Remove the vendor/plugins/exception_notifier directory.
-
-=== Install hoptoad_notifier
-
-from your project's RAILS_ROOT, run:
-
- script/plugin install -f git://github.com/thoughtbot/hoptoad_notifier.git
-
-=== Configuration
-
-You should have something like this in config/initializers/hoptoad.rb.
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- end
-
-(Please note that this configuration should be in a global configuration, and
-is *not* environment-specific. Hoptoad is smart enough to know what errors are
-caused by what environments, so your staging errors don't get mixed in with
-your production errors.)
-
-After adding to your config/initializers like this you must restart your
-server. This will not affect the rake task but it bears stating.
-
-That should be it! Now all exceptions will be logged to Hoptoad where they can
-be aggregated, filtered, sorted, analyzed, massaged, and searched. In previous
-releases you had to include HoptoadNotifier::Catcher into your
-ApplicationController, but the plugin takes care of that now.
-
-You can test that Hoptoad is working in your production environment by using
-this rake task (from RAILS_ROOT):
-
- rake hoptoad:test
-
-If everything is configured properly, that task will send a notice to Hoptoad
-which will be visible immediately.
-
-=== NOTE FOR RAILS 1.2.* USERS:
-
-You will need to copy the hoptoad_notifier_tasks.rake file into your
-RAILS_ROOT/lib/tasks directory in order for the rake hoptoad:test task to work.
-
-== Usage
-
-for the most part, Hoptoad works for itself. Once you've included the notifier
-in your ApplicationController (which is now done automatically by the plugin),
-all errors will be rescued by the #rescue_action_in_public provided by the plugin.
-
-If you want to log arbitrary things which you've rescued yourself from a
-controller, you can do something like this:
-
- ...
- rescue => ex
- notify_hoptoad(ex)
- flash[:failure] = 'Encryptions could not be rerouted, try again.'
- end
- ...
-
-The #notify_hoptoad call will send the notice over to Hoptoad for later analysis. While in your controllers you use the notify_hoptoad method, anywhere else in your code, use HoptoadNotifier.notify.
-
-To perform custom error processing after Hoptoad has been notified, define the instance method #rescue_action_in_public_without_hoptoad(exception) in your controller.
-
-== Tracking deployments in Hoptoad
-
-Paying Hoptoad plans support the ability to track deployments of your application in Hoptoad.
-By notifying Hoptoad of your application deployments, all errors are resolved when a deploy occurs,
-so that you'll be notified again about any errors that reoccur after a deployment.
-
-Additionally, it's possible to review the errors in Hoptoad that occurred before and after a deploy.
-
-When Hoptoad is installed as a plugin this functionality is loaded automatically (if you have Capistrano version 2.0.0 or greater).
-
-When Hoptoad is installed as a gem, you need to add
-
- require 'hoptoad_notifier/recipes/hoptoad'
-
-to your deploy.rb
-
-== Going beyond exceptions
-
-You can also pass a hash to notify_hoptoad method and store whatever you want, not just an exception. And you can also use it anywhere, not just in controllers:
-
- begin
- params = {
- # params that you pass to a method that can throw an exception
- }
- my_unpredicable_method(params)
- rescue => e
- HoptoadNotifier.notify(
- :error_class => "Special Error",
- :error_message => "Special Error: #{e.message}",
- :parameters => params
- )
- end
-
-While in your controllers you use the notify_hoptoad method, anywhere else in your code, use HoptoadNotifier.notify. Hoptoad will get all the information about the error itself. As for a hash, these are the keys you should pass:
-
-* :error_class – Use this to group similar errors together. When Hoptoad catches an exception it sends the class name of that exception object.
-* :error_message – This is the title of the error you see in the errors list. For exceptions it is "#{exception.class.name}: #{exception.message}"
-* :parameters – While there are several ways to send additional data to Hoptoad, passing a Hash as :parameters as in the example above is the most common use case. When Hoptoad catches an exception in a controller, the actual HTTP client request parameters are sent using this key.
-
-Hoptoad merges the hash you pass with these default options:
-
- {
- :api_key => HoptoadNotifier.api_key,
- :error_message => 'Notification',
- :backtrace => caller,
- :parameters => {},
- :session => {}
- }
-
-You can override any of those parameters.
-
-== Filtering
-
-You can specify a whitelist of errors, that Hoptoad will not report on. Use
-this feature when you are so apathetic to certain errors that you don't want
-them even logged.
-
-This filter will only be applied to automatic notifications, not manual
-notifications (when #notify is called directly).
-
-Hoptoad ignores the following exceptions by default:
-
- ActiveRecord::RecordNotFound
- ActionController::RoutingError
- ActionController::InvalidAuthenticityToken
- ActionController::UnknownAction
- CGI::Session::CookieStore::TamperedWithCookie
-
-To ignore errors in addition to those, specify their names in your Hoptoad
-configuration block.
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- config.ignore << ActiveRecord::IgnoreThisError
- end
-
-To ignore *only* certain errors (and override the defaults), use the
-#ignore_only attribute.
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- config.ignore_only = [ActiveRecord::IgnoreThisError]
- end
-
-To ignore certain user agents, add in the #ignore_user_agent attribute as a
-string or regexp:
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- config.ignore_user_agent << /Ignored/
- config.ignore_user_agent << 'IgnoredUserAgent'
- end
-
-To ignore exceptions based on other conditions, use #ignore_by_filter:
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- config.ignore_by_filter do |exception_data|
- true if exception_data[:error_class] == "RuntimeError"
- end
- end
-
-To replace sensitive information sent to the Hoptoad service with [FILTERED] use #params_filters:
-
- HoptoadNotifier.configure do |config|
- config.api_key = '1234567890abcdef'
- config.params_filters << "credit_card_number"
- end
-
-Note that, when rescuing exceptions within an ActionController method,
-hoptoad_notifier will reuse filters specified by #filter_params_logging.
-
-== Testing
-
-When you run your tests, you might notice that the Hoptoad service is recording
-notices generated using #notify when you don't expect it to. You can
-use code like this in your test_helper.rb to redefine that method so those
-errors are not reported while running tests.
-
- module HoptoadNotifier
- def self.notify(thing)
- # do nothing.
- end
- end
-
-== Supported rails versions
-
-the notifier currently supports the following versions of Rails:
-
-* 1.2.6
-* 2.0.2
-* 2.1.0
-* 2.1.2
-* 2.2.2
-* 2.3.2
-* 2.3.3
-* 2.3.4
-
-Please open up a support ticket on Tender ( http://help.hoptoadapp.com ) if you're using a version of Rails that is not listed above and the notifier is not working properly.
-
-== Thanks
-
-Thanks to Eugene Bolshakov for the excellent write-up on GOING BEYOND EXCEPTIONS, which we have included above.
View
29 gold/vendor/plugins/hoptoad_notifier/Rakefile
@@ -1,29 +0,0 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-desc 'Default: run unit tests.'
-task :default => :test
-
-desc 'Test the hoptoad_notifier plugin.'
-Rake::TestTask.new(:test) do |t|
- t.libs << 'lib'
- t.pattern = 'test/**/*_test.rb'
- t.verbose = true
-end
-
-desc 'Run ginger tests'
-task :ginger do
- $LOAD_PATH << File.join(*%w[vendor ginger lib])
- ARGV.clear
- ARGV << 'test'
- load File.join(*%w[vendor ginger bin ginger])
-end
-
-begin
- require 'yard'
- YARD::Rake::YardocTask.new do |t|
- t.files = ['lib/**/*.rb', 'TESTING.rdoc']
- end
-rescue LoadError
-end
View
8 gold/vendor/plugins/hoptoad_notifier/TESTING.rdoc
@@ -1,8 +0,0 @@
-= For Maintainers:
-
-When developing the Hoptoad Notifier, be sure to use the integration test
-against an existing project on staging before pushing to master.
-
-+./script/integration_test.rb <test project's api key> <staging server hostname>+
-
-+./script/integration_test.rb <test project's api key> <staging server hostname> secure+
View
32 gold/vendor/plugins/hoptoad_notifier/ginger_scenarios.rb
@@ -1,32 +0,0 @@
-require 'ginger'
-
-def create_scenario(version)
- scenario = Ginger::Scenario.new
- scenario[/^active_?support$/] = version
- scenario[/^active_?record$/] = version
- scenario[/^action_?pack$/] = version
- scenario[/^action_?controller$/] = version
- scenario
-end
-
-Ginger.configure do |config|
- config.aliases["active_record"] = "activerecord"
- config.aliases["active_support"] = "activesupport"
- config.aliases["action_controller"] = "actionpack"
-
- rails_1_2_6 = Ginger::Scenario.new
- rails_1_2_6[/^active_?support$/] = "1.4.4"
- rails_1_2_6[/^active_?record$/] = "1.15.6"
- rails_1_2_6[/^action_?pack$/] = "1.13.6"
- rails_1_2_6[/^action_?controller$/] = "1.13.6"
-
- config.scenarios << rails_1_2_6
- config.scenarios << create_scenario("2.0.2")
- config.scenarios << create_scenario("2.1.2")
- config.scenarios << create_scenario("2.2.2")
- config.scenarios << create_scenario("2.3.2")
- # Rails 2.3.3 has broken params filtering
- # config.scenarios << create_scenario("2.3.3")
- config.scenarios << create_scenario("2.3.4")
- config.scenarios << create_scenario("2.3.5")
-end
View
1  gold/vendor/plugins/hoptoad_notifier/init.rb
@@ -1 +0,0 @@
-require File.join(File.dirname(__FILE__), 'rails', 'init')
View
1  gold/vendor/plugins/hoptoad_notifier/install.rb
@@ -1 +0,0 @@
-puts IO.read(File.join(File.dirname(__FILE__), 'INSTALL'))
View
146 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier.rb
@@ -1,146 +0,0 @@
-require 'net/http'
-require 'net/https'
-require 'rubygems'
-require 'active_support'
-require 'hoptoad_notifier/configuration'
-require 'hoptoad_notifier/notice'
-require 'hoptoad_notifier/sender'
-require 'hoptoad_notifier/catcher'
-require 'hoptoad_notifier/backtrace'
-
-# Plugin for applications to automatically post errors to the Hoptoad of their choice.
-module HoptoadNotifier
-
- VERSION = "2.0.19"
- API_VERSION = "2.0"
- LOG_PREFIX = "** [Hoptoad] "
-
- HEADERS = {
- 'Content-type' => 'text/xml',
- 'Accept' => 'text/xml, application/xml'
- }
-
- class << self
- # The sender object is responsible for delivering formatted data to the Hoptoad server.
- # Must respond to #send_to_hoptoad. See HoptoadNotifier::Sender.
- attr_accessor :sender
-
- # A Hoptoad configuration object. Must act like a hash and return sensible
- # values for all Hoptoad configuration options. See HoptoadNotifier::Configuration.
- attr_accessor :configuration
-
- # Tell the log that the Notifier is good to go
- def report_ready
- write_verbose_log("Notifier #{VERSION} ready to catch errors")
- end
-
- # Prints out the environment info to the log for debugging help
- def report_environment_info
- write_verbose_log("Environment Info: #{environment_info}")
- end
-
- # Prints out the response body from Hoptoad for debugging help
- def report_response_body(response)
- write_verbose_log("Response from Hoptoad: \n#{response}")
- end
-
- # Returns the Ruby version, Rails version, and current Rails environment
- def environment_info
- info = "[Ruby: #{RUBY_VERSION}]"
- info << " [Rails: #{::Rails::VERSION::STRING}]" if defined?(Rails)
- info << " [Env: #{configuration.environment_name}]"
- end
-
- # Writes out the given message to the #logger
- def write_verbose_log(message)
- logger.info LOG_PREFIX + message if logger
- end
-
- # Look for the Rails logger currently defined
- def logger
- self.configuration.logger
- end
-
- # Call this method to modify defaults in your initializers.
- #
- # @example
- # HoptoadNotifier.configure do |config|
- # config.api_key = '1234567890abcdef'
- # config.secure = false
- # end
- def configure(silent = false)
- self.configuration ||= Configuration.new
- yield(configuration)
- self.sender = Sender.new(configuration)
- report_ready unless silent
- end
-
- # Sends an exception manually using this method, even when you are not in a controller.
- #
- # @param [Exception] exception The exception you want to notify Hoptoad about.
- # @param [Hash] opts Data that will be sent to Hoptoad.
- #
- # @option opts [String] :api_key The API key for this project. The API key is a unique identifier that Hoptoad uses for identification.
- # @option opts [String] :error_message The error returned by the exception (or the message you want to log).
- # @option opts [String] :backtrace A backtrace, usually obtained with +caller+.
- # @option opts [String] :request The controller's request object.
- # @option opts [String] :session The contents of the user's session.
- # @option opts [String] :environment ENV merged with the contents of the request's environment.
- def notify(exception, opts = {})
- send_notice(build_notice_for(exception, opts))
- end
-
- # Sends the notice unless it is one of the default ignored exceptions
- # @see HoptoadNotifier.notify
- def notify_or_ignore(exception, opts = {})
- notice = build_notice_for(exception, opts)
- send_notice(notice) unless notice.ignore?
- end
-
- def build_lookup_hash_for(exception, options = {})
- notice = build_notice_for(exception, options)
-
- result = {}
- result[:action] = notice.action rescue nil
- result[:component] = notice.component rescue nil
- result[:error_class] = notice.error_class if notice.error_class
- result[:environment_name] = 'production'
-
- unless notice.backtrace.lines.empty?
- result[:file] = notice.backtrace.lines.first.file
- result[:line_number] = notice.backtrace.lines.first.number
- end
-
- result
- end
-
- private
-
- def send_notice(notice)
- if configuration.public?
- sender.send_to_hoptoad(notice.to_xml)
- end
- end
-
- def build_notice_for(exception, opts = {})
- exception = unwrap_exception(exception)
- if exception.respond_to?(:to_hash)
- opts = opts.merge(exception)
- else
- opts = opts.merge(:exception => exception)
- end
- Notice.new(configuration.merge(opts))
- end
-
- def unwrap_exception(exception)
- if exception.respond_to?(:original_exception)
- exception.original_exception
- elsif exception.respond_to?(:continued_exception)
- exception.continued_exception
- else
- exception
- end
- end
- end
-end
-
View
99 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/backtrace.rb
@@ -1,99 +0,0 @@
-module HoptoadNotifier
- # Front end to parsing the backtrace for each notice
- class Backtrace
-
- # Handles backtrace parsing line by line
- class Line
-
- INPUT_FORMAT = %r{^([^:]+):(\d+)(?::in `([^']+)')?$}.freeze
-
- # The file portion of the line (such as app/models/user.rb)
- attr_reader :file
-
- # The line number portion of the line
- attr_reader :number
-
- # The method of the line (such as index)
- attr_reader :method
-
- # Parses a single line of a given backtrace
- # @param [String] unparsed_line The raw line from +caller+ or some backtrace
- # @return [Line] The parsed backtrace line
- def self.parse(unparsed_line)
- _, file, number, method = unparsed_line.match(INPUT_FORMAT).to_a
- new(file, number, method)
- end
-
- def initialize(file, number, method)
- self.file = file
- self.number = number
- self.method = method
- end
-
- # Reconstructs the line in a readable fashion
- def to_s
- "#{file}:#{number}:in `#{method}'"
- end
-
- def ==(other)
- to_s == other.to_s
- end
-
- def inspect
- "<Line:#{to_s}>"
- end
-
- private
-
- attr_writer :file, :number, :method
- end
-
- # holder for an Array of Backtrace::Line instances
- attr_reader :lines
-
- def self.parse(ruby_backtrace, opts = {})
- ruby_lines = split_multiline_backtrace(ruby_backtrace)
-
- filters = opts[:filters] || []
- filtered_lines = ruby_lines.to_a.map do |line|
- filters.inject(line) do |line, proc|
- proc.call(line)
- end
- end.compact
-
- lines = filtered_lines.collect do |unparsed_line|
- Line.parse(unparsed_line)
- end
-
- instance = new(lines)
- end
-
- def initialize(lines)
- self.lines = lines
- end
-
- def inspect
- "<Backtrace: " + lines.collect { |line| line.inspect }.join(", ") + ">"
- end
-
- def ==(other)
- if other.respond_to?(:lines)
- lines == other.lines
- else
- false
- end
- end
-
- private
-
- attr_writer :lines
-
- def self.split_multiline_backtrace(backtrace)
- if backtrace.to_a.size == 1
- backtrace.to_a.first.split(/\n\s*/)
- else
- backtrace
- end
- end
- end
-end
View
95 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/catcher.rb
@@ -1,95 +0,0 @@
-module HoptoadNotifier
- # Include this module in Controllers in which you want to be notified of errors.
- module Catcher
-
- # Sets up an alias chain to catch exceptions when Rails does
- def self.included(base) #:nodoc:
- if base.instance_methods.map(&:to_s).include? 'rescue_action_in_public' and !base.instance_methods.map(&:to_s).include? 'rescue_action_in_public_without_hoptoad'
- base.send(:alias_method, :rescue_action_in_public_without_hoptoad, :rescue_action_in_public)
- base.send(:alias_method, :rescue_action_in_public, :rescue_action_in_public_with_hoptoad)
- base.send(:alias_method, :rescue_action_locally_without_hoptoad, :rescue_action_locally)
- base.send(:alias_method, :rescue_action_locally, :rescue_action_locally_with_hoptoad)
- end
- end
-
- private
-
- # Overrides the rescue_action method in ActionController::Base, but does not inhibit
- # any custom processing that is defined with Rails 2's exception helpers.
- def rescue_action_in_public_with_hoptoad(exception)
- unless hoptoad_ignore_user_agent?
- HoptoadNotifier.notify_or_ignore(exception, hoptoad_request_data)
- end
- rescue_action_in_public_without_hoptoad(exception)
- end
-
- def rescue_action_locally_with_hoptoad(exception)
- result = rescue_action_locally_without_hoptoad(exception)
-
- if HoptoadNotifier.configuration.development_lookup
- path = File.join(File.dirname(__FILE__), '..', 'templates', 'rescue.erb')
- notice = HoptoadNotifier.build_lookup_hash_for(exception, hoptoad_request_data)
-
- result << @template.render(
- :file => path,
- :use_full_path => false,
- :locals => { :host => HoptoadNotifier.configuration.host,
- :api_key => HoptoadNotifier.configuration.api_key,
- :notice => notice })
- end
-
- result
- end
-
- # This method should be used for sending manual notifications while you are still
- # inside the controller. Otherwise it works like HoptoadNotifier.notify.
- def notify_hoptoad(hash_or_exception)
- unless consider_all_requests_local || local_request?
- HoptoadNotifier.notify(hash_or_exception, hoptoad_request_data)
- end
- end
-
- def hoptoad_ignore_user_agent? #:nodoc:
- # Rails 1.2.6 doesn't have request.user_agent, so check for it here
- user_agent = request.respond_to?(:user_agent) ? request.user_agent : request.env["HTTP_USER_AGENT"]
- HoptoadNotifier.configuration.ignore_user_agent.flatten.any? { |ua| ua === user_agent }
- end
-
- def hoptoad_request_data
- { :parameters => hoptoad_filter_if_filtering(params.to_hash),
- :session_data => hoptoad_session_data,
- :controller => params[:controller],
- :action => params[:action],
- :url => hoptoad_request_url,
- :cgi_data => hoptoad_filter_if_filtering(request.env),
- :environment_vars => hoptoad_filter_if_filtering(ENV) }
- end
-
- def hoptoad_filter_if_filtering(hash)
- if respond_to?(:filter_parameters)
- filter_parameters(hash) rescue hash
- else
- hash
- end
- end
-
- def hoptoad_session_data
- if session.respond_to?(:to_hash)
- session.to_hash
- else
- session.data
- end
- end
-
- def hoptoad_request_url
- url = "#{request.protocol}#{request.host}"
-
- unless [80, 443].include?(request.port)
- url << ":#{request.port}"
- end
-
- url << request.request_uri
- url
- end
- end
-end
View
232 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/configuration.rb
@@ -1,232 +0,0 @@
-module HoptoadNotifier
- # Used to set up and modify settings for the notifier.
- class Configuration
-
- OPTIONS = [:api_key, :backtrace_filters, :development_environments,
- :development_lookup, :environment_name, :host,
- :http_open_timeout, :http_read_timeout, :ignore, :ignore_by_filters,
- :ignore_user_agent, :notifier_name, :notifier_url, :notifier_version,
- :params_filters, :project_root, :port, :protocol, :proxy_host,
- :proxy_pass, :proxy_port, :proxy_user, :secure].freeze
-
- # The API key for your project, found on the project edit form.
- attr_accessor :api_key
-
- # The host to connect to (defaults to hoptoadapp.com).
- attr_accessor :host
-
- # The port on which your Hoptoad server runs (defaults to 443 for secure
- # connections, 80 for insecure connections).
- attr_accessor :port
-
- # +true+ for https connections, +false+ for http connections.
- attr_accessor :secure
-
- # The HTTP open timeout in seconds (defaults to 2).
- attr_accessor :http_open_timeout
-
- # The HTTP read timeout in seconds (defaults to 5).
- attr_accessor :http_read_timeout
-
- # The hostname of your proxy server (if using a proxy)
- attr_accessor :proxy_host
-
- # The port of your proxy server (if using a proxy)
- attr_accessor :proxy_port
-
- # The username to use when logging into your proxy server (if using a proxy)
- attr_accessor :proxy_user
-
- # The password to use when logging into your proxy server (if using a proxy)
- attr_accessor :proxy_pass
-
- # A list of parameters that should be filtered out of what is sent to Hoptoad.
- # By default, all "password" attributes will have their contents replaced.
- attr_reader :params_filters
-
- # A list of filters for cleaning and pruning the backtrace. See #filter_backtrace.
- attr_reader :backtrace_filters
-
- # A list of filters for ignoring exceptions. See #ignore_by_filter.
- attr_reader :ignore_by_filters
-
- # A list of exception classes to ignore. The array can be appended to.
- attr_reader :ignore
-
- # A list of user agents that are being ignored. The array can be appended to.
- attr_reader :ignore_user_agent
-
- # A list of environments in which notifications should not be sent.
- attr_accessor :development_environments
-
- # +true+ if you want to check for production errors matching development errors, +false+ otherwise.
- attr_accessor :development_lookup
-
- # The name of the environment the application is running in
- attr_accessor :environment_name
-
- # The path to the project in which the error occurred, such as the RAILS_ROOT
- attr_accessor :project_root
-
- # The name of the notifier library being used to send notifications (such as "Hoptoad Notifier")
- attr_accessor :notifier_name
-
- # The version of the notifier library being used to send notifications (such as "1.0.2")
- attr_accessor :notifier_version
-
- # The url of the notifier library being used to send notifications
- attr_accessor :notifier_url
-
- # The logger used by HoptoadNotifier
- attr_accessor :logger
-
- DEFAULT_PARAMS_FILTERS = %w(password password_confirmation).freeze
-
- DEFAULT_BACKTRACE_FILTERS = [
- lambda { |line|
- if defined?(HoptoadNotifier.configuration.project_root)
- line.gsub(/#{HoptoadNotifier.configuration.project_root}/, "[PROJECT_ROOT]")
- else
- line
- end
- },
- lambda { |line| line.gsub(/^\.\//, "") },
- lambda { |line|
- if defined?(Gem)
- Gem.path.inject(line) do |line, path|
- line.gsub(/#{path}/, "[GEM_ROOT]")
- end
- end
- },
- lambda { |line| line if line !~ %r{lib/hoptoad_notifier} }
- ].freeze
-
- IGNORE_DEFAULT = ['ActiveRecord::RecordNotFound',
- 'ActionController::RoutingError',
- 'ActionController::InvalidAuthenticityToken',
- 'CGI::Session::CookieStore::TamperedWithCookie',
- 'ActionController::UnknownAction']
-
- # Some of these don't exist for Rails 1.2.*, so we have to consider that.
- IGNORE_DEFAULT.map!{|e| eval(e) rescue nil }.compact!
- IGNORE_DEFAULT.freeze
-
- alias_method :secure?, :secure
-
- def initialize
- @secure = false
- @host = 'hoptoadapp.com'
- @http_open_timeout = 2
- @http_read_timeout = 5
- @params_filters = DEFAULT_PARAMS_FILTERS.dup
- @backtrace_filters = DEFAULT_BACKTRACE_FILTERS.dup
- @ignore_by_filters = []
- @ignore = IGNORE_DEFAULT.dup
- @ignore_user_agent = []
- @development_environments = %w(development test cucumber)
- @development_lookup = true
- @notifier_name = 'Hoptoad Notifier'
- @notifier_version = VERSION
- @notifier_url = 'http://hoptoadapp.com'
- end
-
- # Takes a block and adds it to the list of backtrace filters. When the filters
- # run, the block will be handed each line of the backtrace and can modify
- # it as necessary.
- #
- # @example
- # config.filter_bracktrace do |line|
- # line.gsub(/^#{Rails.root}/, "[RAILS_ROOT]")
- # end
- #
- # @param [Proc] block The new backtrace filter.
- # @yieldparam [String] line A line in the backtrace.
- def filter_backtrace(&block)
- self.backtrace_filters << block
- end
-
- # Takes a block and adds it to the list of ignore filters.
- # When the filters run, the block will be handed the exception.
- # @example
- # config.ignore_by_filter do |exception_data|
- # true if exception_data[:error_class] == "RuntimeError"
- # end
- #
- # @param [Proc] block The new ignore filter
- # @yieldparam [Hash] data The exception data given to +HoptoadNotifier.notify+
- # @yieldreturn [Boolean] If the block returns true the exception will be ignored, otherwise it will be processed by hoptoad.
- def ignore_by_filter(&block)
- self.ignore_by_filters << block
- end
-
- # Overrides the list of default ignored errors.
- #
- # @param [Array<Exception>] names A list of exceptions to ignore.
- def ignore_only=(names)
- @ignore = [names].flatten
- end
-
- # Overrides the list of default ignored user agents
- #
- # @param [Array<String>] A list of user agents to ignore
- def ignore_user_agent_only=(names)
- @ignore_user_agent = [names].flatten
- end
-
- # Allows config options to be read like a hash
- #
- # @param [Symbol] option Key for a given attribute
- def [](option)
- send(option)
- end
-
- # Returns a hash of all configurable options
- def to_hash
- OPTIONS.inject({}) do |hash, option|
- hash.merge(option.to_sym => send(option))
- end
- end
-
- # Returns a hash of all configurable options merged with +hash+
- #
- # @param [Hash] hash A set of configuration options that will take precedence over the defaults
- def merge(hash)
- to_hash.merge(hash)
- end
-
- # Determines if the notifier will send notices.
- # @return [Boolean] Returns +false+ if in a development environment, +true+ otherwise.
- def public?
- !development_environments.include?(environment_name)
- end
-
- def port
- @port || default_port
- end
-
- def protocol
- if secure?
- 'https'
- else
- 'http'
- end
- end
-
- def environment_filters
- warn 'config.environment_filters has been deprecated and has no effect.'
- []
- end
-
- private
-
- def default_port
- if secure?
- 443
- else
- 80
- end
- end
-
- end
-
-end
View
295 gold/vendor/plugins/hoptoad_notifier/lib/hoptoad_notifier/notice.rb
@@ -1,295 +0,0 @@
-module HoptoadNotifier
- class Notice
-
- # The exception that caused this notice, if any
- attr_reader :exception
-
- # The API key for the project to which this notice should be sent
- attr_reader :api_key
-
- # The backtrace from the given exception or hash.
- attr_reader :backtrace
-
- # The name of the class of error (such as RuntimeError)
- attr_reader :error_class
-
- # The name of the server environment (such as "production")
- attr_reader :environment_name
-
- # CGI variables such as HTTP_METHOD
- attr_reader :cgi_data
-
- # The message from the exception, or a general description of the error
- attr_reader :error_message
-
- # See Configuration#backtrace_filters
- attr_reader :backtrace_filters
-
- # See Configuration#params_filters
- attr_reader :params_filters
-
- # A hash of parameters from the query string or post body.
- attr_reader :parameters
- alias_method :params, :parameters
-
- # The component (if any) which was used in this request (usually the controller)
- attr_reader :component
- alias_method :controller, :component
-
- # The action (if any) that was called in this request
- attr_reader :action
-
- # A hash of session data from the request
- attr_reader :session_data
-
- # The path to the project that caused the error (usually RAILS_ROOT)
- attr_reader :project_root
-
- # The URL at which the error occurred (if any)
- attr_reader :url
-
- # See Configuration#ignore
- attr_reader :ignore
-
- # See Configuration#ignore_by_filters
- attr_reader :ignore_by_filters
-
- # The name of the notifier library sending this notice, such as "Hoptoad Notifier"
- attr_reader :notifier_name
-
- # The version number of the notifier library sending this notice, such as "2.1.3"
- attr_reader :notifier_version
-
- # A URL for more information about the notifier library sending this notice
- attr_reader :notifier_url
-
- def initialize(args)
- self.args = args
- self.exception = args[:exception]
- self.api_key = args[:api_key]
- self.project_root = args[:project_root]
- self.url = args[:url]
-
- self.notifier_name = args[:notifier_name]
- self.notifier_version = args[:notifier_version]
- self.notifier_url = args[:notifier_url]
-
- self.ignore = args[:ignore] || []
- self.ignore_by_filters = args[:ignore_by_filters] || []
- self.backtrace_filters = args[:backtrace_filters] || []
- self.params_filters = args[:params_filters] || []
- self.parameters = args[:parameters] || {}
- self.component = args[:component] || args[:controller]
- self.action = args[:action]
-
- self.environment_name = args[:environment_name]
- self.cgi_data = args[:cgi_data]
- self.backtrace = Backtrace.parse(exception_attribute(:backtrace, caller))
- self.error_class = exception_attribute(:error_class) {|exception| exception.class.name }
- self.error_message = exception_attribute(:error_message, 'Notification') do |exception|
- "#{exception.class.name}: #{exception.message}"
- end
-
- find_session_data
- clean_params
- end
-
- # Converts the given notice to XML
- def to_xml
- builder = Builder::XmlMarkup.new
- builder.instruct!
- xml = builder.notice(:version => HoptoadNotifier::API_VERSION) do |notice|
- notice.tag!("api-key", api_key)
- notice.notifier do |notifier|
- notifier.name(notifier_name)
- notifier.version(notifier_version)
- notifier.url(notifier_url)
- end
- notice.error do |error|
- error.tag!('class', error_class)
- error.message(error_message)
- error.backtrace do |backtrace|
- self.backtrace.lines.each do |line|
- backtrace.line(:number => line.number,
- :file => line.file,
- :method => line.method)
- end
- end
- end
- if url ||
- controller ||
- action ||
- !parameters.blank? ||
- !cgi_data.blank? ||
- !session_data.blank?
- notice.request do |request|
- request.url(url)
- request.component(controller)
- request.action(action)
- unless parameters.blank?
- request.params do |params|
- xml_vars_for(params, parameters)
- end
- end
- unless session_data.blank?
- request.session do |session|
- xml_vars_for(session, session_data)
- end
- end
- unless cgi_data.blank?
- request.tag!("cgi-data") do |cgi_datum|
- xml_vars_for(cgi_datum, cgi_data)
- end
- end
- end
- end
- notice.tag!("server-environment") do |env|
- env.tag!("project-root", project_root)
- env.tag!("environment-name", environment_name)
- end
- end
- xml.to_s
- end
-
- # Determines if this notice should be ignored
- def ignore?
- ignored_class_names.include?(error_class) ||
- ignore_by_filters.any? {|filter| filter.call(self) }
- end
-
- # Allows properties to be accessed using a hash-like syntax
- #
- # @example
- # notice[:error_message]
- # @param [String] method The given key for an attribute
- # @return The attribute value, or self if given +:request+
- def [](method)
- case method
- when :request
- self
- else
- send(method)
- end
- end
-
- private
-
- attr_writer :exception, :api_key, :backtrace, :error_class, :error_message,
- :backtrace_filters, :parameters, :params_filters,
- :environment_filters, :session_data, :project_root, :url, :ignore,
- :ignore_by_filters, :notifier_name, :notifier_url, :notifier_version,
- :component, :action, :cgi_data, :environment_name
-
- # Arguments given in the initializer
- attr_accessor :args
-
- # Gets a property named +attribute+ of an exception, either from an actual
- # exception or a hash.
- #
- # If an exception is available, #from_exception will be used. Otherwise,
- # a key named +attribute+ will be used from the #args.
- #
- # If no exception or hash key is available, +default+ will be used.
- def exception_attribute(attribute, default = nil, &block)
- (exception && from_exception(attribute, &block)) || args[attribute] || default
- end
-
- # Gets a property named +attribute+ from an exception.
-