{"action":"closed","number":2050,"pull_request":{"url":"https://api.github.com/repos/rspec/rspec-core/pulls/2050","id":41397893,"html_url":"https://github.com/rspec/rspec-core/pull/2050","diff_url":"https://github.com/rspec/rspec-core/pull/2050.diff","patch_url":"https://github.com/rspec/rspec-core/pull/2050.patch","issue_url":"https://api.github.com/repos/rspec/rspec-core/issues/2050","number":2050,"state":"closed","locked":false,"title":"allows rspec executable to take arguments from STDIN","user":{"login":"tonyta","id":5795302,"avatar_url":"https://avatars.githubusercontent.com/u/5795302?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyta","html_url":"https://github.com/tonyta","followers_url":"https://api.github.com/users/tonyta/followers","following_url":"https://api.github.com/users/tonyta/following{/other_user}","gists_url":"https://api.github.com/users/tonyta/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyta/subscriptions","organizations_url":"https://api.github.com/users/tonyta/orgs","repos_url":"https://api.github.com/users/tonyta/repos","events_url":"https://api.github.com/users/tonyta/events{/privacy}","received_events_url":"https://api.github.com/users/tonyta/received_events","type":"User","site_admin":false},"body":"This makes it possible to pipe (`|`) arguments from the previous process's `STDOUT` directly into `rspec`. `STDIN` args are simply concated onto `ARGV` and are handled by `RSpec::Core::Runner` as usual.\r\n\r\nThis is ignored when `STDIN` is associated with a terminal device (`tty`), i.e. when there is no process preceding and piped into `rspec`.\r\n\r\n**Examples:**\r\n\r\n```\r\n  $ echo 'test_spec.rb' | rspec --color\r\n\r\n  $ cat list_of_test_files.txt | rspec\r\n\r\n  $ git status | grep -oe '\\S*_spec.rb' | rspec --format doc\r\n```\r\n\r\n**Use Case:**\r\n\r\nThe idea for this came about when @jmschles and I got tired of copying and pasting filenames from the `git status` output into the prompt after the `rspec` command.\r\n```\r\n$ git status\r\nOn branch master\r\nYour branch is up-to-date with 'origin/master'.\r\nChanges not staged for commit:\r\n  (use \"git add <file>...\" to update what will be committed)\r\n  (use \"git checkout -- <file>...\" to discard changes in working directory)\r\n\r\n\tmodified:   lib/gelato.rb\r\n\tmodified:   spec/gelato_spec.rb\r\n\tmodified:   spec/gelato/support_spec.rb\r\n\r\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\r\n\r\n$ git status | grep --only-matching --regex='\\S*_spec.rb'\r\nspec/gelato_spec.rb\r\nspec/gelato/support_spec.rb\r\n\r\n$ git status | grep --only-matching --regex='\\S*_spec.rb' | rspec\r\n.....................FF...\r\n\r\nFinished in 0.0315 seconds (files took 0.21353 seconds to load)\r\n26 examples, 2 failures\r\n```\r\n---\r\nLemme know if you have any questions. I hope this is helpful! :smile_cat: :smile_cat: :smile_cat: ","created_at":"2015-08-01T07:09:30Z","updated_at":"2015-08-04T17:26:04Z","closed_at":"2015-08-04T17:26:04Z","merged_at":null,"merge_commit_sha":"4ebcc0299956a2757ff0f0889e4bd864359da9ff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rspec/rspec-core/pulls/2050/commits","review_comments_url":"https://api.github.com/repos/rspec/rspec-core/pulls/2050/comments","review_comment_url":"https://api.github.com/repos/rspec/rspec-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rspec/rspec-core/issues/2050/comments","statuses_url":"https://api.github.com/repos/rspec/rspec-core/statuses/b89b3924039881347dd651bac21bbfe17c95053e","head":{"label":"tonyta:stdin-args-pipeable","ref":"stdin-args-pipeable","sha":"b89b3924039881347dd651bac21bbfe17c95053e","user":{"login":"tonyta","id":5795302,"avatar_url":"https://avatars.githubusercontent.com/u/5795302?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyta","html_url":"https://github.com/tonyta","followers_url":"https://api.github.com/users/tonyta/followers","following_url":"https://api.github.com/users/tonyta/following{/other_user}","gists_url":"https://api.github.com/users/tonyta/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyta/subscriptions","organizations_url":"https://api.github.com/users/tonyta/orgs","repos_url":"https://api.github.com/users/tonyta/repos","events_url":"https://api.github.com/users/tonyta/events{/privacy}","received_events_url":"https://api.github.com/users/tonyta/received_events","type":"User","site_admin":false},"repo":{"id":40036491,"name":"rspec-core","full_name":"tonyta/rspec-core","owner":{"login":"tonyta","id":5795302,"avatar_url":"https://avatars.githubusercontent.com/u/5795302?v=3","gravatar_id":"","url":"https://api.github.com/users/tonyta","html_url":"https://github.com/tonyta","followers_url":"https://api.github.com/users/tonyta/followers","following_url":"https://api.github.com/users/tonyta/following{/other_user}","gists_url":"https://api.github.com/users/tonyta/gists{/gist_id}","starred_url":"https://api.github.com/users/tonyta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonyta/subscriptions","organizations_url":"https://api.github.com/users/tonyta/orgs","repos_url":"https://api.github.com/users/tonyta/repos","events_url":"https://api.github.com/users/tonyta/events{/privacy}","received_events_url":"https://api.github.com/users/tonyta/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tonyta/rspec-core","description":"RSpec runner and formatters","fork":true,"url":"https://api.github.com/repos/tonyta/rspec-core","forks_url":"https://api.github.com/repos/tonyta/rspec-core/forks","keys_url":"https://api.github.com/repos/tonyta/rspec-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tonyta/rspec-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tonyta/rspec-core/teams","hooks_url":"https://api.github.com/repos/tonyta/rspec-core/hooks","issue_events_url":"https://api.github.com/repos/tonyta/rspec-core/issues/events{/number}","events_url":"https://api.github.com/repos/tonyta/rspec-core/events","assignees_url":"https://api.github.com/repos/tonyta/rspec-core/assignees{/user}","branches_url":"https://api.github.com/repos/tonyta/rspec-core/branches{/branch}","tags_url":"https://api.github.com/repos/tonyta/rspec-core/tags","blobs_url":"https://api.github.com/repos/tonyta/rspec-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tonyta/rspec-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tonyta/rspec-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/tonyta/rspec-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tonyta/rspec-core/statuses/{sha}","languages_url":"https://api.github.com/repos/tonyta/rspec-core/languages","stargazers_url":"https://api.github.com/repos/tonyta/rspec-core/stargazers","contributors_url":"https://api.github.com/repos/tonyta/rspec-core/contributors","subscribers_url":"https://api.github.com/repos/tonyta/rspec-core/subscribers","subscription_url":"https://api.github.com/repos/tonyta/rspec-core/subscription","commits_url":"https://api.github.com/repos/tonyta/rspec-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/tonyta/rspec-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/tonyta/rspec-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/tonyta/rspec-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/tonyta/rspec-core/contents/{+path}","compare_url":"https://api.github.com/repos/tonyta/rspec-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tonyta/rspec-core/merges","archive_url":"https://api.github.com/repos/tonyta/rspec-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tonyta/rspec-core/downloads","issues_url":"https://api.github.com/repos/tonyta/rspec-core/issues{/number}","pulls_url":"https://api.github.com/repos/tonyta/rspec-core/pulls{/number}","milestones_url":"https://api.github.com/repos/tonyta/rspec-core/milestones{/number}","notifications_url":"https://api.github.com/repos/tonyta/rspec-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tonyta/rspec-core/labels{/name}","releases_url":"https://api.github.com/repos/tonyta/rspec-core/releases{/id}","created_at":"2015-08-01T05:29:51Z","updated_at":"2015-08-01T05:29:52Z","pushed_at":"2015-08-01T06:23:33Z","git_url":"git://github.com/tonyta/rspec-core.git","ssh_url":"git@github.com:tonyta/rspec-core.git","clone_url":"https://github.com/tonyta/rspec-core.git","svn_url":"https://github.com/tonyta/rspec-core","homepage":"http://relishapp.com/rspec/rspec-core","size":24158,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rspec:master","ref":"master","sha":"782a8a231d24a26c82e10bbaf895ef49e1442366","user":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"repo":{"id":238972,"name":"rspec-core","full_name":"rspec/rspec-core","owner":{"login":"rspec","id":22388,"avatar_url":"https://avatars.githubusercontent.com/u/22388?v=3","gravatar_id":"","url":"https://api.github.com/users/rspec","html_url":"https://github.com/rspec","followers_url":"https://api.github.com/users/rspec/followers","following_url":"https://api.github.com/users/rspec/following{/other_user}","gists_url":"https://api.github.com/users/rspec/gists{/gist_id}","starred_url":"https://api.github.com/users/rspec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rspec/subscriptions","organizations_url":"https://api.github.com/users/rspec/orgs","repos_url":"https://api.github.com/users/rspec/repos","events_url":"https://api.github.com/users/rspec/events{/privacy}","received_events_url":"https://api.github.com/users/rspec/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rspec/rspec-core","description":"RSpec runner and formatters","fork":false,"url":"https://api.github.com/repos/rspec/rspec-core","forks_url":"https://api.github.com/repos/rspec/rspec-core/forks","keys_url":"https://api.github.com/repos/rspec/rspec-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rspec/rspec-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rspec/rspec-core/teams","hooks_url":"https://api.github.com/repos/rspec/rspec-core/hooks","issue_events_url":"https://api.github.com/repos/rspec/rspec-core/issues/events{/number}","events_url":"https://api.github.com/repos/rspec/rspec-core/events","assignees_url":"https://api.github.com/repos/rspec/rspec-core/assignees{/user}","branches_url":"https://api.github.com/repos/rspec/rspec-core/branches{/branch}","tags_url":"https://api.github.com/repos/rspec/rspec-core/tags","blobs_url":"https://api.github.com/repos/rspec/rspec-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rspec/rspec-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rspec/rspec-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/rspec/rspec-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rspec/rspec-core/statuses/{sha}","languages_url":"https://api.github.com/repos/rspec/rspec-core/languages","stargazers_url":"https://api.github.com/repos/rspec/rspec-core/stargazers","contributors_url":"https://api.github.com/repos/rspec/rspec-core/contributors","subscribers_url":"https://api.github.com/repos/rspec/rspec-core/subscribers","subscription_url":"https://api.github.com/repos/rspec/rspec-core/subscription","commits_url":"https://api.github.com/repos/rspec/rspec-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/rspec/rspec-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/rspec/rspec-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/rspec/rspec-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/rspec/rspec-core/contents/{+path}","compare_url":"https://api.github.com/repos/rspec/rspec-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rspec/rspec-core/merges","archive_url":"https://api.github.com/repos/rspec/rspec-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rspec/rspec-core/downloads","issues_url":"https://api.github.com/repos/rspec/rspec-core/issues{/number}","pulls_url":"https://api.github.com/repos/rspec/rspec-core/pulls{/number}","milestones_url":"https://api.github.com/repos/rspec/rspec-core/milestones{/number}","notifications_url":"https://api.github.com/repos/rspec/rspec-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rspec/rspec-core/labels{/name}","releases_url":"https://api.github.com/repos/rspec/rspec-core/releases{/id}","created_at":"2009-06-29T15:41:05Z","updated_at":"2015-08-03T16:27:38Z","pushed_at":"2015-08-04T16:52:51Z","git_url":"git://github.com/rspec/rspec-core.git","ssh_url":"git@github.com:rspec/rspec-core.git","clone_url":"https://github.com/rspec/rspec-core.git","svn_url":"https://github.com/rspec/rspec-core","homepage":"http://relishapp.com/rspec/rspec-core","size":24158,"stargazers_count":686,"watchers_count":686,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":488,"mirror_url":null,"open_issues_count":29,"forks":488,"open_issues":29,"watchers":686,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2050"},"html":{"href":"https://github.com/rspec/rspec-core/pull/2050"},"issue":{"href":"https://api.github.com/repos/rspec/rspec-core/issues/2050"},"comments":{"href":"https://api.github.com/repos/rspec/rspec-core/issues/2050/comments"},"review_comments":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2050/comments"},"review_comment":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rspec/rspec-core/pulls/2050/commits"},"statuses":{"href":"https://api.github.com/repos/rspec/rspec-core/statuses/b89b3924039881347dd651bac21bbfe17c95053e"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":4,"deletions":0,"changed_files":1}}