wbench 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/javascripts/wbench.js +1 -25
- data/lib/wbench/version.rb +1 -1
- data/spec/support/test_sites.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0daedaca307d354e16455aa297775bc6b4751e1c
|
4
|
+
data.tar.gz: fa1c67ae55d85a398dd963976f9e4b582eeeb5d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11d736b222acbf4b2aad34f595fea4081ec571b53d3e208b71b3d5b6b3a8d28fd9d18a68e94370f9dfbbb7acd7e6882528b329e86ee91a6008819d5788b9887a
|
7
|
+
data.tar.gz: 20713b8ad500dc16b07d8ae832a66945558b81f350135d1e4dc3dce1d8184efe19a2dabbed8c8799560aeb8b4bdb35198dde7db2d8cd32cb722d7b2d0ba78cbb
|
data/lib/javascripts/wbench.js
CHANGED
@@ -5,32 +5,8 @@ window.WBench = {
|
|
5
5
|
return this.stringify(this.parseURLs(urls));
|
6
6
|
},
|
7
7
|
|
8
|
-
/*
|
9
|
-
* Originally from: http://blogs.sitepointstatic.com/examples/tech/json-serialization/json-serialization.js
|
10
|
-
* Modified slightly by Mario Visic
|
11
|
-
*/
|
12
8
|
stringify: function (obj) {
|
13
|
-
|
14
|
-
if (t != "object" || obj === null) {
|
15
|
-
/* simple data type */
|
16
|
-
if (t == "string") obj = '"'+obj+'"';
|
17
|
-
return String(obj);
|
18
|
-
}
|
19
|
-
else {
|
20
|
-
/* recurse array or object */
|
21
|
-
var n, v, json = [], arr = (obj && obj.constructor == Array);
|
22
|
-
|
23
|
-
for (n in obj) {
|
24
|
-
v = obj[n]; t = typeof(v);
|
25
|
-
|
26
|
-
if (t == "string") v = '"'+v+'"';
|
27
|
-
else if (t == "object" && v !== null) v = JSON.stringify(v);
|
28
|
-
|
29
|
-
json.push((arr ? "" : '"' + n + '":') + String(v));
|
30
|
-
}
|
31
|
-
|
32
|
-
return (arr ? "[" : "{") + String(json) + (arr ? "]" : "}");
|
33
|
-
}
|
9
|
+
return JSON.stringify(obj);
|
34
10
|
},
|
35
11
|
|
36
12
|
parseURLs: function(urls) {
|
data/lib/wbench/version.rb
CHANGED
data/spec/support/test_sites.rb
CHANGED
@@ -9,6 +9,7 @@ def sites
|
|
9
9
|
'http://au.yahoo.com/',
|
10
10
|
'http://pegast.ru/',
|
11
11
|
'http://www.aevy.com',
|
12
|
-
'http://cdn01.pegast.su/get/ef/b7/bb/7034fc5327b450373c9f48b2a51377b39aac72b0b45c97e5a74b1129a4/Бухта Халонг — объект всемирного наследия ЮНЕСКО во Вьетнаме в провинции Куангнинь.jpg'
|
12
|
+
'http://cdn01.pegast.su/get/ef/b7/bb/7034fc5327b450373c9f48b2a51377b39aac72b0b45c97e5a74b1129a4/Бухта Халонг — объект всемирного наследия ЮНЕСКО во Вьетнаме в провинции Куангнинь.jpg',
|
13
|
+
'http://housetrip.com'
|
13
14
|
]
|
14
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wbench
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Visic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-03-
|
11
|
+
date: 2013-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|