{"action":"closed","number":3937,"pull_request":{"url":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/3937","id":41227287,"html_url":"https://github.com/CocoaPods/CocoaPods/pull/3937","diff_url":"https://github.com/CocoaPods/CocoaPods/pull/3937.diff","patch_url":"https://github.com/CocoaPods/CocoaPods/pull/3937.patch","issue_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3937","number":3937,"state":"closed","locked":false,"title":"Add a command to check if dependencies are up to date","user":{"login":"marcomorain","id":448001,"avatar_url":"https://avatars.githubusercontent.com/u/448001?v=3","gravatar_id":"","url":"https://api.github.com/users/marcomorain","html_url":"https://github.com/marcomorain","followers_url":"https://api.github.com/users/marcomorain/followers","following_url":"https://api.github.com/users/marcomorain/following{/other_user}","gists_url":"https://api.github.com/users/marcomorain/gists{/gist_id}","starred_url":"https://api.github.com/users/marcomorain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcomorain/subscriptions","organizations_url":"https://api.github.com/users/marcomorain/orgs","repos_url":"https://api.github.com/users/marcomorain/repos","events_url":"https://api.github.com/users/marcomorain/events{/privacy}","received_events_url":"https://api.github.com/users/marcomorain/received_events","type":"User","site_admin":false},"body":":rainbow: :sunglasses: \r\n\r\n# Rational\r\n\r\nAt [CircleCi](https://circleci.com/mobile/ios) we automatically detect and run `pod install` when we detect a that contains a `Podfile` and an empty `Pods` directory. We cache the generated `Pods` folder from build to build, but we still need to run `pod install` to ensure that all dependencies are met. This call can take several minutes on every build. I want to add a command `pod check` that will exit with success when the Podfile.lock's manifest is satisfied, to allow us to run `pod check || pod install`, which should cut minutes off every build.\r\n\r\nI've been writing an internal system to perform the same test, but I would like to push the changes back upstream so that others may benefit.\r\n\r\n# Feature\r\n\r\nAdd a command `pod check` that returns success when the\r\npods specified in the lockfile are installed. This command\r\nis designed to mirror the `bundle check` command provided\r\nby bundler.\r\n\r\nThe expected use-case is to prevent having to run `pod install`\r\non every build in a CI scenario. The user should be able to\r\nrun `pod check || pod install` rather than pod install. This\r\ncan save minutes off CI builds.\r\n\r\nhttp://bundler.io/v1.1/bundle_check.html\r\n\r\n# TODO:\r\n\r\nI wanted to open this PR for discussion and feedback before I spend any more time polishing. Here is a list of tasks that are needed to finish this:\r\n\r\n- [ ] Write code docs\r\n- [ ] Write tests\r\n- [ ] Run linting tools\r\n\r\n# Example\r\n\r\n### Using `pod check` on an app with/without up-to-date pods \r\n\r\nHere is some example usage:\r\n```\r\nmarc@skywarp ~/dev/KiwiTester $ rm Podfile.lock\r\nmarc@skywarp ~/dev/KiwiTester $ pod check\r\n[!] No `Podfile.lock` found in the project directory, run `pod install`.\r\nmarc@skywarp ~/dev/KiwiTester $ pod install > /dev/null\r\nmarc@skywarp ~/dev/KiwiTester $ pod check\r\n\r\n[!] The applications's dependencies are satisfied.\r\nmarc@skywarp ~/dev/KiwiTester $ rm -r Pods\r\nmarc@skywarp ~/dev/KiwiTester $ pod check\r\n[!] Some dependencies are not met. Run `pod install` or update your CocoaPods installation.\r\nmarc@skywarp ~/dev/KiwiTester $ pod install > /dev/null\r\nmarc@skywarp ~/dev/KiwiTester $ pod check\r\n\r\n[!] The applications's dependencies are satisfied.\r\nmarc@skywarp ~/dev/KiwiTester $ sed -i -e '3d' Pods/Manifest.lock # Delete line 3 of Manifest.lock\r\nmarc@skywarp ~/dev/KiwiTester $ pod check\r\n[!] Some dependencies are not met. Run `pod install` or update your CocoaPods installation.\r\nmarc@skywarp ~/dev/KiwiTester $ pod install > /dev/null\r\nmarc@skywarp ~/dev/KiwiTester $ pod check\r\n\r\n[!] The applications's dependencies are satisfied.\r\n```\r\n\r\n### Running `pod install` on an app with dependencies that all already specified.\r\n```\r\nmarc@skywarp ~/dev/KiwiTester $ pod install > /dev/null  && /usr/bin/time pod install > /dev/null\r\n        6.46 real         3.72 user         0.70 sys\r\nmarc@skywarp ~/dev/KiwiTester $ pod install > /dev/null  && /usr/bin/time ../CocoaPods/bin/pod check || pod install\r\n\r\n[!] The applications's dependencies are satisfied.\r\n        0.51 real         0.44 user         0.07 sys\r\n```\r\n","created_at":"2015-07-30T12:19:37Z","updated_at":"2015-08-01T19:36:41Z","closed_at":"2015-08-01T19:36:41Z","merged_at":null,"merge_commit_sha":"8712cea820057582d9493033b77e63ea15acb04e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/3937/commits","review_comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/3937/comments","review_comment_url":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3937/comments","statuses_url":"https://api.github.com/repos/CocoaPods/CocoaPods/statuses/1dad03053db455d012b6be72dedb2e024414284e","head":{"label":"circleci:marc/pod-check","ref":"marc/pod-check","sha":"1dad03053db455d012b6be72dedb2e024414284e","user":{"login":"circleci","id":1231870,"avatar_url":"https://avatars.githubusercontent.com/u/1231870?v=3","gravatar_id":"","url":"https://api.github.com/users/circleci","html_url":"https://github.com/circleci","followers_url":"https://api.github.com/users/circleci/followers","following_url":"https://api.github.com/users/circleci/following{/other_user}","gists_url":"https://api.github.com/users/circleci/gists{/gist_id}","starred_url":"https://api.github.com/users/circleci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/circleci/subscriptions","organizations_url":"https://api.github.com/users/circleci/orgs","repos_url":"https://api.github.com/users/circleci/repos","events_url":"https://api.github.com/users/circleci/events{/privacy}","received_events_url":"https://api.github.com/users/circleci/received_events","type":"Organization","site_admin":false},"repo":{"id":39912799,"name":"CocoaPods","full_name":"circleci/CocoaPods","owner":{"login":"circleci","id":1231870,"avatar_url":"https://avatars.githubusercontent.com/u/1231870?v=3","gravatar_id":"","url":"https://api.github.com/users/circleci","html_url":"https://github.com/circleci","followers_url":"https://api.github.com/users/circleci/followers","following_url":"https://api.github.com/users/circleci/following{/other_user}","gists_url":"https://api.github.com/users/circleci/gists{/gist_id}","starred_url":"https://api.github.com/users/circleci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/circleci/subscriptions","organizations_url":"https://api.github.com/users/circleci/orgs","repos_url":"https://api.github.com/users/circleci/repos","events_url":"https://api.github.com/users/circleci/events{/privacy}","received_events_url":"https://api.github.com/users/circleci/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/circleci/CocoaPods","description":"The Cocoa Dependency Manager.","fork":true,"url":"https://api.github.com/repos/circleci/CocoaPods","forks_url":"https://api.github.com/repos/circleci/CocoaPods/forks","keys_url":"https://api.github.com/repos/circleci/CocoaPods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/circleci/CocoaPods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/circleci/CocoaPods/teams","hooks_url":"https://api.github.com/repos/circleci/CocoaPods/hooks","issue_events_url":"https://api.github.com/repos/circleci/CocoaPods/issues/events{/number}","events_url":"https://api.github.com/repos/circleci/CocoaPods/events","assignees_url":"https://api.github.com/repos/circleci/CocoaPods/assignees{/user}","branches_url":"https://api.github.com/repos/circleci/CocoaPods/branches{/branch}","tags_url":"https://api.github.com/repos/circleci/CocoaPods/tags","blobs_url":"https://api.github.com/repos/circleci/CocoaPods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/circleci/CocoaPods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/circleci/CocoaPods/git/refs{/sha}","trees_url":"https://api.github.com/repos/circleci/CocoaPods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/circleci/CocoaPods/statuses/{sha}","languages_url":"https://api.github.com/repos/circleci/CocoaPods/languages","stargazers_url":"https://api.github.com/repos/circleci/CocoaPods/stargazers","contributors_url":"https://api.github.com/repos/circleci/CocoaPods/contributors","subscribers_url":"https://api.github.com/repos/circleci/CocoaPods/subscribers","subscription_url":"https://api.github.com/repos/circleci/CocoaPods/subscription","commits_url":"https://api.github.com/repos/circleci/CocoaPods/commits{/sha}","git_commits_url":"https://api.github.com/repos/circleci/CocoaPods/git/commits{/sha}","comments_url":"https://api.github.com/repos/circleci/CocoaPods/comments{/number}","issue_comment_url":"https://api.github.com/repos/circleci/CocoaPods/issues/comments{/number}","contents_url":"https://api.github.com/repos/circleci/CocoaPods/contents/{+path}","compare_url":"https://api.github.com/repos/circleci/CocoaPods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/circleci/CocoaPods/merges","archive_url":"https://api.github.com/repos/circleci/CocoaPods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/circleci/CocoaPods/downloads","issues_url":"https://api.github.com/repos/circleci/CocoaPods/issues{/number}","pulls_url":"https://api.github.com/repos/circleci/CocoaPods/pulls{/number}","milestones_url":"https://api.github.com/repos/circleci/CocoaPods/milestones{/number}","notifications_url":"https://api.github.com/repos/circleci/CocoaPods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/circleci/CocoaPods/labels{/name}","releases_url":"https://api.github.com/repos/circleci/CocoaPods/releases{/id}","created_at":"2015-07-29T19:43:39Z","updated_at":"2015-07-29T19:43:42Z","pushed_at":"2015-07-30T12:07:54Z","git_url":"git://github.com/circleci/CocoaPods.git","ssh_url":"git@github.com:circleci/CocoaPods.git","clone_url":"https://github.com/circleci/CocoaPods.git","svn_url":"https://github.com/circleci/CocoaPods","homepage":"cocoapods.org","size":71661,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"CocoaPods:master","ref":"master","sha":"2f0f94659278617e9e07cfc1a413215e26f38f2a","user":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"repo":{"id":2203645,"name":"CocoaPods","full_name":"CocoaPods/CocoaPods","owner":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CocoaPods/CocoaPods","description":"The Cocoa Dependency Manager.","fork":false,"url":"https://api.github.com/repos/CocoaPods/CocoaPods","forks_url":"https://api.github.com/repos/CocoaPods/CocoaPods/forks","keys_url":"https://api.github.com/repos/CocoaPods/CocoaPods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CocoaPods/CocoaPods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CocoaPods/CocoaPods/teams","hooks_url":"https://api.github.com/repos/CocoaPods/CocoaPods/hooks","issue_events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/events{/number}","events_url":"https://api.github.com/repos/CocoaPods/CocoaPods/events","assignees_url":"https://api.github.com/repos/CocoaPods/CocoaPods/assignees{/user}","branches_url":"https://api.github.com/repos/CocoaPods/CocoaPods/branches{/branch}","tags_url":"https://api.github.com/repos/CocoaPods/CocoaPods/tags","blobs_url":"https://api.github.com/repos/CocoaPods/CocoaPods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CocoaPods/CocoaPods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CocoaPods/CocoaPods/git/refs{/sha}","trees_url":"https://api.github.com/repos/CocoaPods/CocoaPods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CocoaPods/CocoaPods/statuses/{sha}","languages_url":"https://api.github.com/repos/CocoaPods/CocoaPods/languages","stargazers_url":"https://api.github.com/repos/CocoaPods/CocoaPods/stargazers","contributors_url":"https://api.github.com/repos/CocoaPods/CocoaPods/contributors","subscribers_url":"https://api.github.com/repos/CocoaPods/CocoaPods/subscribers","subscription_url":"https://api.github.com/repos/CocoaPods/CocoaPods/subscription","commits_url":"https://api.github.com/repos/CocoaPods/CocoaPods/commits{/sha}","git_commits_url":"https://api.github.com/repos/CocoaPods/CocoaPods/git/commits{/sha}","comments_url":"https://api.github.com/repos/CocoaPods/CocoaPods/comments{/number}","issue_comment_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/comments{/number}","contents_url":"https://api.github.com/repos/CocoaPods/CocoaPods/contents/{+path}","compare_url":"https://api.github.com/repos/CocoaPods/CocoaPods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CocoaPods/CocoaPods/merges","archive_url":"https://api.github.com/repos/CocoaPods/CocoaPods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CocoaPods/CocoaPods/downloads","issues_url":"https://api.github.com/repos/CocoaPods/CocoaPods/issues{/number}","pulls_url":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls{/number}","milestones_url":"https://api.github.com/repos/CocoaPods/CocoaPods/milestones{/number}","notifications_url":"https://api.github.com/repos/CocoaPods/CocoaPods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CocoaPods/CocoaPods/labels{/name}","releases_url":"https://api.github.com/repos/CocoaPods/CocoaPods/releases{/id}","created_at":"2011-08-14T00:10:53Z","updated_at":"2015-08-01T15:50:18Z","pushed_at":"2015-07-30T14:55:19Z","git_url":"git://github.com/CocoaPods/CocoaPods.git","ssh_url":"git@github.com:CocoaPods/CocoaPods.git","clone_url":"https://github.com/CocoaPods/CocoaPods.git","svn_url":"https://github.com/CocoaPods/CocoaPods","homepage":"cocoapods.org","size":71661,"stargazers_count":6048,"watchers_count":6048,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1109,"mirror_url":null,"open_issues_count":208,"forks":1109,"open_issues":208,"watchers":6048,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/3937"},"html":{"href":"https://github.com/CocoaPods/CocoaPods/pull/3937"},"issue":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3937"},"comments":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/issues/3937/comments"},"review_comments":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/3937/comments"},"review_comment":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/pulls/3937/commits"},"statuses":{"href":"https://api.github.com/repos/CocoaPods/CocoaPods/statuses/1dad03053db455d012b6be72dedb2e024414284e"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":11,"review_comments":0,"commits":1,"additions":31,"deletions":0,"changed_files":2}}