{"action":"created","issue":{"url":"https://api.github.com/repos/bundler/bundler/issues/3899","labels_url":"https://api.github.com/repos/bundler/bundler/issues/3899/labels{/name}","comments_url":"https://api.github.com/repos/bundler/bundler/issues/3899/comments","events_url":"https://api.github.com/repos/bundler/bundler/issues/3899/events","html_url":"https://github.com/bundler/bundler/issues/3899","id":98282875,"number":3899,"title":"A CLI flag to install a gem and add definition to Gemfile","user":{"login":"jingweno","id":169064,"avatar_url":"https://avatars.githubusercontent.com/u/169064?v=3","gravatar_id":"","url":"https://api.github.com/users/jingweno","html_url":"https://github.com/jingweno","followers_url":"https://api.github.com/users/jingweno/followers","following_url":"https://api.github.com/users/jingweno/following{/other_user}","gists_url":"https://api.github.com/users/jingweno/gists{/gist_id}","starred_url":"https://api.github.com/users/jingweno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingweno/subscriptions","organizations_url":"https://api.github.com/users/jingweno/orgs","repos_url":"https://api.github.com/users/jingweno/repos","events_url":"https://api.github.com/users/jingweno/events{/privacy}","received_events_url":"https://api.github.com/users/jingweno/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-30T23:04:40Z","updated_at":"2015-07-31T00:14:11Z","closed_at":null,"body":"What do you think of adding an optional flag to insert gem definition to `Gemfile` as part of `bundle install`:\r\n\r\n```\r\n$ bundle install a_gem --save\r\n```\r\n\r\nThe gem is installed, an entry is added to `Gemfile`:\r\n\r\n```rb\r\ngem 'a_gem'\r\n```\r\n\r\nand `Gemfile.lock` is updated to lock to the latest version.\r\n\r\nOther usage:\r\n\r\n```\r\n$ bundle install a_gem --version 0.0.1 --save development\r\n```\r\n\r\nThen in `Gemfile`:\r\n\r\n```rb\r\ngroup :development do\r\n  gem 'a_gem', '0.0.1'\r\nend\r\n```\r\n\r\nI would like to discuss it before contributing this feature.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bundler/bundler/issues/comments/126527140","html_url":"https://github.com/bundler/bundler/issues/3899#issuecomment-126527140","issue_url":"https://api.github.com/repos/bundler/bundler/issues/3899","id":126527140,"user":{"login":"jingweno","id":169064,"avatar_url":"https://avatars.githubusercontent.com/u/169064?v=3","gravatar_id":"","url":"https://api.github.com/users/jingweno","html_url":"https://github.com/jingweno","followers_url":"https://api.github.com/users/jingweno/followers","following_url":"https://api.github.com/users/jingweno/following{/other_user}","gists_url":"https://api.github.com/users/jingweno/gists{/gist_id}","starred_url":"https://api.github.com/users/jingweno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jingweno/subscriptions","organizations_url":"https://api.github.com/users/jingweno/orgs","repos_url":"https://api.github.com/users/jingweno/repos","events_url":"https://api.github.com/users/jingweno/events{/privacy}","received_events_url":"https://api.github.com/users/jingweno/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T00:14:11Z","updated_at":"2015-07-31T00:14:11Z","body":"@indirect What does `bundle-add` do? Why needing another wrapper? I could contribute this feature. But basically my preference is a flag in `bundle install` as mentioned in the description."}}