{"action":"created","issue":{"url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/issues/181","labels_url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/issues/181/comments","events_url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/issues/181/events","html_url":"https://github.com/HabitRPG/habitrpg-ios/pull/181","id":103905626,"number":181,"title":"Pods:  use a Gemfile + lock to manage CocoaPods version","user":{"login":"jmoody","id":466104,"avatar_url":"https://avatars.githubusercontent.com/u/466104?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoody","html_url":"https://github.com/jmoody","followers_url":"https://api.github.com/users/jmoody/followers","following_url":"https://api.github.com/users/jmoody/following{/other_user}","gists_url":"https://api.github.com/users/jmoody/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoody/subscriptions","organizations_url":"https://api.github.com/users/jmoody/orgs","repos_url":"https://api.github.com/users/jmoody/repos","events_url":"https://api.github.com/users/jmoody/events{/privacy}","received_events_url":"https://api.github.com/users/jmoody/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-30T07:20:38Z","updated_at":"2015-08-30T10:59:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/pulls/181","html_url":"https://github.com/HabitRPG/habitrpg-ios/pull/181","diff_url":"https://github.com/HabitRPG/habitrpg-ios/pull/181.diff","patch_url":"https://github.com/HabitRPG/habitrpg-ios/pull/181.patch"},"body":"### Motivation\r\n\r\nI have multiple versions of CocoaPods installed on my machines.  Different projects require different versions of CocoaPods.  Running `pod install` will not work for me because I will never know what version of `pod` will be used.  This is especially problematic when testing beta versions of CocoaPods.\r\n\r\nI added a Gemfile + lock that pins the version to 0.38.2 - the most recent released version.\r\n\r\nTo take advantage of the Gemfile + lock, use bundler.\r\n\r\n```\r\n$ bundle exec pod install\r\n```\r\n\r\nCocoaPods has a habit of introducing breaking/incompatible changes between versions.  Pinning to a specific version of CocoaPods is a good practice.  It is, after all, a dependency.\r\n\r\nFor most developers, adding a Gemfile + lock will be transparent.  If they don't run `bundle exec pod install`, the Gemfile + lock will be ignored.\r\n\r\nWhen a new release of CocoaPods comes out, you can _update the dependency_ by changing the Gemfile and running:\r\n\r\n```\r\n$ bundle update\r\n```\r\n\r\nand committing the Gemfile and Gemfile.lock.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/issues/comments/136128037","html_url":"https://github.com/HabitRPG/habitrpg-ios/pull/181#issuecomment-136128037","issue_url":"https://api.github.com/repos/HabitRPG/habitrpg-ios/issues/181","id":136128037,"user":{"login":"jmoody","id":466104,"avatar_url":"https://avatars.githubusercontent.com/u/466104?v=3","gravatar_id":"","url":"https://api.github.com/users/jmoody","html_url":"https://github.com/jmoody","followers_url":"https://api.github.com/users/jmoody/followers","following_url":"https://api.github.com/users/jmoody/following{/other_user}","gists_url":"https://api.github.com/users/jmoody/gists{/gist_id}","starred_url":"https://api.github.com/users/jmoody/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmoody/subscriptions","organizations_url":"https://api.github.com/users/jmoody/orgs","repos_url":"https://api.github.com/users/jmoody/repos","events_url":"https://api.github.com/users/jmoody/events{/privacy}","received_events_url":"https://api.github.com/users/jmoody/received_events","type":"User","site_admin":false},"created_at":"2015-08-30T10:59:12Z","updated_at":"2015-08-30T10:59:12Z","body":"@crookedneighbor \r\n\r\nI think I am in favor of not updating the README.  Users who see a Gemfile, use bundler, and understand CocoaPods will know what to do.  Users with no experience with this stack might be confused by terms like \"managed ruby environment\".\r\n\r\nUsing bundler with `sudo` is not a good idea, so instructions like this:\r\n\r\n```\r\n$ sudo gem install bundler\r\n$ bundle install\r\n$ bundle exec pod install\r\n```\r\n\r\nare not appropriate.  You might even need to throw a `sudo` in front the bundle commands...\r\n\r\nI guess it depends on what kind of contributor you are trying to attract. :)\r\n\r\nAnyhow, I updated the README.md with details about how to stand up the CocoaPods environment with bundler.\r\n\r\nIn my opinion, installing gems with `sudo` is dangerous because during installation the gem can execute arbitrary commands.  A managed ruby environment (rbenv, rvm) or an environment that manages `GEM_HOME` and `GEM_PATH` is preferred.\r\n"}}