benschwarz-smoke 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +47 -0
- data/VERSION.yml +2 -2
- data/lib/core_ext/string.rb +6 -0
- data/lib/smoke/cache.rb +38 -23
- data/lib/smoke/request.rb +4 -8
- data/lib/smoke.rb +7 -2
- data/rdoc/classes/Smoke/Origin.html +340 -0
- data/rdoc/classes/Smoke/Source/Data.html +126 -0
- data/rdoc/classes/Smoke/Source/Feed.html +117 -0
- data/rdoc/classes/Smoke/Source/YQL.html +223 -0
- data/rdoc/classes/Smoke.html +260 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README_markdown.html +180 -0
- data/rdoc/files/lib/core_ext/hash_rb.html +49 -0
- data/rdoc/files/lib/smoke/origin_rb.html +49 -0
- data/rdoc/files/lib/smoke/request_rb.html +49 -0
- data/rdoc/files/lib/smoke/source/data_rb.html +49 -0
- data/rdoc/files/lib/smoke/source/feed_rb.html +49 -0
- data/rdoc/files/lib/smoke/source/join_rb.html +49 -0
- data/rdoc/files/lib/smoke/source/yql_rb.html +49 -0
- data/rdoc/files/lib/smoke_rb.html +65 -0
- data/rdoc/fr_class_index.html +21 -0
- data/rdoc/fr_file_index.html +28 -0
- data/rdoc/fr_method_index.html +4459 -0
- data/rdoc/index.html +15 -0
- data/rdoc/rdoc-style.css +319 -0
- data/spec/smoke/cache_spec.rb +28 -6
- data/vendor/crack/History +15 -0
- data/vendor/crack/LICENSE +20 -0
- data/vendor/crack/README.rdoc +42 -0
- data/vendor/crack/Rakefile +49 -0
- data/vendor/crack/VERSION.yml +4 -0
- data/vendor/crack/crack.gemspec +61 -0
- data/vendor/crack/lib/crack/core_extensions.rb +128 -0
- data/vendor/crack/lib/crack/json.rb +68 -0
- data/vendor/crack/lib/crack/xml.rb +214 -0
- data/vendor/crack/lib/crack.rb +7 -0
- data/vendor/crack/test/crack_test.rb +4 -0
- data/vendor/crack/test/data/twittersearch-firefox.json +1 -0
- data/vendor/crack/test/data/twittersearch-ie.json +1 -0
- data/vendor/crack/test/hash_test.rb +56 -0
- data/vendor/crack/test/json_test.rb +66 -0
- data/vendor/crack/test/string_test.rb +31 -0
- data/vendor/crack/test/test_helper.rb +12 -0
- data/vendor/crack/test/xml_test.rb +489 -0
- data/vendor/dependencies/README.markdown +113 -0
- data/vendor/dependencies/Rakefile +5 -0
- data/vendor/dependencies/bin/dep +83 -0
- data/vendor/dependencies/dependencies.gemspec +15 -0
- data/vendor/dependencies/dependencies.gemspec.erb +27 -0
- data/vendor/dependencies/lib/dependencies/dep.rb +99 -0
- data/vendor/dependencies/lib/dependencies.rb +5 -0
- data/vendor/dependencies/test/dependencies_test.rb +228 -0
- data/vendor/dependencies/test/foobaz-0.3.gem +0 -0
- data/vendor/fakeweb/CHANGELOG +163 -0
- data/vendor/fakeweb/LICENSE.txt +281 -0
- data/vendor/fakeweb/README.rdoc +193 -0
- data/vendor/fakeweb/Rakefile +76 -0
- data/vendor/fakeweb/fakeweb.gemspec +21 -0
- data/vendor/fakeweb/lib/fake_web/ext/net_http.rb +71 -0
- data/vendor/fakeweb/lib/fake_web/registry.rb +103 -0
- data/vendor/fakeweb/lib/fake_web/responder.rb +113 -0
- data/vendor/fakeweb/lib/fake_web/response.rb +10 -0
- data/vendor/fakeweb/lib/fake_web/stub_socket.rb +15 -0
- data/vendor/fakeweb/lib/fake_web/utility.rb +22 -0
- data/vendor/fakeweb/lib/fake_web.rb +172 -0
- data/vendor/fakeweb/lib/fakeweb.rb +2 -0
- data/vendor/fakeweb/test/fixtures/google_response_from_curl +12 -0
- data/vendor/fakeweb/test/fixtures/google_response_with_transfer_encoding +17 -0
- data/vendor/fakeweb/test/fixtures/google_response_without_transfer_encoding +11 -0
- data/vendor/fakeweb/test/fixtures/test_example.txt +1 -0
- data/vendor/fakeweb/test/fixtures/test_txt_file +3 -0
- data/vendor/fakeweb/test/test_allow_net_connect.rb +85 -0
- data/vendor/fakeweb/test/test_deprecations.rb +54 -0
- data/vendor/fakeweb/test/test_fake_authentication.rb +92 -0
- data/vendor/fakeweb/test/test_fake_web.rb +535 -0
- data/vendor/fakeweb/test/test_fake_web_open_uri.rb +58 -0
- data/vendor/fakeweb/test/test_helper.rb +74 -0
- data/vendor/fakeweb/test/test_missing_open_uri.rb +25 -0
- data/vendor/fakeweb/test/test_precedence.rb +51 -0
- data/vendor/fakeweb/test/test_query_string.rb +45 -0
- data/vendor/fakeweb/test/test_regexes.rb +103 -0
- data/vendor/fakeweb/test/test_response_headers.rb +73 -0
- data/vendor/fakeweb/test/test_trailing_slashes.rb +53 -0
- data/vendor/fakeweb/test/test_utility.rb +70 -0
- data/vendor/json-1.1.3/CHANGES +93 -0
- data/vendor/json-1.1.3/GPL +340 -0
- data/vendor/json-1.1.3/README +78 -0
- data/vendor/json-1.1.3/RUBY +58 -0
- data/vendor/json-1.1.3/Rakefile +309 -0
- data/vendor/json-1.1.3/TODO +1 -0
- data/vendor/json-1.1.3/VERSION +1 -0
- data/vendor/json-1.1.3/benchmarks/benchmark.txt +133 -0
- data/vendor/json-1.1.3/benchmarks/benchmark_generator.rb +48 -0
- data/vendor/json-1.1.3/benchmarks/benchmark_parser.rb +26 -0
- data/vendor/json-1.1.3/benchmarks/benchmark_rails.rb +26 -0
- data/vendor/json-1.1.3/bin/edit_json.rb +10 -0
- data/vendor/json-1.1.3/bin/prettify_json.rb +76 -0
- data/vendor/json-1.1.3/data/example.json +1 -0
- data/vendor/json-1.1.3/data/index.html +38 -0
- data/vendor/json-1.1.3/data/prototype.js +4184 -0
- data/vendor/json-1.1.3/ext/json/ext/generator/extconf.rb +9 -0
- data/vendor/json-1.1.3/ext/json/ext/generator/generator.c +875 -0
- data/vendor/json-1.1.3/ext/json/ext/generator/unicode.c +182 -0
- data/vendor/json-1.1.3/ext/json/ext/generator/unicode.h +53 -0
- data/vendor/json-1.1.3/ext/json/ext/parser/extconf.rb +9 -0
- data/vendor/json-1.1.3/ext/json/ext/parser/parser.c +1758 -0
- data/vendor/json-1.1.3/ext/json/ext/parser/parser.rl +638 -0
- data/vendor/json-1.1.3/ext/json/ext/parser/unicode.c +154 -0
- data/vendor/json-1.1.3/ext/json/ext/parser/unicode.h +58 -0
- data/vendor/json-1.1.3/install.rb +26 -0
- data/vendor/json-1.1.3/lib/json/Array.xpm +21 -0
- data/vendor/json-1.1.3/lib/json/FalseClass.xpm +21 -0
- data/vendor/json-1.1.3/lib/json/Hash.xpm +21 -0
- data/vendor/json-1.1.3/lib/json/Key.xpm +73 -0
- data/vendor/json-1.1.3/lib/json/NilClass.xpm +21 -0
- data/vendor/json-1.1.3/lib/json/Numeric.xpm +28 -0
- data/vendor/json-1.1.3/lib/json/String.xpm +96 -0
- data/vendor/json-1.1.3/lib/json/TrueClass.xpm +21 -0
- data/vendor/json-1.1.3/lib/json/add/core.rb +135 -0
- data/vendor/json-1.1.3/lib/json/add/rails.rb +58 -0
- data/vendor/json-1.1.3/lib/json/common.rb +354 -0
- data/vendor/json-1.1.3/lib/json/editor.rb +1362 -0
- data/vendor/json-1.1.3/lib/json/ext.rb +13 -0
- data/vendor/json-1.1.3/lib/json/json.xpm +1499 -0
- data/vendor/json-1.1.3/lib/json/pure/generator.rb +394 -0
- data/vendor/json-1.1.3/lib/json/pure/parser.rb +259 -0
- data/vendor/json-1.1.3/lib/json/pure.rb +75 -0
- data/vendor/json-1.1.3/lib/json/version.rb +9 -0
- data/vendor/json-1.1.3/lib/json.rb +235 -0
- data/vendor/json-1.1.3/tests/fixtures/fail1.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail10.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail11.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail12.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail13.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail14.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail18.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail19.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail2.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail20.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail21.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail22.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail23.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail24.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail25.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail27.json +2 -0
- data/vendor/json-1.1.3/tests/fixtures/fail28.json +2 -0
- data/vendor/json-1.1.3/tests/fixtures/fail3.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail4.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail5.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail6.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail7.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail8.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/fail9.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/pass1.json +56 -0
- data/vendor/json-1.1.3/tests/fixtures/pass15.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/pass16.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/pass17.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/pass2.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/pass26.json +1 -0
- data/vendor/json-1.1.3/tests/fixtures/pass3.json +6 -0
- data/vendor/json-1.1.3/tests/runner.rb +25 -0
- data/vendor/json-1.1.3/tests/test_json.rb +293 -0
- data/vendor/json-1.1.3/tests/test_json_addition.rb +161 -0
- data/vendor/json-1.1.3/tests/test_json_fixtures.rb +30 -0
- data/vendor/json-1.1.3/tests/test_json_generate.rb +100 -0
- data/vendor/json-1.1.3/tests/test_json_rails.rb +118 -0
- data/vendor/json-1.1.3/tests/test_json_unicode.rb +61 -0
- data/vendor/json-1.1.3/tools/fuzz.rb +140 -0
- data/vendor/json-1.1.3/tools/server.rb +62 -0
- data/vendor/moneta/LICENSE +20 -0
- data/vendor/moneta/README +51 -0
- data/vendor/moneta/Rakefile +60 -0
- data/vendor/moneta/TODO +4 -0
- data/vendor/moneta/benchmarks/various.rb +234 -0
- data/vendor/moneta/lib/moneta/basic_file.rb +111 -0
- data/vendor/moneta/lib/moneta/berkeley.rb +53 -0
- data/vendor/moneta/lib/moneta/couch.rb +63 -0
- data/vendor/moneta/lib/moneta/datamapper.rb +117 -0
- data/vendor/moneta/lib/moneta/file.rb +91 -0
- data/vendor/moneta/lib/moneta/lmc.rb +52 -0
- data/vendor/moneta/lib/moneta/memcache.rb +53 -0
- data/vendor/moneta/lib/moneta/memory.rb +11 -0
- data/vendor/moneta/lib/moneta/mongodb.rb +58 -0
- data/vendor/moneta/lib/moneta/redis.rb +49 -0
- data/vendor/moneta/lib/moneta/rufus.rb +41 -0
- data/vendor/moneta/lib/moneta/s3.rb +162 -0
- data/vendor/moneta/lib/moneta/sdbm.rb +33 -0
- data/vendor/moneta/lib/moneta/tyrant.rb +58 -0
- data/vendor/moneta/lib/moneta/xattr.rb +58 -0
- data/vendor/moneta/lib/moneta.rb +76 -0
- data/vendor/moneta/moneta.gemspec +32 -0
- data/vendor/moneta/script/destroy +14 -0
- data/vendor/moneta/script/generate +14 -0
- data/vendor/moneta/spec/moneta_basic_file_spec.rb +50 -0
- data/vendor/moneta/spec/moneta_berkeley_spec.rb +20 -0
- data/vendor/moneta/spec/moneta_couch_spec.rb +22 -0
- data/vendor/moneta/spec/moneta_datamapper_spec.rb +79 -0
- data/vendor/moneta/spec/moneta_file_spec.rb +21 -0
- data/vendor/moneta/spec/moneta_lmc_spec.rb +24 -0
- data/vendor/moneta/spec/moneta_memcache_spec.rb +16 -0
- data/vendor/moneta/spec/moneta_memory_spec.rb +12 -0
- data/vendor/moneta/spec/moneta_mongodb_spec.rb +16 -0
- data/vendor/moneta/spec/moneta_redis_spec.rb +16 -0
- data/vendor/moneta/spec/moneta_rufus_spec.rb +15 -0
- data/vendor/moneta/spec/moneta_s3_spec.rb +19 -0
- data/vendor/moneta/spec/moneta_sdbm_spec.rb +21 -0
- data/vendor/moneta/spec/moneta_tyrant_spec.rb +15 -0
- data/vendor/moneta/spec/moneta_xattr_spec.rb +21 -0
- data/vendor/moneta/spec/shared.rb +122 -0
- data/vendor/moneta/spec/spec_helper.rb +7 -0
- data/vendor/rest-client/README.rdoc +151 -0
- data/vendor/rest-client/Rakefile +58 -0
- data/vendor/rest-client/VERSION +1 -0
- data/vendor/rest-client/bin/restclient +87 -0
- data/vendor/rest-client/lib/rest_client.rb +2 -0
- data/vendor/rest-client/lib/restclient/exceptions.rb +88 -0
- data/vendor/rest-client/lib/restclient/mixin/response.rb +43 -0
- data/vendor/rest-client/lib/restclient/raw_response.rb +30 -0
- data/vendor/rest-client/lib/restclient/request.rb +238 -0
- data/vendor/rest-client/lib/restclient/resource.rb +146 -0
- data/vendor/rest-client/lib/restclient/response.rb +20 -0
- data/vendor/rest-client/lib/restclient.rb +99 -0
- data/vendor/rest-client/rest-client.gemspec +66 -0
- data/vendor/rest-client/spec/base.rb +4 -0
- data/vendor/rest-client/spec/exceptions_spec.rb +65 -0
- data/vendor/rest-client/spec/mixin/response_spec.rb +46 -0
- data/vendor/rest-client/spec/raw_response_spec.rb +17 -0
- data/vendor/rest-client/spec/request_spec.rb +476 -0
- data/vendor/rest-client/spec/resource_spec.rb +75 -0
- data/vendor/rest-client/spec/response_spec.rb +16 -0
- data/vendor/rest-client/spec/restclient_spec.rb +53 -0
- data/vendor/simple-rss/LICENSE +429 -0
- data/vendor/simple-rss/README +43 -0
- data/vendor/simple-rss/Rakefile +212 -0
- data/vendor/simple-rss/install.rb +40 -0
- data/vendor/simple-rss/lib/simple-rss.rb +150 -0
- data/vendor/simple-rss/simple-rss.gemspec +12 -0
- data/vendor/simple-rss/test/base/base_test.rb +51 -0
- data/vendor/simple-rss/test/data/atom.xml +45 -0
- data/vendor/simple-rss/test/data/not-rss.xml +8 -0
- data/vendor/simple-rss/test/data/rss09.rdf +79 -0
- data/vendor/simple-rss/test/data/rss20.xml +818 -0
- data/vendor/simple-rss/test/test_helper.rb +4 -0
- metadata +314 -40
data/rdoc/index.html
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
2
|
+
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
+
<head>
|
4
|
+
<title>smoke</title>
|
5
|
+
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
|
6
|
+
</head>
|
7
|
+
<frameset border='1' bordercolor='gray' cols='20%, *' frameborder='1'>
|
8
|
+
<frameset rows='15%, 35%, 50%'>
|
9
|
+
<frame name='Files' src='fr_file_index.html' title='Files'></frame>
|
10
|
+
<frame name='Classes' src='fr_class_index.html'></frame>
|
11
|
+
<frame name='Methods' src='fr_method_index.html'></frame>
|
12
|
+
</frameset>
|
13
|
+
<frame name='docwin' src='files/README_markdown.html'></frame>
|
14
|
+
</frameset>
|
15
|
+
</html>
|
data/rdoc/rdoc-style.css
ADDED
@@ -0,0 +1,319 @@
|
|
1
|
+
html, body {
|
2
|
+
height: 100%; }
|
3
|
+
|
4
|
+
body {
|
5
|
+
font-family: Lucida Grande , Verdana, Arial, Helvetica, sans-serif;
|
6
|
+
font-size: 90%;
|
7
|
+
margin: 0;
|
8
|
+
padding: 0;
|
9
|
+
background: white;
|
10
|
+
color: black; }
|
11
|
+
|
12
|
+
#wrapper {
|
13
|
+
min-height: 100%;
|
14
|
+
height: auto !important;
|
15
|
+
height: 100%;
|
16
|
+
margin: 0 auto -43px; }
|
17
|
+
|
18
|
+
#footer-push {
|
19
|
+
height: 43px; }
|
20
|
+
|
21
|
+
div.header, #footer {
|
22
|
+
background: #eee; }
|
23
|
+
|
24
|
+
#footer {
|
25
|
+
border-top: 1px solid silver;
|
26
|
+
margin-top: 12px;
|
27
|
+
padding: 0 2em;
|
28
|
+
line-height: 30px;
|
29
|
+
text-align: center;
|
30
|
+
font-variant: small-caps;
|
31
|
+
font-size: 95%; }
|
32
|
+
|
33
|
+
.clearing:after {
|
34
|
+
content: ".";
|
35
|
+
visibility: hidden;
|
36
|
+
height: 0;
|
37
|
+
display: block;
|
38
|
+
clear: both; }
|
39
|
+
* html .clearing {
|
40
|
+
height: 1px; }
|
41
|
+
.clearing *:first-child + html {
|
42
|
+
overflow: hidden; }
|
43
|
+
|
44
|
+
h1, h2, h3, h4, h5, h6 {
|
45
|
+
margin: 0;
|
46
|
+
font-weight: normal; }
|
47
|
+
|
48
|
+
a {
|
49
|
+
color: #0b3e71; }
|
50
|
+
a:hover {
|
51
|
+
background: #336699;
|
52
|
+
text-decoration: none;
|
53
|
+
color: #eef; }
|
54
|
+
|
55
|
+
#diagram img {
|
56
|
+
border: 0; }
|
57
|
+
|
58
|
+
#description a, .method .description a, .header a {
|
59
|
+
color: #336699; }
|
60
|
+
#description a:hover, .method .description a:hover, .header a:hover {
|
61
|
+
color: #eee; }
|
62
|
+
#description h1 a, #description h2 a, #description h3 a, #description h4 a, #description h5 a, #description h6 a, .method .description h1 a, .method .description h2 a, .method .description h3 a, .method .description h4 a, .method .description h5 a, .method .description h6 a, .header h1 a, .header h2 a, .header h3 a, .header h4 a, .header h5 a, .header h6 a {
|
63
|
+
color: #0b3e71; }
|
64
|
+
|
65
|
+
ol {
|
66
|
+
margin: 0;
|
67
|
+
padding: 0;
|
68
|
+
list-style: none; }
|
69
|
+
ol li {
|
70
|
+
margin-left: 0;
|
71
|
+
white-space: nowrap; }
|
72
|
+
ol li.other {
|
73
|
+
display: none; }
|
74
|
+
|
75
|
+
ol.expanded li.other {
|
76
|
+
display: list-item; }
|
77
|
+
|
78
|
+
table {
|
79
|
+
margin-bottom: 1em;
|
80
|
+
font-size: 1em;
|
81
|
+
border-collapse: collapse; }
|
82
|
+
table td, table th {
|
83
|
+
padding: .4em .8em; }
|
84
|
+
table thead {
|
85
|
+
background-color: #e8e8e8; }
|
86
|
+
table thead th {
|
87
|
+
font-variant: small-caps;
|
88
|
+
color: #666666; }
|
89
|
+
table tr {
|
90
|
+
border-bottom: 1px solid silver; }
|
91
|
+
|
92
|
+
#index a.show, div.header a.show {
|
93
|
+
text-decoration: underline;
|
94
|
+
font-style: italic;
|
95
|
+
color: #666666; }
|
96
|
+
#index a.show:after, div.header a.show:after {
|
97
|
+
content: " ..."; }
|
98
|
+
#index a.show:hover, div.header a.show:hover {
|
99
|
+
color: black;
|
100
|
+
background: #ffe; }
|
101
|
+
|
102
|
+
#index {
|
103
|
+
font: 85%/1.2 Arial, Helvetica, sans-serif; }
|
104
|
+
#index a {
|
105
|
+
text-decoration: none; }
|
106
|
+
#index h1 {
|
107
|
+
padding: .2em .5em .1em;
|
108
|
+
background: #ccc;
|
109
|
+
font: small-caps 1.2em Georgia, serif;
|
110
|
+
color: #333;
|
111
|
+
border-bottom: 1px solid gray; }
|
112
|
+
#index form {
|
113
|
+
margin: 0;
|
114
|
+
padding: 0; }
|
115
|
+
#index form input {
|
116
|
+
margin: .4em;
|
117
|
+
margin-bottom: 0;
|
118
|
+
width: 90%; }
|
119
|
+
#index form #search.untouched {
|
120
|
+
color: #777777; }
|
121
|
+
#index ol {
|
122
|
+
padding: .4em .5em; }
|
123
|
+
#index ol li {
|
124
|
+
white-space: nowrap; }
|
125
|
+
#index #index-entries li a {
|
126
|
+
padding: 1px 2px; }
|
127
|
+
#index #index-entries.classes {
|
128
|
+
font-size: 1.1em; }
|
129
|
+
#index #index-entries.classes ol {
|
130
|
+
padding: 0; }
|
131
|
+
#index #index-entries.classes span.nodoc {
|
132
|
+
display: none; }
|
133
|
+
#index #index-entries.classes span.nodoc, #index #index-entries.classes a {
|
134
|
+
font-weight: bold; }
|
135
|
+
#index #index-entries.classes .parent {
|
136
|
+
font-weight: normal; }
|
137
|
+
#index #index-entries.methods li, #index #search-results.methods li {
|
138
|
+
margin-bottom: 0.2em; }
|
139
|
+
#index #index-entries.methods li a .method_name, #index #search-results.methods li a .method_name {
|
140
|
+
margin-right: 0.25em; }
|
141
|
+
#index #index-entries.methods li a .module_name, #index #search-results.methods li a .module_name {
|
142
|
+
color: #666666; }
|
143
|
+
#index #index-entries.methods li a:hover .module_name, #index #search-results.methods li a:hover .module_name {
|
144
|
+
color: #ddd; }
|
145
|
+
|
146
|
+
div.header {
|
147
|
+
font-size: 80%;
|
148
|
+
padding: .5em 2%;
|
149
|
+
font-family: Arial, Helvetica, sans-serif;
|
150
|
+
border-bottom: 1px solid silver; }
|
151
|
+
div.header .name {
|
152
|
+
font-size: 1.6em;
|
153
|
+
font-family: Georgia, serif; }
|
154
|
+
div.header .name .type {
|
155
|
+
color: #666666;
|
156
|
+
font-size: 80%;
|
157
|
+
font-variant: small-caps; }
|
158
|
+
div.header h1.name {
|
159
|
+
font-size: 2.2em; }
|
160
|
+
div.header .paths, div.header .last-update, div.header .parent {
|
161
|
+
color: #666666; }
|
162
|
+
div.header .last-update .datetime {
|
163
|
+
color: #484848; }
|
164
|
+
div.header .parent {
|
165
|
+
margin-top: .3em; }
|
166
|
+
div.header .parent strong {
|
167
|
+
font-weight: normal;
|
168
|
+
color: #484848; }
|
169
|
+
|
170
|
+
#content {
|
171
|
+
padding: 12px 2%; }
|
172
|
+
div.class #content {
|
173
|
+
position: relative;
|
174
|
+
width: 72%; }
|
175
|
+
#content pre, #content .method .synopsis {
|
176
|
+
font: 14px Monaco, DejaVu Sans Mono , Bitstream Vera Sans Mono , Courier New , monospace; }
|
177
|
+
#content pre {
|
178
|
+
color: black;
|
179
|
+
background: #eee;
|
180
|
+
border: 1px solid silver;
|
181
|
+
padding: .5em .8em;
|
182
|
+
overflow: auto; }
|
183
|
+
#content p code, #content p tt, #content li code, #content li tt, #content dl code, #content dl tt {
|
184
|
+
font: 14px Monaco, DejaVu Sans Mono , Bitstream Vera Sans Mono , Courier New , monospace;
|
185
|
+
background: #ffffe3;
|
186
|
+
padding: 2px 3px;
|
187
|
+
line-height: 1.4; }
|
188
|
+
#content h1 code, #content h1 tt, #content h2 code, #content h2 tt, #content h3 code, #content h3 tt, #content h4 code, #content h4 tt, #content h5 code, #content h5 tt, #content h6 code, #content h6 tt {
|
189
|
+
font-size: 1.1em; }
|
190
|
+
#content #text {
|
191
|
+
position: relative; }
|
192
|
+
#content #description p {
|
193
|
+
margin-top: .5em; }
|
194
|
+
#content #description h1, #content #description h2, #content #description h3, #content #description h4, #content #description h5, #content #description h6 {
|
195
|
+
font-family: Georgia, serif; }
|
196
|
+
#content #description h1 {
|
197
|
+
font-size: 2.2em;
|
198
|
+
margin-bottom: .2em;
|
199
|
+
border-bottom: 3px double #d8d8d8;
|
200
|
+
padding-bottom: .1em; }
|
201
|
+
#content #description h2 {
|
202
|
+
font-size: 1.8em;
|
203
|
+
color: #0e3062;
|
204
|
+
margin: .8em 0 .3em 0; }
|
205
|
+
#content #description h3 {
|
206
|
+
font-size: 1.6em;
|
207
|
+
margin: .8em 0 .3em 0;
|
208
|
+
color: #666666; }
|
209
|
+
#content #description h4 {
|
210
|
+
font-size: 1.4em;
|
211
|
+
margin: .8em 0 .3em 0; }
|
212
|
+
#content #description h5 {
|
213
|
+
font-size: 1.2em;
|
214
|
+
margin: .8em 0 .3em 0;
|
215
|
+
color: #0e3062; }
|
216
|
+
#content #description h6 {
|
217
|
+
font-size: 1.0em;
|
218
|
+
margin: .8em 0 .3em 0;
|
219
|
+
color: #666666; }
|
220
|
+
#content #description ul, #content #description ol, #content .method .description ul, #content .method .description ol {
|
221
|
+
margin: .8em 0;
|
222
|
+
padding-left: 1.5em; }
|
223
|
+
#content #description ol, #content .method .description ol {
|
224
|
+
list-style: decimal; }
|
225
|
+
#content #description ol li, #content .method .description ol li {
|
226
|
+
white-space: normal; }
|
227
|
+
|
228
|
+
#method-list {
|
229
|
+
position: absolute;
|
230
|
+
top: 0px;
|
231
|
+
right: -33%;
|
232
|
+
width: 28%;
|
233
|
+
background: #eee;
|
234
|
+
border: 1px solid silver;
|
235
|
+
padding: .4em 1%;
|
236
|
+
overflow: hidden; }
|
237
|
+
#method-list h2 {
|
238
|
+
font-size: 1.3em; }
|
239
|
+
#method-list h3 {
|
240
|
+
font-variant: small-caps;
|
241
|
+
text-transform: capitalize;
|
242
|
+
font-family: Georgia, serif;
|
243
|
+
color: #666;
|
244
|
+
font-size: 1.1em; }
|
245
|
+
#method-list ol {
|
246
|
+
padding: 0 0 .5em .5em; }
|
247
|
+
|
248
|
+
#context {
|
249
|
+
border-top: 1px dashed silver;
|
250
|
+
margin-top: 1em;
|
251
|
+
margin-bottom: 1em; }
|
252
|
+
|
253
|
+
#context h2, #section h2 {
|
254
|
+
font: small-caps 1.2em Georgia, serif;
|
255
|
+
color: #444;
|
256
|
+
margin: 1em 0 .2em 0; }
|
257
|
+
|
258
|
+
#methods .method {
|
259
|
+
border: 1px solid silver;
|
260
|
+
margin-top: .5em;
|
261
|
+
background: #eee; }
|
262
|
+
#methods .method .synopsis {
|
263
|
+
color: black;
|
264
|
+
background: silver;
|
265
|
+
padding: .2em 1em; }
|
266
|
+
#methods .method .synopsis .name {
|
267
|
+
font-weight: bold; }
|
268
|
+
#methods .method .synopsis a {
|
269
|
+
text-decoration: none; }
|
270
|
+
#methods .method .description {
|
271
|
+
padding: 0 1em; }
|
272
|
+
#methods .method .description pre {
|
273
|
+
background: #f8f8f8; }
|
274
|
+
#methods .method .source {
|
275
|
+
margin: .5em 0; }
|
276
|
+
#methods .method .source-toggle {
|
277
|
+
font-size: 85%;
|
278
|
+
margin-left: 1em; }
|
279
|
+
#methods .public-class {
|
280
|
+
background: #ffffe4; }
|
281
|
+
#methods .public-instance .synopsis {
|
282
|
+
color: #eee;
|
283
|
+
background: #336699; }
|
284
|
+
|
285
|
+
#content .method .source pre {
|
286
|
+
background: #262626;
|
287
|
+
color: #ffdead;
|
288
|
+
margin: 1em;
|
289
|
+
padding: 0.5em;
|
290
|
+
border: 1px dashed #999;
|
291
|
+
overflow: auto; }
|
292
|
+
#content .method .source pre .ruby-constant {
|
293
|
+
color: #7fffd4;
|
294
|
+
background: transparent; }
|
295
|
+
#content .method .source pre .ruby-keyword {
|
296
|
+
color: #00ffff;
|
297
|
+
background: transparent; }
|
298
|
+
#content .method .source pre .ruby-ivar {
|
299
|
+
color: #eedd82;
|
300
|
+
background: transparent; }
|
301
|
+
#content .method .source pre .ruby-operator {
|
302
|
+
color: #00ffee;
|
303
|
+
background: transparent; }
|
304
|
+
#content .method .source pre .ruby-identifier {
|
305
|
+
color: #ffdead;
|
306
|
+
background: transparent; }
|
307
|
+
#content .method .source pre .ruby-node {
|
308
|
+
color: #ffa07a;
|
309
|
+
background: transparent; }
|
310
|
+
#content .method .source pre .ruby-comment {
|
311
|
+
color: #b22222;
|
312
|
+
font-weight: bold;
|
313
|
+
background: transparent; }
|
314
|
+
#content .method .source pre .ruby-regexp {
|
315
|
+
color: #ffa07a;
|
316
|
+
background: transparent; }
|
317
|
+
#content .method .source pre .ruby-value {
|
318
|
+
color: #7fffd4;
|
319
|
+
background: transparent; }
|
data/spec/smoke/cache_spec.rb
CHANGED
@@ -1,11 +1,7 @@
|
|
1
1
|
require File.join(File.dirname(__FILE__), "..", "spec_helper.rb")
|
2
2
|
|
3
3
|
describe Smoke::Cache do
|
4
|
-
describe "class methods" do
|
5
|
-
it "should respond to configure!" do
|
6
|
-
Smoke::Cache.should respond_to(:configure!)
|
7
|
-
end
|
8
|
-
|
4
|
+
describe "class methods" do
|
9
5
|
it "should respond to fetch" do
|
10
6
|
Smoke::Cache.should respond_to(:fetch)
|
11
7
|
end
|
@@ -47,7 +43,33 @@ describe Smoke::Cache do
|
|
47
43
|
|
48
44
|
describe "caching my block" do
|
49
45
|
before :all do
|
50
|
-
Smoke.configure
|
46
|
+
Smoke.configure do |c|
|
47
|
+
c[:cache][:enabled] = true
|
48
|
+
c[:cache][:store] = :memory
|
49
|
+
end
|
50
|
+
|
51
|
+
@url = "http://memory.tld/store"
|
52
|
+
FakeWeb.register_uri(@url, :file => File.join(SPEC_DIR, 'supports', 'slashdot.xml'))
|
53
|
+
|
54
|
+
require 'moneta/memory'
|
55
|
+
@store = Moneta::Memory.new
|
56
|
+
Moneta::Memory.stub!(:new).and_return(@store)
|
57
|
+
end
|
58
|
+
|
59
|
+
it "should use the moneta::memory store" do
|
60
|
+
Moneta::Memory.should_receive(:new).with(Smoke.config[:cache][:options])
|
61
|
+
|
62
|
+
Smoke::Cache.fetch @url, {}
|
63
|
+
end
|
64
|
+
|
65
|
+
it "should try to read from the memory store" do
|
66
|
+
@store.should_receive(:[])
|
67
|
+
Smoke::Cache.fetch @url, {}
|
68
|
+
end
|
69
|
+
|
70
|
+
it "should be stored in the cache" do
|
71
|
+
Smoke::Cache.fetch @url, {}
|
72
|
+
@store['33af9f13054e64520430f7a437cdd377'].should_not be_nil
|
51
73
|
end
|
52
74
|
end
|
53
75
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
== 0.1.3 2009-06-22
|
2
|
+
* 1 minor patch
|
3
|
+
* Parsing a text node with attributes stores them in the attributes method (tamalw)
|
4
|
+
|
5
|
+
== 0.1.2 2009-04-21
|
6
|
+
* 2 minor patches
|
7
|
+
* Correct unnormalization of attribute values (der-flo)
|
8
|
+
* Fix error in parsing YAML in the case where a hash value ends with backslashes, and there are subsequent values in the hash (deadprogrammer)
|
9
|
+
|
10
|
+
== 0.1.1 2009-03-31
|
11
|
+
* 1 minor patch
|
12
|
+
* Parsing empty or blank xml now returns empty hash instead of raising error.
|
13
|
+
|
14
|
+
== 0.1.0 2009-03-28
|
15
|
+
* Initial release.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 John Nunemaker
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
= crack
|
2
|
+
|
3
|
+
Really simple JSON and XML parsing, ripped from Merb and Rails. The XML parser is ripped from Merb and the JSON parser is ripped from Rails. I take no credit, just packaged them for all to enjoy and easily use.
|
4
|
+
|
5
|
+
== note on releases
|
6
|
+
|
7
|
+
Releases are tagged on github and also released as gems on github and rubyforge. Master is pushed to whenever I add a patch or a new feature. To build from master, you can clone the code, generate the updated gemspec, build the gem and install.
|
8
|
+
|
9
|
+
* rake gemspec
|
10
|
+
* gem build httparty.gemspec
|
11
|
+
* gem install the gem that was built
|
12
|
+
|
13
|
+
== note on patches/pull requests
|
14
|
+
|
15
|
+
* Fork the project.
|
16
|
+
* Make your feature addition or bug fix.
|
17
|
+
* Add tests for it. This is important so I don't break it in a future version unintentionally.
|
18
|
+
* Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself in another branch so I can ignore when I pull)
|
19
|
+
* Send me a pull request. Bonus points for topic branches.
|
20
|
+
|
21
|
+
== usage
|
22
|
+
|
23
|
+
gem 'crack'
|
24
|
+
require 'crack' # for xml and json
|
25
|
+
require 'crack/json' # for just json
|
26
|
+
require 'crack/xml' # for just xml
|
27
|
+
|
28
|
+
== examples
|
29
|
+
|
30
|
+
Crack::XML.parse("<tag>This is the contents</tag>")
|
31
|
+
# => {'tag' => 'This is the contents'}
|
32
|
+
|
33
|
+
Crack::JSON.parse('{"tag":"This is the contents"}')
|
34
|
+
# => {'tag' => 'This is the contents'}
|
35
|
+
|
36
|
+
== Copyright
|
37
|
+
|
38
|
+
Copyright (c) 2009 John Nunemaker. See LICENSE for details.
|
39
|
+
|
40
|
+
== Docs
|
41
|
+
|
42
|
+
http://rdoc.info/projects/jnunemaker/crack
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "crack"
|
8
|
+
gem.summary = %Q{Really simple JSON and XML parsing, ripped from Merb and Rails.}
|
9
|
+
gem.email = "nunemaker@gmail.com"
|
10
|
+
gem.homepage = "http://github.com/jnunemaker/crack"
|
11
|
+
gem.authors = ["John Nunemaker"]
|
12
|
+
gem.rubyforge_project = 'crack'
|
13
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
14
|
+
end
|
15
|
+
rescue LoadError
|
16
|
+
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
17
|
+
end
|
18
|
+
|
19
|
+
require 'rake/rdoctask'
|
20
|
+
Rake::RDocTask.new do |rdoc|
|
21
|
+
rdoc.rdoc_dir = 'rdoc'
|
22
|
+
rdoc.title = 'crack'
|
23
|
+
rdoc.options << '--line-numbers' << '--inline-source'
|
24
|
+
rdoc.rdoc_files.include('README*')
|
25
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/*_test.rb'
|
32
|
+
test.verbose = false
|
33
|
+
end
|
34
|
+
|
35
|
+
begin
|
36
|
+
require 'rcov/rcovtask'
|
37
|
+
Rcov::RcovTask.new do |test|
|
38
|
+
test.libs << 'test'
|
39
|
+
test.pattern = 'test/**/*_test.rb'
|
40
|
+
test.verbose = true
|
41
|
+
end
|
42
|
+
rescue LoadError
|
43
|
+
task :rcov do
|
44
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
task :default => :test
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = %q{crack}
|
5
|
+
s.version = "0.1.4"
|
6
|
+
|
7
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
+
s.authors = ["John Nunemaker"]
|
9
|
+
s.date = %q{2009-07-19}
|
10
|
+
s.email = %q{nunemaker@gmail.com}
|
11
|
+
s.extra_rdoc_files = [
|
12
|
+
"LICENSE",
|
13
|
+
"README.rdoc"
|
14
|
+
]
|
15
|
+
s.files = [
|
16
|
+
".gitignore",
|
17
|
+
"History",
|
18
|
+
"LICENSE",
|
19
|
+
"README.rdoc",
|
20
|
+
"Rakefile",
|
21
|
+
"VERSION.yml",
|
22
|
+
"crack.gemspec",
|
23
|
+
"lib/crack.rb",
|
24
|
+
"lib/crack/core_extensions.rb",
|
25
|
+
"lib/crack/json.rb",
|
26
|
+
"lib/crack/xml.rb",
|
27
|
+
"test/crack_test.rb",
|
28
|
+
"test/data/twittersearch-firefox.json",
|
29
|
+
"test/data/twittersearch-ie.json",
|
30
|
+
"test/hash_test.rb",
|
31
|
+
"test/json_test.rb",
|
32
|
+
"test/string_test.rb",
|
33
|
+
"test/test_helper.rb",
|
34
|
+
"test/xml_test.rb"
|
35
|
+
]
|
36
|
+
s.has_rdoc = true
|
37
|
+
s.homepage = %q{http://github.com/jnunemaker/crack}
|
38
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
39
|
+
s.require_paths = ["lib"]
|
40
|
+
s.rubyforge_project = %q{crack}
|
41
|
+
s.rubygems_version = %q{1.3.1}
|
42
|
+
s.summary = %q{Really simple JSON and XML parsing, ripped from Merb and Rails.}
|
43
|
+
s.test_files = [
|
44
|
+
"test/crack_test.rb",
|
45
|
+
"test/hash_test.rb",
|
46
|
+
"test/json_test.rb",
|
47
|
+
"test/string_test.rb",
|
48
|
+
"test/test_helper.rb",
|
49
|
+
"test/xml_test.rb"
|
50
|
+
]
|
51
|
+
|
52
|
+
if s.respond_to? :specification_version then
|
53
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
54
|
+
s.specification_version = 2
|
55
|
+
|
56
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
57
|
+
else
|
58
|
+
end
|
59
|
+
else
|
60
|
+
end
|
61
|
+
end
|