{"action":"closed","issue":{"url":"https://api.github.com/repos/chefspec/chefspec/issues/896","repository_url":"https://api.github.com/repos/chefspec/chefspec","labels_url":"https://api.github.com/repos/chefspec/chefspec/issues/896/labels{/name}","comments_url":"https://api.github.com/repos/chefspec/chefspec/issues/896/comments","events_url":"https://api.github.com/repos/chefspec/chefspec/issues/896/events","html_url":"https://github.com/chefspec/chefspec/issues/896","id":310513999,"number":896,"title":"ChefSpec crashes when installing gems with no version constraints","user":{"login":"josacar","id":1630686,"avatar_url":"https://avatars2.githubusercontent.com/u/1630686?v=4","gravatar_id":"","url":"https://api.github.com/users/josacar","html_url":"https://github.com/josacar","followers_url":"https://api.github.com/users/josacar/followers","following_url":"https://api.github.com/users/josacar/following{/other_user}","gists_url":"https://api.github.com/users/josacar/gists{/gist_id}","starred_url":"https://api.github.com/users/josacar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josacar/subscriptions","organizations_url":"https://api.github.com/users/josacar/orgs","repos_url":"https://api.github.com/users/josacar/repos","events_url":"https://api.github.com/users/josacar/events{/privacy}","received_events_url":"https://api.github.com/users/josacar/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-02T15:20:49Z","updated_at":"2018-05-08T18:19:13Z","closed_at":"2018-05-08T18:19:13Z","author_association":"CONTRIBUTOR","body":"ChefSpec 7.1.2 when including a cookbook that has a `gem` dependency in`metadata.rb` results in crash, ChefSpec 7.1.1 works fine.\r\n\r\nFor example:\r\n\r\n```\r\nname 'glare'\r\nmaintainer 'Flywire'\r\nmaintainer_email 'engineering@flywire.com'\r\nlicense 'MIT'\r\ndescription 'Manages Cloudflare resources via API v4'\r\nlong_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))\r\nversion '1.0.6'\r\n\r\nsource_url 'https://github.com/peertransfer/glare-cookbook'\r\nissues_url 'https://github.com/peertransfer/glare-cookbook/issues'\r\n\r\nsupports 'debian'\r\nsupports 'ubuntu'\r\nsupports 'centos'\r\n\r\nchef_version '>= 12.6'\r\n\r\ngem 'glare'\r\n```\r\n\r\nThis is the backtrace:\r\n\r\n```\r\n  1) monitoring::default in wadus.com\r\n     Failure/Error: cached(:subject) { runner.converge(described_recipe) }\r\n\r\n     NoMethodError:\r\n       undefined method `first' for \"glare\":String\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/extensions/chef/cookbook/gem_installer.rb:13:in `block (2 levels) in install'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/extensions/chef/cookbook/gem_installer.rb:11:in `each'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/extensions/chef/cookbook/gem_installer.rb:11:in `block in install'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/extensions/chef/cookbook/gem_installer.rb:10:in `each'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/extensions/chef/cookbook/gem_installer.rb:10:in `install'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chef-12.21.31/lib/chef/cookbook/cookbook_collection.rb:60:in `install_gems'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chef-12.21.31/lib/chef/policy_builder/expand_node_object.rb:78:in `setup_run_context'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chef-12.21.31/lib/chef/client.rb:513:in `setup_run_context'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/solo_runner.rb:119:in `converge'\r\n     # ./spec/default_spec.rb:17:in `block (3 levels) in <top (required)>'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/cacher.rb:50:in `instance_eval'\r\n     # /Users/selu/code/platform/infra/vendor/bundle/gems/chefspec-7.1.2/lib/chefspec/cacher.rb:50:in `block in cached'\r\n     # ./spec/default_spec.rb:20:in `block (3 levels) in <top (required)>'\r\n```"}}
{"actor":{"display_login":"lamont-granquist"}}