{"action":"created","issue":{"url":"https://api.github.com/repos/kikito/inspect.lua/issues/42","repository_url":"https://api.github.com/repos/kikito/inspect.lua","labels_url":"https://api.github.com/repos/kikito/inspect.lua/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/kikito/inspect.lua/issues/42/comments","events_url":"https://api.github.com/repos/kikito/inspect.lua/issues/42/events","html_url":"https://github.com/kikito/inspect.lua/pull/42","id":377935427,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NzU5Mjgy","number":42,"title":"stop/start inspection and direct print options","user":{"login":"Sorky","id":43520033,"node_id":"MDQ6VXNlcjQzNTIwMDMz","avatar_url":"https://avatars2.githubusercontent.com/u/43520033?v=4","gravatar_id":"","url":"https://api.github.com/users/Sorky","html_url":"https://github.com/Sorky","followers_url":"https://api.github.com/users/Sorky/followers","following_url":"https://api.github.com/users/Sorky/following{/other_user}","gists_url":"https://api.github.com/users/Sorky/gists{/gist_id}","starred_url":"https://api.github.com/users/Sorky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sorky/subscriptions","organizations_url":"https://api.github.com/users/Sorky/orgs","repos_url":"https://api.github.com/users/Sorky/repos","events_url":"https://api.github.com/users/Sorky/events{/privacy}","received_events_url":"https://api.github.com/users/Sorky/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-06T16:44:12Z","updated_at":"2018-11-06T16:45:59Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/kikito/inspect.lua/pulls/42","html_url":"https://github.com/kikito/inspect.lua/pull/42","diff_url":"https://github.com/kikito/inspect.lua/pull/42.diff","patch_url":"https://github.com/kikito/inspect.lua/pull/42.patch"},"body":"Keep / discard / improve - Just sharing if you are interested...\r\n\r\n  1. Allows the inspect to wait until needed\r\n  2. Print (with user set text) rather than return\r\n\r\nTest...\r\n\r\n  -- Variables\r\n  local extensions = {\"png\", \"bmp\", {[\"jpg\"] = 1, [\"jpeg\"] = 2}}\r\n\r\n  -- Code\r\n  print(inspect(extensions))                                                                         -- \"A\"\r\n  print(inspect(extensions, {wait = true}))                                                          -- \"B\"\r\n  print(\"C: Inspecting 'extensions': \" .. inspect(extensions))                                       -- \"C\"\r\n  print(inspect(extensions, {start = true}))                                                         -- \"D\"\r\n  print(\"E: Inspecting 'extensions': \" .. inspect(extensions, {wait = true}))                        -- \"E\"\r\n  inspect(extensions, {wait = true, doprint = \"F: Inspecting 'extensions'...\"})                      -- \"F\"\r\n  inspect(extensions, {wait = true, doprint = \"\" })                                                  -- \"G\"\r\n  inspect({},{stop = true})                                                                          -- \"H\"\r\n  inspect( extensions, {wait = true, doprint = \"I: This should not inspect\"})                        -- \"I\"\r\n  for i=1,4 do                                                                                       -- \"J\"\r\n      if i == 3 then inspect(_,{start = 1}) else inspect(_,{stop = 1}) end                           -- \"K\"\r\n      inspect( extensions, {wait = true, doprint = \"L: Inspecting 'extensions' (\" .. i .. \")...\" } ) -- \"L\"\r\n  end\r\n\r\nOutput...\r\n\r\n  { \"png\", \"bmp\", {\r\n      jpeg = 2,\r\n      jpg = 1\r\n    } }\r\n  did not inspect - waiting for a start\r\n  C: Inspecting 'extensions': { \"png\", \"bmp\", {\r\n      jpeg = 2,\r\n      jpg = 1\r\n    } }\r\n  inspect enabled\r\n  E: Inspecting 'extensions': { \"png\", \"bmp\", {\r\n      jpeg = 2,\r\n      jpg = 1\r\n    } }\r\n  F: Inspecting 'extensions'...\r\n  { \"png\", \"bmp\", {\r\n      jpeg = 2,\r\n      jpg = 1\r\n    } }\r\n  { \"png\", \"bmp\", {\r\n      jpeg = 2,\r\n      jpg = 1\r\n    } }\r\n  L: Inspecting 'extensions' (3)...\r\n  { \"png\", \"bmp\", {\r\n      jpeg = 2,\r\n      jpg = 1\r\n    } }\r\n\r\nCommentary...\r\n\r\n  A: Original way still works\r\n  B: Will only work when called after a call with start=true [note: status message added when using the original way]\r\n  C: Original way still works [only usage with wait enabled can get blocked]\r\n  D: Enable all subsequent wait enabled calls [Does not inspect the element / bonus status message when using the original way]\r\n  E: Basically the same as 'C' but it will now work because a start has been done [unlike 'B' which was blocke]\r\n  F: Basically the same as 'E' but using the new doprint option\r\n  G: Basically the same as 'E' but using the new doprint option with no preamble\r\n  H: Stop further inspections [absolutely nothing prints as opposed to 'D']\r\n  I: Inspection blocked just like 'B' [but absolutely nothing prints unlike 'B']\r\n  J: One situation where the new options can really help follows...\r\n  K: Start and stop selectively [using simplest option settings with absolutely nothing printing]\r\n  L: Thanks to 'K' it only inspects the chosen instance [3] !!!\r\n\r\nNotes...\r\n\r\n  1. As shown in 'G' and 'K', all new options only need to exist and not be nil or false (ie: Can even be 1 or \"\")\r\n  2. BONUS = Can start & stop inspection in one file from another!\r\n\r\nPS...\r\n\r\n  Thanks for sharing the original!"},"comment":{"url":"https://api.github.com/repos/kikito/inspect.lua/issues/comments/436322933","html_url":"https://github.com/kikito/inspect.lua/pull/42#issuecomment-436322933","issue_url":"https://api.github.com/repos/kikito/inspect.lua/issues/42","id":436322933,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNjMyMjkzMw==","user":{"login":"coveralls","id":2354108,"node_id":"MDQ6VXNlcjIzNTQxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-11-06T16:45:59Z","updated_at":"2018-11-06T16:45:59Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/19939248/badge)](https://coveralls.io/builds/19939248)\n\nCoverage decreased (-1.8%) to 97.448% when pulling **7e38027990c3fda2dff489f074fcacb496df224c on Sorky:patch-1** into **b611db6bfa9c12ce35dd4972032fbbd2ad5ba965 on kikito:master**.\n"}}
{"actor":{"display_login":"coveralls"}}