Skip to content

Commit

Permalink
move output to examples
Browse files Browse the repository at this point in the history
  • Loading branch information
heikoschmidt committed Mar 8, 2024
1 parent 4d4a607 commit 8114bca
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/pypacer/output.pac → src/examples/unittests.pac
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function FindProxyForURL(url, host) {
var host = host.toLowerCase();
host = host.toLowerCase();
if (
dnsDomainIs(host, "99.77.128.0/18")
|| dnsDomainIs(host, "127.0.0.0/24")
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pypacer/pypacer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ def _get_javascript(self) -> str:

def output(self) -> str:
output = self._get_javascript()
open(os.path.join(location, "output.pac"), "w").write(output)
open(os.path.join(location, "..", "examples", "unittests.pac"), "w").write(output)
return output
2 changes: 1 addition & 1 deletion src/pypacer/pypacer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class TestPyPacer(unittest.TestCase):

def setUp(self):
self.pac_file = open(os.path.join(location, "..", "examples", "pac_unittests.yaml"), "r").read()
self.pac_file = open(os.path.join(location, "..", "examples", "unittests.yaml"), "r").read()

def test_load_config_from_yaml(self):
p = PyPacer()
Expand Down
2 changes: 1 addition & 1 deletion src/pypacer/template.js.jinja
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function FindProxyForURL(url, host) {
var host = host.toLowerCase();
host = host.toLowerCase();
{%- for proxy in proxies %}
if (
{%- for target in proxy.targets %}
Expand Down

0 comments on commit 8114bca

Please sign in to comment.