encoding_with_bom 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +32 -0
- data/lib/encoding_with_bom/string_ext.rb +58 -0
- data/lib/encoding_with_bom/version.rb +3 -0
- data/lib/encoding_with_bom.rb +4 -0
- data/lib/tasks/encoding_with_bom_tasks.rake +4 -0
- data/test/dummy/README.rdoc +28 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/javascripts/application.js +13 -0
- data/test/dummy/app/assets/stylesheets/application.css +15 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +23 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +78 -0
- data/test/dummy/config/environments/test.rb +39 -0
- data/test/dummy/config/initializers/assets.rb +8 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +23 -0
- data/test/dummy/config/routes.rb +56 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +0 -0
- data/test/dummy/log/test.log +285 -0
- data/test/dummy/public/404.html +67 -0
- data/test/dummy/public/422.html +67 -0
- data/test/dummy/public/500.html +66 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/spec/rails_helper.rb +50 -0
- data/test/dummy/spec/spec_helper.rb +85 -0
- data/test/encoding_with_bom_test.rb +18 -0
- data/test/test_helper.rb +15 -0
- metadata +173 -0
File without changes
|
File without changes
|
@@ -0,0 +1,285 @@
|
|
1
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
2
|
+
-------------------------------
|
3
|
+
EncodingWithBomTest: test_truth
|
4
|
+
-------------------------------
|
5
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
6
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
7
|
+
-----------------------------------------
|
8
|
+
EncodingWithBomTest: test_Equals_encoding
|
9
|
+
-----------------------------------------
|
10
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
11
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
12
|
+
-------------------------------
|
13
|
+
EncodingWithBomTest: test_truth
|
14
|
+
-------------------------------
|
15
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
16
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
17
|
+
-----------------------------------------
|
18
|
+
EncodingWithBomTest: test_Equals_encoding
|
19
|
+
-----------------------------------------
|
20
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
21
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
22
|
+
-------------------------------
|
23
|
+
EncodingWithBomTest: test_truth
|
24
|
+
-------------------------------
|
25
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
26
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
27
|
+
-----------------------------------------
|
28
|
+
EncodingWithBomTest: test_Equals_encoding
|
29
|
+
-----------------------------------------
|
30
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
31
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
32
|
+
-------------------------------
|
33
|
+
EncodingWithBomTest: test_truth
|
34
|
+
-------------------------------
|
35
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
36
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
37
|
+
-----------------------------------------
|
38
|
+
EncodingWithBomTest: test_Equals_encoding
|
39
|
+
-----------------------------------------
|
40
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
41
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
42
|
+
-------------------------------
|
43
|
+
EncodingWithBomTest: test_truth
|
44
|
+
-------------------------------
|
45
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
46
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
47
|
+
-----------------------------------------
|
48
|
+
EncodingWithBomTest: test_Equals_encoding
|
49
|
+
-----------------------------------------
|
50
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
51
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
52
|
+
-------------------------------
|
53
|
+
EncodingWithBomTest: test_truth
|
54
|
+
-------------------------------
|
55
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
56
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
57
|
+
-----------------------------------------
|
58
|
+
EncodingWithBomTest: test_Equals_encoding
|
59
|
+
-----------------------------------------
|
60
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
61
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
62
|
+
-------------------------------
|
63
|
+
EncodingWithBomTest: test_truth
|
64
|
+
-------------------------------
|
65
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
66
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
67
|
+
-----------------------------------------
|
68
|
+
EncodingWithBomTest: test_Equals_encoding
|
69
|
+
-----------------------------------------
|
70
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
71
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
72
|
+
-------------------------------
|
73
|
+
EncodingWithBomTest: test_truth
|
74
|
+
-------------------------------
|
75
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
76
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
77
|
+
-----------------------------------------
|
78
|
+
EncodingWithBomTest: test_Equals_encoding
|
79
|
+
-----------------------------------------
|
80
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
81
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
82
|
+
-------------------------------
|
83
|
+
EncodingWithBomTest: test_truth
|
84
|
+
-------------------------------
|
85
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
87
|
+
-----------------------------------------
|
88
|
+
EncodingWithBomTest: test_Equals_encoding
|
89
|
+
-----------------------------------------
|
90
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
91
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
92
|
+
-------------------------------
|
93
|
+
EncodingWithBomTest: test_truth
|
94
|
+
-------------------------------
|
95
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
96
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
97
|
+
-----------------------------------------
|
98
|
+
EncodingWithBomTest: test_Equals_encoding
|
99
|
+
-----------------------------------------
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
102
|
+
-------------------------------
|
103
|
+
EncodingWithBomTest: test_truth
|
104
|
+
-------------------------------
|
105
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
106
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
107
|
+
-----------------------------------------
|
108
|
+
EncodingWithBomTest: test_Equals_encoding
|
109
|
+
-----------------------------------------
|
110
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
111
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
112
|
+
-------------------------------
|
113
|
+
EncodingWithBomTest: test_truth
|
114
|
+
-------------------------------
|
115
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
116
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
117
|
+
-----------------------------------------
|
118
|
+
EncodingWithBomTest: test_Equals_encoding
|
119
|
+
-----------------------------------------
|
120
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
121
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
122
|
+
-------------------------------
|
123
|
+
EncodingWithBomTest: test_truth
|
124
|
+
-------------------------------
|
125
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
126
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
127
|
+
-----------------------------------------
|
128
|
+
EncodingWithBomTest: test_Equals_encoding
|
129
|
+
-----------------------------------------
|
130
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
131
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
132
|
+
-------------------------------
|
133
|
+
EncodingWithBomTest: test_truth
|
134
|
+
-------------------------------
|
135
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
136
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
137
|
+
-----------------------------------------
|
138
|
+
EncodingWithBomTest: test_Equals_encoding
|
139
|
+
-----------------------------------------
|
140
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
141
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
142
|
+
-------------------------------
|
143
|
+
EncodingWithBomTest: test_truth
|
144
|
+
-------------------------------
|
145
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
146
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
147
|
+
-----------------------------------------
|
148
|
+
EncodingWithBomTest: test_Equals_encoding
|
149
|
+
-----------------------------------------
|
150
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
151
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
152
|
+
-------------------------------
|
153
|
+
EncodingWithBomTest: test_truth
|
154
|
+
-------------------------------
|
155
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
156
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
157
|
+
-----------------------------------------
|
158
|
+
EncodingWithBomTest: test_Equals_encoding
|
159
|
+
-----------------------------------------
|
160
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
161
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
162
|
+
-------------------------------
|
163
|
+
EncodingWithBomTest: test_truth
|
164
|
+
-------------------------------
|
165
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
166
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
167
|
+
-----------------------------------------
|
168
|
+
EncodingWithBomTest: test_Equals_encoding
|
169
|
+
-----------------------------------------
|
170
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
171
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
172
|
+
-------------------------------
|
173
|
+
EncodingWithBomTest: test_truth
|
174
|
+
-------------------------------
|
175
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
176
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
177
|
+
-----------------------------------------
|
178
|
+
EncodingWithBomTest: test_Equals_encoding
|
179
|
+
-----------------------------------------
|
180
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
181
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
182
|
+
-------------------------------
|
183
|
+
EncodingWithBomTest: test_truth
|
184
|
+
-------------------------------
|
185
|
+
[1m[35m (0.3ms)[0m rollback transaction
|
186
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
187
|
+
-----------------------------------------
|
188
|
+
EncodingWithBomTest: test_Equals_encoding
|
189
|
+
-----------------------------------------
|
190
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
191
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
192
|
+
-------------------------------
|
193
|
+
EncodingWithBomTest: test_truth
|
194
|
+
-------------------------------
|
195
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
196
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
197
|
+
-----------------------------------------
|
198
|
+
EncodingWithBomTest: test_Equals_encoding
|
199
|
+
-----------------------------------------
|
200
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
201
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
202
|
+
-------------------------------
|
203
|
+
EncodingWithBomTest: test_truth
|
204
|
+
-------------------------------
|
205
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
206
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
207
|
+
-----------------------------------------
|
208
|
+
EncodingWithBomTest: test_Equals_encoding
|
209
|
+
-----------------------------------------
|
210
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
211
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
212
|
+
-------------------------------
|
213
|
+
EncodingWithBomTest: test_truth
|
214
|
+
-------------------------------
|
215
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
216
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
217
|
+
-----------------------------------------
|
218
|
+
EncodingWithBomTest: test_Equals_encoding
|
219
|
+
-----------------------------------------
|
220
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
221
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
222
|
+
-------------------------------
|
223
|
+
EncodingWithBomTest: test_truth
|
224
|
+
-------------------------------
|
225
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
226
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
227
|
+
-----------------------------------------
|
228
|
+
EncodingWithBomTest: test_Equals_encoding
|
229
|
+
-----------------------------------------
|
230
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
231
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
232
|
+
-------------------------------
|
233
|
+
EncodingWithBomTest: test_truth
|
234
|
+
-------------------------------
|
235
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
236
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
237
|
+
-----------------------------------------
|
238
|
+
EncodingWithBomTest: test_Equals_encoding
|
239
|
+
-----------------------------------------
|
240
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
241
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
242
|
+
-------------------------------
|
243
|
+
EncodingWithBomTest: test_truth
|
244
|
+
-------------------------------
|
245
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
246
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
247
|
+
-----------------------------------------
|
248
|
+
EncodingWithBomTest: test_Equals_encoding
|
249
|
+
-----------------------------------------
|
250
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
251
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
252
|
+
-------------------------------
|
253
|
+
EncodingWithBomTest: test_truth
|
254
|
+
-------------------------------
|
255
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
256
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
257
|
+
-----------------------------------------
|
258
|
+
EncodingWithBomTest: test_Equals_encoding
|
259
|
+
-----------------------------------------
|
260
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
261
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
262
|
+
-------------------------------
|
263
|
+
EncodingWithBomTest: test_truth
|
264
|
+
-------------------------------
|
265
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
266
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
267
|
+
-----------------------------------------
|
268
|
+
EncodingWithBomTest: test_Equals_encoding
|
269
|
+
-----------------------------------------
|
270
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
271
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
272
|
+
-------------------------------
|
273
|
+
EncodingWithBomTest: test_truth
|
274
|
+
-------------------------------
|
275
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
276
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
277
|
+
-----------------------------------------
|
278
|
+
EncodingWithBomTest: test_Equals_encoding
|
279
|
+
-----------------------------------------
|
280
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
281
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
282
|
+
-------------------------------
|
283
|
+
EncodingWithBomTest: test_truth
|
284
|
+
-------------------------------
|
285
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
require 'spec_helper'
|
4
|
+
require File.expand_path("../../config/environment", __FILE__)
|
5
|
+
require 'rspec/rails'
|
6
|
+
# Add additional requires below this line. Rails is not loaded until this point!
|
7
|
+
|
8
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
9
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
10
|
+
# run as spec files by default. This means that files in spec/support that end
|
11
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
12
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
13
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
14
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
15
|
+
#
|
16
|
+
# The following line is provided for convenience purposes. It has the downside
|
17
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
18
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
19
|
+
# require only the support files necessary.
|
20
|
+
#
|
21
|
+
# Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
22
|
+
|
23
|
+
# Checks for pending migrations before tests are run.
|
24
|
+
# If you are not using ActiveRecord, you can remove this line.
|
25
|
+
ActiveRecord::Migration.maintain_test_schema!
|
26
|
+
|
27
|
+
RSpec.configure do |config|
|
28
|
+
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
29
|
+
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
30
|
+
|
31
|
+
# If you're not using ActiveRecord, or you'd prefer not to run each of your
|
32
|
+
# examples within a transaction, remove the following line or assign false
|
33
|
+
# instead of true.
|
34
|
+
config.use_transactional_fixtures = true
|
35
|
+
|
36
|
+
# RSpec Rails can automatically mix in different behaviours to your tests
|
37
|
+
# based on their file location, for example enabling you to call `get` and
|
38
|
+
# `post` in specs under `spec/controllers`.
|
39
|
+
#
|
40
|
+
# You can disable this behaviour by removing the line below, and instead
|
41
|
+
# explicitly tag your specs with their type, e.g.:
|
42
|
+
#
|
43
|
+
# RSpec.describe UsersController, :type => :controller do
|
44
|
+
# # ...
|
45
|
+
# end
|
46
|
+
#
|
47
|
+
# The different available types are documented in the features, such as in
|
48
|
+
# https://relishapp.com/rspec/rspec-rails/docs
|
49
|
+
config.infer_spec_type_from_file_location!
|
50
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# The generated `.rspec` file contains `--require spec_helper` which will cause this
|
4
|
+
# file to always be loaded, without a need to explicitly require it in any files.
|
5
|
+
#
|
6
|
+
# Given that it is always loaded, you are encouraged to keep this file as
|
7
|
+
# light-weight as possible. Requiring heavyweight dependencies from this file
|
8
|
+
# will add to the boot time of your test suite on EVERY test run, even for an
|
9
|
+
# individual file that may not need all of that loaded. Instead, consider making
|
10
|
+
# a separate helper file that requires the additional dependencies and performs
|
11
|
+
# the additional setup, and require it from the spec files that actually need it.
|
12
|
+
#
|
13
|
+
# The `.rspec` file also contains a few flags that are not defaults but that
|
14
|
+
# users commonly want.
|
15
|
+
#
|
16
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
17
|
+
RSpec.configure do |config|
|
18
|
+
# rspec-expectations config goes here. You can use an alternate
|
19
|
+
# assertion/expectation library such as wrong or the stdlib/minitest
|
20
|
+
# assertions if you prefer.
|
21
|
+
config.expect_with :rspec do |expectations|
|
22
|
+
# This option will default to `true` in RSpec 4. It makes the `description`
|
23
|
+
# and `failure_message` of custom matchers include text for helper methods
|
24
|
+
# defined using `chain`, e.g.:
|
25
|
+
# be_bigger_than(2).and_smaller_than(4).description
|
26
|
+
# # => "be bigger than 2 and smaller than 4"
|
27
|
+
# ...rather than:
|
28
|
+
# # => "be bigger than 2"
|
29
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
30
|
+
end
|
31
|
+
|
32
|
+
# rspec-mocks config goes here. You can use an alternate test double
|
33
|
+
# library (such as bogus or mocha) by changing the `mock_with` option here.
|
34
|
+
config.mock_with :rspec do |mocks|
|
35
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
36
|
+
# a real object. This is generally recommended, and will default to
|
37
|
+
# `true` in RSpec 4.
|
38
|
+
mocks.verify_partial_doubles = true
|
39
|
+
end
|
40
|
+
|
41
|
+
# The settings below are suggested to provide a good initial experience
|
42
|
+
# with RSpec, but feel free to customize to your heart's content.
|
43
|
+
=begin
|
44
|
+
# These two settings work together to allow you to limit a spec run
|
45
|
+
# to individual examples or groups you care about by tagging them with
|
46
|
+
# `:focus` metadata. When nothing is tagged with `:focus`, all examples
|
47
|
+
# get run.
|
48
|
+
config.filter_run :focus
|
49
|
+
config.run_all_when_everything_filtered = true
|
50
|
+
|
51
|
+
# Limits the available syntax to the non-monkey patched syntax that is recommended.
|
52
|
+
# For more details, see:
|
53
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
54
|
+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
55
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
56
|
+
config.disable_monkey_patching!
|
57
|
+
|
58
|
+
# Many RSpec users commonly either run the entire suite or an individual
|
59
|
+
# file, and it's useful to allow more verbose output when running an
|
60
|
+
# individual spec file.
|
61
|
+
if config.files_to_run.one?
|
62
|
+
# Use the documentation formatter for detailed output,
|
63
|
+
# unless a formatter has already been configured
|
64
|
+
# (e.g. via a command-line flag).
|
65
|
+
config.default_formatter = 'doc'
|
66
|
+
end
|
67
|
+
|
68
|
+
# Print the 10 slowest examples and example groups at the
|
69
|
+
# end of the spec run, to help surface which specs are running
|
70
|
+
# particularly slow.
|
71
|
+
config.profile_examples = 10
|
72
|
+
|
73
|
+
# Run specs in random order to surface order dependencies. If you find an
|
74
|
+
# order dependency and want to debug it, you can fix the order by providing
|
75
|
+
# the seed, which is printed after each run.
|
76
|
+
# --seed 1234
|
77
|
+
config.order = :random
|
78
|
+
|
79
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
80
|
+
# Setting this allows you to use `--seed` to deterministically reproduce
|
81
|
+
# test failures related to randomization by passing the same `--seed` value
|
82
|
+
# as the one that triggered the failure.
|
83
|
+
Kernel.srand config.seed
|
84
|
+
=end
|
85
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'iconv'
|
3
|
+
require 'encoding_with_bom/string_ext'
|
4
|
+
|
5
|
+
class EncodingWithBomTest < ActiveSupport::TestCase
|
6
|
+
test "truth" do
|
7
|
+
assert_kind_of Module, EncodingWithBom
|
8
|
+
end
|
9
|
+
|
10
|
+
test "Equals encoding" do
|
11
|
+
encoding_to = "UTF-16LE"
|
12
|
+
in_str = "FOO"
|
13
|
+
out_str = "FOO"
|
14
|
+
encoding_from = in_str.encoding.to_s
|
15
|
+
|
16
|
+
assert_equal in_str.set_encoding_and_add_bom(encoding_to).encoding.to_s, (Iconv.conv encoding_to, encoding_from, out_str).encoding.to_s
|
17
|
+
end
|
18
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
|
7
|
+
Rails.backtrace_cleaner.remove_silencers!
|
8
|
+
|
9
|
+
# Load support files
|
10
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
11
|
+
|
12
|
+
# Load fixtures from the engine
|
13
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
14
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
15
|
+
end
|