{"action":"opened","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/3502","labels_url":"https://api.github.com/repos/bundler/bundler/issues/3502/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/3502/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/3502/events","html_url":"https://github.com/bundler/bundler/issues/3502","id":63837922,"number":3502,"title":"Clarify documentation of source selection with a block and what a bang (!) means","user":{"login":"aprescott","id":342081,"avatar_url":"https://avatars.githubusercontent.com/u/342081?v=3","gravatar_id":"","url":"https://api.github.com/users/aprescott","html_url":"https://github.com/aprescott","followers_url":"https://api.github.com/users/aprescott/followers","following_url":"https://api.github.com/users/aprescott/following{/other_user}","gists_url":"https://api.github.com/users/aprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/aprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aprescott/subscriptions","organizations_url":"https://api.github.com/users/aprescott/orgs","repos_url":"https://api.github.com/users/aprescott/repos","events_url":"https://api.github.com/users/aprescott/events{/privacy}","received_events_url":"https://api.github.com/users/aprescott/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-23T21:33:22Z","updated_at":"2015-03-23T21:33:22Z","closed_at":null,"body":"The new block-form of `source` is really great, and I'm glad it improves the security of `Gemfile`. Unfortunately, I had some confusion (see https://github.com/mperham/sidekiq/issues/2199#issuecomment-78264403 for example) around a `!` showing up in my `Gemfile.lock`. For example, when I changed\r\n\r\n```ruby\r\ngem \"foo\"\r\n```\r\n\r\nto\r\n\r\n```ruby\r\nsource \"https://example.com/foo\" do\r\n  gem \"foo\"\r\nend\r\n```\r\n\r\nMy `Gemfile.lock` changed from containing\r\n\r\n```\r\nfoo\r\n```\r\n\r\nto containing\r\n\r\n```\r\nfoo!\r\n```\r\n\r\nThis looked broken to me because I'd only ever seen `foo!` to mean \"this is coming from a local path\" or something similar.\r\n\r\nIn both the [1.7 changelog](http://bundler.io/v1.7/whats_new.html#version17) and the [1.8 changelog](http://bundler.io/v1.8/whats_new.html#version18) I couldn't find any explanation of whether the addition of a `!` was expected and all fine. A coworker later pointed me to [the relevant part of bundler's source](https://github.com/bundler/bundler/blob/cab48fb8273108eb95d5b4332bdb9ad21a6524fb/lib/bundler/lockfile_parser.rb#L106-L134).\r\n\r\nI think it'd be really useful to document that this is expected behavior somewhere. Perhaps also along with documentation of how `!` works in general?"}}