local_pac 0.1.11 → 0.1.13
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/Gemfile +13 -0
- data/README.DEVELOPER.md +18 -0
- data/README.md +9 -1
- data/app/assets/fonts/open-sans/Apache License Version 2.txt +53 -0
- data/app/assets/fonts/open-sans/OpenSans-Bold-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Bold-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-Bold-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Bold-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Italic-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Italic-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-Italic-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Italic-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Light-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Light-webfont.svg +252 -0
- data/app/assets/fonts/open-sans/OpenSans-Light-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Light-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.svg +252 -0
- data/app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Regular-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Regular-webfont.svg +252 -0
- data/app/assets/fonts/open-sans/OpenSans-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Regular-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Semibold-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Semibold-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-Semibold-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-Semibold-webfont.woff +0 -0
- data/app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.eot +0 -0
- data/app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.svg +251 -0
- data/app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.woff +0 -0
- data/app/assets/javascripts/application.js +17 -0
- data/app/assets/javascripts/jquery-min.js +4 -0
- data/app/assets/stylesheets/application.css.scss +139 -0
- data/app/assets/stylesheets/open-sans.css.scss +109 -0
- data/app/controllers/application_controller.rb +90 -0
- data/app/controllers/assets_controller.rb +64 -0
- data/app/controllers/file_serve_controller.rb +22 -0
- data/app/controllers/lookup_controller.rb +34 -0
- data/app/locales/de.yml +2 -0
- data/app/locales/en.yml +31 -0
- data/{features/show_known_pacfiles.feature → app/public/favicon.ico} +0 -0
- data/app/views/application.haml +10 -0
- data/app/views/error.haml +6 -0
- data/app/views/form.haml +11 -0
- data/app/views/lookup.haml +3 -0
- data/app/views/lookup_result.haml +19 -0
- data/bin/local_pac +47 -27
- data/config.ru +24 -3
- data/features/fetch_proxy_pac.feature +1 -1
- data/features/initializer.feature +0 -1
- data/features/{show_config.feature → show_status.feature} +2 -2
- data/features/step_definitions.rb +14 -0
- data/features/support/env.rb +1 -0
- data/files/config.yaml +1 -0
- data/files/example-config.erb +16 -0
- data/lib/local_pac/{logger.rb → access_logger.rb} +1 -1
- data/lib/local_pac/actions/create_directory.rb +2 -2
- data/lib/local_pac/actions/create_file.rb +2 -2
- data/lib/local_pac/actions/create_output.rb +36 -0
- data/lib/local_pac/config.rb +15 -5
- data/lib/local_pac/exceptions.rb +12 -0
- data/lib/local_pac/initializer.rb +10 -1
- data/lib/local_pac/main.rb +39 -2
- data/lib/local_pac/null_access_logger.rb +6 -0
- data/lib/local_pac/proxy_pac/html_data.rb +17 -0
- data/lib/local_pac/proxy_pac/html_div_style.rb +48 -0
- data/lib/local_pac/proxy_pac/html_table_style.rb +57 -0
- data/lib/local_pac/proxy_pac/pac_engine.rb +28 -0
- data/lib/local_pac/proxy_pac/pac_parser.rb +33 -0
- data/lib/local_pac/proxy_pac/pac_result.rb +49 -0
- data/lib/local_pac/proxy_pac/pac_result_html_stylist.rb +34 -0
- data/lib/local_pac/proxy_pac/result.rb +40 -0
- data/lib/local_pac/proxy_pac/result_parser.rb +49 -0
- data/lib/local_pac/router.rb +7 -0
- data/lib/local_pac/server.rb +28 -0
- data/lib/local_pac/spec_helper_file_server.rb +1 -1
- data/lib/local_pac/ui_logger.rb +0 -1
- data/lib/local_pac/version.rb +1 -1
- data/lib/local_pac.rb +15 -4
- data/local_pac.gemspec +10 -0
- data/script/console +14 -0
- data/share/archlinux/PKGBUILD +4 -4
- data/spec/actions/create_directory_spec.rb +1 -1
- data/spec/actions/create_file_spec.rb +0 -2
- data/spec/actions/create_output_spec.rb +46 -0
- data/spec/config_spec.rb +11 -0
- data/spec/features/fetch_proxy_pac_spec.rb +49 -14
- data/spec/features/lookup_proxy_spec.rb +102 -0
- data/spec/initializer_spec.rb +7 -2
- data/spec/proxy_pac/html_div_style_spec.rb +45 -0
- data/spec/proxy_pac/html_table_style_spec.rb +54 -0
- data/spec/proxy_pac/pac_engine_spec.rb +33 -0
- data/spec/proxy_pac/pac_parser_spec.rb +32 -0
- data/spec/proxy_pac/pac_result_html_stylist_spec.rb +36 -0
- data/spec/proxy_pac/pac_result_spec.rb +54 -0
- data/spec/proxy_pac_result_parser_spec.rb +15 -0
- data/spec/server_spec.rb +18 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/spec_helper_features.rb +3 -0
- data/spec/support/capybara.rb +6 -0
- metadata +264 -8
- data/lib/local_pac/file_server.rb +0 -37
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: local_pac
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.13
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-02-
|
12
|
+
date: 2014-02-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
@@ -107,6 +107,38 @@ dependencies:
|
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
109
|
version: '0'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: haml
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: sass
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
type: :runtime
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
110
142
|
- !ruby/object:Gem::Dependency
|
111
143
|
name: git_hook-pre_receive
|
112
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -139,6 +171,134 @@ dependencies:
|
|
139
171
|
- - ! '>='
|
140
172
|
- !ruby/object:Gem::Version
|
141
173
|
version: '0'
|
174
|
+
- !ruby/object:Gem::Dependency
|
175
|
+
name: bootstrap-sass
|
176
|
+
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ! '>='
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
type: :runtime
|
183
|
+
prerelease: false
|
184
|
+
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: sprockets
|
192
|
+
requirement: !ruby/object:Gem::Requirement
|
193
|
+
none: false
|
194
|
+
requirements:
|
195
|
+
- - ! '>='
|
196
|
+
- !ruby/object:Gem::Version
|
197
|
+
version: '0'
|
198
|
+
type: :runtime
|
199
|
+
prerelease: false
|
200
|
+
version_requirements: !ruby/object:Gem::Requirement
|
201
|
+
none: false
|
202
|
+
requirements:
|
203
|
+
- - ! '>='
|
204
|
+
- !ruby/object:Gem::Version
|
205
|
+
version: '0'
|
206
|
+
- !ruby/object:Gem::Dependency
|
207
|
+
name: sprockets-helpers
|
208
|
+
requirement: !ruby/object:Gem::Requirement
|
209
|
+
none: false
|
210
|
+
requirements:
|
211
|
+
- - ! '>='
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
type: :runtime
|
215
|
+
prerelease: false
|
216
|
+
version_requirements: !ruby/object:Gem::Requirement
|
217
|
+
none: false
|
218
|
+
requirements:
|
219
|
+
- - ! '>='
|
220
|
+
- !ruby/object:Gem::Version
|
221
|
+
version: '0'
|
222
|
+
- !ruby/object:Gem::Dependency
|
223
|
+
name: sprockets-sass
|
224
|
+
requirement: !ruby/object:Gem::Requirement
|
225
|
+
none: false
|
226
|
+
requirements:
|
227
|
+
- - ! '>='
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :runtime
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
none: false
|
234
|
+
requirements:
|
235
|
+
- - ! '>='
|
236
|
+
- !ruby/object:Gem::Version
|
237
|
+
version: '0'
|
238
|
+
- !ruby/object:Gem::Dependency
|
239
|
+
name: compass
|
240
|
+
requirement: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
242
|
+
requirements:
|
243
|
+
- - ! '>='
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '0'
|
246
|
+
type: :runtime
|
247
|
+
prerelease: false
|
248
|
+
version_requirements: !ruby/object:Gem::Requirement
|
249
|
+
none: false
|
250
|
+
requirements:
|
251
|
+
- - ! '>='
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: '0'
|
254
|
+
- !ruby/object:Gem::Dependency
|
255
|
+
name: addressable
|
256
|
+
requirement: !ruby/object:Gem::Requirement
|
257
|
+
none: false
|
258
|
+
requirements:
|
259
|
+
- - ! '>='
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: '0'
|
262
|
+
type: :runtime
|
263
|
+
prerelease: false
|
264
|
+
version_requirements: !ruby/object:Gem::Requirement
|
265
|
+
none: false
|
266
|
+
requirements:
|
267
|
+
- - ! '>='
|
268
|
+
- !ruby/object:Gem::Version
|
269
|
+
version: '0'
|
270
|
+
- !ruby/object:Gem::Dependency
|
271
|
+
name: i18n
|
272
|
+
requirement: !ruby/object:Gem::Requirement
|
273
|
+
none: false
|
274
|
+
requirements:
|
275
|
+
- - ! '>='
|
276
|
+
- !ruby/object:Gem::Version
|
277
|
+
version: '0'
|
278
|
+
type: :runtime
|
279
|
+
prerelease: false
|
280
|
+
version_requirements: !ruby/object:Gem::Requirement
|
281
|
+
none: false
|
282
|
+
requirements:
|
283
|
+
- - ! '>='
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
- !ruby/object:Gem::Dependency
|
287
|
+
name: rack-contrib
|
288
|
+
requirement: !ruby/object:Gem::Requirement
|
289
|
+
none: false
|
290
|
+
requirements:
|
291
|
+
- - ! '>='
|
292
|
+
- !ruby/object:Gem::Version
|
293
|
+
version: '0'
|
294
|
+
type: :runtime
|
295
|
+
prerelease: false
|
296
|
+
version_requirements: !ruby/object:Gem::Requirement
|
297
|
+
none: false
|
298
|
+
requirements:
|
299
|
+
- - ! '>='
|
300
|
+
- !ruby/object:Gem::Version
|
301
|
+
version: '0'
|
142
302
|
description: ! 'This gem helps you to serve proxy.pacs locallly
|
143
303
|
|
144
304
|
'
|
@@ -158,39 +318,110 @@ files:
|
|
158
318
|
- Gemfile
|
159
319
|
- LICENSE.txt
|
160
320
|
- Procfile
|
321
|
+
- README.DEVELOPER.md
|
161
322
|
- README.md
|
162
323
|
- Rakefile
|
324
|
+
- app/assets/fonts/open-sans/Apache License Version 2.txt
|
325
|
+
- app/assets/fonts/open-sans/OpenSans-Bold-webfont.eot
|
326
|
+
- app/assets/fonts/open-sans/OpenSans-Bold-webfont.svg
|
327
|
+
- app/assets/fonts/open-sans/OpenSans-Bold-webfont.ttf
|
328
|
+
- app/assets/fonts/open-sans/OpenSans-Bold-webfont.woff
|
329
|
+
- app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.eot
|
330
|
+
- app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.svg
|
331
|
+
- app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.ttf
|
332
|
+
- app/assets/fonts/open-sans/OpenSans-BoldItalic-webfont.woff
|
333
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.eot
|
334
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.svg
|
335
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.ttf
|
336
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBold-webfont.woff
|
337
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.eot
|
338
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.svg
|
339
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.ttf
|
340
|
+
- app/assets/fonts/open-sans/OpenSans-ExtraBoldItalic-webfont.woff
|
341
|
+
- app/assets/fonts/open-sans/OpenSans-Italic-webfont.eot
|
342
|
+
- app/assets/fonts/open-sans/OpenSans-Italic-webfont.svg
|
343
|
+
- app/assets/fonts/open-sans/OpenSans-Italic-webfont.ttf
|
344
|
+
- app/assets/fonts/open-sans/OpenSans-Italic-webfont.woff
|
345
|
+
- app/assets/fonts/open-sans/OpenSans-Light-webfont.eot
|
346
|
+
- app/assets/fonts/open-sans/OpenSans-Light-webfont.svg
|
347
|
+
- app/assets/fonts/open-sans/OpenSans-Light-webfont.ttf
|
348
|
+
- app/assets/fonts/open-sans/OpenSans-Light-webfont.woff
|
349
|
+
- app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.eot
|
350
|
+
- app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.svg
|
351
|
+
- app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.ttf
|
352
|
+
- app/assets/fonts/open-sans/OpenSans-LightItalic-webfont.woff
|
353
|
+
- app/assets/fonts/open-sans/OpenSans-Regular-webfont.eot
|
354
|
+
- app/assets/fonts/open-sans/OpenSans-Regular-webfont.svg
|
355
|
+
- app/assets/fonts/open-sans/OpenSans-Regular-webfont.ttf
|
356
|
+
- app/assets/fonts/open-sans/OpenSans-Regular-webfont.woff
|
357
|
+
- app/assets/fonts/open-sans/OpenSans-Semibold-webfont.eot
|
358
|
+
- app/assets/fonts/open-sans/OpenSans-Semibold-webfont.svg
|
359
|
+
- app/assets/fonts/open-sans/OpenSans-Semibold-webfont.ttf
|
360
|
+
- app/assets/fonts/open-sans/OpenSans-Semibold-webfont.woff
|
361
|
+
- app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.eot
|
362
|
+
- app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.svg
|
363
|
+
- app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.ttf
|
364
|
+
- app/assets/fonts/open-sans/OpenSans-SemiboldItalic-webfont.woff
|
365
|
+
- app/assets/javascripts/application.js
|
366
|
+
- app/assets/javascripts/jquery-min.js
|
367
|
+
- app/assets/stylesheets/application.css.scss
|
368
|
+
- app/assets/stylesheets/open-sans.css.scss
|
369
|
+
- app/controllers/application_controller.rb
|
370
|
+
- app/controllers/assets_controller.rb
|
371
|
+
- app/controllers/file_serve_controller.rb
|
372
|
+
- app/controllers/lookup_controller.rb
|
373
|
+
- app/locales/de.yml
|
374
|
+
- app/locales/en.yml
|
375
|
+
- app/public/favicon.ico
|
376
|
+
- app/views/application.haml
|
377
|
+
- app/views/error.haml
|
378
|
+
- app/views/form.haml
|
379
|
+
- app/views/lookup.haml
|
380
|
+
- app/views/lookup_result.haml
|
163
381
|
- bin/local_pac
|
164
382
|
- config.ru
|
165
383
|
- features/fetch_proxy_pac.feature
|
166
384
|
- features/initializer.feature
|
167
|
-
- features/
|
168
|
-
- features/
|
385
|
+
- features/show_status.feature
|
386
|
+
- features/step_definitions.rb
|
169
387
|
- features/support/env.rb
|
170
388
|
- files/config.yaml
|
389
|
+
- files/example-config.erb
|
171
390
|
- files/git-hook.erb
|
172
391
|
- files/proxy.pac
|
173
392
|
- lib/local_pac.rb
|
393
|
+
- lib/local_pac/access_logger.rb
|
174
394
|
- lib/local_pac/actions/create_directory.rb
|
175
395
|
- lib/local_pac/actions/create_file.rb
|
396
|
+
- lib/local_pac/actions/create_output.rb
|
176
397
|
- lib/local_pac/actions/create_repository.rb
|
177
398
|
- lib/local_pac/config.rb
|
178
399
|
- lib/local_pac/data.rb
|
179
400
|
- lib/local_pac/erb_generator.rb
|
180
401
|
- lib/local_pac/exceptions.rb
|
181
|
-
- lib/local_pac/file_server.rb
|
182
402
|
- lib/local_pac/git.rb
|
183
403
|
- lib/local_pac/git_file.rb
|
184
404
|
- lib/local_pac/git_repository.rb
|
185
405
|
- lib/local_pac/initializer.rb
|
186
406
|
- lib/local_pac/java_script_compressor.rb
|
187
407
|
- lib/local_pac/local_storage.rb
|
188
|
-
- lib/local_pac/logger.rb
|
189
408
|
- lib/local_pac/main.rb
|
409
|
+
- lib/local_pac/null_access_logger.rb
|
190
410
|
- lib/local_pac/null_pac_file.rb
|
191
411
|
- lib/local_pac/pac_file.rb
|
192
412
|
- lib/local_pac/pac_file_validator.rb
|
413
|
+
- lib/local_pac/proxy_pac/html_data.rb
|
414
|
+
- lib/local_pac/proxy_pac/html_div_style.rb
|
415
|
+
- lib/local_pac/proxy_pac/html_table_style.rb
|
416
|
+
- lib/local_pac/proxy_pac/pac_engine.rb
|
417
|
+
- lib/local_pac/proxy_pac/pac_parser.rb
|
418
|
+
- lib/local_pac/proxy_pac/pac_result.rb
|
419
|
+
- lib/local_pac/proxy_pac/pac_result_html_stylist.rb
|
420
|
+
- lib/local_pac/proxy_pac/result.rb
|
421
|
+
- lib/local_pac/proxy_pac/result_parser.rb
|
422
|
+
- lib/local_pac/router.rb
|
193
423
|
- lib/local_pac/runner.rb
|
424
|
+
- lib/local_pac/server.rb
|
194
425
|
- lib/local_pac/spec_helper.rb
|
195
426
|
- lib/local_pac/spec_helper_file_server.rb
|
196
427
|
- lib/local_pac/template_file.rb
|
@@ -198,6 +429,7 @@ files:
|
|
198
429
|
- lib/local_pac/ui_logger.rb
|
199
430
|
- lib/local_pac/version.rb
|
200
431
|
- local_pac.gemspec
|
432
|
+
- script/console
|
201
433
|
- share/archlinux/Makefile
|
202
434
|
- share/archlinux/PKGBUILD
|
203
435
|
- share/archlinux/config.yaml
|
@@ -209,11 +441,13 @@ files:
|
|
209
441
|
- share/systemd/local_pac@.service
|
210
442
|
- spec/actions/create_directory_spec.rb
|
211
443
|
- spec/actions/create_file_spec.rb
|
444
|
+
- spec/actions/create_output_spec.rb
|
212
445
|
- spec/actions/create_repository_spec.rb
|
213
446
|
- spec/config_spec.rb
|
214
447
|
- spec/data_spec.rb
|
215
448
|
- spec/erb_generator_spec.rb
|
216
449
|
- spec/features/fetch_proxy_pac_spec.rb
|
450
|
+
- spec/features/lookup_proxy_spec.rb
|
217
451
|
- spec/git_repository_spec.rb
|
218
452
|
- spec/git_spec.rb
|
219
453
|
- spec/initializer_spec.rb
|
@@ -222,8 +456,18 @@ files:
|
|
222
456
|
- spec/null_pac_file_spec.rb
|
223
457
|
- spec/pac_file_spec.rb
|
224
458
|
- spec/pac_file_validator_spec.rb
|
459
|
+
- spec/proxy_pac/html_div_style_spec.rb
|
460
|
+
- spec/proxy_pac/html_table_style_spec.rb
|
461
|
+
- spec/proxy_pac/pac_engine_spec.rb
|
462
|
+
- spec/proxy_pac/pac_parser_spec.rb
|
463
|
+
- spec/proxy_pac/pac_result_html_stylist_spec.rb
|
464
|
+
- spec/proxy_pac/pac_result_spec.rb
|
465
|
+
- spec/proxy_pac_result_parser_spec.rb
|
225
466
|
- spec/runner_spec.rb
|
467
|
+
- spec/server_spec.rb
|
226
468
|
- spec/spec_helper.rb
|
469
|
+
- spec/spec_helper_features.rb
|
470
|
+
- spec/support/capybara.rb
|
227
471
|
- spec/support/environment.rb
|
228
472
|
- spec/support/filesystem.rb
|
229
473
|
- spec/support/git.rb
|
@@ -261,16 +505,18 @@ summary: Serve local proxy pac
|
|
261
505
|
test_files:
|
262
506
|
- features/fetch_proxy_pac.feature
|
263
507
|
- features/initializer.feature
|
264
|
-
- features/
|
265
|
-
- features/
|
508
|
+
- features/show_status.feature
|
509
|
+
- features/step_definitions.rb
|
266
510
|
- features/support/env.rb
|
267
511
|
- spec/actions/create_directory_spec.rb
|
268
512
|
- spec/actions/create_file_spec.rb
|
513
|
+
- spec/actions/create_output_spec.rb
|
269
514
|
- spec/actions/create_repository_spec.rb
|
270
515
|
- spec/config_spec.rb
|
271
516
|
- spec/data_spec.rb
|
272
517
|
- spec/erb_generator_spec.rb
|
273
518
|
- spec/features/fetch_proxy_pac_spec.rb
|
519
|
+
- spec/features/lookup_proxy_spec.rb
|
274
520
|
- spec/git_repository_spec.rb
|
275
521
|
- spec/git_spec.rb
|
276
522
|
- spec/initializer_spec.rb
|
@@ -279,8 +525,18 @@ test_files:
|
|
279
525
|
- spec/null_pac_file_spec.rb
|
280
526
|
- spec/pac_file_spec.rb
|
281
527
|
- spec/pac_file_validator_spec.rb
|
528
|
+
- spec/proxy_pac/html_div_style_spec.rb
|
529
|
+
- spec/proxy_pac/html_table_style_spec.rb
|
530
|
+
- spec/proxy_pac/pac_engine_spec.rb
|
531
|
+
- spec/proxy_pac/pac_parser_spec.rb
|
532
|
+
- spec/proxy_pac/pac_result_html_stylist_spec.rb
|
533
|
+
- spec/proxy_pac/pac_result_spec.rb
|
534
|
+
- spec/proxy_pac_result_parser_spec.rb
|
282
535
|
- spec/runner_spec.rb
|
536
|
+
- spec/server_spec.rb
|
283
537
|
- spec/spec_helper.rb
|
538
|
+
- spec/spec_helper_features.rb
|
539
|
+
- spec/support/capybara.rb
|
284
540
|
- spec/support/environment.rb
|
285
541
|
- spec/support/filesystem.rb
|
286
542
|
- spec/support/git.rb
|
@@ -1,37 +0,0 @@
|
|
1
|
-
module LocalPac
|
2
|
-
class FileServer < Sinatra::Base
|
3
|
-
use Rack::Deflater
|
4
|
-
|
5
|
-
configure do
|
6
|
-
if settings.environment == :test
|
7
|
-
require_relative 'spec_helper_file_server'
|
8
|
-
SpecHelperFileServer.new
|
9
|
-
end
|
10
|
-
|
11
|
-
set :local_storage, LocalPac::LocalStorage.new
|
12
|
-
end
|
13
|
-
|
14
|
-
configure do
|
15
|
-
mime_type :proxy_pac_file, 'application/x-ns-proxy-autoconfig'
|
16
|
-
end
|
17
|
-
|
18
|
-
not_found do
|
19
|
-
"Sorry, but I cant' find proxy-pac-file \"#{env['sinatra.error'].message}\"."
|
20
|
-
end
|
21
|
-
|
22
|
-
get '/' do
|
23
|
-
redirect to('/v1/pac/proxy.pac')
|
24
|
-
end
|
25
|
-
|
26
|
-
get '/v1/pac/:name' do
|
27
|
-
content_type :proxy_pac_file
|
28
|
-
file = settings.local_storage.find(params[:name])
|
29
|
-
|
30
|
-
if file.nil?
|
31
|
-
fail Sinatra::NotFound, params[:name]
|
32
|
-
else
|
33
|
-
file.compressed_content
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|