garb 0.9.1 → 0.9.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +3 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +95 -0
- data/Gemfile +15 -0
- data/README.md +47 -25
- data/Rakefile +8 -34
- data/garb.gemspec +22 -0
- data/lib/garb.rb +71 -48
- data/lib/garb/attributes.rb +35 -0
- data/lib/garb/core_ext/array.rb +13 -0
- data/lib/garb/core_ext/string.rb +48 -0
- data/lib/garb/core_ext/symbol.rb +59 -0
- data/lib/garb/destination.rb +5 -6
- data/lib/garb/errors.rb +20 -0
- data/lib/garb/filter_parameters.rb +20 -29
- data/lib/garb/management/account.rb +10 -16
- data/lib/garb/management/feed.rb +4 -5
- data/lib/garb/management/goal.rb +10 -15
- data/lib/garb/management/profile.rb +11 -20
- data/lib/garb/management/segment.rb +9 -15
- data/lib/garb/management/web_property.rb +11 -16
- data/lib/garb/model.rb +37 -13
- data/lib/garb/path_attribute.rb +7 -0
- data/lib/garb/report_parameter.rb +5 -5
- data/lib/garb/report_response.rb +29 -28
- data/lib/garb/reports/bounces.rb +1 -1
- data/lib/garb/reports/exits.rb +1 -1
- data/lib/garb/reports/pageviews.rb +1 -1
- data/lib/garb/reports/unique_pageviews.rb +1 -1
- data/lib/garb/reports/visits.rb +1 -1
- data/lib/garb/request/authentication.rb +54 -0
- data/lib/garb/request/data.rb +98 -0
- data/lib/garb/result_set.rb +23 -9
- data/lib/garb/session.rb +3 -3
- data/lib/garb/step.rb +4 -4
- data/lib/garb/support.rb +6 -0
- data/lib/garb/version.rb +3 -3
- data/test/fixtures/account_management.json +1 -0
- data/test/fixtures/ga_profile_management.json +1 -0
- data/test/fixtures/ga_segment_management.json +1 -0
- data/test/fixtures/ga_webproperty_management.json +1 -0
- data/test/fixtures/goal_management.json +1 -0
- data/test/fixtures/profile_feed.json +1 -0
- data/test/fixtures/report_feed.json +75 -0
- data/test/test_helper.rb +6 -10
- data/test/unit/garb/filter_parameters_test.rb +15 -46
- data/test/unit/garb/management/account_test.rb +8 -16
- data/test/unit/garb/management/feed_test.rb +5 -10
- data/test/unit/garb/management/goal_test.rb +7 -21
- data/test/unit/garb/management/profile_test.rb +11 -26
- data/test/unit/garb/management/segment_test.rb +7 -6
- data/test/unit/garb/management/web_property_test.rb +10 -12
- data/test/unit/garb/model_test.rb +70 -32
- data/test/unit/garb/report_parameter_test.rb +6 -6
- data/test/unit/garb/report_response_test.rb +23 -13
- data/test/unit/garb/request/authentication_test.rb +152 -0
- data/test/unit/garb/request/data_test.rb +157 -0
- data/test/unit/garb/session_test.rb +13 -13
- data/test/unit/garb_test.rb +4 -11
- data/test/unit/symbol_operator_test.rb +3 -3
- metadata +90 -292
- data/lib/garb/account.rb +0 -22
- data/lib/garb/account_feed_request.rb +0 -25
- data/lib/garb/authentication_request.rb +0 -53
- data/lib/garb/data_request.rb +0 -42
- data/lib/garb/goal.rb +0 -20
- data/lib/garb/profile.rb +0 -33
- data/lib/garb/report.rb +0 -28
- data/lib/garb/resource.rb +0 -115
- data/lib/support.rb +0 -40
- data/test/unit/garb/account_feed_request_test.rb +0 -42
- data/test/unit/garb/account_test.rb +0 -53
- data/test/unit/garb/authentication_request_test.rb +0 -121
- data/test/unit/garb/coverage/assets/0.3.9/app.js +0 -66
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/blank.gif +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_close.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_loading.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_nav_left.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_nav_right.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_e.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_n.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_ne.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_nw.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_s.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_se.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_sw.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_shadow_w.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_title_left.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_title_main.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_title_over.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancy_title_right.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancybox-x.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancybox-y.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/fancybox.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/jquery.fancybox-1.3.1.css +0 -363
- data/test/unit/garb/coverage/assets/0.3.9/fancybox/jquery.fancybox-1.3.1.pack.js +0 -44
- data/test/unit/garb/coverage/assets/0.3.9/favicon.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/jquery-1.4.2.min.js +0 -155
- data/test/unit/garb/coverage/assets/0.3.9/jquery.dataTables.min.js +0 -152
- data/test/unit/garb/coverage/assets/0.3.9/jquery.timeago.js +0 -141
- data/test/unit/garb/coverage/assets/0.3.9/jquery.url.js +0 -174
- data/test/unit/garb/coverage/assets/0.3.9/loading.gif +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/magnify.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/unit/garb/coverage/assets/0.3.9/smoothness/jquery-ui-1.8.4.custom.css +0 -295
- data/test/unit/garb/coverage/assets/0.3.9/stylesheet.css +0 -341
- data/test/unit/garb/coverage/index.html +0 -100
- data/test/unit/garb/coverage/resultset.yml +0 -5
- data/test/unit/garb/data_request_test.rb +0 -107
- data/test/unit/garb/destination_test.rb +0 -28
- data/test/unit/garb/goal_test.rb +0 -24
- data/test/unit/garb/management/coverage/assets/0.3.9/app.js +0 -66
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/blank.gif +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_close.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_loading.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_nav_left.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_nav_right.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_e.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_n.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_ne.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_nw.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_s.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_se.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_sw.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_shadow_w.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_title_left.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_title_main.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_title_over.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancy_title_right.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancybox-x.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancybox-y.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/fancybox.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/jquery.fancybox-1.3.1.css +0 -363
- data/test/unit/garb/management/coverage/assets/0.3.9/fancybox/jquery.fancybox-1.3.1.pack.js +0 -44
- data/test/unit/garb/management/coverage/assets/0.3.9/favicon.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/jquery-1.4.2.min.js +0 -155
- data/test/unit/garb/management/coverage/assets/0.3.9/jquery.dataTables.min.js +0 -152
- data/test/unit/garb/management/coverage/assets/0.3.9/jquery.timeago.js +0 -141
- data/test/unit/garb/management/coverage/assets/0.3.9/jquery.url.js +0 -174
- data/test/unit/garb/management/coverage/assets/0.3.9/loading.gif +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/magnify.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/test/unit/garb/management/coverage/assets/0.3.9/smoothness/jquery-ui-1.8.4.custom.css +0 -295
- data/test/unit/garb/management/coverage/assets/0.3.9/stylesheet.css +0 -341
- data/test/unit/garb/management/coverage/index.html +0 -100
- data/test/unit/garb/management/coverage/resultset.yml +0 -5
- data/test/unit/garb/profile_test.rb +0 -77
- data/test/unit/garb/report_test.rb +0 -99
- data/test/unit/garb/resource_test.rb +0 -50
- data/test/unit/garb/step_test.rb +0 -15
@@ -1,341 +0,0 @@
|
|
1
|
-
/* -----------------------------------------------------------------------
|
2
|
-
|
3
|
-
|
4
|
-
Blueprint CSS Framework 0.9
|
5
|
-
http://blueprintcss.org
|
6
|
-
|
7
|
-
* Copyright (c) 2007-Present. See LICENSE for more info.
|
8
|
-
* See README for instructions on how to use Blueprint.
|
9
|
-
* For credits and origins, see AUTHORS.
|
10
|
-
* This is a compressed file. See the sources in the 'src' directory.
|
11
|
-
|
12
|
-
----------------------------------------------------------------------- */
|
13
|
-
|
14
|
-
/* reset.css */
|
15
|
-
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {margin:0;padding:0;border:0;font-weight:inherit;font-style:inherit;font-size:100%;font-family:inherit;vertical-align:baseline;}
|
16
|
-
article, aside, dialog, figure, footer, header, hgroup, nav, section {display:block;}
|
17
|
-
body {line-height:1.5;}
|
18
|
-
table {border-collapse:separate;border-spacing:0;}
|
19
|
-
caption, th, td {text-align:left;font-weight:normal;}
|
20
|
-
table, td, th {vertical-align:middle;}
|
21
|
-
blockquote:before, blockquote:after, q:before, q:after {content:"";}
|
22
|
-
blockquote, q {quotes:"" "";}
|
23
|
-
a img {border:none;}
|
24
|
-
|
25
|
-
/* typography.css */
|
26
|
-
html {font-size:100.01%;}
|
27
|
-
body {font-size:82%;color:#222;background:#fff;font-family:"Helvetica Neue", Arial, Helvetica, sans-serif;}
|
28
|
-
h1, h2, h3, h4, h5, h6 {font-weight:normal;color:#111;}
|
29
|
-
h1 {font-size:3em;line-height:1;margin-bottom:0.5em;}
|
30
|
-
h2 {font-size:2em;margin-bottom:0.75em;}
|
31
|
-
h3 {font-size:1.5em;line-height:1;margin-bottom:1em;}
|
32
|
-
h4 {font-size:1.2em;line-height:1.25;margin-bottom:1.25em;}
|
33
|
-
h5 {font-size:1em;font-weight:bold;margin-bottom:1.5em;}
|
34
|
-
h6 {font-size:1em;font-weight:bold;}
|
35
|
-
h1 img, h2 img, h3 img, h4 img, h5 img, h6 img {margin:0;}
|
36
|
-
p {margin:0 0 1.5em;}
|
37
|
-
p img.left {float:left;margin:1.5em 1.5em 1.5em 0;padding:0;}
|
38
|
-
p img.right {float:right;margin:1.5em 0 1.5em 1.5em;}
|
39
|
-
a:focus, a:hover {color:#000;}
|
40
|
-
a {color:#009;text-decoration:underline;}
|
41
|
-
blockquote {margin:1.5em;color:#666;font-style:italic;}
|
42
|
-
strong {font-weight:bold;}
|
43
|
-
em, dfn {font-style:italic;}
|
44
|
-
dfn {font-weight:bold;}
|
45
|
-
sup, sub {line-height:0;}
|
46
|
-
abbr, acronym {border-bottom:1px dotted #666;}
|
47
|
-
address {margin:0 0 1.5em;font-style:italic;}
|
48
|
-
del {color:#666;}
|
49
|
-
pre {margin:1.5em 0;white-space:pre;}
|
50
|
-
pre, code, tt {font:1em 'andale mono', 'lucida console', monospace;line-height:1.5;}
|
51
|
-
li ul, li ol {margin:0;}
|
52
|
-
ul, ol {margin:0 1.5em 1.5em 0;padding-left:3.333em;}
|
53
|
-
ul {list-style-type:disc;}
|
54
|
-
ol {list-style-type:decimal;}
|
55
|
-
dl {margin:0 0 1.5em 0;}
|
56
|
-
dl dt {font-weight:bold;}
|
57
|
-
dd {margin-left:1.5em;}
|
58
|
-
table {margin-bottom:1.4em;width:100%;}
|
59
|
-
th {font-weight:bold;}
|
60
|
-
thead th {background:#c3d9ff;}
|
61
|
-
th, td, caption {padding:4px 10px 4px 5px;}
|
62
|
-
tr.even td {background:#efefef;}
|
63
|
-
tfoot {font-style:italic;}
|
64
|
-
caption {background:#eee;}
|
65
|
-
.small {font-size:.8em;margin-bottom:1.875em;line-height:1.875em;}
|
66
|
-
.large {font-size:1.2em;line-height:2.5em;margin-bottom:1.25em;}
|
67
|
-
.hide {display:none;}
|
68
|
-
.quiet {color:#666;}
|
69
|
-
.loud {color:#000;}
|
70
|
-
.highlight {background:#ff0;}
|
71
|
-
.added {background:#060;color:#fff;}
|
72
|
-
.removed {background:#900;color:#fff;}
|
73
|
-
.first {margin-left:0;padding-left:0;}
|
74
|
-
.last {margin-right:0;padding-right:0;}
|
75
|
-
.top {margin-top:0;padding-top:0;}
|
76
|
-
.bottom {margin-bottom:0;padding-bottom:0;}
|
77
|
-
|
78
|
-
/* forms.css */
|
79
|
-
label {font-weight:bold;}
|
80
|
-
fieldset {padding:1.4em;margin:0 0 1.5em 0;border:1px solid #ccc;}
|
81
|
-
legend {font-weight:bold;font-size:1.2em;}
|
82
|
-
input[type=text], input[type=password], input.text, input.title, textarea, select {background-color:#fff;border:1px solid #bbb;}
|
83
|
-
input[type=text]:focus, input[type=password]:focus, input.text:focus, input.title:focus, textarea:focus, select:focus {border-color:#666;}
|
84
|
-
input[type=text], input[type=password], input.text, input.title, textarea, select {margin:0.5em 0;}
|
85
|
-
input.text, input.title {width:300px;padding:5px;}
|
86
|
-
input.title {font-size:1.5em;}
|
87
|
-
textarea {width:390px;height:250px;padding:5px;}
|
88
|
-
input[type=checkbox], input[type=radio], input.checkbox, input.radio {position:relative;top:.25em;}
|
89
|
-
form.inline {line-height:3;}
|
90
|
-
form.inline p {margin-bottom:0;}
|
91
|
-
.error, .notice, .success {padding:.8em;margin-bottom:1em;border:2px solid #ddd;}
|
92
|
-
.error {background:#FBE3E4;color:#8a1f11;border-color:#FBC2C4;}
|
93
|
-
.notice {background:#FFF6BF;color:#514721;border-color:#FFD324;}
|
94
|
-
.success {background:#E6EFC2;color:#264409;border-color:#C6D880;}
|
95
|
-
.error a {color:#8a1f11;}
|
96
|
-
.notice a {color:#514721;}
|
97
|
-
.success a {color:#264409;}
|
98
|
-
.box {padding:1.5em;margin-bottom:1.5em;background:#E5ECF9;}
|
99
|
-
hr {background:#ddd;color:#ddd;clear:both;float:none;width:100%;height:.1em;margin:0 0 1.45em;border:none;}
|
100
|
-
hr.space {background:#fff;color:#fff;visibility:hidden;}
|
101
|
-
.clearfix:after, .container:after {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}
|
102
|
-
.clearfix, .container {display:block;}
|
103
|
-
.clear {clear:both;}
|
104
|
-
|
105
|
-
#loading {
|
106
|
-
position: fixed;
|
107
|
-
left: 40%;
|
108
|
-
top: 50%;
|
109
|
-
}
|
110
|
-
|
111
|
-
a {
|
112
|
-
color: #600;
|
113
|
-
text-decoration: none;
|
114
|
-
}
|
115
|
-
|
116
|
-
a:hover {
|
117
|
-
color: #900;
|
118
|
-
text-decoration: underline;
|
119
|
-
}
|
120
|
-
|
121
|
-
body {
|
122
|
-
font-family: "Lucida Grande", Helvetica, "Helvetica Neue", Arial, sans-serif;
|
123
|
-
padding: 12px;
|
124
|
-
background-color: #333;
|
125
|
-
}
|
126
|
-
|
127
|
-
h1, h2, h3, h4 {
|
128
|
-
color: #1C2324;
|
129
|
-
margin: 0;
|
130
|
-
padding: 0;
|
131
|
-
margin-bottom: 12px;
|
132
|
-
}
|
133
|
-
|
134
|
-
table {
|
135
|
-
width: 100%;
|
136
|
-
}
|
137
|
-
|
138
|
-
#content {
|
139
|
-
clear: left;
|
140
|
-
background-color: white;
|
141
|
-
border: 2px solid #ddd;
|
142
|
-
border-top: 8px solid #ddd;
|
143
|
-
padding: 18px;
|
144
|
-
-webkit-border-bottom-left-radius: 5px;
|
145
|
-
-webkit-border-bottom-right-radius: 5px;
|
146
|
-
-webkit-border-top-right-radius: 5px;
|
147
|
-
-moz-border-radius-bottomleft: 5px;
|
148
|
-
-moz-border-radius-bottomright: 5px;
|
149
|
-
-moz-border-radius-topright: 5px;
|
150
|
-
border-bottom-left-radius: 5px;
|
151
|
-
border-bottom-right-radius: 5px;
|
152
|
-
border-top-right-radius: 5px;
|
153
|
-
}
|
154
|
-
|
155
|
-
.dataTables_filter, .dataTables_info {
|
156
|
-
padding: 2px 6px;
|
157
|
-
}
|
158
|
-
|
159
|
-
abbr.timeago {
|
160
|
-
text-decoration: none;
|
161
|
-
border: none;
|
162
|
-
font-weight: bold;
|
163
|
-
}
|
164
|
-
|
165
|
-
.timestamp {
|
166
|
-
float: right;
|
167
|
-
color: #ddd;
|
168
|
-
}
|
169
|
-
|
170
|
-
.group_tabs {
|
171
|
-
list-style: none;
|
172
|
-
float: left;
|
173
|
-
margin: 0;
|
174
|
-
padding: 0;
|
175
|
-
}
|
176
|
-
.group_tabs li {
|
177
|
-
display: inline;
|
178
|
-
float: left;
|
179
|
-
}
|
180
|
-
|
181
|
-
.group_tabs li a {
|
182
|
-
font-family: Helvetica, Arial, sans-serif;
|
183
|
-
display: block;
|
184
|
-
float: left;
|
185
|
-
text-decoration: none;
|
186
|
-
padding: 4px 8px;
|
187
|
-
background-color: #aaa;
|
188
|
-
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#DDD), to(#aaa));
|
189
|
-
background: -moz-linear-gradient(#DDD, #aaa);
|
190
|
-
background: linear-gradient(#DDD, #aaa);
|
191
|
-
text-shadow: #e5e5e5 1px 1px 0px;
|
192
|
-
border-bottom: none;
|
193
|
-
color: #333;
|
194
|
-
font-weight: bold;
|
195
|
-
margin-right: 8px;
|
196
|
-
border-top: 1px solid #efefef;
|
197
|
-
-webkit-border-top-left-radius: 2px;
|
198
|
-
-webkit-border-top-right-radius: 2px;
|
199
|
-
-moz-border-radius-topleft: 2px;
|
200
|
-
-moz-border-radius-topright: 2px;
|
201
|
-
border-top-left-radius: 2px;
|
202
|
-
border-top-right-radius: 2px;
|
203
|
-
}
|
204
|
-
|
205
|
-
.group_tabs li a:hover {
|
206
|
-
background-color: #ccc;
|
207
|
-
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#eee), to(#aaa));
|
208
|
-
background: -moz-linear-gradient(#eee, #aaa);
|
209
|
-
background: linear-gradient(#eee, #aaa);
|
210
|
-
}
|
211
|
-
|
212
|
-
.group_tabs li a:active {
|
213
|
-
padding-top: 5px;
|
214
|
-
padding-bottom: 3px;
|
215
|
-
}
|
216
|
-
|
217
|
-
.group_tabs li.active a {
|
218
|
-
color: black;
|
219
|
-
text-shadow: #fff 1px 1px 0px;
|
220
|
-
background-color: #ddd;
|
221
|
-
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#fff), to(#ddd));
|
222
|
-
background: -moz-linear-gradient(#fff, #ddd);
|
223
|
-
background: linear-gradient(#fff, #ddd);
|
224
|
-
}
|
225
|
-
|
226
|
-
.file_list {
|
227
|
-
margin-bottom: 18px;
|
228
|
-
}
|
229
|
-
|
230
|
-
a.src_link {
|
231
|
-
background: url('./magnify.png') no-repeat left 50%;
|
232
|
-
padding-left: 18px;
|
233
|
-
}
|
234
|
-
|
235
|
-
tr, td {
|
236
|
-
margin: 0;
|
237
|
-
padding: 0;
|
238
|
-
}
|
239
|
-
|
240
|
-
th {
|
241
|
-
white-space: nowrap;
|
242
|
-
}
|
243
|
-
|
244
|
-
th.ui-state-default {
|
245
|
-
cursor: pointer;
|
246
|
-
}
|
247
|
-
|
248
|
-
th span.ui-icon {
|
249
|
-
float: left;
|
250
|
-
}
|
251
|
-
|
252
|
-
td {
|
253
|
-
padding: 4px 8px;
|
254
|
-
}
|
255
|
-
|
256
|
-
.source_table td {
|
257
|
-
padding: 2px 8px;
|
258
|
-
}
|
259
|
-
|
260
|
-
|
261
|
-
.source_table {
|
262
|
-
overflow: auto;
|
263
|
-
}
|
264
|
-
|
265
|
-
.source_table table {
|
266
|
-
width: 95%;
|
267
|
-
}
|
268
|
-
|
269
|
-
.source_table thead td {
|
270
|
-
background-color: white;
|
271
|
-
}
|
272
|
-
|
273
|
-
.source_table thead th {
|
274
|
-
background-color: white;
|
275
|
-
}
|
276
|
-
|
277
|
-
.source_table td.hits {
|
278
|
-
text-align: right;
|
279
|
-
}
|
280
|
-
|
281
|
-
.source_table h3, .source_table h4 {
|
282
|
-
padding: 0;
|
283
|
-
margin: 0;
|
284
|
-
margin-bottom: 4px;
|
285
|
-
}
|
286
|
-
|
287
|
-
td pre {
|
288
|
-
margin: 0;
|
289
|
-
padding: 0;
|
290
|
-
color: #222;
|
291
|
-
font-family: "Monaco", "Inconsolata", "Consolas", monospace;
|
292
|
-
}
|
293
|
-
|
294
|
-
.line_number {
|
295
|
-
width: 20px;
|
296
|
-
font-weight: bold;
|
297
|
-
}
|
298
|
-
|
299
|
-
#footer {
|
300
|
-
color: #ddd;
|
301
|
-
font-size: 12px;
|
302
|
-
font-weight: bold;
|
303
|
-
margin-top: 12px;
|
304
|
-
text-align: right;
|
305
|
-
}
|
306
|
-
#footer a {
|
307
|
-
color: #eee;
|
308
|
-
text-decoration: underline;
|
309
|
-
}
|
310
|
-
#footer a:hover {
|
311
|
-
color: #fff;
|
312
|
-
text-decoration: none;
|
313
|
-
}
|
314
|
-
|
315
|
-
.green {
|
316
|
-
color: #090;
|
317
|
-
}
|
318
|
-
.red {
|
319
|
-
color: #900;
|
320
|
-
}
|
321
|
-
.yellow {
|
322
|
-
color: #da0;
|
323
|
-
}
|
324
|
-
.hit.odd td {
|
325
|
-
background-color: #bbdbb6;
|
326
|
-
}
|
327
|
-
.hit.even td {
|
328
|
-
background-color: #cde1c9;
|
329
|
-
}
|
330
|
-
.miss.odd td {
|
331
|
-
background-color: #f19683;
|
332
|
-
}
|
333
|
-
.miss.even td {
|
334
|
-
background-color: #efb5a8;
|
335
|
-
}
|
336
|
-
.never.odd td {
|
337
|
-
background-color: #efefef;
|
338
|
-
}
|
339
|
-
.never.even td {
|
340
|
-
background-color: #f4f4f4;
|
341
|
-
}
|
@@ -1,100 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
-
<head>
|
4
|
-
<title>Code coverage for Garb</title>
|
5
|
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
6
|
-
<script src='./assets/0.3.9/jquery-1.4.2.min.js' type='text/javascript'></script>
|
7
|
-
<script src='./assets/0.3.9/jquery.dataTables.min.js' type='text/javascript'></script>
|
8
|
-
<script src='./assets/0.3.9/fancybox/jquery.fancybox-1.3.1.pack.js' type='text/javascript'></script>
|
9
|
-
<script src='./assets/0.3.9/jquery.timeago.js' type='text/javascript'></script>
|
10
|
-
<script src='./assets/0.3.9/jquery.url.js' type='text/javascript'></script>
|
11
|
-
<script src='./assets/0.3.9/app.js' type='text/javascript'></script>
|
12
|
-
<link href='./assets/0.3.9/stylesheet.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
|
13
|
-
<link href='./assets/0.3.9/fancybox/jquery.fancybox-1.3.1.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
|
14
|
-
<link href='./assets/0.3.9/smoothness/jquery-ui-1.8.4.custom.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
|
15
|
-
<link rel="shortcut icon" type="image/png" href="./assets/0.3.9/favicon.png" />
|
16
|
-
<link rel="icon" type="image/png" href="./assets/0.3.9/favicon.png" />
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<div id="loading">
|
21
|
-
<img src="./assets/0.3.9/loading.gif" alt="loading"/>
|
22
|
-
</div>
|
23
|
-
<div id="wrapper" style="display:none;">
|
24
|
-
<div class="timestamp">Generated <abbr class="timeago" title="2011-01-08T20:21:01-05:00">2011-01-08T20:21:01-05:00</abbr></div>
|
25
|
-
<ul class="group_tabs"></ul>
|
26
|
-
|
27
|
-
<div id="content">
|
28
|
-
<div class="file_list_container" id="AllFiles">
|
29
|
-
<h2>
|
30
|
-
All Files
|
31
|
-
(<span class="green">100.0%</span>)
|
32
|
-
</h2>
|
33
|
-
<a name="AllFiles"></a>
|
34
|
-
<div>
|
35
|
-
<b>0</b> files in total.
|
36
|
-
<b>0.0</b> relevant lines.
|
37
|
-
<span class="green"><b>0.0</b> lines covered</span> and
|
38
|
-
<span class="red"><b>0.0</b> lines missed </span>
|
39
|
-
</div>
|
40
|
-
<table class="file_list">
|
41
|
-
<thead>
|
42
|
-
<tr>
|
43
|
-
<th>File</th>
|
44
|
-
<th>% covered</th>
|
45
|
-
<th>Lines</th>
|
46
|
-
<th>Relevant Lines</th>
|
47
|
-
<th>Lines covered</th>
|
48
|
-
<th>Lines missed</th>
|
49
|
-
</tr>
|
50
|
-
</thead>
|
51
|
-
<tbody>
|
52
|
-
|
53
|
-
</tbody>
|
54
|
-
</table>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
|
58
|
-
<div class="file_list_container" id="Libraries">
|
59
|
-
<h2>
|
60
|
-
Libraries
|
61
|
-
(<span class="green">100.0%</span>)
|
62
|
-
</h2>
|
63
|
-
<a name="Libraries"></a>
|
64
|
-
<div>
|
65
|
-
<b>0</b> files in total.
|
66
|
-
<b>0.0</b> relevant lines.
|
67
|
-
<span class="green"><b>0.0</b> lines covered</span> and
|
68
|
-
<span class="red"><b>0.0</b> lines missed </span>
|
69
|
-
</div>
|
70
|
-
<table class="file_list">
|
71
|
-
<thead>
|
72
|
-
<tr>
|
73
|
-
<th>File</th>
|
74
|
-
<th>% covered</th>
|
75
|
-
<th>Lines</th>
|
76
|
-
<th>Relevant Lines</th>
|
77
|
-
<th>Lines covered</th>
|
78
|
-
<th>Lines missed</th>
|
79
|
-
</tr>
|
80
|
-
</thead>
|
81
|
-
<tbody>
|
82
|
-
|
83
|
-
</tbody>
|
84
|
-
</table>
|
85
|
-
</div>
|
86
|
-
|
87
|
-
</div>
|
88
|
-
|
89
|
-
<div id="footer">
|
90
|
-
Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.3.7
|
91
|
-
and simplecov-html v0.3.9<br/>
|
92
|
-
using Unit Tests
|
93
|
-
</div>
|
94
|
-
|
95
|
-
<div class="source_files">
|
96
|
-
|
97
|
-
</div>
|
98
|
-
</div>
|
99
|
-
</body>
|
100
|
-
</html>
|
@@ -1,107 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Garb
|
4
|
-
class DataRequestTest < MiniTest::Unit::TestCase
|
5
|
-
|
6
|
-
context "An instance of the DataRequest class" do
|
7
|
-
setup do
|
8
|
-
@session = Session.new
|
9
|
-
@session.auth_token = 'abcdefg123456'
|
10
|
-
end
|
11
|
-
|
12
|
-
should "be able to build the query string from parameters" do
|
13
|
-
parameters = {'ids' => '12345', 'metrics' => 'country'}
|
14
|
-
data_request = DataRequest.new(@session, "", parameters)
|
15
|
-
|
16
|
-
query_string = data_request.query_string
|
17
|
-
|
18
|
-
assert_match(/^\?/, query_string)
|
19
|
-
|
20
|
-
query_string.sub!(/^\?/, '')
|
21
|
-
|
22
|
-
assert_equal ["ids=12345", "metrics=country"], query_string.split('&').sort
|
23
|
-
end
|
24
|
-
|
25
|
-
should "return an empty query string if parameters are empty" do
|
26
|
-
data_request = DataRequest.new(@session, "")
|
27
|
-
assert_equal "", data_request.query_string
|
28
|
-
end
|
29
|
-
|
30
|
-
should "be able to build a uri" do
|
31
|
-
url = 'http://example.com'
|
32
|
-
assert_equal URI.parse(url), DataRequest.new(@session, url).uri
|
33
|
-
end
|
34
|
-
|
35
|
-
should "be able to send a request for a single user" do
|
36
|
-
@session.stubs(:single_user?).returns(true)
|
37
|
-
response = mock('Net::HTTPOK') do |m|
|
38
|
-
m.expects(:kind_of?).with(Net::HTTPSuccess).returns(true)
|
39
|
-
end
|
40
|
-
|
41
|
-
data_request = DataRequest.new(@session, 'https://example.com/data', 'key' => 'value')
|
42
|
-
data_request.stubs(:single_user_request).returns(response)
|
43
|
-
data_request.send_request
|
44
|
-
|
45
|
-
assert_received(data_request, :single_user_request)
|
46
|
-
end
|
47
|
-
|
48
|
-
should "be able to send a request for an oauth user" do
|
49
|
-
@session.stubs(:single_user?).returns(false)
|
50
|
-
@session.stubs(:oauth_user?).returns(true)
|
51
|
-
response = mock('Net::HTTPOK') do |m|
|
52
|
-
m.expects(:kind_of?).with(Net::HTTPSuccess).returns(true)
|
53
|
-
end
|
54
|
-
|
55
|
-
data_request = DataRequest.new(@session, 'https://example.com/data', 'key' => 'value')
|
56
|
-
data_request.stubs(:oauth_user_request).returns(response)
|
57
|
-
data_request.send_request
|
58
|
-
|
59
|
-
assert_received(data_request, :oauth_user_request)
|
60
|
-
end
|
61
|
-
|
62
|
-
should "raise if the request is unauthorized" do
|
63
|
-
@session.stubs(:single_user?).returns(false)
|
64
|
-
@session.stubs(:oauth_user?).returns(true)
|
65
|
-
response = mock('Net::HTTPUnauthorized', :body => 'Error')
|
66
|
-
|
67
|
-
data_request = DataRequest.new(@session, 'https://example.com/data', 'key' => 'value')
|
68
|
-
data_request.stubs(:oauth_user_request).returns(response)
|
69
|
-
|
70
|
-
assert_raises(Garb::DataRequest::ClientError) do
|
71
|
-
data_request.send_request
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
should "be able to request via the ouath access token" do
|
76
|
-
access_token = stub(:get => "responseobject")
|
77
|
-
@session.stubs(:access_token).returns(access_token)
|
78
|
-
|
79
|
-
data_request = DataRequest.new(@session, 'https://example.com/data', 'key' => 'value')
|
80
|
-
assert_equal 'responseobject', data_request.oauth_user_request
|
81
|
-
|
82
|
-
assert_received(@session, :access_token)
|
83
|
-
assert_received(access_token, :get) {|e| e.with('https://example.com/data?key=value', {'GData-Version' => '2'})}
|
84
|
-
end
|
85
|
-
|
86
|
-
should "be able to request via http with an auth token" do
|
87
|
-
@session.expects(:auth_token).with().returns('toke')
|
88
|
-
response = mock
|
89
|
-
|
90
|
-
http = mock do |m|
|
91
|
-
m.expects(:use_ssl=).with(true)
|
92
|
-
m.expects(:verify_mode=).with(OpenSSL::SSL::VERIFY_NONE)
|
93
|
-
m.expects(:get).with('/data?key=value', {
|
94
|
-
'Authorization' => 'GoogleLogin auth=toke',
|
95
|
-
'GData-Version' => '2'
|
96
|
-
}).returns(response)
|
97
|
-
end
|
98
|
-
|
99
|
-
Net::HTTP.expects(:new).with('example.com', 443).returns(http)
|
100
|
-
|
101
|
-
data_request = DataRequest.new(@session, 'https://example.com/data', 'key' => 'value')
|
102
|
-
assert_equal response, data_request.single_user_request
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
end
|
107
|
-
end
|