{"action":"created","issue":{"url":"https://api.github.com/repos/google/grinder.dart/issues/153","labels_url":"https://api.github.com/repos/google/grinder.dart/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/google/grinder.dart/issues/153/comments","events_url":"https://api.github.com/repos/google/grinder.dart/issues/153/events","html_url":"https://github.com/google/grinder.dart/issues/153","id":65252200,"number":153,"title":"Refactor PubApplication","user":{"login":"seaneagan","id":444270,"avatar_url":"https://avatars.githubusercontent.com/u/444270?v=3","gravatar_id":"","url":"https://api.github.com/users/seaneagan","html_url":"https://github.com/seaneagan","followers_url":"https://api.github.com/users/seaneagan/followers","following_url":"https://api.github.com/users/seaneagan/following{/other_user}","gists_url":"https://api.github.com/users/seaneagan/gists{/gist_id}","starred_url":"https://api.github.com/users/seaneagan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seaneagan/subscriptions","organizations_url":"https://api.github.com/users/seaneagan/orgs","repos_url":"https://api.github.com/users/seaneagan/repos","events_url":"https://api.github.com/users/seaneagan/events{/privacy}","received_events_url":"https://api.github.com/users/seaneagan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/google/grinder.dart/milestones/3","html_url":"https://github.com/google/grinder.dart/milestones/0.7.0","labels_url":"https://api.github.com/repos/google/grinder.dart/milestones/3/labels","id":995640,"number":3,"title":"0.7.0","description":"API refactoring!","creator":{"login":"devoncarew","id":1269969,"avatar_url":"https://avatars.githubusercontent.com/u/1269969?v=3","gravatar_id":"","url":"https://api.github.com/users/devoncarew","html_url":"https://github.com/devoncarew","followers_url":"https://api.github.com/users/devoncarew/followers","following_url":"https://api.github.com/users/devoncarew/following{/other_user}","gists_url":"https://api.github.com/users/devoncarew/gists{/gist_id}","starred_url":"https://api.github.com/users/devoncarew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devoncarew/subscriptions","organizations_url":"https://api.github.com/users/devoncarew/orgs","repos_url":"https://api.github.com/users/devoncarew/repos","events_url":"https://api.github.com/users/devoncarew/events{/privacy}","received_events_url":"https://api.github.com/users/devoncarew/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":13,"state":"open","created_at":"2015-02-25T18:41:37Z","updated_at":"2015-03-30T16:44:18Z","due_on":"2015-03-10T07:00:00Z","closed_at":null},"comments":6,"created_at":"2015-03-30T16:44:18Z","updated_at":"2015-04-01T07:21:13Z","closed_at":null,"body":"@devoncarew This is for the `PubApplication` class added in #71.  This doesn't need to block 0.7.0, but labeled as such so we can at least discuss it first:\r\n\r\n* I liked the original shorter name `PubApp` better, no need to spell out `Application`.\r\n* `isInstalled()` should be a getter, possibly renamed to `isActivated`.\r\n* It should allow running any cli app from the package, not just the same named one.  The name `PubApplication` suggests it should be a constructor parameter (e.g. `executable: 'foo'`), and not a `run` parameter, in which case `isInstalled` should check the `pub global list` output to see if the individual script is installed ([once that is supported](http://dartbug.com/20641)).  But it's then weird to `activate()` or `update()` an individual script, so maybe change their name to `activatePackage` / `updatePackage`.  Probably also need to add `packageName` along-side `appName`.\r\n* `pub run` has some advantages over `pub global run`.  Particularly matching the version of the package containing the script with the version used by the local package.  It should be supported as well.  Perhaps it can be an interface with (private) implementations for both global and local packages.  It can have an `isGlobal` property which is set by `PubApp.global` and `PubApp.local` constructors.  But `PubApp.activate()` doesn't make sense for local apps ([at least yet](https://docs.google.com/document/d/1lvbzyivCejhTuHLG4WI3YVThbQqJhPUrwajwTC-sXWU)), so maybe make it private for now, and just rely on it being done as part of `PubApp.run`?  Or just make it a no-op.  `PubApp.update` could potentially run `pub upgrade` (in which case, rename to `upgrade`?).  `PubApp.isInstalled` should check whether the script's containing package is in the pubspec.lock, and use the version found there to check the pub cache for the individual script existing in /bin.\r\n"},"comment":{"url":"https://api.github.com/repos/google/grinder.dart/issues/comments/88376903","html_url":"https://github.com/google/grinder.dart/issues/153#issuecomment-88376903","issue_url":"https://api.github.com/repos/google/grinder.dart/issues/153","id":88376903,"user":{"login":"zoechi","id":405837,"avatar_url":"https://avatars.githubusercontent.com/u/405837?v=3","gravatar_id":"","url":"https://api.github.com/users/zoechi","html_url":"https://github.com/zoechi","followers_url":"https://api.github.com/users/zoechi/followers","following_url":"https://api.github.com/users/zoechi/following{/other_user}","gists_url":"https://api.github.com/users/zoechi/gists{/gist_id}","starred_url":"https://api.github.com/users/zoechi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoechi/subscriptions","organizations_url":"https://api.github.com/users/zoechi/orgs","repos_url":"https://api.github.com/users/zoechi/repos","events_url":"https://api.github.com/users/zoechi/events{/privacy}","received_events_url":"https://api.github.com/users/zoechi/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T07:21:13Z","updated_at":"2015-04-01T07:21:13Z","body":"Is there a way in PubApplication for custom error handling?\r\nThe doc-comment doesn't tell anything about the behavior.\r\nIs all it does to fail the task when `exitCode != 0`?\r\n\r\nI tried to create a `check` tasks which runs `tuneup check`, the linter and I also want to check if the source is properly formatted.\r\n\r\n`dartformat -n .` doesn't change the exitCode yet when there are issues but it prints a list of files which would need to be fixed.\r\nI think there should be a way to handle the exit code in the task (only fail if `exitCode > 3` for example) and also to being able to subscribe to the stdout/stderr of the process would be great (see also dart-lang/dart_style#225)\r\n\r\n\r\n"}}