rack-cors 1.1.1 → 2.0.2
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +54 -35
- data/lib/rack/cors/resource.rb +142 -0
- data/lib/rack/cors/resources/cors_misconfiguration_error.rb +14 -0
- data/lib/rack/cors/resources.rb +62 -0
- data/lib/rack/cors/result.rb +63 -0
- data/lib/rack/cors/version.rb +3 -1
- data/lib/rack/cors.rb +101 -354
- metadata +50 -44
- data/.travis.yml +0 -8
- data/Gemfile +0 -6
- data/Rakefile +0 -21
- data/rack-cors.gemspec +0 -27
- data/test/cors/expect.js +0 -1286
- data/test/cors/mocha.css +0 -250
- data/test/cors/mocha.js +0 -5373
- data/test/cors/runner.html +0 -20
- data/test/cors/test.cors.coffee +0 -47
- data/test/cors/test.cors.js +0 -75
- data/test/unit/cors_test.rb +0 -534
- data/test/unit/dsl_test.rb +0 -69
- data/test/unit/insecure.ru +0 -8
- data/test/unit/non_http.ru +0 -8
- data/test/unit/test.ru +0 -63
data/test/cors/mocha.css
DELETED
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
@charset "utf-8";
|
|
2
|
-
|
|
3
|
-
body {
|
|
4
|
-
margin:0;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
#mocha {
|
|
8
|
-
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
9
|
-
margin: 60px 50px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
#mocha ul, #mocha li {
|
|
13
|
-
margin: 0;
|
|
14
|
-
padding: 0;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
#mocha ul {
|
|
18
|
-
list-style: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
#mocha h1, #mocha h2 {
|
|
22
|
-
margin: 0;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
#mocha h1 {
|
|
26
|
-
margin-top: 15px;
|
|
27
|
-
font-size: 1em;
|
|
28
|
-
font-weight: 200;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
#mocha h1 a {
|
|
32
|
-
text-decoration: none;
|
|
33
|
-
color: inherit;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
#mocha h1 a:hover {
|
|
37
|
-
text-decoration: underline;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
#mocha .suite .suite h1 {
|
|
41
|
-
margin-top: 0;
|
|
42
|
-
font-size: .8em;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
#mocha .hidden {
|
|
46
|
-
display: none;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
#mocha h2 {
|
|
50
|
-
font-size: 12px;
|
|
51
|
-
font-weight: normal;
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
#mocha .suite {
|
|
56
|
-
margin-left: 15px;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
#mocha .test {
|
|
60
|
-
margin-left: 15px;
|
|
61
|
-
overflow: hidden;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
#mocha .test.pending:hover h2::after {
|
|
65
|
-
content: '(pending)';
|
|
66
|
-
font-family: arial, sans-serif;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
#mocha .test.pass.medium .duration {
|
|
70
|
-
background: #C09853;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
#mocha .test.pass.slow .duration {
|
|
74
|
-
background: #B94A48;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
#mocha .test.pass::before {
|
|
78
|
-
content: '✓';
|
|
79
|
-
font-size: 12px;
|
|
80
|
-
display: block;
|
|
81
|
-
float: left;
|
|
82
|
-
margin-right: 5px;
|
|
83
|
-
color: #00d6b2;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
#mocha .test.pass .duration {
|
|
87
|
-
font-size: 9px;
|
|
88
|
-
margin-left: 5px;
|
|
89
|
-
padding: 2px 5px;
|
|
90
|
-
color: white;
|
|
91
|
-
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
|
92
|
-
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
|
93
|
-
box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
|
|
94
|
-
-webkit-border-radius: 5px;
|
|
95
|
-
-moz-border-radius: 5px;
|
|
96
|
-
-ms-border-radius: 5px;
|
|
97
|
-
-o-border-radius: 5px;
|
|
98
|
-
border-radius: 5px;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
#mocha .test.pass.fast .duration {
|
|
102
|
-
display: none;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
#mocha .test.pending {
|
|
106
|
-
color: #0b97c4;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
#mocha .test.pending::before {
|
|
110
|
-
content: '◦';
|
|
111
|
-
color: #0b97c4;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
#mocha .test.fail {
|
|
115
|
-
color: #c00;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
#mocha .test.fail pre {
|
|
119
|
-
color: black;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
#mocha .test.fail::before {
|
|
123
|
-
content: '✖';
|
|
124
|
-
font-size: 12px;
|
|
125
|
-
display: block;
|
|
126
|
-
float: left;
|
|
127
|
-
margin-right: 5px;
|
|
128
|
-
color: #c00;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
#mocha .test pre.error {
|
|
132
|
-
color: #c00;
|
|
133
|
-
max-height: 300px;
|
|
134
|
-
overflow: auto;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
#mocha .test pre {
|
|
138
|
-
display: block;
|
|
139
|
-
float: left;
|
|
140
|
-
clear: left;
|
|
141
|
-
font: 12px/1.5 monaco, monospace;
|
|
142
|
-
margin: 5px;
|
|
143
|
-
padding: 15px;
|
|
144
|
-
border: 1px solid #eee;
|
|
145
|
-
border-bottom-color: #ddd;
|
|
146
|
-
-webkit-border-radius: 3px;
|
|
147
|
-
-webkit-box-shadow: 0 1px 3px #eee;
|
|
148
|
-
-moz-border-radius: 3px;
|
|
149
|
-
-moz-box-shadow: 0 1px 3px #eee;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
#mocha .test h2 {
|
|
153
|
-
position: relative;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
#mocha .test a.replay {
|
|
157
|
-
position: absolute;
|
|
158
|
-
top: 3px;
|
|
159
|
-
right: 0;
|
|
160
|
-
text-decoration: none;
|
|
161
|
-
vertical-align: middle;
|
|
162
|
-
display: block;
|
|
163
|
-
width: 15px;
|
|
164
|
-
height: 15px;
|
|
165
|
-
line-height: 15px;
|
|
166
|
-
text-align: center;
|
|
167
|
-
background: #eee;
|
|
168
|
-
font-size: 15px;
|
|
169
|
-
-moz-border-radius: 15px;
|
|
170
|
-
border-radius: 15px;
|
|
171
|
-
-webkit-transition: opacity 200ms;
|
|
172
|
-
-moz-transition: opacity 200ms;
|
|
173
|
-
transition: opacity 200ms;
|
|
174
|
-
opacity: 0.3;
|
|
175
|
-
color: #888;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
#mocha .test:hover a.replay {
|
|
179
|
-
opacity: 1;
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
#mocha-report.pass .test.fail {
|
|
183
|
-
display: none;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
#mocha-report.fail .test.pass {
|
|
187
|
-
display: none;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
#mocha-error {
|
|
191
|
-
color: #c00;
|
|
192
|
-
font-size: 1.5em;
|
|
193
|
-
font-weight: 100;
|
|
194
|
-
letter-spacing: 1px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
#mocha-stats {
|
|
198
|
-
position: fixed;
|
|
199
|
-
top: 15px;
|
|
200
|
-
right: 10px;
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
margin: 0;
|
|
203
|
-
color: #888;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
#mocha-stats .progress {
|
|
207
|
-
float: right;
|
|
208
|
-
padding-top: 0;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
#mocha-stats em {
|
|
212
|
-
color: black;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
#mocha-stats a {
|
|
216
|
-
text-decoration: none;
|
|
217
|
-
color: inherit;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
#mocha-stats a:hover {
|
|
221
|
-
border-bottom: 1px solid #eee;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
#mocha-stats li {
|
|
225
|
-
display: inline-block;
|
|
226
|
-
margin: 0 5px;
|
|
227
|
-
list-style: none;
|
|
228
|
-
padding-top: 11px;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
#mocha-stats canvas {
|
|
232
|
-
width: 40px;
|
|
233
|
-
height: 40px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
#mocha code .comment { color: #ddd }
|
|
237
|
-
#mocha code .init { color: #2F6FAD }
|
|
238
|
-
#mocha code .string { color: #5890AD }
|
|
239
|
-
#mocha code .keyword { color: #8A6343 }
|
|
240
|
-
#mocha code .number { color: #2F6FAD }
|
|
241
|
-
|
|
242
|
-
@media screen and (max-device-width: 480px) {
|
|
243
|
-
#mocha {
|
|
244
|
-
margin: 60px 0px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
#mocha #stats {
|
|
248
|
-
position: absolute;
|
|
249
|
-
}
|
|
250
|
-
}
|