hoptoad-api 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,207 @@
1
+ HTTP/1.1 200 OK
2
+
3
+ <?xml version="1.0" encoding="UTF-8"?>
4
+ <group>
5
+ <action>index</action>
6
+ <controller>shades</controller>
7
+ <created-at type="datetime">2010-04-16T21:45:30Z</created-at>
8
+ <error-class>ActiveRecord::StatementInvalid</error-class>
9
+ <error-message>ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'otype' in 'order clause': SELECT shades.* FROM shades ORDER BY 'otype desc'</error-message>
10
+ <file>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb</file>
11
+ <id type="integer">1696170</id>
12
+ <lighthouse-ticket-id type="integer" nil="true"></lighthouse-ticket-id>
13
+ <line-number type="integer">219</line-number>
14
+ <most-recent-notice-at type="datetime">2010-04-24T02:27:11Z</most-recent-notice-at>
15
+ <notice-hash>71ce436b9c091d468daf479eeee4b216</notice-hash>
16
+ <notices-count type="integer">455</notices-count>
17
+ <project-id type="integer">248</project-id>
18
+ <rails-env>production</rails-env>
19
+ <resolved type="boolean">false</resolved>
20
+ <updated-at type="datetime">2010-04-24T02:27:11Z</updated-at>
21
+ <environment>
22
+ <rack-session-record>#&lt;ActiveRecord::SessionStore::Session:0x2b6486cfc9a0&gt;</rack-session-record>
23
+ <action-controller-rescue-request>#&lt;ActionController::Request:0x2b6486d02788&gt;</action-controller-rescue-request>
24
+ <server-name>_</server-name>
25
+ <http-user-agent>Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp)</http-user-agent>
26
+ <rack-run-once>false</rack-run-once>
27
+ <content-length>0</content-length>
28
+ <http-via>1.0 v1-akamaitech.net(ghost) (AkamaiGHost), 1.1 akamai.net(ghost) (AkamaiGHost)</http-via>
29
+ <http-accept-encoding>gzip</http-accept-encoding>
30
+ <path-info>/company/sigm/shades</path-info>
31
+ <rack-url-scheme>http</rack-url-scheme>
32
+ <passenger-app-spawner-idle-time>0</passenger-app-spawner-idle-time>
33
+ <http-te>chunked;q=1.0</http-te>
34
+ <rack-input>#&lt;Rack::RewindableInput:0x2b6486d037a0&gt;</rack-input>
35
+ <http-host>www.myapp.com</http-host>
36
+ <http-accept-language>en-us,en;q=0.5</http-accept-language>
37
+ <server-addr>127.0.0.1</server-addr>
38
+ <http-cache-control>no-cache, max-age=0</http-cache-control>
39
+ <server-protocol>HTTP/1.0</server-protocol>
40
+ <rack-errors>#&lt;IO:0x2b647c6aeeb8&gt;</rack-errors>
41
+ <script-name></script-name>
42
+ <action-controller-request-request-parameters></action-controller-request-request-parameters>
43
+ <remote-addr>127.0.0.1</remote-addr>
44
+ <server-software>nginx/0.6.35</server-software>
45
+ <passenger-spawn-method>smart-lv2</passenger-spawn-method>
46
+ <passenger-environment>production</passenger-environment>
47
+ <http-akamai-origin-hop>2</http-akamai-origin-hop>
48
+ <rack-multithread>false</rack-multithread>
49
+ <http-accept-charset>ISO-8859-1,utf-8;q=0.7,*;q=0.7</http-accept-charset>
50
+ <http-true-client-ip>67.195.110.176</http-true-client-ip>
51
+ <rack.request.query_hash>
52
+ <options>true</options>
53
+ <sort-order>asc</sort-order>
54
+ <sort-key>strike_price_in_cents</sort-key>
55
+ </rack.request.query_hash>
56
+ <rack-version>10</rack-version>
57
+ <action_controller.request.path_parameters>
58
+ <action>index</action>
59
+ <controller>shades</controller>
60
+ <company-id>sigm</company-id>
61
+ </action_controller.request.path_parameters>
62
+ <rack-multiprocess>true</rack-multiprocess>
63
+ <http-x-akamai-config-log-detail>true</http-x-akamai-config-log-detail>
64
+ <request-uri>/company/sigm/shades?options=true&amp;sort_key=strike_price_in_cents&amp;sort_order=asc</request-uri>
65
+ <document-root>/data/myapp/current/public</document-root>
66
+ <server-port>81</server-port>
67
+ <scgi>1</scgi>
68
+ <passenger-app-type>rails</passenger-app-type>
69
+ <passenger-use-global-queue>true</passenger-use-global-queue>
70
+ <action-controller-rescue-response>#&lt;ActionController::Response:0x2b6486d02468&gt;</action-controller-rescue-response>
71
+ <remote-port>33166</remote-port>
72
+ <http-pragma>no-cache</http-pragma>
73
+ <rack-request-query-string>options=true&amp;sort_key=strike_price_in_cents&amp;sort_order=asc</rack-request-query-string>
74
+ <rack.session.options>
75
+ <domain></domain>
76
+ <id>4060bb6302450f0f0e94acc4ec9964e3</id>
77
+ <secure>false</secure>
78
+ <expire-after></expire-after>
79
+ <cookie-only>true</cookie-only>
80
+ <key>_tk_www_session</key>
81
+ <path>/</path>
82
+ <secret>270022c1d7400e0aba2f515d59d3bd56f18d036428c0a16a1292b6d4d1f0a90c67e5247f8e15d67abcc690fe94bac1793789cdef843a679231d7e43d104ad674</secret>
83
+ <httponly>true</httponly>
84
+ </rack.session.options>
85
+ <query-string>options=true&amp;sort_key=strike_price_in_cents&amp;sort_order=asc</query-string>
86
+ <rack.session>
87
+ <sliding-session-expires-at>Fri Apr 23 21:27:12 -0700 2010</sliding-session-expires-at>
88
+ </rack.session>
89
+ <http-x-forwarded-for>67.195.110.176, 96.17.69.188, 67.131.237.20</http-x-forwarded-for>
90
+ <http-accept>text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5</http-accept>
91
+ <action_controller.request.query_parameters>
92
+ <options>true</options>
93
+ <sort-order>asc</sort-order>
94
+ <sort-key>strike_price_in_cents</sort-key>
95
+ </action_controller.request.query_parameters>
96
+ <passenger-framework-spawner-idle-time>0</passenger-framework-spawner-idle-time>
97
+ <http-connection>close</http-connection>
98
+ <http-x-real-ip>67.131.237.20</http-x-real-ip>
99
+ <request-method>GET</request-method>
100
+ </environment>
101
+ <session>
102
+ <data>
103
+ <sliding-session-expires-at>Fri Apr 23 21:27:12 -0700 2010</sliding-session-expires-at>
104
+ </data>
105
+ </session>
106
+ <request>
107
+ <rails-root>/data/myapp/releases/20100416200739</rails-root>
108
+ <url>http://www.myapp.com/company/sigm/shades?options=true&amp;sort_key=strike_price_in_cents&amp;sort_order=asc</url>
109
+ <params>
110
+ <options>true</options>
111
+ <sort-order>asc</sort-order>
112
+ <action>index</action>
113
+ <controller>shades</controller>
114
+ <company-id>sigm</company-id>
115
+ <sort-key>strike_price_in_cents</sort-key>
116
+ </params>
117
+ </request>
118
+ <backtrace>
119
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log_without_newrelic_instrumentation'</line>
120
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb:52:in `log'</line>
121
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
122
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/active_record_instrumentation.rb:50:in `log'</line>
123
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute'</line>
124
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb:608:in `select'</line>
125
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'</line>
126
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'</line>
127
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:81:in `cache_sql'</line>
128
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:60:in `select_all'</line>
129
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/base.rb:661:in `find_by_sql_without_trace_ActiveRecord___self_name__find_by_sql'</line>
130
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:161:in `find_by_sql'</line>
131
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
132
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:160:in `find_by_sql'</line>
133
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/base.rb:1548:in `find_every'</line>
134
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/base.rb:615:in `find'</line>
135
+ <line>/data/myapp/releases/20100416200739/vendor/gems/will_paginate-2.2.2/lib/will_paginate/finder.rb:82:in `send'</line>
136
+ <line>/data/myapp/releases/20100416200739/vendor/gems/will_paginate-2.2.2/lib/will_paginate/finder.rb:82:in `paginate'</line>
137
+ <line>/data/myapp/releases/20100416200739/vendor/gems/will_paginate-2.2.2/lib/will_paginate/collection.rb:87:in `create'</line>
138
+ <line>/data/myapp/releases/20100416200739/vendor/gems/will_paginate-2.2.2/lib/will_paginate/finder.rb:76:in `paginate'</line>
139
+ <line>/data/myapp/releases/20100416200739/app/controllers/shades_controller.rb:85:in `pagination_for_index'</line>
140
+ <line>/data/myapp/releases/20100416200739/app/controllers/shades_controller.rb:10:in `index'</line>
141
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `send'</line>
142
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `perform_action_without_filters'</line>
143
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'</line>
144
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'</line>
145
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'</line>
146
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'</line>
147
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:10:in `realtime'</line>
148
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'</line>
149
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'</line>
150
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'</line>
151
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/flash.rb:146:in `perform_action_without_newrelic_trace'</line>
152
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:138:in `perform_action'</line>
153
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:62:in `trace_method_execution_with_scope'</line>
154
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:122:in `perform_action'</line>
155
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/method_tracer.rb:38:in `trace_method_execution_no_scope'</line>
156
+ <line>/data/myapp/releases/20100416200739/vendor/plugins/newrelic_rpm/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:117:in `perform_action'</line>
157
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `send'</line>
158
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/base.rb:532:in `process_without_filters'</line>
159
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process'</line>
160
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/base.rb:391:in `process'</line>
161
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/base.rb:386:in `call'</line>
162
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `call'</line>
163
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in `dispatch'</line>
164
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'</line>
165
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'</line>
166
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'</line>
167
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'</line>
168
+ <line>/data/myapp/releases/20100416200739/vendor/gems/rack-1.0.1/lib/rack/head.rb:9:in `call'</line>
169
+ <line>/data/myapp/releases/20100416200739/vendor/gems/rack-1.0.1/lib/rack/methodoverride.rb:24:in `call'</line>
170
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in `call'</line>
171
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/session/abstract_store.rb:122:in `call'</line>
172
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'</line>
173
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'</line>
174
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'</line>
175
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'</line>
176
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'</line>
177
+ <line>/data/myapp/releases/20100416200739/vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:24:in `call'</line>
178
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'</line>
179
+ <line>/data/myapp/releases/20100416200739/vendor/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'</line>
180
+ <line>/data/myapp/releases/20100416200739/vendor/gems/rack-1.0.1/lib/rack/lock.rb:11:in `synchronize'</line>
181
+ <line>/data/myapp/releases/20100416200739/vendor/gems/rack-1.0.1/lib/rack/lock.rb:11:in `call'</line>
182
+ <line>/data/myapp/releases/20100416200739/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in `call'</line>
183
+ <line>/usr/lib/passenger/lib/phusion_passenger/rack/request_handler.rb:95:in `process_request'</line>
184
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'</line>
185
+ <line>/usr/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:378:in `start_request_handler'</line>
186
+ <line>/usr/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:336:in `handle_spawn_application'</line>
187
+ <line>/usr/lib/passenger/lib/phusion_passenger/utils.rb:183:in `safe_fork'</line>
188
+ <line>/usr/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:334:in `handle_spawn_application'</line>
189
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'</line>
190
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'</line>
191
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'</line>
192
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:163:in `start'</line>
193
+ <line>/usr/lib/passenger/lib/phusion_passenger/railz/application_spawner.rb:213:in `start'</line>
194
+ <line>/usr/lib/passenger/lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'</line>
195
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'</line>
196
+ <line>/usr/lib/passenger/lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'</line>
197
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'</line>
198
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'</line>
199
+ <line>/usr/lib/passenger/lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'</line>
200
+ <line>/usr/lib/passenger/lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'</line>
201
+ <line>/usr/lib/passenger/lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'</line>
202
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:352:in `__send__'</line>
203
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'</line>
204
+ <line>/usr/lib/passenger/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'</line>
205
+ <line>/usr/lib/passenger/bin/passenger-spawn-server:63</line>
206
+ </backtrace>
207
+ </group>
@@ -0,0 +1,41 @@
1
+ HTTP/1.1 200 OK
2
+
3
+ <?xml version="1.0" encoding="UTF-8"?>
4
+ <groups type="array">
5
+ <group>
6
+ <action>index</action>
7
+ <controller>shades</controller>
8
+ <created-at type="datetime">2010-04-16T21:45:30Z</created-at>
9
+ <error-class>ActiveRecord::StatementInvalid</error-class>
10
+ <error-message>ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'otype' in 'order clause': SELECT shades.id, shades.member_id, shades.equity_id, shades.etype, shades.shade_type, shade_executions.shade_id, shade_executions.price_in_cents, shade_executions.tra</error-message>
11
+ <file>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb</file>
12
+ <id type="integer">1696170</id>
13
+ <lighthouse-ticket-id type="integer" nil="true"></lighthouse-ticket-id>
14
+ <line-number type="integer">219</line-number>
15
+ <most-recent-notice-at type="datetime">2010-04-24T02:27:11Z</most-recent-notice-at>
16
+ <notice-hash>71ce436b9c091d468daf479eeee4b216</notice-hash>
17
+ <notices-count type="integer">455</notices-count>
18
+ <project-id type="integer">248</project-id>
19
+ <rails-env>production</rails-env>
20
+ <resolved type="boolean">false</resolved>
21
+ <updated-at type="datetime">2010-04-24T02:27:11Z</updated-at>
22
+ </group>
23
+ <group>
24
+ <action>index</action>
25
+ <controller>member_ballots</controller>
26
+ <created-at type="datetime">2010-04-16T20:19:25Z</created-at>
27
+ <error-class>ActiveRecord::StatementInvalid</error-class>
28
+ <error-message>ActiveRecord::StatementInvalid: Mysql::Error: Unknown column 'group_count' in 'order clause': SELECT `members`.* FROM `members` right join member_ballots on member_ballots.member_id = members.id WHERE (member_ballots.posting_id = 4703) ORDER BY `group_cou</error-message>
29
+ <file>/data/myapp/releases/20100416200739/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb</file>
30
+ <id type="integer">1695879</id>
31
+ <lighthouse-ticket-id type="integer" nil="true"></lighthouse-ticket-id>
32
+ <line-number type="integer">219</line-number>
33
+ <most-recent-notice-at type="datetime">2010-04-24T02:25:41Z</most-recent-notice-at>
34
+ <notice-hash>8e80ee8d42a6922f28d936eb25b1203e</notice-hash>
35
+ <notices-count type="integer">895</notices-count>
36
+ <project-id type="integer">248</project-id>
37
+ <rails-env>production</rails-env>
38
+ <resolved type="boolean">false</resolved>
39
+ <updated-at type="datetime">2010-04-24T02:25:41Z</updated-at>
40
+ </group>
41
+ </groups>
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'test/unit'
3
+ require 'shoulda'
4
+ require 'fakeweb'
5
+
6
+ require File.join(File.dirname(__FILE__), "..", "lib", "hoptoad-api")
7
+
8
+ FakeWeb.allow_net_connect = false
9
+ 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
+ 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
+ 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"])
@@ -0,0 +1,37 @@
1
+ require 'test_helper'
2
+
3
+ class HoptoadTest < Test::Unit::TestCase
4
+
5
+ context "given a Hoptoad account & API key" do
6
+ setup do
7
+ Hoptoad.account = 'myapp'
8
+ Hoptoad.auth_token = 'abcdefg123456'
9
+ end
10
+
11
+ should "have correct collection path" do
12
+ assert_equal "/errors.xml", Hoptoad::Error.collection_path
13
+ end
14
+
15
+ should "find a page of the 30 most recent errors" do
16
+ errors = Hoptoad::Error.find(:all)
17
+ ordered = errors.sort_by(&:most_recent_notice_at).reverse
18
+ assert_equal ordered, errors
19
+ assert_equal errors.size, 30
20
+ end
21
+
22
+ should "paginate errors" do
23
+ errors = Hoptoad::Error.find(:all, :page => 2)
24
+ ordered = errors.sort_by(&:most_recent_notice_at).reverse
25
+ assert_equal ordered, errors
26
+ assert_equal errors.size, 2
27
+ end
28
+
29
+ should "find an individual error" do
30
+ error = Hoptoad::Error.find(1696170)
31
+ assert_equal error.action, 'index'
32
+ assert_equal error.id, 1696170
33
+ end
34
+ end
35
+
36
+ end
37
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoptoad-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Agalloco
@@ -9,28 +9,48 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-24 00:00:00 -04:00
12
+ date: 2010-04-23 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: activesupport
16
+ name: httparty
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 2.1.0
23
+ version: 0.5.2
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: activeresource
26
+ name: hashie
27
27
  type: :runtime
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.0
33
+ version: 0.2.0
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: shoulda
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: "0"
44
+ version:
45
+ - !ruby/object:Gem::Dependency
46
+ name: fakeweb
47
+ type: :development
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: "0"
34
54
  version:
35
55
  description: An unofficial gem for interacting with the Hoptoad API
36
56
  email: steve.agalloco@gmail.com
@@ -44,10 +64,16 @@ files:
44
64
  - .gitignore
45
65
  - README.textile
46
66
  - Rakefile
47
- - VERSION.yml
48
67
  - hoptoad-api.gemspec
49
68
  - lib/hoptoad-api.rb
50
- - test/hoptoad-api.rb
69
+ - lib/hoptoad-api/client.rb
70
+ - lib/hoptoad-api/core_extensions.rb
71
+ - lib/hoptoad-api/version.rb
72
+ - test/fixtures/errors.xml
73
+ - test/fixtures/individual_error.xml
74
+ - test/fixtures/paginated_errors.xml
75
+ - test/test_helper.rb
76
+ - test/test_hoptoad-api.rb
51
77
  has_rdoc: true
52
78
  homepage: http://github.com/spagalloco/hoptoad-api
53
79
  licenses: []
@@ -77,4 +103,5 @@ signing_key:
77
103
  specification_version: 3
78
104
  summary: An unofficial gem for interacting with the Hoptoad API
79
105
  test_files:
80
- - test/hoptoad-api.rb
106
+ - test/test_helper.rb
107
+ - test/test_hoptoad-api.rb
data/VERSION.yml DELETED
@@ -1,4 +0,0 @@
1
- ---
2
- :major: 1
3
- :minor: 0
4
- :patch: 0
data/test/hoptoad-api.rb DELETED
@@ -1,29 +0,0 @@
1
- require 'test/unit'
2
- require 'rubygems'
3
- require 'shoulda'
4
- require File.join(File.dirname(__FILE__), "..", "lib", "hoptoad-api")
5
-
6
- class HoptoadTest < Test::Unit::TestCase
7
-
8
- context "given a Hoptoad account & API key" do
9
- setup do
10
- credentials_path = File.join(ENV['HOME'], ".hoptoad.yml")
11
- credentials = YAML::load_file(credentials_path)
12
- Hoptoad.account = credentials['account']
13
- Hoptoad.token = credentials['token']
14
- end
15
-
16
- should "find a page of the 30 most recent errors" do
17
- errors = Hoptoad::Error.find(:all)
18
- ordered = errors.sort_by(&:most_recent_notice_at).reverse
19
- assert_equal ordered, errors
20
- assert_equal 30, errors.size
21
- end
22
-
23
- should "have correct collection path" do
24
- assert_equal "/errors.xml", Hoptoad::Error.collection_path
25
- end
26
- end
27
-
28
- end
29
-