summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-07-21 11:15:22 -0700
committerGitHub <noreply@github.com>2017-07-21 11:15:22 -0700
commit607111eaec0b529defdfe74a61117e159ae646ff (patch)
treee58d3d22f53b1a710c4336ee0e3826266e29513f
parent30cc959bde0f00293cd28a77963f12a29b0086df (diff)
parent692672e69e617c34d606c23a0f50d77f2e055733 (diff)
downloadchef-607111eaec0b529defdfe74a61117e159ae646ff.tar.gz
Merge pull request #6289 from chef/lcg/fix-nil-maintainer
chef server rejects metadata with nil maintainer
-rw-r--r--lib/chef/cookbook/metadata.rb4
-rw-r--r--spec/unit/cookbook/metadata_spec.rb6
-rw-r--r--spec/unit/knife/cookbook_show_spec.rb6
3 files changed, 8 insertions, 8 deletions
diff --git a/lib/chef/cookbook/metadata.rb b/lib/chef/cookbook/metadata.rb
index 5efadd6f62..b23c01e622 100644
--- a/lib/chef/cookbook/metadata.rb
+++ b/lib/chef/cookbook/metadata.rb
@@ -100,8 +100,8 @@ class Chef
@long_description = ""
@license = "All rights reserved"
- @maintainer = nil
- @maintainer_email = nil
+ @maintainer = ""
+ @maintainer_email = ""
@platforms = Mash.new
@dependencies = Mash.new
diff --git a/spec/unit/cookbook/metadata_spec.rb b/spec/unit/cookbook/metadata_spec.rb
index 2fdc43c289..a91feec26d 100644
--- a/spec/unit/cookbook/metadata_spec.rb
+++ b/spec/unit/cookbook/metadata_spec.rb
@@ -1,7 +1,7 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
# Author:: Seth Falcon (<seth@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software, Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -98,11 +98,11 @@ describe Chef::Cookbook::Metadata do
end
it "has an empty maintainer field" do
- expect(metadata.maintainer).to eq(nil)
+ expect(metadata.maintainer).to eq("")
end
it "has an empty maintainer_email field" do
- expect(metadata.maintainer).to eq(nil)
+ expect(metadata.maintainer_email).to eq("")
end
it "has an empty platforms list" do
diff --git a/spec/unit/knife/cookbook_show_spec.rb b/spec/unit/knife/cookbook_show_spec.rb
index 1e8ea836d7..bd952c215f 100644
--- a/spec/unit/knife/cookbook_show_spec.rb
+++ b/spec/unit/knife/cookbook_show_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2017, Chef Software Inc.
# License:: Apache License, eersion 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -110,8 +110,8 @@ describe Chef::Knife::CookbookShow do
"name" => nil,
"description" => "",
"long_description" => "",
- "maintainer" => nil,
- "maintainer_email" => nil,
+ "maintainer" => "",
+ "maintainer_email" => "",
"license" => "All rights reserved",
"platforms" => {},
"dependencies" => {},