From 9adb548e5ad671c8623937e86d62e15212a5aa1b Mon Sep 17 00:00:00 2001 From: James Hill Date: Fri, 30 Jun 2017 14:00:48 +1200 Subject: [PATCH 1/2] Handle new Apex ToC structure as at 2017-06-30 Fixes #33 --- salesforce_reference/retrieve.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salesforce_reference/retrieve.py b/salesforce_reference/retrieve.py index 9808315..fc86d50 100644 --- a/salesforce_reference/retrieve.py +++ b/salesforce_reference/retrieve.py @@ -82,7 +82,8 @@ def run(self): sf_document = urllib.request.urlopen(urllib.request.Request(DocTypeEnum.APEX.toc_url,None,{"User-Agent": "Mozilla/5.0"})).read().decode("utf-8") sf_json = json.loads(sf_document) sf_toc = sf_json["toc"] - reference_toc = filter(lambda x: "id" in x and x["id"] == "apex_reference", sf_toc) + dev_guide_toc = next(filter(lambda x: "id" in x and x["id"] == "apex_dev_guide", sf_toc)) + reference_toc = filter(lambda x: "id" in x and x["id"] == "apex_reference", dev_guide_toc["children"]) for toc_entry in getAllTocLeafParents(next(reference_toc),None): with self.cache_lock: self.cache.append( From 160c095553a11d9bc97ee64a12c0980d10f16100 Mon Sep 17 00:00:00 2001 From: James Hill Date: Fri, 30 Jun 2017 14:26:26 +1200 Subject: [PATCH 2/2] Update version to 2.1.1 --- SalesforceReference.py | 4 ++-- messages.json | 3 ++- messages/2.1.1.txt | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 messages/2.1.1.txt diff --git a/SalesforceReference.py b/SalesforceReference.py index c9d07e8..bac45a6 100644 --- a/SalesforceReference.py +++ b/SalesforceReference.py @@ -1,7 +1,7 @@ """SublimeSalesforceReference: Quick access to Salesforce Documentation from Sublime Text""" -__version__ = "2.1.0" +__version__ = "2.1.1" __author__ = "James Hill " -__copyright__ = "SublimeSalesforceReference: (C) 2014-2015 James Hill. GNU GPL 3." +__copyright__ = "SublimeSalesforceReference: (C) 2014-2017 James Hill. GNU GPL 3." __credits__ = ["All Salesforce Documentation is © Copyright 2000–2015 salesforce.com, inc.", "ThreadProgress.py is under the MIT License, Will Bond , and SalesforceReference.py's RetrieveIndexThread method is a derives in part from code under the same license"] import sublime, sublime_plugin diff --git a/messages.json b/messages.json index 9823b2e..03b407c 100644 --- a/messages.json +++ b/messages.json @@ -10,5 +10,6 @@ "2.0.0": "messages/2.0.0.txt", "2.0.1": "messages/2.0.1.txt", "2.0.2": "messages/2.0.2.txt", - "2.1.0": "messages/2.1.0.txt" + "2.1.0": "messages/2.1.0.txt", + "2.1.1": "messages/2.1.1.txt" } diff --git a/messages/2.1.1.txt b/messages/2.1.1.txt new file mode 100644 index 0000000..0e611d6 --- /dev/null +++ b/messages/2.1.1.txt @@ -0,0 +1,4 @@ +Sublime Salesforce Reference 2.1.1 Release Notes: + +Bug Fixes: + - Updated Apex retrieval to handle Salesforce's new Apex ToC format (as at 2017-06-30)