{"action":"created","issue":{"url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/issues/17","labels_url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/issues/17/comments","events_url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/issues/17/events","html_url":"https://github.com/gonzalo-bulnes/dredd-rack/pull/17","id":101050532,"number":17,"title":"Allow single blueprint argument","user":{"login":"rylnd","id":657252,"avatar_url":"https://avatars.githubusercontent.com/u/657252?v=3","gravatar_id":"","url":"https://api.github.com/users/rylnd","html_url":"https://github.com/rylnd","followers_url":"https://api.github.com/users/rylnd/followers","following_url":"https://api.github.com/users/rylnd/following{/other_user}","gists_url":"https://api.github.com/users/rylnd/gists{/gist_id}","starred_url":"https://api.github.com/users/rylnd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rylnd/subscriptions","organizations_url":"https://api.github.com/users/rylnd/orgs","repos_url":"https://api.github.com/users/rylnd/repos","events_url":"https://api.github.com/users/rylnd/events{/privacy}","received_events_url":"https://api.github.com/users/rylnd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-14T16:42:39Z","updated_at":"2015-08-15T17:26:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/pulls/17","html_url":"https://github.com/gonzalo-bulnes/dredd-rack/pull/17","diff_url":"https://github.com/gonzalo-bulnes/dredd-rack/pull/17.diff","patch_url":"https://github.com/gonzalo-bulnes/dredd-rack/pull/17.patch"},"body":"@gonzalo-bulnes currently, one is unable to do the following:\r\n\r\n```ruby\r\nDredd::Rack::RakeTask.new do |task|\r\n  task.runner.configure do |dredd|\r\n    dredd.paths_to_blueprints 'doc/*.apib'\r\n  end\r\nend\r\n```\r\n\r\nbecause the task exits early due to the # of arguments being checked _before_ we attempt to run the server (which has the side effect of adding an argument).\r\n\r\nThis is just a spike to get things working, so feel free to recommend a better solution. I tried my best to keep the documentation and tests up to date."},"comment":{"url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/issues/comments/131402989","html_url":"https://github.com/gonzalo-bulnes/dredd-rack/pull/17#issuecomment-131402989","issue_url":"https://api.github.com/repos/gonzalo-bulnes/dredd-rack/issues/17","id":131402989,"user":{"login":"gonzalo-bulnes","id":1619067,"avatar_url":"https://avatars.githubusercontent.com/u/1619067?v=3","gravatar_id":"","url":"https://api.github.com/users/gonzalo-bulnes","html_url":"https://github.com/gonzalo-bulnes","followers_url":"https://api.github.com/users/gonzalo-bulnes/followers","following_url":"https://api.github.com/users/gonzalo-bulnes/following{/other_user}","gists_url":"https://api.github.com/users/gonzalo-bulnes/gists{/gist_id}","starred_url":"https://api.github.com/users/gonzalo-bulnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gonzalo-bulnes/subscriptions","organizations_url":"https://api.github.com/users/gonzalo-bulnes/orgs","repos_url":"https://api.github.com/users/gonzalo-bulnes/repos","events_url":"https://api.github.com/users/gonzalo-bulnes/events{/privacy}","received_events_url":"https://api.github.com/users/gonzalo-bulnes/received_events","type":"User","site_admin":false},"created_at":"2015-08-15T17:26:59Z","updated_at":"2015-08-15T17:26:59Z","body":"@rylnd,\r\n\r\nI think I made a mistake and added the validation too early when running the command  (see the [code affected by the bug][affected], and the [code I think should not be affected by the bug][working]).\r\n\r\nWould moving the command validation fix the issue?\r\n\r\n```ruby\r\n# lib/dredd/rack/runner.rb\r\n\r\n# ...\r\n\r\n# Run Dredd\r\n#\r\n# Returns true if the Dredd exit status is zero, false instead.\r\ndef run\r\n  start_server! unless api_remote?\r\n  raise InvalidCommandError.new(command) unless command_valid?\r\n  Kernel.system(command)\r\nend\r\n\r\n# ...\r\n```\r\n\r\nIf it does, that would be simpler than adding specific command-length validation, don't you think?\r\n\r\n  [affected]: https://github.com/gonzalo-bulnes/dredd-rack/blob/master/lib/dredd/rack/runner.rb#L91-L98\r\n  [working]: https://github.com/gonzalo-bulnes/dredd-rack/blob/v0.6.0/lib/dredd/rack/runner.rb#L91-L100"}}