Skip to content

Commit

Permalink
Revert ARGV to {query} as ARGV broke support for spaces in VPN names #3
Browse files Browse the repository at this point in the history
  • Loading branch information
deanishe committed Apr 4, 2017
1 parent fad1aa3 commit a8d7ae5
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 24 deletions.
Binary file not shown.
6 changes: 3 additions & 3 deletions src/info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@
<key>escaping</key>
<integer>0</integer>
<key>script</key>
<string>/usr/bin/python viscosity.py $1</string>
<string>/usr/bin/python viscosity.py {query}</string>
<key>scriptargtype</key>
<integer>1</integer>
<integer>0</integer>
<key>scriptfile</key>
<string></string>
<key>type</key>
Expand Down Expand Up @@ -122,7 +122,7 @@ Requires Viscosity app from https://www.sparklabs.com/viscosity/</string>
</dict>
</dict>
<key>version</key>
<string>2.0</string>
<string>2.0.1</string>
<key>webaddress</key>
<string></string>
</dict>
Expand Down
Binary file modified src/scripts/connect_vpn.scpt
Binary file not shown.
Binary file modified src/scripts/disconnect_vpn.scpt
Binary file not shown.
Binary file modified src/scripts/get_connections.scpt
Binary file not shown.
2 changes: 1 addition & 1 deletion src/workflow/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.25
1.25.1
48 changes: 28 additions & 20 deletions src/workflow/workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1974,26 +1974,30 @@ def filter(self, query, items, key=lambda x: x, ascending=False,
By default, :meth:`filter` uses all of the following flags (i.e.
:const:`MATCH_ALL`). The tests are always run in the given order:
1. :const:`MATCH_STARTSWITH` : Item search key startswith
``query``(case-insensitive).
2. :const:`MATCH_CAPITALS` : The list of capital letters in item
search key starts with ``query`` (``query`` may be
lower-case). E.g., ``of`` would match ``OmniFocus``,
``gc`` would match ``Google Chrome``.
3. :const:`MATCH_ATOM` : Search key is split into "atoms" on
non-word characters (.,-,' etc.). Matches if ``query`` is
one of these atoms (case-insensitive).
4. :const:`MATCH_INITIALS_STARTSWITH` : Initials are the first
characters of the above-described "atoms" (case-insensitive).
5. :const:`MATCH_INITIALS_CONTAIN` : ``query`` is a substring of
the above-described initials.
6. :const:`MATCH_INITIALS` : Combination of (4) and (5).
7. :const:`MATCH_SUBSTRING` : Match if ``query`` is a substring
of item search key (case-insensitive).
8. :const:`MATCH_ALLCHARS` : Matches if all characters in
``query`` appear in item search key in the same order
1. :const:`MATCH_STARTSWITH`
Item search key starts with ``query`` (case-insensitive).
2. :const:`MATCH_CAPITALS`
The list of capital letters in item search key starts with
``query`` (``query`` may be lower-case). E.g., ``of``
would match ``OmniFocus``, ``gc`` would match ``Google Chrome``.
3. :const:`MATCH_ATOM`
Search key is split into "atoms" on non-word characters
(.,-,' etc.). Matches if ``query`` is one of these atoms
(case-insensitive).
9. :const:`MATCH_ALL` : Combination of all the above.
4. :const:`MATCH_INITIALS_STARTSWITH`
Initials are the first characters of the above-described
"atoms" (case-insensitive).
5. :const:`MATCH_INITIALS_CONTAIN`
``query`` is a substring of the above-described initials.
6. :const:`MATCH_INITIALS`
Combination of (4) and (5).
7. :const:`MATCH_SUBSTRING`
``query`` is a substring of item search key (case-insensitive).
8. :const:`MATCH_ALLCHARS`
All characters in ``query`` appear in item search key in
the same order (case-insensitive).
9. :const:`MATCH_ALL`
Combination of all the above.
:const:`MATCH_ALLCHARS` is considerably slower than the other
Expand Down Expand Up @@ -2432,7 +2436,11 @@ def update_available(self):
:returns: ``True`` if an update is available, else ``False``
"""
update_data = self.cached_data('__workflow_update_status', max_age=0)
# Create a new workflow object to ensure standard serialiser
# is used (update.py is called without the user's settings)
update_data = Workflow().cached_data('__workflow_update_status',
max_age=0)

self.logger.debug('update_data : {0}'.format(update_data))

if not update_data or not update_data.get('available'):
Expand Down

0 comments on commit a8d7ae5

Please sign in to comment.