hoptoad-api 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +5 -1
- data/hoptoad-api.gemspec +5 -2
- data/lib/hoptoad-api.rb +7 -7
- data/lib/hoptoad-api/client.rb +120 -29
- data/lib/hoptoad-api/core_extensions.rb +0 -16
- data/lib/hoptoad-api/version.rb +1 -1
- data/test/fixtures/individual_notice.xml +198 -0
- data/test/fixtures/notices.xml +245 -0
- data/test/fixtures/paginated_notices.xml +101 -0
- data/test/test_helper.rb +12 -0
- data/test/test_hoptoad-api.rb +58 -29
- metadata +6 -3
data/README.textile
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
h1. Hoptoad API
|
2
2
|
|
3
3
|
An unofficial Ruby library for interacting with the "Hoptoad API":http://hoptoadapp.com/pages/api
|
4
|
-
"Hoptoad-2 API":http://help.hoptoadapp.com/faqs/api-2/api-overview
|
5
4
|
|
6
5
|
h2. Usage
|
7
6
|
|
@@ -29,3 +28,8 @@ h2. Requirements
|
|
29
28
|
h2. Acknowledgements
|
30
29
|
|
31
30
|
* "Hoptoad":http://hoptoadapp.com
|
31
|
+
|
32
|
+
h2. Contributors
|
33
|
+
|
34
|
+
Matias Käkelä (SSL Support)
|
35
|
+
Jordan Brough (Notices)
|
data/hoptoad-api.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{hoptoad-api}
|
8
|
-
s.version = "2.0
|
8
|
+
s.version = "2.1.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Steve Agalloco"]
|
12
|
-
s.date = %q{2010-05-
|
12
|
+
s.date = %q{2010-05-26}
|
13
13
|
s.description = %q{An unofficial gem for interacting with the Hoptoad API}
|
14
14
|
s.email = %q{steve.agalloco@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,7 +26,10 @@ Gem::Specification.new do |s|
|
|
26
26
|
"lib/hoptoad-api/version.rb",
|
27
27
|
"test/fixtures/errors.xml",
|
28
28
|
"test/fixtures/individual_error.xml",
|
29
|
+
"test/fixtures/individual_notice.xml",
|
30
|
+
"test/fixtures/notices.xml",
|
29
31
|
"test/fixtures/paginated_errors.xml",
|
32
|
+
"test/fixtures/paginated_notices.xml",
|
30
33
|
"test/test_helper.rb",
|
31
34
|
"test/test_hoptoad-api.rb"
|
32
35
|
]
|
data/lib/hoptoad-api.rb
CHANGED
@@ -4,29 +4,29 @@ require 'httparty'
|
|
4
4
|
module Hoptoad
|
5
5
|
extend self
|
6
6
|
attr_accessor :secure
|
7
|
-
|
7
|
+
|
8
8
|
class HoptoadError < StandardError; end
|
9
|
-
|
9
|
+
|
10
10
|
def account=(account)
|
11
11
|
@account = account
|
12
12
|
end
|
13
|
-
|
13
|
+
|
14
14
|
def account
|
15
15
|
"#{protocol}://#{@account}.hoptoadapp.com"
|
16
16
|
end
|
17
|
-
|
17
|
+
|
18
18
|
def auth_token=(token)
|
19
19
|
@auth_token = token
|
20
20
|
end
|
21
|
-
|
21
|
+
|
22
22
|
def auth_token
|
23
23
|
@auth_token
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
def protocol
|
27
27
|
secure ? "https" : "http"
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
end
|
31
31
|
|
32
32
|
require 'hoptoad-api/version'
|
data/lib/hoptoad-api/client.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Ruby lib for working with the Hoptoad API's XML interface.
|
1
|
+
# Ruby lib for working with the Hoptoad API's XML interface.
|
2
2
|
# The first thing you need to set is the account name. This is the same
|
3
3
|
# as the web address for your account.
|
4
4
|
#
|
@@ -6,10 +6,14 @@
|
|
6
6
|
#
|
7
7
|
# Then, you should set the authentication token.
|
8
8
|
#
|
9
|
-
# Hoptoad.
|
9
|
+
# Hoptoad.auth_token = 'abcdefg'
|
10
10
|
#
|
11
11
|
# If no token or authentication info is given, a HoptoadError exception will be raised.
|
12
12
|
#
|
13
|
+
# If your account uses ssl then turn it on:
|
14
|
+
#
|
15
|
+
# Hoptoad.secure = true
|
16
|
+
#
|
13
17
|
# For more details, check out the hoptoad docs at http://hoptoadapp.com/pages/api.
|
14
18
|
#
|
15
19
|
# Find errors
|
@@ -22,25 +26,50 @@
|
|
22
26
|
#
|
23
27
|
# find individual error by ID
|
24
28
|
# Hoptoad::Error.find(44)
|
29
|
+
#
|
30
|
+
# Find *all* notices by error_id
|
31
|
+
#
|
32
|
+
# notices = Hoptoad::Notice.all(1234) # 1234 == error id
|
33
|
+
#
|
34
|
+
# Find notice by id + error_id
|
35
|
+
#
|
36
|
+
# notice = Hoptoad::Notice.find(12345, 1234) # 12345 == notice id, 1234 == error id
|
25
37
|
|
26
38
|
module Hoptoad
|
27
|
-
class
|
39
|
+
class Base
|
28
40
|
include HTTParty
|
29
41
|
format :xml
|
30
|
-
|
31
|
-
@@collection_path = '/errors.xml'
|
32
|
-
@@individual_collection_path = '/errors/'
|
33
42
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
def self.find(*args)
|
43
|
+
private
|
44
|
+
|
45
|
+
def self.setup
|
39
46
|
base_uri Hoptoad.account
|
40
47
|
default_params :auth_token => Hoptoad.auth_token
|
41
48
|
|
42
49
|
check_configuration
|
50
|
+
end
|
43
51
|
|
52
|
+
def self.check_configuration
|
53
|
+
raise HoptoadError.new('API Token cannot be nil') if default_options.nil? || default_options[:default_params].nil? || !default_options[:default_params].has_key?(:auth_token)
|
54
|
+
raise HoptoadError.new('Account cannot be nil') unless default_options.has_key?(:base_uri)
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.fetch(path, options)
|
58
|
+
response = get(path, { :query => options })
|
59
|
+
if response.code == 403
|
60
|
+
raise HoptoadError.new('SSL should be enabled - use Hoptoad.secure = true in configuration')
|
61
|
+
end
|
62
|
+
|
63
|
+
Hashie::Mash.new(response)
|
64
|
+
end
|
65
|
+
|
66
|
+
end
|
67
|
+
|
68
|
+
class Error < Base
|
69
|
+
|
70
|
+
def self.find(*args)
|
71
|
+
setup
|
72
|
+
|
44
73
|
results = case args.first
|
45
74
|
when Fixnum
|
46
75
|
find_individual(args)
|
@@ -49,38 +78,100 @@ module Hoptoad
|
|
49
78
|
else
|
50
79
|
raise HoptoadError.new('Invalid argument')
|
51
80
|
end
|
52
|
-
|
81
|
+
|
53
82
|
raise HoptoadError.new('No results found.') if results.nil?
|
54
83
|
raise HoptoadError.new(results.errors.error) if results.errors
|
55
84
|
|
56
85
|
results.group || results.groups
|
57
86
|
end
|
58
|
-
|
87
|
+
|
59
88
|
def self.update(error, options)
|
60
|
-
|
61
|
-
|
62
|
-
self.class.put(
|
89
|
+
setup
|
90
|
+
|
91
|
+
self.class.put(collection_path, options)
|
63
92
|
end
|
64
|
-
|
93
|
+
|
65
94
|
private
|
66
|
-
|
67
|
-
def self.check_configuration
|
68
|
-
raise HoptoadError.new('API Token cannot be nil') if default_options.nil? || default_options[:default_params].nil? || !default_options[:default_params].has_key?(:auth_token)
|
69
|
-
raise HoptoadError.new('Account cannot be nil') unless default_options.has_key?(:base_uri)
|
70
|
-
end
|
71
|
-
|
95
|
+
|
72
96
|
def self.find_all(args)
|
73
97
|
options = args.extract_options!
|
74
|
-
|
98
|
+
|
99
|
+
fetch(collection_path, options)
|
75
100
|
end
|
76
|
-
|
101
|
+
|
77
102
|
def self.find_individual(args)
|
78
103
|
id = args.shift
|
79
104
|
options = args.extract_options!
|
80
|
-
|
81
|
-
|
82
|
-
|
105
|
+
|
106
|
+
fetch(error_path(id), options)
|
107
|
+
end
|
108
|
+
|
109
|
+
def self.collection_path
|
110
|
+
'/errors.xml'
|
111
|
+
end
|
112
|
+
|
113
|
+
def self.error_path(error_id)
|
114
|
+
"/errors/#{error_id}.xml"
|
115
|
+
end
|
116
|
+
|
117
|
+
end
|
118
|
+
|
119
|
+
class Notice < Base
|
120
|
+
|
121
|
+
def self.find(id, error_id, options={})
|
122
|
+
setup
|
123
|
+
|
124
|
+
hash = fetch(find_path(id, error_id), options)
|
125
|
+
|
126
|
+
if hash.errors
|
127
|
+
raise HoptoadError.new(results.errors.error)
|
128
|
+
end
|
129
|
+
|
130
|
+
hash.notice
|
131
|
+
end
|
132
|
+
|
133
|
+
def self.find_all_by_error_id(error_id)
|
134
|
+
setup
|
135
|
+
|
136
|
+
options = {}
|
137
|
+
notices = []
|
138
|
+
page = 1
|
139
|
+
while true
|
140
|
+
options[:page] = page
|
141
|
+
hash = fetch(all_path(error_id), options)
|
142
|
+
if hash.errors
|
143
|
+
raise HoptoadError.new(results.errors.error)
|
144
|
+
end
|
145
|
+
notice_stubs = hash.notices
|
146
|
+
|
147
|
+
notice_stubs.map do |notice|
|
148
|
+
notices << find(notice.id, error_id)
|
149
|
+
end
|
150
|
+
break if notice_stubs.size < 30
|
151
|
+
page += 1
|
152
|
+
end
|
153
|
+
notices
|
83
154
|
end
|
84
155
|
|
156
|
+
def self.find_by_error_id(error_id, options={ 'page' => 1})
|
157
|
+
setup
|
158
|
+
|
159
|
+
hash = fetch(all_path(error_id), options)
|
160
|
+
if hash.errors
|
161
|
+
raise HoptoadError.new(results.errors.error)
|
162
|
+
end
|
163
|
+
|
164
|
+
hash.notices
|
165
|
+
end
|
166
|
+
|
167
|
+
private
|
168
|
+
|
169
|
+
def self.find_path(id, error_id)
|
170
|
+
"/errors/#{error_id}/notices/#{id}.xml"
|
171
|
+
end
|
172
|
+
|
173
|
+
def self.all_path(error_id)
|
174
|
+
"/errors/#{error_id}/notices.xml"
|
175
|
+
end
|
85
176
|
end
|
86
|
-
end
|
177
|
+
end
|
@@ -2,20 +2,4 @@ class Array
|
|
2
2
|
def extract_options!
|
3
3
|
last.is_a?(::Hash) ? pop : {}
|
4
4
|
end
|
5
|
-
end
|
6
|
-
|
7
|
-
class Hash
|
8
|
-
|
9
|
-
# Converts all of the keys to strings, optionally formatting key name
|
10
|
-
def rubyify_keys!
|
11
|
-
keys.each{|k|
|
12
|
-
v = delete(k)
|
13
|
-
new_key = k.to_s.underscore
|
14
|
-
self[new_key] = v
|
15
|
-
v.rubyify_keys! if v.is_a?(Hash)
|
16
|
-
v.each{|p| p.rubyify_keys! if p.is_a?(Hash)} if v.is_a?(Array)
|
17
|
-
}
|
18
|
-
self
|
19
|
-
end
|
20
|
-
|
21
5
|
end
|
data/lib/hoptoad-api/version.rb
CHANGED
@@ -0,0 +1,198 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
|
3
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
4
|
+
<notice>
|
5
|
+
<created-at type="datetime">2010-05-21T13:40:00Z</created-at>
|
6
|
+
<error-message>NoMethodError: undefined method `timezone_adjusted_traded_at' for nil:NilClass</error-message>
|
7
|
+
<group-id type="integer">1827573</group-id>
|
8
|
+
<id type="integer">294426853</id>
|
9
|
+
<project-id type="integer">248</project-id>
|
10
|
+
<updated-at type="datetime">2010-05-21T13:40:00Z</updated-at>
|
11
|
+
<environment>
|
12
|
+
<action-controller-rescue-request>#<ActionController::Request:0x2ad2d6d0a588></action-controller-rescue-request>
|
13
|
+
<rack-session-record>#<ActiveRecord::SessionStore::Session:0x2ad2d6cebed0></rack-session-record>
|
14
|
+
<server-name>_</server-name>
|
15
|
+
<http-from>googlebot(at)googlebot.com</http-from>
|
16
|
+
<rack-url-scheme>http</rack-url-scheme>
|
17
|
+
<passenger-app-spawner-idle-time>0</passenger-app-spawner-idle-time>
|
18
|
+
<http-user-agent>Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)</http-user-agent>
|
19
|
+
<rack-run-once>false</rack-run-once>
|
20
|
+
<path-info>/company/qek-la/trade_notes</path-info>
|
21
|
+
<http-te>chunked;q=1.0</http-te>
|
22
|
+
<rack-input>#<Rack::RewindableInput:0x2ad2d6d0b9d8></rack-input>
|
23
|
+
<content-length>0</content-length>
|
24
|
+
<http-accept-encoding>gzip</http-accept-encoding>
|
25
|
+
<http-via>1.1 v1-akamaitech.net(ghost) (AkamaiGHost), 1.1 akamai.net(ghost) (AkamaiGHost)</http-via>
|
26
|
+
<http-cache-control>no-cache, max-age=0</http-cache-control>
|
27
|
+
<server-protocol>HTTP/1.0</server-protocol>
|
28
|
+
<action-controller-request-request-parameters></action-controller-request-request-parameters>
|
29
|
+
<server-addr>127.0.0.1</server-addr>
|
30
|
+
<http-host>community.tradeking.com</http-host>
|
31
|
+
<rack-errors>#<IO:0x2ad2cc818ea8></rack-errors>
|
32
|
+
<script-name></script-name>
|
33
|
+
<remote-addr>127.0.0.1</remote-addr>
|
34
|
+
<server-software>nginx/0.6.35</server-software>
|
35
|
+
<passenger-spawn-method>smart-lv2</passenger-spawn-method>
|
36
|
+
<passenger-environment>production</passenger-environment>
|
37
|
+
<http-akamai-origin-hop>2</http-akamai-origin-hop>
|
38
|
+
<rack-request-query-hash></rack-request-query-hash>
|
39
|
+
<rack-multithread>false</rack-multithread>
|
40
|
+
<rack-version>10</rack-version>
|
41
|
+
<http-true-client-ip>66.249.65.108</http-true-client-ip>
|
42
|
+
<action_controller.request.path_parameters>
|
43
|
+
<action>index</action>
|
44
|
+
<controller>trade_notes</controller>
|
45
|
+
<company-id>qek-la</company-id>
|
46
|
+
</action_controller.request.path_parameters>
|
47
|
+
<rack-multiprocess>true</rack-multiprocess>
|
48
|
+
<http-x-akamai-config-log-detail>true</http-x-akamai-config-log-detail>
|
49
|
+
<request-uri>/company/qek-la/trade_notes</request-uri>
|
50
|
+
<document-root>/data/tradeking/current/public</document-root>
|
51
|
+
<server-port>81</server-port>
|
52
|
+
<scgi>1</scgi>
|
53
|
+
<passenger-app-type>rails</passenger-app-type>
|
54
|
+
<passenger-use-global-queue>true</passenger-use-global-queue>
|
55
|
+
<action-controller-rescue-response>#<ActionController::Response:0x2ad2d6d0a178></action-controller-rescue-response>
|
56
|
+
<remote-port>51114</remote-port>
|
57
|
+
<http-pragma>no-cache</http-pragma>
|
58
|
+
<rack-request-query-string></rack-request-query-string>
|
59
|
+
<rack.session.options>
|
60
|
+
<domain></domain>
|
61
|
+
<id>bc65dcd014452ec479f77d43ce25fbe8</id>
|
62
|
+
<secure>false</secure>
|
63
|
+
<expire-after></expire-after>
|
64
|
+
<cookie-only>true</cookie-only>
|
65
|
+
<httponly>true</httponly>
|
66
|
+
<key>_tk_community_session</key>
|
67
|
+
<secret>270022c1d7400e0aba2f515d59d3bd56f18d036428c0a16a1292b6d4d1f0a90c67e5247f8e15d67abcc690fe94bac1793789cdef843a679231d7e43d104ad674</secret>
|
68
|
+
<path>/</path>
|
69
|
+
</rack.session.options>
|
70
|
+
<query-string></query-string>
|
71
|
+
<rack.session>
|
72
|
+
<sliding-session-expires-at>Fri May 21 08:39:58 -0700 2010</sliding-session-expires-at>
|
73
|
+
</rack.session>
|
74
|
+
<http-x-forwarded-for>66.249.65.108, 193.108.94.132, 199.3.115.196</http-x-forwarded-for>
|
75
|
+
<http-accept>*/*</http-accept>
|
76
|
+
<action-controller-request-query-parameters></action-controller-request-query-parameters>
|
77
|
+
<passenger-framework-spawner-idle-time>0</passenger-framework-spawner-idle-time>
|
78
|
+
<http-connection>close</http-connection>
|
79
|
+
<http-x-real-ip>199.3.115.196</http-x-real-ip>
|
80
|
+
<request-method>GET</request-method>
|
81
|
+
</environment>
|
82
|
+
<session>
|
83
|
+
<data>
|
84
|
+
<sliding-session-expires-at>Fri May 21 08:39:58 -0700 2010</sliding-session-expires-at>
|
85
|
+
</data>
|
86
|
+
</session>
|
87
|
+
<request>
|
88
|
+
<rails-root>/data/tradeking/releases/20100520043505</rails-root>
|
89
|
+
<url>http://community.tradeking.com/company/qek-la/trade_notes</url>
|
90
|
+
<params>
|
91
|
+
<action>index</action>
|
92
|
+
<controller>trade_notes</controller>
|
93
|
+
<company-id>qek-la</company-id>
|
94
|
+
</params>
|
95
|
+
</request>
|
96
|
+
<backtrace>
|
97
|
+
<line>/data/tradeking/releases/20100520043505/app/helpers/application_helper.rb:47:in `posted_time_ago'</line>
|
98
|
+
<line>/data/tradeking/releases/20100520043505/app/views/trade_notes/_in_list.html.erb:54:in `_run_erb_app47views47trade_notes47_in_list46html46erb_locals_in_list_object_trade_note'</line>
|
99
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `send'</line>
|
100
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `render_without_trace_View___path__Rendering'</line>
|
101
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:306:in `with_template'</line>
|
102
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:30:in `render_without_trace_View___path__Rendering'</line>
|
103
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render'</line>
|
104
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
|
105
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render'</line>
|
106
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:20:in `render'</line>
|
107
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:30:in `benchmark'</line>
|
108
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:19:in `render'</line>
|
109
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/template.rb:205:in `render_template'</line>
|
110
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:44:in `render_partial_without_trace_View___path__Partial'</line>
|
111
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render_partial'</line>
|
112
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
|
113
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render_partial'</line>
|
114
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/partials.rb:184:in `render_partial'</line>
|
115
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:267:in `render'</line>
|
116
|
+
<line>/data/tradeking/releases/20100520043505/app/views/trade_notes/_trade_notes.html.erb:3:in `_run_erb_app47views47trade_notes47_trade_notes46html46erb_locals_object_trade_notes'</line>
|
117
|
+
<line>/data/tradeking/releases/20100520043505/app/views/trade_notes/_trade_notes.html.erb:1:in `each'</line>
|
118
|
+
<line>/data/tradeking/releases/20100520043505/app/views/trade_notes/_trade_notes.html.erb:1:in `_run_erb_app47views47trade_notes47_trade_notes46html46erb_locals_object_trade_notes'</line>
|
119
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `send'</line>
|
120
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `render_without_trace_View___path__Rendering'</line>
|
121
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:306:in `with_template'</line>
|
122
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:30:in `render_without_trace_View___path__Rendering'</line>
|
123
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render'</line>
|
124
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
|
125
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render'</line>
|
126
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:20:in `render'</line>
|
127
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:30:in `benchmark'</line>
|
128
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:19:in `render'</line>
|
129
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/template.rb:205:in `render_template'</line>
|
130
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable_partial.rb:44:in `render_partial_without_trace_View___path__Partial'</line>
|
131
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render_partial'</line>
|
132
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
|
133
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render_partial'</line>
|
134
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/partials.rb:184:in `render_partial'</line>
|
135
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:267:in `render'</line>
|
136
|
+
<line>/data/tradeking/releases/20100520043505/app/views/trade_notes/index.html.erb:32:in `_run_erb_app47views47trade_notes47index46html46erb'</line>
|
137
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `send'</line>
|
138
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:34:in `render_without_trace_View___path__Rendering'</line>
|
139
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:306:in `with_template'</line>
|
140
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/renderable.rb:30:in `render_without_trace_View___path__Rendering'</line>
|
141
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `render'</line>
|
142
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
|
143
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `render'</line>
|
144
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/template.rb:205:in `render_template'</line>
|
145
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:265:in `render'</line>
|
146
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:348:in `_render_with_layout'</line>
|
147
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_view/base.rb:262:in `render'</line>
|
148
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:1250:in `render_for_file'</line>
|
149
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:945:in `render_without_benchmark'</line>
|
150
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'</line>
|
151
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'</line>
|
152
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:10:in `realtime'</line>
|
153
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'</line>
|
154
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:51:in `render'</line>
|
155
|
+
<line>/data/tradeking/releases/20100520043505/app/controllers/trade_notes_controller.rb:33:in `index'</line>
|
156
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:135:in `call'</line>
|
157
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:135:in `custom'</line>
|
158
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:175:in `call'</line>
|
159
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:175:in `respond'</line>
|
160
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:173:in `each'</line>
|
161
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:173:in `respond'</line>
|
162
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/mime_responds.rb:107:in `respond_to'</line>
|
163
|
+
<line>/data/tradeking/releases/20100520043505/app/controllers/trade_notes_controller.rb:32:in `index'</line>
|
164
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `send'</line>
|
165
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `perform_action_without_filters'</line>
|
166
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'</line>
|
167
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:638:in `run_before_filters'</line>
|
168
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:189:in `call'</line>
|
169
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:189:in `call'</line>
|
170
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:635:in `run_before_filters'</line>
|
171
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:615:in `call_filters'</line>
|
172
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'</line>
|
173
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'</line>
|
174
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'</line>
|
175
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:10:in `realtime'</line>
|
176
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'</line>
|
177
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'</line>
|
178
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'</line>
|
179
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/flash.rb:146:in `perform_action_without_newrelic_trace'</line>
|
180
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:138:in `perform_action'</line>
|
181
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
|
182
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:122:in `perform_action'</line>
|
183
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:38:in `trace_method_execution_no_scope'</line>
|
184
|
+
<line>/data/tradeking/releases/20100520043505/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:117:in `perform_action'</line>
|
185
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `send'</line>
|
186
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `process_without_filters'</line>
|
187
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process'</line>
|
188
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:391:in `process'</line>
|
189
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/base.rb:386:in `call'</line>
|
190
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `call'</line>
|
191
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in `dispatch'</line>
|
192
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'</line>
|
193
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'</line>
|
194
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'</line>
|
195
|
+
<line>/data/tradeking/releases/20100520043505/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'</line>
|
196
|
+
<line>/data/tradeking/releases/20100520043505/vendor/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'</line>
|
197
|
+
</backtrace>
|
198
|
+
</notice>
|
@@ -0,0 +1,245 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
|
3
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
4
|
+
<notices type="array">
|
5
|
+
<notice>
|
6
|
+
<created-at type="datetime">2010-05-25T01:30:58Z</created-at>
|
7
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
8
|
+
<group-id type="integer">1696170</group-id>
|
9
|
+
<id type="integer">1234</id>
|
10
|
+
<project-id type="integer">248</project-id>
|
11
|
+
<updated-at type="datetime">2010-05-25T01:30:58Z</updated-at>
|
12
|
+
</notice>
|
13
|
+
<notice>
|
14
|
+
<created-at type="datetime">2010-05-24T21:43:54Z</created-at>
|
15
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
16
|
+
<group-id type="integer">1696170</group-id>
|
17
|
+
<id type="integer">1234</id>
|
18
|
+
<project-id type="integer">248</project-id>
|
19
|
+
<updated-at type="datetime">2010-05-24T21:43:54Z</updated-at>
|
20
|
+
</notice>
|
21
|
+
<notice>
|
22
|
+
<created-at type="datetime">2010-05-24T15:29:01Z</created-at>
|
23
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
24
|
+
<group-id type="integer">1696170</group-id>
|
25
|
+
<id type="integer">1234</id>
|
26
|
+
<project-id type="integer">248</project-id>
|
27
|
+
<updated-at type="datetime">2010-05-24T15:29:01Z</updated-at>
|
28
|
+
</notice>
|
29
|
+
<notice>
|
30
|
+
<created-at type="datetime">2010-05-24T09:34:34Z</created-at>
|
31
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
32
|
+
<group-id type="integer">1696170</group-id>
|
33
|
+
<id type="integer">1234</id>
|
34
|
+
<project-id type="integer">248</project-id>
|
35
|
+
<updated-at type="datetime">2010-05-24T09:34:34Z</updated-at>
|
36
|
+
</notice>
|
37
|
+
<notice>
|
38
|
+
<created-at type="datetime">2010-05-24T03:48:08Z</created-at>
|
39
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
40
|
+
<group-id type="integer">1696170</group-id>
|
41
|
+
<id type="integer">1234</id>
|
42
|
+
<project-id type="integer">248</project-id>
|
43
|
+
<updated-at type="datetime">2010-05-24T03:48:08Z</updated-at>
|
44
|
+
</notice>
|
45
|
+
<notice>
|
46
|
+
<created-at type="datetime">2010-05-24T03:38:45Z</created-at>
|
47
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
48
|
+
<group-id type="integer">1696170</group-id>
|
49
|
+
<id type="integer">1234</id>
|
50
|
+
<project-id type="integer">248</project-id>
|
51
|
+
<updated-at type="datetime">2010-05-24T03:38:45Z</updated-at>
|
52
|
+
</notice>
|
53
|
+
<notice>
|
54
|
+
<created-at type="datetime">2010-05-24T03:34:05Z</created-at>
|
55
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
56
|
+
<group-id type="integer">1696170</group-id>
|
57
|
+
<id type="integer">1234</id>
|
58
|
+
<project-id type="integer">248</project-id>
|
59
|
+
<updated-at type="datetime">2010-05-24T03:34:05Z</updated-at>
|
60
|
+
</notice>
|
61
|
+
<notice>
|
62
|
+
<created-at type="datetime">2010-05-24T03:17:05Z</created-at>
|
63
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
64
|
+
<group-id type="integer">1696170</group-id>
|
65
|
+
<id type="integer">1234</id>
|
66
|
+
<project-id type="integer">248</project-id>
|
67
|
+
<updated-at type="datetime">2010-05-24T03:17:05Z</updated-at>
|
68
|
+
</notice>
|
69
|
+
<notice>
|
70
|
+
<created-at type="datetime">2010-05-23T23:11:54Z</created-at>
|
71
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
72
|
+
<group-id type="integer">1696170</group-id>
|
73
|
+
<id type="integer">1234</id>
|
74
|
+
<project-id type="integer">248</project-id>
|
75
|
+
<updated-at type="datetime">2010-05-23T23:11:54Z</updated-at>
|
76
|
+
</notice>
|
77
|
+
<notice>
|
78
|
+
<created-at type="datetime">2010-05-23T20:52:10Z</created-at>
|
79
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
80
|
+
<group-id type="integer">1696170</group-id>
|
81
|
+
<id type="integer">1234</id>
|
82
|
+
<project-id type="integer">248</project-id>
|
83
|
+
<updated-at type="datetime">2010-05-23T20:52:10Z</updated-at>
|
84
|
+
</notice>
|
85
|
+
<notice>
|
86
|
+
<created-at type="datetime">2010-05-23T20:49:07Z</created-at>
|
87
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
88
|
+
<group-id type="integer">1696170</group-id>
|
89
|
+
<id type="integer">1234</id>
|
90
|
+
<project-id type="integer">248</project-id>
|
91
|
+
<updated-at type="datetime">2010-05-23T20:49:07Z</updated-at>
|
92
|
+
</notice>
|
93
|
+
<notice>
|
94
|
+
<created-at type="datetime">2010-05-23T16:05:19Z</created-at>
|
95
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
96
|
+
<group-id type="integer">1696170</group-id>
|
97
|
+
<id type="integer">1234</id>
|
98
|
+
<project-id type="integer">248</project-id>
|
99
|
+
<updated-at type="datetime">2010-05-23T16:05:19Z</updated-at>
|
100
|
+
</notice>
|
101
|
+
<notice>
|
102
|
+
<created-at type="datetime">2010-05-23T11:43:20Z</created-at>
|
103
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
104
|
+
<group-id type="integer">1696170</group-id>
|
105
|
+
<id type="integer">1234</id>
|
106
|
+
<project-id type="integer">248</project-id>
|
107
|
+
<updated-at type="datetime">2010-05-23T11:43:20Z</updated-at>
|
108
|
+
</notice>
|
109
|
+
<notice>
|
110
|
+
<created-at type="datetime">2010-05-23T11:22:09Z</created-at>
|
111
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
112
|
+
<group-id type="integer">1696170</group-id>
|
113
|
+
<id type="integer">1234</id>
|
114
|
+
<project-id type="integer">248</project-id>
|
115
|
+
<updated-at type="datetime">2010-05-23T11:22:09Z</updated-at>
|
116
|
+
</notice>
|
117
|
+
<notice>
|
118
|
+
<created-at type="datetime">2010-05-22T19:29:40Z</created-at>
|
119
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
120
|
+
<group-id type="integer">1696170</group-id>
|
121
|
+
<id type="integer">1234</id>
|
122
|
+
<project-id type="integer">248</project-id>
|
123
|
+
<updated-at type="datetime">2010-05-22T19:29:40Z</updated-at>
|
124
|
+
</notice>
|
125
|
+
<notice>
|
126
|
+
<created-at type="datetime">2010-05-22T13:42:48Z</created-at>
|
127
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
128
|
+
<group-id type="integer">1696170</group-id>
|
129
|
+
<id type="integer">1234</id>
|
130
|
+
<project-id type="integer">248</project-id>
|
131
|
+
<updated-at type="datetime">2010-05-22T13:42:48Z</updated-at>
|
132
|
+
</notice>
|
133
|
+
<notice>
|
134
|
+
<created-at type="datetime">2010-05-22T08:09:35Z</created-at>
|
135
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
136
|
+
<group-id type="integer">1696170</group-id>
|
137
|
+
<id type="integer">1234</id>
|
138
|
+
<project-id type="integer">248</project-id>
|
139
|
+
<updated-at type="datetime">2010-05-22T08:09:35Z</updated-at>
|
140
|
+
</notice>
|
141
|
+
<notice>
|
142
|
+
<created-at type="datetime">2010-05-22T07:39:47Z</created-at>
|
143
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
144
|
+
<group-id type="integer">1696170</group-id>
|
145
|
+
<id type="integer">1234</id>
|
146
|
+
<project-id type="integer">248</project-id>
|
147
|
+
<updated-at type="datetime">2010-05-22T07:39:47Z</updated-at>
|
148
|
+
</notice>
|
149
|
+
<notice>
|
150
|
+
<created-at type="datetime">2010-05-22T07:35:33Z</created-at>
|
151
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
152
|
+
<group-id type="integer">1696170</group-id>
|
153
|
+
<id type="integer">1234</id>
|
154
|
+
<project-id type="integer">248</project-id>
|
155
|
+
<updated-at type="datetime">2010-05-22T07:35:33Z</updated-at>
|
156
|
+
</notice>
|
157
|
+
<notice>
|
158
|
+
<created-at type="datetime">2010-05-22T07:34:44Z</created-at>
|
159
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
160
|
+
<group-id type="integer">1696170</group-id>
|
161
|
+
<id type="integer">1234</id>
|
162
|
+
<project-id type="integer">248</project-id>
|
163
|
+
<updated-at type="datetime">2010-05-22T07:34:44Z</updated-at>
|
164
|
+
</notice>
|
165
|
+
<notice>
|
166
|
+
<created-at type="datetime">2010-05-22T00:59:38Z</created-at>
|
167
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
168
|
+
<group-id type="integer">1696170</group-id>
|
169
|
+
<id type="integer">1234</id>
|
170
|
+
<project-id type="integer">248</project-id>
|
171
|
+
<updated-at type="datetime">2010-05-22T00:59:38Z</updated-at>
|
172
|
+
</notice>
|
173
|
+
<notice>
|
174
|
+
<created-at type="datetime">2010-05-22T00:57:59Z</created-at>
|
175
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
176
|
+
<group-id type="integer">1696170</group-id>
|
177
|
+
<id type="integer">1234</id>
|
178
|
+
<project-id type="integer">248</project-id>
|
179
|
+
<updated-at type="datetime">2010-05-22T00:57:59Z</updated-at>
|
180
|
+
</notice>
|
181
|
+
<notice>
|
182
|
+
<created-at type="datetime">2010-05-22T00:53:13Z</created-at>
|
183
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
184
|
+
<group-id type="integer">1696170</group-id>
|
185
|
+
<id type="integer">1234</id>
|
186
|
+
<project-id type="integer">248</project-id>
|
187
|
+
<updated-at type="datetime">2010-05-22T00:53:13Z</updated-at>
|
188
|
+
</notice>
|
189
|
+
<notice>
|
190
|
+
<created-at type="datetime">2010-05-21T23:08:16Z</created-at>
|
191
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
192
|
+
<group-id type="integer">1696170</group-id>
|
193
|
+
<id type="integer">1234</id>
|
194
|
+
<project-id type="integer">248</project-id>
|
195
|
+
<updated-at type="datetime">2010-05-21T23:08:16Z</updated-at>
|
196
|
+
</notice>
|
197
|
+
<notice>
|
198
|
+
<created-at type="datetime">2010-05-21T18:44:37Z</created-at>
|
199
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
200
|
+
<group-id type="integer">1696170</group-id>
|
201
|
+
<id type="integer">1234</id>
|
202
|
+
<project-id type="integer">248</project-id>
|
203
|
+
<updated-at type="datetime">2010-05-21T18:44:37Z</updated-at>
|
204
|
+
</notice>
|
205
|
+
<notice>
|
206
|
+
<created-at type="datetime">2010-05-21T18:25:50Z</created-at>
|
207
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
208
|
+
<group-id type="integer">1696170</group-id>
|
209
|
+
<id type="integer">1234</id>
|
210
|
+
<project-id type="integer">248</project-id>
|
211
|
+
<updated-at type="datetime">2010-05-21T18:25:50Z</updated-at>
|
212
|
+
</notice>
|
213
|
+
<notice>
|
214
|
+
<created-at type="datetime">2010-05-21T18:24:28Z</created-at>
|
215
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
216
|
+
<group-id type="integer">1696170</group-id>
|
217
|
+
<id type="integer">1234</id>
|
218
|
+
<project-id type="integer">248</project-id>
|
219
|
+
<updated-at type="datetime">2010-05-21T18:24:28Z</updated-at>
|
220
|
+
</notice>
|
221
|
+
<notice>
|
222
|
+
<created-at type="datetime">2010-05-21T13:40:00Z</created-at>
|
223
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
224
|
+
<group-id type="integer">1696170</group-id>
|
225
|
+
<id type="integer">1234</id>
|
226
|
+
<project-id type="integer">248</project-id>
|
227
|
+
<updated-at type="datetime">2010-05-21T13:40:00Z</updated-at>
|
228
|
+
</notice>
|
229
|
+
<notice>
|
230
|
+
<created-at type="datetime">2010-05-21T11:07:18Z</created-at>
|
231
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
232
|
+
<group-id type="integer">1696170</group-id>
|
233
|
+
<id type="integer">1234</id>
|
234
|
+
<project-id type="integer">248</project-id>
|
235
|
+
<updated-at type="datetime">2010-05-21T11:07:18Z</updated-at>
|
236
|
+
</notice>
|
237
|
+
<notice>
|
238
|
+
<created-at type="datetime">2010-05-21T10:34:07Z</created-at>
|
239
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
240
|
+
<group-id type="integer">1696170</group-id>
|
241
|
+
<id type="integer">1234</id>
|
242
|
+
<project-id type="integer">248</project-id>
|
243
|
+
<updated-at type="datetime">2010-05-21T10:34:07Z</updated-at>
|
244
|
+
</notice>
|
245
|
+
</notices>
|
@@ -0,0 +1,101 @@
|
|
1
|
+
HTTP/1.1 200 OK
|
2
|
+
|
3
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
4
|
+
<notices type="array">
|
5
|
+
<notice>
|
6
|
+
<created-at type="datetime">2010-05-21T10:31:41Z</created-at>
|
7
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
8
|
+
<group-id type="integer">1696170</group-id>
|
9
|
+
<id type="integer">1234</id>
|
10
|
+
<project-id type="integer">248</project-id>
|
11
|
+
<updated-at type="datetime">2010-05-21T10:31:41Z</updated-at>
|
12
|
+
</notice>
|
13
|
+
<notice>
|
14
|
+
<created-at type="datetime">2010-05-21T05:22:47Z</created-at>
|
15
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
16
|
+
<group-id type="integer">1696170</group-id>
|
17
|
+
<id type="integer">1234</id>
|
18
|
+
<project-id type="integer">248</project-id>
|
19
|
+
<updated-at type="datetime">2010-05-21T05:22:47Z</updated-at>
|
20
|
+
</notice>
|
21
|
+
<notice>
|
22
|
+
<created-at type="datetime">2010-05-20T23:54:26Z</created-at>
|
23
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
24
|
+
<group-id type="integer">1696170</group-id>
|
25
|
+
<id type="integer">1234</id>
|
26
|
+
<project-id type="integer">248</project-id>
|
27
|
+
<updated-at type="datetime">2010-05-20T23:54:26Z</updated-at>
|
28
|
+
</notice>
|
29
|
+
<notice>
|
30
|
+
<created-at type="datetime">2010-05-20T17:38:06Z</created-at>
|
31
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
32
|
+
<group-id type="integer">1696170</group-id>
|
33
|
+
<id type="integer">1234</id>
|
34
|
+
<project-id type="integer">248</project-id>
|
35
|
+
<updated-at type="datetime">2010-05-20T17:38:06Z</updated-at>
|
36
|
+
</notice>
|
37
|
+
<notice>
|
38
|
+
<created-at type="datetime">2010-05-20T11:08:22Z</created-at>
|
39
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
40
|
+
<group-id type="integer">1696170</group-id>
|
41
|
+
<id type="integer">1234</id>
|
42
|
+
<project-id type="integer">248</project-id>
|
43
|
+
<updated-at type="datetime">2010-05-20T11:08:22Z</updated-at>
|
44
|
+
</notice>
|
45
|
+
<notice>
|
46
|
+
<created-at type="datetime">2010-05-20T11:07:09Z</created-at>
|
47
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
48
|
+
<group-id type="integer">1696170</group-id>
|
49
|
+
<id type="integer">1234</id>
|
50
|
+
<project-id type="integer">248</project-id>
|
51
|
+
<updated-at type="datetime">2010-05-20T11:07:09Z</updated-at>
|
52
|
+
</notice>
|
53
|
+
<notice>
|
54
|
+
<created-at type="datetime">2010-05-20T11:05:02Z</created-at>
|
55
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
56
|
+
<group-id type="integer">1696170</group-id>
|
57
|
+
<id type="integer">1234</id>
|
58
|
+
<project-id type="integer">248</project-id>
|
59
|
+
<updated-at type="datetime">2010-05-20T11:05:02Z</updated-at>
|
60
|
+
</notice>
|
61
|
+
<notice>
|
62
|
+
<created-at type="datetime">2010-05-20T11:04:50Z</created-at>
|
63
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
64
|
+
<group-id type="integer">1696170</group-id>
|
65
|
+
<id type="integer">1234</id>
|
66
|
+
<project-id type="integer">248</project-id>
|
67
|
+
<updated-at type="datetime">2010-05-20T11:04:50Z</updated-at>
|
68
|
+
</notice>
|
69
|
+
<notice>
|
70
|
+
<created-at type="datetime">2010-05-20T07:45:50Z</created-at>
|
71
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
72
|
+
<group-id type="integer">1696170</group-id>
|
73
|
+
<id type="integer">1234</id>
|
74
|
+
<project-id type="integer">248</project-id>
|
75
|
+
<updated-at type="datetime">2010-05-20T07:45:50Z</updated-at>
|
76
|
+
</notice>
|
77
|
+
<notice>
|
78
|
+
<created-at type="datetime">2010-05-20T05:07:31Z</created-at>
|
79
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
80
|
+
<group-id type="integer">1696170</group-id>
|
81
|
+
<id type="integer">1234</id>
|
82
|
+
<project-id type="integer">248</project-id>
|
83
|
+
<updated-at type="datetime">2010-05-20T05:07:31Z</updated-at>
|
84
|
+
</notice>
|
85
|
+
<notice>
|
86
|
+
<created-at type="datetime">2010-05-20T04:43:33Z</created-at>
|
87
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
88
|
+
<group-id type="integer">1696170</group-id>
|
89
|
+
<id type="integer">1234</id>
|
90
|
+
<project-id type="integer">248</project-id>
|
91
|
+
<updated-at type="datetime">2010-05-20T04:43:33Z</updated-at>
|
92
|
+
</notice>
|
93
|
+
<notice>
|
94
|
+
<created-at type="datetime">2010-05-20T04:43:15Z</created-at>
|
95
|
+
<error-message>NoMethodError: undefined method `oh_no_not_that' for nil:NilClass</error-message>
|
96
|
+
<group-id type="integer">1696170</group-id>
|
97
|
+
<id type="integer">1234</id>
|
98
|
+
<project-id type="integer">248</project-id>
|
99
|
+
<updated-at type="datetime">2010-05-20T04:43:15Z</updated-at>
|
100
|
+
</notice>
|
101
|
+
</notices>
|
data/test/test_helper.rb
CHANGED
@@ -6,8 +6,20 @@ require 'fakeweb'
|
|
6
6
|
require File.join(File.dirname(__FILE__), "..", "lib", "hoptoad-api")
|
7
7
|
|
8
8
|
FakeWeb.allow_net_connect = false
|
9
|
+
|
10
|
+
# error responses
|
9
11
|
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors.xml?auth_token=abcdefg123456", :response => File.join(File.dirname(__FILE__), 'fixtures', 'errors.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
10
12
|
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors.xml?auth_token=abcdefg123456&page=2", :response => File.join(File.dirname(__FILE__), 'fixtures', 'paginated_errors.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
11
13
|
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors/1696170.xml?auth_token=abcdefg123456", :response => File.join(File.dirname(__FILE__), 'fixtures', 'individual_error.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
14
|
+
|
15
|
+
# notice responses
|
16
|
+
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors/1696170/notices.xml?auth_token=abcdefg123456", :response => File.join(File.dirname(__FILE__), 'fixtures', 'notices.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
17
|
+
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors/1696170/notices.xml?auth_token=abcdefg123456&page=1", :response => File.join(File.dirname(__FILE__), 'fixtures', 'notices.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
18
|
+
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors/1696170/notices.xml?page=1&auth_token=abcdefg123456", :response => File.join(File.dirname(__FILE__), 'fixtures', 'notices.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
19
|
+
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors/1696170/notices.xml?auth_token=abcdefg123456&page=2", :response => File.join(File.dirname(__FILE__), 'fixtures', 'paginated_notices.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
20
|
+
FakeWeb.register_uri(:get, "http://myapp.hoptoadapp.com/errors/1696170/notices/1234.xml?auth_token=abcdefg123456", :response => File.join(File.dirname(__FILE__), 'fixtures', 'notices.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
21
|
+
|
22
|
+
|
23
|
+
# ssl responses
|
12
24
|
FakeWeb.register_uri(:get, "http://sslapp.hoptoadapp.com/errors/1696170.xml?auth_token=abcdefg123456", :body => " ", :content_type => "application/xml; charset=utf-8", :status => ["403", "Forbidden"])
|
13
25
|
FakeWeb.register_uri(:get, "https://sslapp.hoptoadapp.com/errors/1696170.xml?auth_token=abcdefg123456", :response => File.join(File.dirname(__FILE__), 'fixtures', 'individual_error.xml'), :content_type => "application/xml; charset=utf-8", :status => ["200", "OK"])
|
data/test/test_hoptoad-api.rb
CHANGED
@@ -8,47 +8,76 @@ class HoptoadTest < Test::Unit::TestCase
|
|
8
8
|
Hoptoad.auth_token = 'abcdefg123456'
|
9
9
|
Hoptoad.secure = false
|
10
10
|
end
|
11
|
-
|
11
|
+
|
12
12
|
should "have correct collection path" do
|
13
13
|
assert_equal "/errors.xml", Hoptoad::Error.collection_path
|
14
14
|
end
|
15
|
-
|
16
|
-
should "
|
17
|
-
errors
|
18
|
-
ordered = errors.sort_by(&:most_recent_notice_at).reverse
|
19
|
-
assert_equal ordered, errors
|
20
|
-
assert_equal errors.size, 30
|
15
|
+
|
16
|
+
should "generate correct error path given an id" do
|
17
|
+
assert_equal "/errors/1234.xml", Hoptoad::Error.error_path(1234)
|
21
18
|
end
|
19
|
+
|
20
|
+
context "when finding errors" do
|
22
21
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
should "find a page of the 30 most recent errors" do
|
23
|
+
errors = Hoptoad::Error.find(:all)
|
24
|
+
ordered = errors.sort_by(&:most_recent_notice_at).reverse
|
25
|
+
assert_equal ordered, errors
|
26
|
+
assert_equal errors.size, 30
|
27
|
+
end
|
28
|
+
|
29
|
+
should "paginate errors" do
|
30
|
+
errors = Hoptoad::Error.find(:all, :page => 2)
|
31
|
+
ordered = errors.sort_by(&:most_recent_notice_at).reverse
|
32
|
+
assert_equal ordered, errors
|
33
|
+
assert_equal errors.size, 2
|
34
|
+
end
|
35
|
+
|
36
|
+
should "find an individual error" do
|
37
|
+
error = Hoptoad::Error.find(1696170)
|
38
|
+
assert_equal error.action, 'index'
|
39
|
+
assert_equal error.id, 1696170
|
40
|
+
end
|
41
|
+
|
28
42
|
end
|
29
43
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
44
|
+
context "when finding notices" do
|
45
|
+
|
46
|
+
should "find error notices" do
|
47
|
+
notices = Hoptoad::Notice.find_by_error_id(1696170)
|
48
|
+
assert_equal notices.size, 30
|
49
|
+
assert_equal notices.first.id, 1234
|
50
|
+
end
|
51
|
+
|
52
|
+
should "find all error notices" do
|
53
|
+
notices = Hoptoad::Notice.find_all_by_error_id(1696170)
|
54
|
+
assert_equal notices.size, 42
|
55
|
+
end
|
56
|
+
|
57
|
+
should "find individual notices" do
|
58
|
+
Hoptoad::Notice.find(1234, 1696170)
|
59
|
+
end
|
60
|
+
|
34
61
|
end
|
35
62
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
end
|
42
|
-
|
43
|
-
should "raise exception if trying to access SSL enabled account with unsecure connection" do
|
44
|
-
Hoptoad.account = "sslapp"
|
45
|
-
Hoptoad.secure = false
|
46
|
-
assert_raise(Hoptoad::HoptoadError) do
|
63
|
+
context "when using SSL" do
|
64
|
+
|
65
|
+
should "find an error if account is SSL enabled" do
|
66
|
+
Hoptoad.secure = true
|
67
|
+
Hoptoad.account = "sslapp"
|
47
68
|
error = Hoptoad::Error.find(1696170)
|
69
|
+
assert_equal error.id, 1696170
|
70
|
+
end
|
71
|
+
|
72
|
+
should "raise exception if trying to access SSL enabled account with unsecure connection" do
|
73
|
+
Hoptoad.account = "sslapp"
|
74
|
+
Hoptoad.secure = false
|
75
|
+
assert_raise(Hoptoad::HoptoadError) do
|
76
|
+
error = Hoptoad::Error.find(1696170)
|
77
|
+
end
|
48
78
|
end
|
49
79
|
end
|
50
80
|
|
51
81
|
end
|
52
82
|
|
53
|
-
end
|
54
|
-
|
83
|
+
end
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 2
|
7
|
-
- 0
|
8
7
|
- 1
|
9
|
-
|
8
|
+
- 0
|
9
|
+
version: 2.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Steve Agalloco
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-05-
|
17
|
+
date: 2010-05-26 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -88,7 +88,10 @@ files:
|
|
88
88
|
- lib/hoptoad-api/version.rb
|
89
89
|
- test/fixtures/errors.xml
|
90
90
|
- test/fixtures/individual_error.xml
|
91
|
+
- test/fixtures/individual_notice.xml
|
92
|
+
- test/fixtures/notices.xml
|
91
93
|
- test/fixtures/paginated_errors.xml
|
94
|
+
- test/fixtures/paginated_notices.xml
|
92
95
|
- test/test_helper.rb
|
93
96
|
- test/test_hoptoad-api.rb
|
94
97
|
has_rdoc: true
|