Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(PUP-10025) fix top-level docs output from puppet describe #247

Merged
merged 1 commit into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/puppet/resource_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ def register_type(definition)
end

Puppet::Type.newtype(definition[:name].to_sym) do
@docs = definition[:desc]
# The :desc value is already cleaned up by the TypeDefinition validation
@doc = definition[:desc]
@type_definition = type_def

# Keeps a copy of the provider around. Weird naming to avoid clashes with puppet's own `provider` member
Expand Down
2 changes: 1 addition & 1 deletion spec/puppet/resource_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

it { is_expected.not_to be_nil }
it { is_expected.to be_respond_to :instances }
it { expect(type.instance_variable_get(:@docs)).to eq 'the docs' }
it { expect(type.instance_variable_get(:@doc)).to eq 'the docs' }
end
end

Expand Down