rhinestone 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +5 -0
- data/.rspec +1 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Guardfile +8 -0
- data/README.md +49 -0
- data/Rakefile +1 -0
- data/benchmark/Gemfile +5 -0
- data/benchmark/Gemfile.proxy +4 -0
- data/benchmark/Gemfile.proxy.lock +100 -0
- data/benchmark/benchmark.sh +16 -0
- data/bin/rhinestone +7 -0
- data/lib/rhinestone/app.rb +13 -0
- data/lib/rhinestone/cache.rb +29 -0
- data/lib/rhinestone/filesystem_cache_backend.rb +29 -0
- data/lib/rhinestone/header_filter.rb +16 -0
- data/lib/rhinestone/http_client.rb +15 -0
- data/lib/rhinestone/in_memory_cache_backend.rb +17 -0
- data/lib/rhinestone/injector.rb +18 -0
- data/lib/rhinestone/later.rb +7 -0
- data/lib/rhinestone/response.rb +3 -0
- data/lib/rhinestone/server.rb +25 -0
- data/lib/rhinestone/version.rb +3 -0
- data/lib/rhinestone.rb +28 -0
- data/rhinestone.gemspec +34 -0
- data/spec/cassettes/Rhinestone_HttpClient/returns_a_Rhinestone_Response.yml +166 -0
- data/spec/cassettes/Rhinestone_integration/caches_the_requests.yml +329 -0
- data/spec/cassettes/Rhinestone_integration/proxies_requests_to_rubygems_org.yml +166 -0
- data/spec/rhinestone/cache_spec.rb +25 -0
- data/spec/rhinestone/filesystem_cache_backend_spec.rb +10 -0
- data/spec/rhinestone/header_filter_spec.rb +29 -0
- data/spec/rhinestone/http_client_spec.rb +21 -0
- data/spec/rhinestone/in_memory_cache_backend_spec.rb +7 -0
- data/spec/rhinestone/integration_spec.rb +29 -0
- data/spec/rhinestone/server_spec.rb +60 -0
- data/spec/spec_helper.rb +26 -0
- metadata +199 -0
@@ -0,0 +1,329 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://rubygems.org/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
Date:
|
16
|
+
- Fri, 16 Mar 2012 14:09:53 GMT
|
17
|
+
Server:
|
18
|
+
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.11
|
19
|
+
X-Powered-By:
|
20
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
21
|
+
Etag:
|
22
|
+
- ! '"a8376959d95d8748780dcdcef9a0e83f"'
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge,chrome=1
|
27
|
+
X-Runtime:
|
28
|
+
- '0.911631'
|
29
|
+
Set-Cookie:
|
30
|
+
- _rubygems_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZDg2MWY5YWMzMGQyMTA3Y2UwZjYwMTBhYjFkYTE5YmNJIhBfY3NyZl90b2tlbgY7AEZJIjFHc1hrbkZmRW93aXN6cng4TE5ZalJHeTBmQjFia3N5bTg3dkRobDdxaVpFPQY7AEY%3D--06fa73446e29b37a1be0af2c5b69ad907a74451d;
|
31
|
+
path=/; HttpOnly
|
32
|
+
Status:
|
33
|
+
- '200'
|
34
|
+
Vary:
|
35
|
+
- Accept-Encoding
|
36
|
+
Content-Length:
|
37
|
+
- '9648'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Content-Type:
|
41
|
+
- text/html; charset=utf-8
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\"
|
45
|
+
content=\"text/html; charset=utf-8\">\n <link rel=\"apple-touch-icon\"
|
46
|
+
href=\"/touch-icon-iphone.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"72x72\"
|
47
|
+
href=\"/touch-icon-ipad.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"114x114\"
|
48
|
+
href=\"/touch-icon-iphone4.png\" />\n <link rel=\"fluid-icon\" href=\"/fluid-icon.png\"/>\n
|
49
|
+
\ <link rel=\"search\" type=\"application/opensearchdescription+xml\" title=\"RubyGems.org\"
|
50
|
+
href=\"/opensearch.xml\">\n <link rel=\"shortcut icon\" href=\"/favicon.ico\"
|
51
|
+
type=\"image/x-icon\">\n <link href=\"/stylesheets/all.css?1331498529\"
|
52
|
+
media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n <!--[if IE 7]>\n
|
53
|
+
\ <link href=\"/stylesheets/ie7.css?1331498529\" media=\"screen\" rel=\"stylesheet\"
|
54
|
+
type=\"text/css\" />\n <![endif]-->\n \n<link href=\"http://feeds.feedburner.com/gemcutter-latest\"
|
55
|
+
rel=\"alternate\" title=\"RubyGems.org | Latest Gems\" type=\"application/atom+xml\"
|
56
|
+
/>\n\n <meta name=\"csrf-param\" content=\"authenticity_token\"/>\n<meta
|
57
|
+
name=\"csrf-token\" content=\"GsXknFfEowiszrx8LNYjRGy0fB1bksym87vDhl7qiZE=\"/>\n
|
58
|
+
\ <title>RubyGems.org | your community gem host</title>\n </head>\n <body>\n
|
59
|
+
\ <div class=\"container_12\">\n <div class=\"prefix_1 grid_4 header\">\n
|
60
|
+
\ <h1><a href=\"http://rubygems.org/\" title=\"Home\">RubyGems.org</a></h1>\n
|
61
|
+
\ </div>\n <div class=\"grid_6 suffix_1 nav\">\n <div id=\"nav-cap\">\n
|
62
|
+
\ <div id=\"nav\">\n <ul id=\"signed_out\">\n <li
|
63
|
+
id=\"all-gems\"><a href=\"http://rubygems.org/gems\">all gems</a></li>\n\n
|
64
|
+
\ <li id=\"sign-in\">\n <a href=\"https://rubygems.org/session/new\">sign
|
65
|
+
in</a>\n </li>\n\n <li id=\"sign-up\">\n <a
|
66
|
+
href=\"https://rubygems.org/users/new\">sign up</a>\n </li>\n
|
67
|
+
\ </ul>\n </div>\n </div>\n <form accept-charset=\"UTF-8\"
|
68
|
+
action=\"http://rubygems.org/search\" id=\"main-search\" method=\"get\"><div
|
69
|
+
style=\"margin:0;padding:0;display:inline\"><input name=\"utf8\" type=\"hidden\"
|
70
|
+
value=\"✓\" /></div>\n <input id=\"query\" name=\"query\"
|
71
|
+
type=\"text\" value=\"Search gems…\" />\n <input id=\"search_submit\"
|
72
|
+
type=\"submit\" value=\"Search\" />\n</form> </div>\n <div class=\"prefix_1
|
73
|
+
grid_10 suffix_1 main\">\n \n\n <div class=\"fold\">\n <div
|
74
|
+
class=\"count\">\n <strong>528,292,202 downloads</strong>\n of 35,805
|
75
|
+
gems cut since July 2009\n </div>\n <div class=\"blurb\">\n <strong>Welcome
|
76
|
+
to your community RubyGem host.</strong>\n <br />Find your gems easier,
|
77
|
+
publish them faster, and have fun doing it.\n </div>\n\n </div>\n
|
78
|
+
\ <div class=\"info clearfix\">\n <div class=\"title\">\n \n
|
79
|
+
\ </div>\n \n<div class=\"border\">\n <div class=\"background\">\n
|
80
|
+
\ <div class=\"learn\">\n <h3>learn</h3>\n <dl>\n <dt><a
|
81
|
+
href=\"http://rubygems.org/pages/download\">Install RubyGems 1.8.17</a></dt>\n
|
82
|
+
\ <dd>Ruby's premier packaging system</dd>\n <dt><a href=\"http://guides.rubygems.org/\">Browse
|
83
|
+
the Guides</a></dt>\n <dd>In depth explanations, tutorials, and references</dd>\n
|
84
|
+
\ <dt><a href=\"http://guides.rubygems.org/specification-reference/\">Gem
|
85
|
+
Specification</a></dt>\n <dd>Your gem's interface to the world</dd>\n
|
86
|
+
\ </dl>\n </div>\n <div class=\"share\">\n <h3>share</h3>\n
|
87
|
+
\ <dl>\n <dt><code>gem update --system</code></dt>\n <dd>Update
|
88
|
+
to the latest RubyGems version</dd>\n <dt><code>gem build foo.gemspec</code></dt>\n
|
89
|
+
\ <dd>Build your gem</dd>\n <dt><code>gem push foo-1.0.0.gem</code></dt>\n
|
90
|
+
\ <dd>Deploy your gem instantly</dd>\n </dl>\n </div>\n </div>\n</div>\n\n<p
|
91
|
+
class=\"pitch\">\n <strong><a href=\"http://rubygems.org/pages/about\">RubyGems.org</a></strong>
|
92
|
+
is the Ruby community's gem hosting service. <strong><a href=\"http://guides.rubygems.org/make-your-own-gem\"
|
93
|
+
anchor=\"push\">Instantly publish</a></strong> your gems and install them.
|
94
|
+
<strong><a href=\"http://guides.rubygems.org/rubygems-org-api/\">Use the API</a></strong>
|
95
|
+
to interact and find out more information about available gems. <strong><a
|
96
|
+
href=\"http://github.com/rubygems/rubygems.org\">Become a contributor</a></strong>
|
97
|
+
and enhance the site with your own changes.\n</p>\n<div class=\"leaderboards\">\n
|
98
|
+
\ <div class=\"grid_3\" id=\"new_gems\">\n <strong>New Gems</strong>\n
|
99
|
+
\ <ol>\n <li>\n <a href=\"/gems/intercom-rails\" title=\"Intercom
|
100
|
+
(https://www.intercom.io) is a customer relationship management and messaging
|
101
|
+
tool for w...\">intercom-rails (0.0.1)</a>\n </li>\n <li>\n
|
102
|
+
\ <a href=\"/gems/fotonauts-premailer\" title=\"Improve the rendering
|
103
|
+
of HTML emails by making CSS inline, converting links and warning about uns...\">fotonauts-premailer
|
104
|
+
(1.7.3)</a>\n </li>\n <li>\n <a href=\"/gems/post_haste\"
|
105
|
+
title=\"A Ruby gem for accessing Washington Post articles and blog posts.\">post_haste
|
106
|
+
(0.1)</a>\n </li>\n <li>\n <a href=\"/gems/fotonauts-flickr_fu\"
|
107
|
+
title=\"Provides a ruby interface to flickr via the REST api\">fotonauts-flickr_fu
|
108
|
+
(0.3.2)</a>\n </li>\n <li>\n <a href=\"/gems/locale_dating\"
|
109
|
+
title=\"LocaleDating generates wrapper methods around the attributes you want
|
110
|
+
to support editing\n ...\">locale_dating (0.1.0)</a>\n </li>\n
|
111
|
+
\ </ol>\n </div>\n <div class=\"grid_3\" id=\"most_downloaded\">\n <strong>Most
|
112
|
+
Downloaded Today</strong>\n <ol>\n <li>\n <a href=\"/gems/mime-types\"
|
113
|
+
title=\"This library allows for the identification of a file's likely MIME
|
114
|
+
content\ntype. This is release ...\">mime-types-1.17.2 (9,975)</a>\n </li>\n
|
115
|
+
\ <li>\n <a href=\"/gems/json\" title=\"This is a JSON
|
116
|
+
implementation as a Ruby extension in C.\">json-1.6.5 (9,490)</a>\n </li>\n
|
117
|
+
\ <li>\n <a href=\"/gems/rake\" title=\"Rake is a Make-like
|
118
|
+
program implemented in Ruby. Tasks and dependencies arespecified in standard
|
119
|
+
...\">rake-0.9.2.2 (9,291)</a>\n </li>\n <li>\n <a
|
120
|
+
href=\"/gems/thor\" title=\"A scripting framework that replaces rake, sake
|
121
|
+
and rubigen\">thor-0.14.6 (8,675)</a>\n </li>\n <li>\n <a
|
122
|
+
href=\"/gems/treetop\" title=\"A Ruby-based text parsing and interpretation
|
123
|
+
DSL\">treetop-1.4.10 (8,412)</a>\n </li>\n </ol>\n </div>\n
|
124
|
+
\ <div class=\"grid_3\" id=\"just_updated\">\n <strong>Just Updated</strong>\n
|
125
|
+
\ <ol>\n <li>\n <a href=\"/gems/geomagic\" title=\"Plugin
|
126
|
+
for working with Geo locations in serverside.\">geomagic (0.0.2)</a>\n </li>\n
|
127
|
+
\ <li>\n <a href=\"/gems/gamespy_query\" title=\"Ruby library
|
128
|
+
for accessing Gamespy services\">gamespy_query (0.2.0pre4)</a>\n </li>\n
|
129
|
+
\ <li>\n <a href=\"/gems/gamespy_query\" title=\"Ruby library
|
130
|
+
for accessing Gamespy services\">gamespy_query (0.2.0pre3)</a>\n </li>\n
|
131
|
+
\ <li>\n <a href=\"/gems/response_for_rails\" title=\"response_for
|
132
|
+
allows you to decorate the respond_to block of actions on subclassed controllers.\">response_for_rails
|
133
|
+
(0.4.1)</a>\n </li>\n <li>\n <a href=\"/gems/omniauth-exvo\"
|
134
|
+
title=\"OmniAuth strategy for Exvo\">omniauth-exvo (0.0.3)</a>\n </li>\n
|
135
|
+
\ </ol>\n </div>\n</div>\n\n </div>\n </div>\n <div class=\"prefix_1
|
136
|
+
grid_10 suffix_1 footer\">\n <ul class=\"major\">\n <li><a
|
137
|
+
href=\"http://help.rubygems.org\">Help</a></li>\n <li><a href=\"http://guides.rubygems.org\">Guides</a></li>\n
|
138
|
+
\ <li><a href=\"http://blog.rubygems.org\">Blog</a></li>\n <li><a
|
139
|
+
href=\"http://guides.rubygems.org/contributing/\">Contribute</a></li>\n </ul>\n
|
140
|
+
\ <ul class=\"minor\">\n <li><a href=\"http://m.rubygems.org\">Mobile</a></li>\n
|
141
|
+
\ <li><a href=\"http://status.rubygems.org\">Status</a></li>\n <li><a
|
142
|
+
href=\"http://uptime.rubygems.org\">Uptime</a></li>\n <li><a href=\"http://github.com/rubygems/rubygems.org\">Code</a></li>\n
|
143
|
+
\ <li><a href=\"http://groups.google.com/group/gemcutter\">Discuss</a></li>\n
|
144
|
+
\ <li><a href=\"http://rubygems.org/stats\">Stats</a></li>\n <li><a
|
145
|
+
href=\"http://rubygems.org/pages/about\">About</a></li>\n </ul>\n <ul
|
146
|
+
class=\"sponsors\">\n <li><a href=\"http://rubycentral.org\" id=\"rubycentral\"
|
147
|
+
title=\"Hosted by Ruby Central\">hosted by <img alt=\"Rubycentral\" src=\"/images/rubycentral.png?1331498529\"
|
148
|
+
/></a></li>\n <li><a href=\"http://thoughtbot.com\" id=\"thoughtbot\"
|
149
|
+
title=\"Design by Thoughtbot\">design by <img alt=\"Thoughtbot\" src=\"/images/thoughtbot.png?1331498529\"
|
150
|
+
/></a></li>\n <li><a href=\"http://dnsimple.com\" id=\"dnsimple\"
|
151
|
+
title=\"Resolved with DNSimple\">resolved with <img alt=\"Dnsimple\" src=\"/images/dnsimple.png?1331498529\"
|
152
|
+
/></a></li>\n <li><a href=\"http://newrelic.com\" id=\"newrelic\"
|
153
|
+
title=\"Optimized by NewRelic\">optimized by <img alt=\"Newrelic\" src=\"/images/newrelic.png?1331498529\"
|
154
|
+
/></a></li>\n <li><a href=\"http://gaug.es\" id=\"gauges\" title=\"Tracking
|
155
|
+
by Gauges\">tracking by <img alt=\"Gauges\" src=\"/images/gauges.png?1331498529\"
|
156
|
+
/></a></li>\n </ul>\n </div>\n </div>\n <script src=\"/javascripts/all.js?1331498529\"
|
157
|
+
type=\"text/javascript\"></script>\n \n <script type=\"text/javascript\">\n
|
158
|
+
\ var _gauges = _gauges || [];\n (function() {\n var t =
|
159
|
+
document.createElement('script');\n t.type = 'text/javascript';\n
|
160
|
+
\ t.async = true;\n t.id = 'gauges-tracker';\n t.setAttribute('data-site-id',
|
161
|
+
'4eab0ac8613f5d1583000005');\n t.src = '//secure.gaug.es/track.js';\n
|
162
|
+
\ var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(t,
|
163
|
+
s);\n })();\n </script>\n </body>\n</html>\n"
|
164
|
+
http_version:
|
165
|
+
recorded_at: Fri, 16 Mar 2012 14:09:55 GMT
|
166
|
+
- request:
|
167
|
+
method: get
|
168
|
+
uri: http://rubygems.org/
|
169
|
+
body:
|
170
|
+
encoding: US-ASCII
|
171
|
+
string: ''
|
172
|
+
headers: {}
|
173
|
+
response:
|
174
|
+
status:
|
175
|
+
code: 200
|
176
|
+
message: OK
|
177
|
+
headers:
|
178
|
+
Date:
|
179
|
+
- Fri, 16 Mar 2012 14:09:55 GMT
|
180
|
+
Server:
|
181
|
+
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.11
|
182
|
+
X-Powered-By:
|
183
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
184
|
+
Etag:
|
185
|
+
- ! '"dd63f9414975e2476598cd83d0beb532"'
|
186
|
+
Cache-Control:
|
187
|
+
- max-age=0, private, must-revalidate
|
188
|
+
X-Ua-Compatible:
|
189
|
+
- IE=Edge,chrome=1
|
190
|
+
X-Runtime:
|
191
|
+
- '0.963019'
|
192
|
+
Set-Cookie:
|
193
|
+
- _rubygems_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlZTZiY2VlY2EwZmU3ZDAyN2U2MmM1NGQwNTcwOTc4ZTZJIhBfY3NyZl90b2tlbgY7AEZJIjFncS9BejNNUUIxcEZuVnZRRGd3dTBHT09GTnhWYWR5TXQrVGFVTmJzZWVzPQY7AEY%3D--734fcc13b288063d9853e02084560327c814dfa0;
|
194
|
+
path=/; HttpOnly
|
195
|
+
Status:
|
196
|
+
- '200'
|
197
|
+
Vary:
|
198
|
+
- Accept-Encoding
|
199
|
+
Content-Length:
|
200
|
+
- '9652'
|
201
|
+
Connection:
|
202
|
+
- close
|
203
|
+
Content-Type:
|
204
|
+
- text/html; charset=utf-8
|
205
|
+
body:
|
206
|
+
encoding: US-ASCII
|
207
|
+
string: ! "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\"
|
208
|
+
content=\"text/html; charset=utf-8\">\n <link rel=\"apple-touch-icon\"
|
209
|
+
href=\"/touch-icon-iphone.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"72x72\"
|
210
|
+
href=\"/touch-icon-ipad.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"114x114\"
|
211
|
+
href=\"/touch-icon-iphone4.png\" />\n <link rel=\"fluid-icon\" href=\"/fluid-icon.png\"/>\n
|
212
|
+
\ <link rel=\"search\" type=\"application/opensearchdescription+xml\" title=\"RubyGems.org\"
|
213
|
+
href=\"/opensearch.xml\">\n <link rel=\"shortcut icon\" href=\"/favicon.ico\"
|
214
|
+
type=\"image/x-icon\">\n <link href=\"/stylesheets/all.css?1331498529\"
|
215
|
+
media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n <!--[if IE 7]>\n
|
216
|
+
\ <link href=\"/stylesheets/ie7.css?1331498529\" media=\"screen\" rel=\"stylesheet\"
|
217
|
+
type=\"text/css\" />\n <![endif]-->\n \n<link href=\"http://feeds.feedburner.com/gemcutter-latest\"
|
218
|
+
rel=\"alternate\" title=\"RubyGems.org | Latest Gems\" type=\"application/atom+xml\"
|
219
|
+
/>\n\n <meta name=\"csrf-param\" content=\"authenticity_token\"/>\n<meta
|
220
|
+
name=\"csrf-token\" content=\"gq/Az3MQB1pFnVvQDgwu0GOOFNxVadyMt+TaUNbsees=\"/>\n
|
221
|
+
\ <title>RubyGems.org | your community gem host</title>\n </head>\n <body>\n
|
222
|
+
\ <div class=\"container_12\">\n <div class=\"prefix_1 grid_4 header\">\n
|
223
|
+
\ <h1><a href=\"http://rubygems.org/\" title=\"Home\">RubyGems.org</a></h1>\n
|
224
|
+
\ </div>\n <div class=\"grid_6 suffix_1 nav\">\n <div id=\"nav-cap\">\n
|
225
|
+
\ <div id=\"nav\">\n <ul id=\"signed_out\">\n <li
|
226
|
+
id=\"all-gems\"><a href=\"http://rubygems.org/gems\">all gems</a></li>\n\n
|
227
|
+
\ <li id=\"sign-in\">\n <a href=\"https://rubygems.org/session/new\">sign
|
228
|
+
in</a>\n </li>\n\n <li id=\"sign-up\">\n <a
|
229
|
+
href=\"https://rubygems.org/users/new\">sign up</a>\n </li>\n
|
230
|
+
\ </ul>\n </div>\n </div>\n <form accept-charset=\"UTF-8\"
|
231
|
+
action=\"http://rubygems.org/search\" id=\"main-search\" method=\"get\"><div
|
232
|
+
style=\"margin:0;padding:0;display:inline\"><input name=\"utf8\" type=\"hidden\"
|
233
|
+
value=\"✓\" /></div>\n <input id=\"query\" name=\"query\"
|
234
|
+
type=\"text\" value=\"Search gems…\" />\n <input id=\"search_submit\"
|
235
|
+
type=\"submit\" value=\"Search\" />\n</form> </div>\n <div class=\"prefix_1
|
236
|
+
grid_10 suffix_1 main\">\n \n\n <div class=\"fold\">\n <div
|
237
|
+
class=\"count\">\n <strong>528,292,225 downloads</strong>\n of 35,805
|
238
|
+
gems cut since July 2009\n </div>\n <div class=\"blurb\">\n <strong>Welcome
|
239
|
+
to your community RubyGem host.</strong>\n <br />Find your gems easier,
|
240
|
+
publish them faster, and have fun doing it.\n </div>\n\n </div>\n
|
241
|
+
\ <div class=\"info clearfix\">\n <div class=\"title\">\n \n
|
242
|
+
\ </div>\n \n<div class=\"border\">\n <div class=\"background\">\n
|
243
|
+
\ <div class=\"learn\">\n <h3>learn</h3>\n <dl>\n <dt><a
|
244
|
+
href=\"http://rubygems.org/pages/download\">Install RubyGems 1.8.17</a></dt>\n
|
245
|
+
\ <dd>Ruby's premier packaging system</dd>\n <dt><a href=\"http://guides.rubygems.org/\">Browse
|
246
|
+
the Guides</a></dt>\n <dd>In depth explanations, tutorials, and references</dd>\n
|
247
|
+
\ <dt><a href=\"http://guides.rubygems.org/specification-reference/\">Gem
|
248
|
+
Specification</a></dt>\n <dd>Your gem's interface to the world</dd>\n
|
249
|
+
\ </dl>\n </div>\n <div class=\"share\">\n <h3>share</h3>\n
|
250
|
+
\ <dl>\n <dt><code>gem update --system</code></dt>\n <dd>Update
|
251
|
+
to the latest RubyGems version</dd>\n <dt><code>gem build foo.gemspec</code></dt>\n
|
252
|
+
\ <dd>Build your gem</dd>\n <dt><code>gem push foo-1.0.0.gem</code></dt>\n
|
253
|
+
\ <dd>Deploy your gem instantly</dd>\n </dl>\n </div>\n </div>\n</div>\n\n<p
|
254
|
+
class=\"pitch\">\n <strong><a href=\"http://rubygems.org/pages/about\">RubyGems.org</a></strong>
|
255
|
+
is the Ruby community's gem hosting service. <strong><a href=\"http://guides.rubygems.org/make-your-own-gem\"
|
256
|
+
anchor=\"push\">Instantly publish</a></strong> your gems and install them.
|
257
|
+
<strong><a href=\"http://guides.rubygems.org/rubygems-org-api/\">Use the API</a></strong>
|
258
|
+
to interact and find out more information about available gems. <strong><a
|
259
|
+
href=\"http://github.com/rubygems/rubygems.org\">Become a contributor</a></strong>
|
260
|
+
and enhance the site with your own changes.\n</p>\n<div class=\"leaderboards\">\n
|
261
|
+
\ <div class=\"grid_3\" id=\"new_gems\">\n <strong>New Gems</strong>\n
|
262
|
+
\ <ol>\n <li>\n <a href=\"/gems/intercom-rails\" title=\"Intercom
|
263
|
+
(https://www.intercom.io) is a customer relationship management and messaging
|
264
|
+
tool for w...\">intercom-rails (0.0.1)</a>\n </li>\n <li>\n
|
265
|
+
\ <a href=\"/gems/fotonauts-premailer\" title=\"Improve the rendering
|
266
|
+
of HTML emails by making CSS inline, converting links and warning about uns...\">fotonauts-premailer
|
267
|
+
(1.7.3)</a>\n </li>\n <li>\n <a href=\"/gems/post_haste\"
|
268
|
+
title=\"A Ruby gem for accessing Washington Post articles and blog posts.\">post_haste
|
269
|
+
(0.1)</a>\n </li>\n <li>\n <a href=\"/gems/fotonauts-flickr_fu\"
|
270
|
+
title=\"Provides a ruby interface to flickr via the REST api\">fotonauts-flickr_fu
|
271
|
+
(0.3.2)</a>\n </li>\n <li>\n <a href=\"/gems/locale_dating\"
|
272
|
+
title=\"LocaleDating generates wrapper methods around the attributes you want
|
273
|
+
to support editing\n ...\">locale_dating (0.1.0)</a>\n </li>\n
|
274
|
+
\ </ol>\n </div>\n <div class=\"grid_3\" id=\"most_downloaded\">\n <strong>Most
|
275
|
+
Downloaded Today</strong>\n <ol>\n <li>\n <a href=\"/gems/mime-types\"
|
276
|
+
title=\"This library allows for the identification of a file's likely MIME
|
277
|
+
content\ntype. This is release ...\">mime-types-1.17.2 (9,976)</a>\n </li>\n
|
278
|
+
\ <li>\n <a href=\"/gems/json\" title=\"This is a JSON
|
279
|
+
implementation as a Ruby extension in C.\">json-1.6.5 (9,491)</a>\n </li>\n
|
280
|
+
\ <li>\n <a href=\"/gems/rake\" title=\"Rake is a Make-like
|
281
|
+
program implemented in Ruby. Tasks and dependencies arespecified in standard
|
282
|
+
...\">rake-0.9.2.2 (9,291)</a>\n </li>\n <li>\n <a
|
283
|
+
href=\"/gems/thor\" title=\"A scripting framework that replaces rake, sake
|
284
|
+
and rubigen\">thor-0.14.6 (8,677)</a>\n </li>\n <li>\n <a
|
285
|
+
href=\"/gems/treetop\" title=\"A Ruby-based text parsing and interpretation
|
286
|
+
DSL\">treetop-1.4.10 (8,412)</a>\n </li>\n </ol>\n </div>\n
|
287
|
+
\ <div class=\"grid_3\" id=\"just_updated\">\n <strong>Just Updated</strong>\n
|
288
|
+
\ <ol>\n <li>\n <a href=\"/gems/geomagic\" title=\"Plugin
|
289
|
+
for working with Geo locations in serverside.\">geomagic (0.0.2)</a>\n </li>\n
|
290
|
+
\ <li>\n <a href=\"/gems/gamespy_query\" title=\"Ruby library
|
291
|
+
for accessing Gamespy services\">gamespy_query (0.2.0pre4)</a>\n </li>\n
|
292
|
+
\ <li>\n <a href=\"/gems/gamespy_query\" title=\"Ruby library
|
293
|
+
for accessing Gamespy services\">gamespy_query (0.2.0pre3)</a>\n </li>\n
|
294
|
+
\ <li>\n <a href=\"/gems/response_for_rails\" title=\"response_for
|
295
|
+
allows you to decorate the respond_to block of actions on subclassed controllers.\">response_for_rails
|
296
|
+
(0.4.1)</a>\n </li>\n <li>\n <a href=\"/gems/omniauth-exvo\"
|
297
|
+
title=\"OmniAuth strategy for Exvo\">omniauth-exvo (0.0.3)</a>\n </li>\n
|
298
|
+
\ </ol>\n </div>\n</div>\n\n </div>\n </div>\n <div class=\"prefix_1
|
299
|
+
grid_10 suffix_1 footer\">\n <ul class=\"major\">\n <li><a
|
300
|
+
href=\"http://help.rubygems.org\">Help</a></li>\n <li><a href=\"http://guides.rubygems.org\">Guides</a></li>\n
|
301
|
+
\ <li><a href=\"http://blog.rubygems.org\">Blog</a></li>\n <li><a
|
302
|
+
href=\"http://guides.rubygems.org/contributing/\">Contribute</a></li>\n </ul>\n
|
303
|
+
\ <ul class=\"minor\">\n <li><a href=\"http://m.rubygems.org\">Mobile</a></li>\n
|
304
|
+
\ <li><a href=\"http://status.rubygems.org\">Status</a></li>\n <li><a
|
305
|
+
href=\"http://uptime.rubygems.org\">Uptime</a></li>\n <li><a href=\"http://github.com/rubygems/rubygems.org\">Code</a></li>\n
|
306
|
+
\ <li><a href=\"http://groups.google.com/group/gemcutter\">Discuss</a></li>\n
|
307
|
+
\ <li><a href=\"http://rubygems.org/stats\">Stats</a></li>\n <li><a
|
308
|
+
href=\"http://rubygems.org/pages/about\">About</a></li>\n </ul>\n <ul
|
309
|
+
class=\"sponsors\">\n <li><a href=\"http://rubycentral.org\" id=\"rubycentral\"
|
310
|
+
title=\"Hosted by Ruby Central\">hosted by <img alt=\"Rubycentral\" src=\"/images/rubycentral.png?1331498529\"
|
311
|
+
/></a></li>\n <li><a href=\"http://thoughtbot.com\" id=\"thoughtbot\"
|
312
|
+
title=\"Design by Thoughtbot\">design by <img alt=\"Thoughtbot\" src=\"/images/thoughtbot.png?1331498529\"
|
313
|
+
/></a></li>\n <li><a href=\"http://dnsimple.com\" id=\"dnsimple\"
|
314
|
+
title=\"Resolved with DNSimple\">resolved with <img alt=\"Dnsimple\" src=\"/images/dnsimple.png?1331498529\"
|
315
|
+
/></a></li>\n <li><a href=\"http://newrelic.com\" id=\"newrelic\"
|
316
|
+
title=\"Optimized by NewRelic\">optimized by <img alt=\"Newrelic\" src=\"/images/newrelic.png?1331498529\"
|
317
|
+
/></a></li>\n <li><a href=\"http://gaug.es\" id=\"gauges\" title=\"Tracking
|
318
|
+
by Gauges\">tracking by <img alt=\"Gauges\" src=\"/images/gauges.png?1331498529\"
|
319
|
+
/></a></li>\n </ul>\n </div>\n </div>\n <script src=\"/javascripts/all.js?1331498529\"
|
320
|
+
type=\"text/javascript\"></script>\n \n <script type=\"text/javascript\">\n
|
321
|
+
\ var _gauges = _gauges || [];\n (function() {\n var t =
|
322
|
+
document.createElement('script');\n t.type = 'text/javascript';\n
|
323
|
+
\ t.async = true;\n t.id = 'gauges-tracker';\n t.setAttribute('data-site-id',
|
324
|
+
'4eab0ac8613f5d1583000005');\n t.src = '//secure.gaug.es/track.js';\n
|
325
|
+
\ var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(t,
|
326
|
+
s);\n })();\n </script>\n </body>\n</html>\n"
|
327
|
+
http_version:
|
328
|
+
recorded_at: Fri, 16 Mar 2012 14:09:56 GMT
|
329
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,166 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://rubygems.org/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers: {}
|
10
|
+
response:
|
11
|
+
status:
|
12
|
+
code: 200
|
13
|
+
message: OK
|
14
|
+
headers:
|
15
|
+
Date:
|
16
|
+
- Fri, 16 Mar 2012 11:40:32 GMT
|
17
|
+
Server:
|
18
|
+
- Apache/2.2.3 (Red Hat) mod_ssl/2.2.3 OpenSSL/0.9.8e-fips-rhel5 Phusion_Passenger/3.0.11
|
19
|
+
X-Powered-By:
|
20
|
+
- Phusion Passenger (mod_rails/mod_rack) 3.0.11
|
21
|
+
Etag:
|
22
|
+
- ! '"e6478fca32908228802da01c4ad6e60f"'
|
23
|
+
Cache-Control:
|
24
|
+
- max-age=0, private, must-revalidate
|
25
|
+
X-Ua-Compatible:
|
26
|
+
- IE=Edge,chrome=1
|
27
|
+
X-Runtime:
|
28
|
+
- '0.840540'
|
29
|
+
Set-Cookie:
|
30
|
+
- _rubygems_session=BAh7B0kiD3Nlc3Npb25faWQGOgZFRiIlYjQzODRhYWY0NDU1OTY4Nzc0ODlhNjAxMDM0ZTM5MWJJIhBfY3NyZl90b2tlbgY7AEZJIjFlM01LcVBmOXM4NHBOREtrOEl6WTFjd0x6R2JtMU5vTzJnMSs0Mk1sM3p3PQY7AEY%3D--938d42bdaed931ff3100b7e77e36186c38efd03c;
|
31
|
+
path=/; HttpOnly
|
32
|
+
Status:
|
33
|
+
- '200'
|
34
|
+
Vary:
|
35
|
+
- Accept-Encoding
|
36
|
+
Content-Length:
|
37
|
+
- '9629'
|
38
|
+
Connection:
|
39
|
+
- close
|
40
|
+
Content-Type:
|
41
|
+
- text/html; charset=utf-8
|
42
|
+
body:
|
43
|
+
encoding: US-ASCII
|
44
|
+
string: ! "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\"
|
45
|
+
content=\"text/html; charset=utf-8\">\n <link rel=\"apple-touch-icon\"
|
46
|
+
href=\"/touch-icon-iphone.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"72x72\"
|
47
|
+
href=\"/touch-icon-ipad.png\" />\n <link rel=\"apple-touch-icon\" sizes=\"114x114\"
|
48
|
+
href=\"/touch-icon-iphone4.png\" />\n <link rel=\"fluid-icon\" href=\"/fluid-icon.png\"/>\n
|
49
|
+
\ <link rel=\"search\" type=\"application/opensearchdescription+xml\" title=\"RubyGems.org\"
|
50
|
+
href=\"/opensearch.xml\">\n <link rel=\"shortcut icon\" href=\"/favicon.ico\"
|
51
|
+
type=\"image/x-icon\">\n <link href=\"/stylesheets/all.css?1331498529\"
|
52
|
+
media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n <!--[if IE 7]>\n
|
53
|
+
\ <link href=\"/stylesheets/ie7.css?1331498529\" media=\"screen\" rel=\"stylesheet\"
|
54
|
+
type=\"text/css\" />\n <![endif]-->\n \n<link href=\"http://feeds.feedburner.com/gemcutter-latest\"
|
55
|
+
rel=\"alternate\" title=\"RubyGems.org | Latest Gems\" type=\"application/atom+xml\"
|
56
|
+
/>\n\n <meta name=\"csrf-param\" content=\"authenticity_token\"/>\n<meta
|
57
|
+
name=\"csrf-token\" content=\"e3MKqPf9s84pNDKk8IzY1cwLzGbm1NoO2g1+42Ml3zw=\"/>\n
|
58
|
+
\ <title>RubyGems.org | your community gem host</title>\n </head>\n <body>\n
|
59
|
+
\ <div class=\"container_12\">\n <div class=\"prefix_1 grid_4 header\">\n
|
60
|
+
\ <h1><a href=\"http://rubygems.org/\" title=\"Home\">RubyGems.org</a></h1>\n
|
61
|
+
\ </div>\n <div class=\"grid_6 suffix_1 nav\">\n <div id=\"nav-cap\">\n
|
62
|
+
\ <div id=\"nav\">\n <ul id=\"signed_out\">\n <li
|
63
|
+
id=\"all-gems\"><a href=\"http://rubygems.org/gems\">all gems</a></li>\n\n
|
64
|
+
\ <li id=\"sign-in\">\n <a href=\"https://rubygems.org/session/new\">sign
|
65
|
+
in</a>\n </li>\n\n <li id=\"sign-up\">\n <a
|
66
|
+
href=\"https://rubygems.org/users/new\">sign up</a>\n </li>\n
|
67
|
+
\ </ul>\n </div>\n </div>\n <form accept-charset=\"UTF-8\"
|
68
|
+
action=\"http://rubygems.org/search\" id=\"main-search\" method=\"get\"><div
|
69
|
+
style=\"margin:0;padding:0;display:inline\"><input name=\"utf8\" type=\"hidden\"
|
70
|
+
value=\"✓\" /></div>\n <input id=\"query\" name=\"query\"
|
71
|
+
type=\"text\" value=\"Search gems…\" />\n <input id=\"search_submit\"
|
72
|
+
type=\"submit\" value=\"Search\" />\n</form> </div>\n <div class=\"prefix_1
|
73
|
+
grid_10 suffix_1 main\">\n \n\n <div class=\"fold\">\n <div
|
74
|
+
class=\"count\">\n <strong>528,128,534 downloads</strong>\n of 35,796
|
75
|
+
gems cut since July 2009\n </div>\n <div class=\"blurb\">\n <strong>Welcome
|
76
|
+
to your community RubyGem host.</strong>\n <br />Find your gems easier,
|
77
|
+
publish them faster, and have fun doing it.\n </div>\n\n </div>\n
|
78
|
+
\ <div class=\"info clearfix\">\n <div class=\"title\">\n \n
|
79
|
+
\ </div>\n \n<div class=\"border\">\n <div class=\"background\">\n
|
80
|
+
\ <div class=\"learn\">\n <h3>learn</h3>\n <dl>\n <dt><a
|
81
|
+
href=\"http://rubygems.org/pages/download\">Install RubyGems 1.8.17</a></dt>\n
|
82
|
+
\ <dd>Ruby's premier packaging system</dd>\n <dt><a href=\"http://guides.rubygems.org/\">Browse
|
83
|
+
the Guides</a></dt>\n <dd>In depth explanations, tutorials, and references</dd>\n
|
84
|
+
\ <dt><a href=\"http://guides.rubygems.org/specification-reference/\">Gem
|
85
|
+
Specification</a></dt>\n <dd>Your gem's interface to the world</dd>\n
|
86
|
+
\ </dl>\n </div>\n <div class=\"share\">\n <h3>share</h3>\n
|
87
|
+
\ <dl>\n <dt><code>gem update --system</code></dt>\n <dd>Update
|
88
|
+
to the latest RubyGems version</dd>\n <dt><code>gem build foo.gemspec</code></dt>\n
|
89
|
+
\ <dd>Build your gem</dd>\n <dt><code>gem push foo-1.0.0.gem</code></dt>\n
|
90
|
+
\ <dd>Deploy your gem instantly</dd>\n </dl>\n </div>\n </div>\n</div>\n\n<p
|
91
|
+
class=\"pitch\">\n <strong><a href=\"http://rubygems.org/pages/about\">RubyGems.org</a></strong>
|
92
|
+
is the Ruby community's gem hosting service. <strong><a href=\"http://guides.rubygems.org/make-your-own-gem\"
|
93
|
+
anchor=\"push\">Instantly publish</a></strong> your gems and install them.
|
94
|
+
<strong><a href=\"http://guides.rubygems.org/rubygems-org-api/\">Use the API</a></strong>
|
95
|
+
to interact and find out more information about available gems. <strong><a
|
96
|
+
href=\"http://github.com/rubygems/rubygems.org\">Become a contributor</a></strong>
|
97
|
+
and enhance the site with your own changes.\n</p>\n<div class=\"leaderboards\">\n
|
98
|
+
\ <div class=\"grid_3\" id=\"new_gems\">\n <strong>New Gems</strong>\n
|
99
|
+
\ <ol>\n <li>\n <a href=\"/gems/appyantra_admin\" title=\"Rails
|
100
|
+
3 engine for managing an app's assets, users, pages, blog, SEO and Social
|
101
|
+
Media Integration \">appyantra_admin (0.0.1)</a>\n </li>\n <li>\n
|
102
|
+
\ <a href=\"/gems/artieller\" title=\"Converts CSS files from left-to-right
|
103
|
+
to right-to-left\">artieller (0.0.2)</a>\n </li>\n <li>\n <a
|
104
|
+
href=\"/gems/fluent-plugin-file-alternative\" title=\"alternative implementation
|
105
|
+
of out_file, with various configurations\">fluent-plugin-file-alternative
|
106
|
+
(0.1.0)</a>\n </li>\n <li>\n <a href=\"/gems/middleware\"
|
107
|
+
title=\"Generalized implementation of the middleware abstraction for Ruby.\">middleware
|
108
|
+
(0.1.0)</a>\n </li>\n <li>\n <a href=\"/gems/failsafe\"
|
109
|
+
title=\"Tiny little library for silently handling errors so they don't interrupt
|
110
|
+
program flow.\">failsafe (0.1.0)</a>\n </li>\n </ol>\n </div>\n
|
111
|
+
\ <div class=\"grid_3\" id=\"most_downloaded\">\n <strong>Most Downloaded
|
112
|
+
Today</strong>\n <ol>\n <li>\n <a href=\"/gems/mime-types\"
|
113
|
+
title=\"This library allows for the identification of a file's likely MIME
|
114
|
+
content\ntype. This is release ...\">mime-types-1.17.2 (7,851)</a>\n </li>\n
|
115
|
+
\ <li>\n <a href=\"/gems/json\" title=\"This is a JSON
|
116
|
+
implementation as a Ruby extension in C.\">json-1.6.5 (7,544)</a>\n </li>\n
|
117
|
+
\ <li>\n <a href=\"/gems/rake\" title=\"Rake is a Make-like
|
118
|
+
program implemented in Ruby. Tasks and dependencies arespecified in standard
|
119
|
+
...\">rake-0.9.2.2 (7,339)</a>\n </li>\n <li>\n <a
|
120
|
+
href=\"/gems/thor\" title=\"A scripting framework that replaces rake, sake
|
121
|
+
and rubigen\">thor-0.14.6 (6,862)</a>\n </li>\n <li>\n <a
|
122
|
+
href=\"/gems/treetop\" title=\"A Ruby-based text parsing and interpretation
|
123
|
+
DSL\">treetop-1.4.10 (6,598)</a>\n </li>\n </ol>\n </div>\n
|
124
|
+
\ <div class=\"grid_3\" id=\"just_updated\">\n <strong>Just Updated</strong>\n
|
125
|
+
\ <ol>\n <li>\n <a href=\"/gems/dynarex\" title=\"dynarex\">dynarex
|
126
|
+
(1.1.9)</a>\n </li>\n <li>\n <a href=\"/gems/ajax_pagination\"
|
127
|
+
title=\"Loads page content into AJAX sections with AJAX links, handling the
|
128
|
+
details for you, load content...\">ajax_pagination (0.6.2)</a>\n </li>\n
|
129
|
+
\ <li>\n <a href=\"/gems/diffbench\" title=\"Diffbench is gem
|
130
|
+
designed to benchmark the performance patches. It can run specified benchmark
|
131
|
+
fi...\">diffbench (0.0.2)</a>\n </li>\n <li>\n <a href=\"/gems/elibri_onix\"
|
132
|
+
title=\"EDItEUR ONIX format subset implementation used in Elibri publication
|
133
|
+
system\">elibri_onix (0.1.12)</a>\n </li>\n <li>\n <a
|
134
|
+
href=\"/gems/anmo\" title=\"This rubygem does not have a description or summary.\">anmo
|
135
|
+
(0.0.3)</a>\n </li>\n </ol>\n </div>\n</div>\n\n </div>\n
|
136
|
+
\ </div>\n <div class=\"prefix_1 grid_10 suffix_1 footer\">\n <ul
|
137
|
+
class=\"major\">\n <li><a href=\"http://help.rubygems.org\">Help</a></li>\n
|
138
|
+
\ <li><a href=\"http://guides.rubygems.org\">Guides</a></li>\n <li><a
|
139
|
+
href=\"http://blog.rubygems.org\">Blog</a></li>\n <li><a href=\"http://guides.rubygems.org/contributing/\">Contribute</a></li>\n
|
140
|
+
\ </ul>\n <ul class=\"minor\">\n <li><a href=\"http://m.rubygems.org\">Mobile</a></li>\n
|
141
|
+
\ <li><a href=\"http://status.rubygems.org\">Status</a></li>\n <li><a
|
142
|
+
href=\"http://uptime.rubygems.org\">Uptime</a></li>\n <li><a href=\"http://github.com/rubygems/rubygems.org\">Code</a></li>\n
|
143
|
+
\ <li><a href=\"http://groups.google.com/group/gemcutter\">Discuss</a></li>\n
|
144
|
+
\ <li><a href=\"http://rubygems.org/stats\">Stats</a></li>\n <li><a
|
145
|
+
href=\"http://rubygems.org/pages/about\">About</a></li>\n </ul>\n <ul
|
146
|
+
class=\"sponsors\">\n <li><a href=\"http://rubycentral.org\" id=\"rubycentral\"
|
147
|
+
title=\"Hosted by Ruby Central\">hosted by <img alt=\"Rubycentral\" src=\"/images/rubycentral.png?1331498529\"
|
148
|
+
/></a></li>\n <li><a href=\"http://thoughtbot.com\" id=\"thoughtbot\"
|
149
|
+
title=\"Design by Thoughtbot\">design by <img alt=\"Thoughtbot\" src=\"/images/thoughtbot.png?1331498529\"
|
150
|
+
/></a></li>\n <li><a href=\"http://dnsimple.com\" id=\"dnsimple\"
|
151
|
+
title=\"Resolved with DNSimple\">resolved with <img alt=\"Dnsimple\" src=\"/images/dnsimple.png?1331498529\"
|
152
|
+
/></a></li>\n <li><a href=\"http://newrelic.com\" id=\"newrelic\"
|
153
|
+
title=\"Optimized by NewRelic\">optimized by <img alt=\"Newrelic\" src=\"/images/newrelic.png?1331498529\"
|
154
|
+
/></a></li>\n <li><a href=\"http://gaug.es\" id=\"gauges\" title=\"Tracking
|
155
|
+
by Gauges\">tracking by <img alt=\"Gauges\" src=\"/images/gauges.png?1331498529\"
|
156
|
+
/></a></li>\n </ul>\n </div>\n </div>\n <script src=\"/javascripts/all.js?1331498529\"
|
157
|
+
type=\"text/javascript\"></script>\n \n <script type=\"text/javascript\">\n
|
158
|
+
\ var _gauges = _gauges || [];\n (function() {\n var t =
|
159
|
+
document.createElement('script');\n t.type = 'text/javascript';\n
|
160
|
+
\ t.async = true;\n t.id = 'gauges-tracker';\n t.setAttribute('data-site-id',
|
161
|
+
'4eab0ac8613f5d1583000005');\n t.src = '//secure.gaug.es/track.js';\n
|
162
|
+
\ var s = document.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(t,
|
163
|
+
s);\n })();\n </script>\n </body>\n</html>\n"
|
164
|
+
http_version:
|
165
|
+
recorded_at: Fri, 16 Mar 2012 11:40:34 GMT
|
166
|
+
recorded_with: VCR 2.0.0
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Rhinestone::Cache do
|
4
|
+
let(:cache_backend) { Rhinestone::InMemoryCacheBackend.new }
|
5
|
+
let(:cache) { Rhinestone::Cache.new(cache_backend) }
|
6
|
+
|
7
|
+
let(:response) {
|
8
|
+
Rhinestone::Response.new(200, {'Content-Type' => 'application/json'}, 'some body')
|
9
|
+
}
|
10
|
+
|
11
|
+
it "stores response serialized as 3 separate key-value pairs" do
|
12
|
+
cache.set('/gems.json', response)
|
13
|
+
|
14
|
+
cache_backend.data.keys.size.should == 3
|
15
|
+
end
|
16
|
+
|
17
|
+
it "deserializes response from the key-value pairs" do
|
18
|
+
cache.set('/gems.json', response)
|
19
|
+
cache.get('/gems.json').should == response
|
20
|
+
end
|
21
|
+
|
22
|
+
it "returns nil if any of the 3 pairs was not present in cache_backend" do
|
23
|
+
cache.get('/gems.json').should be_nil
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Rhinestone::FilesystemCacheBackend do
|
4
|
+
after { FileUtils.rm_rf(base_directory) }
|
5
|
+
|
6
|
+
let(:base_directory) { "/tmp/rhinestone/cache" }
|
7
|
+
let(:cache_backend) { Rhinestone::FilesystemCacheBackend.new(base_directory) }
|
8
|
+
|
9
|
+
it_behaves_like "cache backend"
|
10
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Rhinestone::HeaderFilter do
|
4
|
+
let(:important_headers) {
|
5
|
+
['Content-Type', 'ETag']
|
6
|
+
}
|
7
|
+
|
8
|
+
let(:headers) {
|
9
|
+
FakeHeaders.new('Status' => 200, 'Content-Type' => 'application/json')
|
10
|
+
}
|
11
|
+
|
12
|
+
let(:filter) { Rhinestone::HeaderFilter.new(important_headers) }
|
13
|
+
|
14
|
+
it "returns only the headers that are important and exist" do
|
15
|
+
filter.filter(headers).should == {'Content-Type' => 'application/json'}
|
16
|
+
end
|
17
|
+
|
18
|
+
# limit the hash interface to only one method
|
19
|
+
# because em-http returns headers uppercased with "indifferent access" via []
|
20
|
+
class FakeHeaders
|
21
|
+
def initialize(data)
|
22
|
+
@data = data
|
23
|
+
end
|
24
|
+
|
25
|
+
def [](name)
|
26
|
+
return @data[name]
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative '../spec_helper'
|
2
|
+
|
3
|
+
describe Rhinestone::HttpClient, :vcr do
|
4
|
+
let(:header_filter) { stub(:header_filter) }
|
5
|
+
|
6
|
+
let(:http_client) { Rhinestone::HttpClient.new("rubygems.org", header_filter) }
|
7
|
+
|
8
|
+
it "returns a Rhinestone::Response" do
|
9
|
+
header_filter.should_receive(:filter).and_return {|headers| headers}
|
10
|
+
response = nil
|
11
|
+
|
12
|
+
EM.synchrony do
|
13
|
+
response = http_client.get("/")
|
14
|
+
EM.stop
|
15
|
+
end
|
16
|
+
|
17
|
+
response.status.should == 200
|
18
|
+
response.headers['Content-Type'].should_not be_nil
|
19
|
+
response.body.should include('RubyGems.org')
|
20
|
+
end
|
21
|
+
end
|