{"action":"created","issue":{"url":"https://api.github.com/repos/dylanratcliffe/controlrepo_gem/issues/5","labels_url":"https://api.github.com/repos/dylanratcliffe/controlrepo_gem/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/dylanratcliffe/controlrepo_gem/issues/5/comments","events_url":"https://api.github.com/repos/dylanratcliffe/controlrepo_gem/issues/5/events","html_url":"https://github.com/dylanratcliffe/controlrepo_gem/issues/5","id":117284987,"number":5,"title":"[bug] ruby error when running controlrepo_spec","user":{"login":"GeoffWilliams","id":3904115,"avatar_url":"https://avatars.githubusercontent.com/u/3904115?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoffWilliams","html_url":"https://github.com/GeoffWilliams","followers_url":"https://api.github.com/users/GeoffWilliams/followers","following_url":"https://api.github.com/users/GeoffWilliams/following{/other_user}","gists_url":"https://api.github.com/users/GeoffWilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoffWilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoffWilliams/subscriptions","organizations_url":"https://api.github.com/users/GeoffWilliams/orgs","repos_url":"https://api.github.com/users/GeoffWilliams/repos","events_url":"https://api.github.com/users/GeoffWilliams/events{/privacy}","received_events_url":"https://api.github.com/users/GeoffWilliams/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-17T05:20:40Z","updated_at":"2015-11-17T05:22:12Z","closed_at":null,"body":"## Overview\r\nRuby error encountered after copying in default config files from https://github.com/dylanratcliffe/puppet_controlrepo\r\n\r\n## Expected result\r\nTests should run or give actionable error\r\n\r\n## Actual result\r\n\r\n```shell\r\ngeoff ~/github/r10k-control $ bundle exec rake controlrepo_spec\r\nrake aborted!\r\nTypeError: no implicit conversion of nil into String\r\n/Library/Ruby/Gems/2.0.0/gems/controlrepo-2.0.1/lib/controlrepo.rb:260:in `r10k_config'\r\n/Library/Ruby/Gems/2.0.0/gems/controlrepo-2.0.1/lib/controlrepo/testconfig.rb:108:in `r10k_deploy_local'\r\n/Library/Ruby/Gems/2.0.0/gems/controlrepo-2.0.1/lib/controlrepo/rake_tasks.rb:87:in `block in <top (required)>'\r\nTasks: TOP => controlrepo_spec => controlrepo_autotest_prep\r\n(See full trace by running task with --trace)\r\n```\r\n\r\n## trace output\r\n```shell\r\ngeoff ~/github/r10k-control $ bundle exec rake controlrepo_spec --trace\r\n** Invoke controlrepo_spec (first_time)\r\n** Invoke controlrepo_autotest_prep (first_time)\r\n** Execute controlrepo_autotest_prep\r\nrake aborted!\r\nTypeError: no implicit conversion of nil into String\r\n/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `initialize'\r\n/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `open'\r\n/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:299:in `load_file'\r\n/Library/Ruby/Gems/2.0.0/gems/controlrepo-2.0.1/lib/controlrepo.rb:260:in `r10k_config'\r\n/Library/Ruby/Gems/2.0.0/gems/controlrepo-2.0.1/lib/controlrepo/testconfig.rb:108:in `r10k_deploy_local'\r\n/Library/Ruby/Gems/2.0.0/gems/controlrepo-2.0.1/lib/controlrepo/rake_tasks.rb:87:in `block in <top (required)>'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'\r\n/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'\r\n/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'\r\n/Library/Ruby/Gems/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'\r\n/usr/bin/rake:23:in `load'\r\n/usr/bin/rake:23:in `<main>'\r\nTasks: TOP => controlrepo_spec => controlrepo_autotest_prep\r\n```"},"comment":{"url":"https://api.github.com/repos/dylanratcliffe/controlrepo_gem/issues/comments/157272719","html_url":"https://github.com/dylanratcliffe/controlrepo_gem/issues/5#issuecomment-157272719","issue_url":"https://api.github.com/repos/dylanratcliffe/controlrepo_gem/issues/5","id":157272719,"user":{"login":"GeoffWilliams","id":3904115,"avatar_url":"https://avatars.githubusercontent.com/u/3904115?v=3","gravatar_id":"","url":"https://api.github.com/users/GeoffWilliams","html_url":"https://github.com/GeoffWilliams","followers_url":"https://api.github.com/users/GeoffWilliams/followers","following_url":"https://api.github.com/users/GeoffWilliams/following{/other_user}","gists_url":"https://api.github.com/users/GeoffWilliams/gists{/gist_id}","starred_url":"https://api.github.com/users/GeoffWilliams/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeoffWilliams/subscriptions","organizations_url":"https://api.github.com/users/GeoffWilliams/orgs","repos_url":"https://api.github.com/users/GeoffWilliams/repos","events_url":"https://api.github.com/users/GeoffWilliams/events{/privacy}","received_events_url":"https://api.github.com/users/GeoffWilliams/received_events","type":"User","site_admin":false},"created_at":"2015-11-17T05:22:12Z","updated_at":"2015-11-17T05:22:12Z","body":"Problem seems to be here:\r\n```ruby\r\n  def r10k_config_file\r\n    r10k_config_file = File.expand_path('./r10k.yaml',@spec_dir) if File.exist?(File.expand_path('./r10k.yaml',@spec_dir))\r\n    r10k_config_file = File.expand_path('./r10k.yaml',@root) if File.exist?(File.expand_path('./r10k.yaml',@root))\r\n    r10k_config_file\r\n  end\r\n\r\n  def r10k_config\r\n    YAML.load_file(r10k_config_file)\r\n  end\r\n```\r\n\r\nCan we live without an R10K config file and just process the Puppetfile?"}}