proxy_pac_rb 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0d845793863b94be39bb326eca665d388a02637f
4
- data.tar.gz: b6e5e70a3d32810a0926d247988ba1fbbe60b177
3
+ metadata.gz: c160dda689a5f77a10d7cf048000b18372b84a47
4
+ data.tar.gz: b73a956acbc3e188b84ed56740d21dc8ec4ff544
5
5
  SHA512:
6
- metadata.gz: eebf9334ebc77426a5db86d8ff81696e11f7e4cd806f294e55b985a29362648be5831735e79072d62785b0cb60935c0eaba34cef74726ce2dcbd2d40f29084b8
7
- data.tar.gz: 33dc4405b36ab7a754eaf24231470d4e2e5d90f8d56d2cb21dbb30f023a29781d9a0c1f04098821b8ad6e59afe677aa597ef8fc3c8290598897fa838ec7c7db4
6
+ metadata.gz: f0b039ba958cc036619d564362a5f06b71cdc02811d25801a35b9bd56965d56ef761cc2a52d74c31150c8a60a1fe4e4ac19595aa8eeb0a485bd08b8cb49fdbee
7
+ data.tar.gz: bc7f4dfdc8eb1a859464b63b5ec141100628293be9748544fa20270a94444647d71e6712b7a418030bb2eb276a642c978860eb93285b73132a1936f1469a281b
data/Gemfile CHANGED
@@ -15,7 +15,6 @@ group :debug do
15
15
  end
16
16
 
17
17
  group :development, :test do
18
- gem 'activesupport', '~> 4.0.0', require: false
19
18
  gem 'aruba', require: false, git: 'https://github.com/cucumber/aruba'
20
19
  gem 'awesome_print', require: 'ap'
21
20
  gem 'bundler', '~> 1.3', require: false
@@ -23,7 +22,7 @@ group :development, :test do
23
22
  gem 'coveralls', require: false
24
23
  gem 'cucumber', require: false, git: 'https://github.com/cucumber/cucumber'
25
24
  gem 'erubis'
26
- gem 'fedux_org-stdlib', '~>0.7.25', require: false
25
+ gem 'fedux_org-stdlib', '~>0.11.16', require: false
27
26
  gem 'filegen'
28
27
  gem 'foreman', require: false
29
28
  gem 'fuubar', require: false
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
 
10
10
  GIT
11
11
  remote: https://github.com/cucumber/cucumber
12
- revision: 9d11cb7e10ed72b7dd72ba7aaafaccbb8e018da0
12
+ revision: c95539e88e8addf1156f72d7e3bb1759c299e587
13
13
  specs:
14
14
  cucumber (2.0.0)
15
15
  builder (>= 2.1.2)
@@ -22,20 +22,20 @@ GIT
22
22
  PATH
23
23
  remote: .
24
24
  specs:
25
- proxy_pac_rb (0.5.2)
26
- activesupport
27
- addressable
28
- uglifier
25
+ proxy_pac_rb (0.5.3)
26
+ activesupport (~> 4.2.0)
27
+ addressable (~> 2.3.8)
28
+ uglifier (~> 2.7.1)
29
29
 
30
30
  GEM
31
31
  remote: https://rubygems.org/
32
32
  specs:
33
- activesupport (4.0.13)
34
- i18n (~> 0.6, >= 0.6.9)
35
- minitest (~> 4.2)
36
- multi_json (~> 1.3)
37
- thread_safe (~> 0.1)
38
- tzinfo (~> 0.3.37)
33
+ activesupport (4.2.1)
34
+ i18n (~> 0.7)
35
+ json (~> 1.7, >= 1.7.7)
36
+ minitest (~> 5.1)
37
+ thread_safe (~> 0.3, >= 0.3.4)
38
+ tzinfo (~> 1.1)
39
39
  addressable (2.3.8)
40
40
  ast (2.0.0)
41
41
  astrolabe (1.3.0)
@@ -55,10 +55,10 @@ GEM
55
55
  activesupport
56
56
  smart_colored
57
57
  xml-simple
58
- coveralls (0.8.0)
59
- multi_json (~> 1.10)
58
+ coveralls (0.8.1)
59
+ json (~> 1.8)
60
60
  rest-client (>= 1.6.8, < 2)
61
- simplecov (~> 0.9.1)
61
+ simplecov (~> 0.10.0)
62
62
  term-ansicolor (~> 1.3)
63
63
  thor (~> 0.19.1)
64
64
  crack (0.4.2)
@@ -68,11 +68,11 @@ GEM
68
68
  debug_inspector (0.0.2)
69
69
  diff-lcs (1.2.5)
70
70
  docile (1.1.5)
71
- domain_name (0.5.23)
71
+ domain_name (0.5.24)
72
72
  unf (>= 0.0.5, < 1.0.0)
73
73
  erubis (2.7.0)
74
- execjs (2.5.1)
75
- fedux_org-stdlib (0.7.33)
74
+ execjs (2.5.2)
75
+ fedux_org-stdlib (0.11.16)
76
76
  activesupport
77
77
  ffi (1.9.8)
78
78
  filegen (0.4.3)
@@ -100,19 +100,19 @@ GEM
100
100
  launchy (2.4.3)
101
101
  addressable (~> 2.3)
102
102
  libv8 (3.16.14.7)
103
- license_finder (2.0.3)
103
+ license_finder (2.0.4)
104
104
  bundler
105
105
  httparty
106
106
  thor
107
107
  xml-simple
108
108
  method_source (0.8.2)
109
109
  mime-types (2.4.3)
110
- minitest (4.7.5)
110
+ minitest (5.6.0)
111
111
  multi_json (1.11.0)
112
112
  multi_test (0.1.2)
113
113
  multi_xml (0.5.5)
114
114
  netrc (0.10.3)
115
- parser (2.2.0.3)
115
+ parser (2.2.2.1)
116
116
  ast (>= 1.1, < 3.0)
117
117
  powerpack (0.1.0)
118
118
  pry (0.10.1)
@@ -135,7 +135,7 @@ GEM
135
135
  rack (>= 1.0)
136
136
  rainbow (2.0.0)
137
137
  rake (10.4.2)
138
- redcarpet (3.2.2)
138
+ redcarpet (3.2.3)
139
139
  ref (1.0.5)
140
140
  rest-client (1.8.0)
141
141
  http-cookie (>= 1.0.2, < 2.0)
@@ -145,29 +145,29 @@ GEM
145
145
  rspec-core (~> 3.2.0)
146
146
  rspec-expectations (~> 3.2.0)
147
147
  rspec-mocks (~> 3.2.0)
148
- rspec-core (3.2.2)
148
+ rspec-core (3.2.3)
149
149
  rspec-support (~> 3.2.0)
150
- rspec-expectations (3.2.0)
150
+ rspec-expectations (3.2.1)
151
151
  diff-lcs (>= 1.2.0, < 2.0)
152
152
  rspec-support (~> 3.2.0)
153
153
  rspec-mocks (3.2.1)
154
154
  diff-lcs (>= 1.2.0, < 2.0)
155
155
  rspec-support (~> 3.2.0)
156
156
  rspec-support (3.2.2)
157
- rubocop (0.30.0)
157
+ rubocop (0.30.1)
158
158
  astrolabe (~> 1.3)
159
- parser (>= 2.2.0.1, < 3.0)
159
+ parser (>= 2.2.2.1, < 3.0)
160
160
  powerpack (~> 0.1)
161
161
  rainbow (>= 1.99.1, < 3.0)
162
162
  ruby-progressbar (~> 1.4)
163
163
  ruby-prof (0.15.6)
164
164
  ruby-progressbar (1.7.5)
165
165
  safe_yaml (1.0.4)
166
- simplecov (0.9.2)
166
+ simplecov (0.10.0)
167
167
  docile (~> 1.1.0)
168
- multi_json (~> 1.0)
169
- simplecov-html (~> 0.9.0)
170
- simplecov-html (0.9.0)
168
+ json (~> 1.8)
169
+ simplecov-html (~> 0.10.0)
170
+ simplecov-html (0.10.0)
171
171
  sinatra (1.4.6)
172
172
  rack (~> 1.4)
173
173
  rack-protection (~> 1.4)
@@ -177,7 +177,7 @@ GEM
177
177
  sparkr (0.4.1)
178
178
  term-ansicolor (1.3.0)
179
179
  tins (~> 1.0)
180
- therubyracer (0.12.1)
180
+ therubyracer (0.12.2)
181
181
  libv8 (~> 3.16.14.0)
182
182
  ref
183
183
  therubyrhino (2.0.4)
@@ -191,13 +191,14 @@ GEM
191
191
  thor
192
192
  travis-lint (2.0.0)
193
193
  json
194
- tzinfo (0.3.43)
194
+ tzinfo (1.2.2)
195
+ thread_safe (~> 0.1)
195
196
  uglifier (2.7.1)
196
197
  execjs (>= 0.3.0)
197
198
  json (>= 1.8.0)
198
199
  unf (0.1.4)
199
200
  unf_ext
200
- unf_ext (0.0.6)
201
+ unf_ext (0.0.7.1)
201
202
  versionomy (0.4.4)
202
203
  blockenspiel (>= 0.4.5)
203
204
  webmock (1.21.0)
@@ -210,7 +211,6 @@ PLATFORMS
210
211
  ruby
211
212
 
212
213
  DEPENDENCIES
213
- activesupport (~> 4.0.0)
214
214
  aruba!
215
215
  awesome_print
216
216
  bundler (~> 1.3)
@@ -219,7 +219,7 @@ DEPENDENCIES
219
219
  coveralls
220
220
  cucumber!
221
221
  erubis
222
- fedux_org-stdlib (~> 0.7.25)
222
+ fedux_org-stdlib (~> 0.11.16)
223
223
  filegen
224
224
  foreman
225
225
  fuubar
@@ -3,7 +3,60 @@ module ProxyPacRb
3
3
  # Compress javascript files
4
4
  class ProxyPacCompressor
5
5
  def compress(proxy_pac)
6
- proxy_pac.content = Uglifier.new.compile(proxy_pac.content)
6
+ options = {
7
+ output: {
8
+ # ascii_only: true, # Escape non-ASCII characters
9
+ # comments: :copyright, # Preserve comments (:all, :jsdoc, :copyright, :none, Regexp (see below))
10
+ # inline_script: false, # Escape occurrences of </script in strings
11
+ # quote_keys: false, # Quote keys in object literals
12
+ # max_line_len: 32 * 1024, # Maximum line length in minified code
13
+ max_line_len: 1024, # Maximum line length in minified code
14
+ # bracketize: true, # Bracketize if, for, do, while or with statements, even if their body is a single statement
15
+ # semicolons: true, # Separate statements with semicolons
16
+ # preserve_line: false, # Preserve line numbers in outputs
17
+ # beautify: false, # Beautify output
18
+ beautify: true, # Beautify output
19
+ # indent_level: 4, # Indent level in spaces
20
+ # indent_start: 0, # Starting indent level
21
+ # space_colon: false, # Insert space before colons (only with beautifier)
22
+ # width: 80, # Specify line width when beautifier is used (only with beautifier)
23
+ # preamble: nil # Preamble for the generated JS file. Can be used to insert any code or comment.
24
+ },
25
+ mangle: {
26
+ # eval: false, # Mangle names when eval of when is used in scope
27
+ # except: ["$super"], # Argument names to be excluded from mangling
28
+ # sort: false, # Assign shorter names to most frequently used variables. Often results in bigger output after gzip.
29
+ # toplevel: false # Mangle names declared in the toplevel scope
30
+ },
31
+ compress: {
32
+ # sequences: false, # Allow statements to be joined by commas
33
+ # properties: true, # Rewrite property access using the dot notation
34
+ # dead_code: true, # Remove unreachable code
35
+ # drop_debugger: true, # Remove debugger; statements
36
+ # unsafe: false, # Apply "unsafe" transformations
37
+ # conditionals: true, # Optimize for if-s and conditional expressions
38
+ # comparisons: true, # Apply binary node optimizations for comparisons
39
+ # evaluate: true, # Attempt to evaluate constant expressions
40
+ # booleans: true, # Various optimizations to boolean contexts
41
+ # loops: true, # Optimize loops when condition can be statically determined
42
+ # unused: true, # Drop unreferenced functions and variables
43
+ # hoist_funs: true, # Hoist function declarations
44
+ # hoist_vars: false, # Hoist var declarations
45
+ # if_return: true, # Optimizations for if/return and if/continue
46
+ # join_vars: true, # Join consecutive var statements
47
+ join_vars: false, # Join consecutive var statements
48
+ # cascade: true, # Cascade sequences
49
+ # negate_iife: true, # Negate immediately invoked function expressions to avoid extra parens
50
+ # pure_getters: false, # Assume that object property access does not have any side-effects
51
+ # pure_funcs: nil, # List of functions without side-effects. Can safely discard function calls when the result value is not used
52
+ # drop_console: false, # Drop calls to console.* functions
53
+ # angular: false, # Process @ngInject annotations
54
+ # keep_fargs: false, # Preserve unused function arguments
55
+ # keep_fnames: true # Preserve function names
56
+ },
57
+ }
58
+
59
+ proxy_pac.content = Uglifier.new(options).compile(proxy_pac.content)
7
60
  end
8
61
  end
9
62
  end
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
  # ProxyPacRb
3
3
  module ProxyPacRb
4
- VERSION = '0.5.3'
4
+ VERSION = '0.5.4'
5
5
  end
data/proxy_pac_rb.gemspec CHANGED
@@ -1,4 +1,3 @@
1
- # encoding: utf-8
2
1
  lib = ::File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'proxy_pac_rb/version'
@@ -23,9 +22,9 @@ DESC
23
22
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
24
23
  spec.require_paths = ['lib']
25
24
 
26
- spec.add_runtime_dependency 'addressable'
27
- spec.add_runtime_dependency 'activesupport'
28
- spec.add_runtime_dependency 'uglifier'
25
+ spec.add_runtime_dependency 'addressable', '~>2.3.8'
26
+ spec.add_runtime_dependency 'activesupport', '~>4.2.0'
27
+ spec.add_runtime_dependency 'uglifier', '~> 2.7.1'
29
28
 
30
29
  spec.required_ruby_version = '~> 2.0'
31
30
  end
@@ -4,10 +4,11 @@ RSpec.describe ProxyPacCompressor do
4
4
  subject(:proxy_pac) { instance_double('ProxyPac::ProxyPacFile') }
5
5
 
6
6
  let(:compressor) { described_class.new }
7
- let(:modified_content) { %(function FindProxyForURL(){return"DIRECT"}) }
7
+ let(:modified_content) { %(function FindProxyForURL() {\n return \"DIRECT\";\n}) }
8
8
 
9
9
  let(:content) do
10
10
  <<-EOS.strip_heredoc.chomp
11
+ // comment
11
12
  function FindProxyForURL(url, host) {
12
13
  return "DIRECT";
13
14
  }
@@ -3,7 +3,7 @@ require 'proxy_pac_rb/rack/proxy_pac_compressor'
3
3
  require 'rack/lint'
4
4
 
5
5
  RSpec.describe ProxyPacRb::Rack::ProxyPacCompressor, type: :rack_test do
6
- let(:compressed_content) { %(function FindProxyForURL(){return\"DIRECT\"}) }
6
+ let(:compressed_content) { %(function FindProxyForURL() {\n return \"DIRECT\";\n}) }
7
7
 
8
8
  before(:each) { get '/' }
9
9
  subject(:body) { last_response.body }
@@ -17,6 +17,7 @@ RSpec.describe ProxyPacRb::Rack::ProxyPacCompressor, type: :rack_test do
17
17
 
18
18
  get '/' do
19
19
  <<-EOS.strip_heredoc.chomp
20
+ // comment
20
21
  function FindProxyForURL(url, host) {
21
22
  return "DIRECT";
22
23
  }
@@ -1,2 +1 @@
1
- # encoding: utf-8
2
- require 'active_support/core_ext/kernel/reporting'
1
+ require 'fedux_org_stdlib/core_ext/kernel/reporting'
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_pac_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Günnewig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-09 00:00:00.000000000 Z
11
+ date: 2015-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 2.3.8
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 2.3.8
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 4.2.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 4.2.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: uglifier
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 2.7.1
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 2.7.1
55
55
  description: |
56
56
  This gem uses a JavaScript runtime to evaulate a proxy auto-config file the same way a browser does to determine what proxy (if
57
57
  any at all) should a program use to connect to a server. You must install on of the supported JavaScript runtimes: