Merge pull request #164 from eputnam/update_travis

(PDOC-223) prepare travis for dropping old version support
This commit is contained in:
Hunter Haugen 2018-03-22 13:35:29 -07:00
commit 67f249c8ea
No known key found for this signature in database
GPG Key ID: EF99694AA599DDAD
8 changed files with 15 additions and 25 deletions

View File

@ -14,14 +14,10 @@ before_install:
matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3" CHECK=spec
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3" CHECK=spec
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 3" CHECK=spec
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4" CHECK=spec
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 4" CHECK=spec
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 5" CHECK=spec
- rvm: 2.1.9

View File

@ -24,7 +24,7 @@ class PuppetStrings::Yard::Handlers::Ruby::RsapiHandler < PuppetStrings::Yard::H
object = PuppetStrings::Yard::CodeObjects::Type.new(schema['name'])
register object
docstring = schema['desc'] || ""
docstring = schema['docs']
if docstring
register_docstring(object, PuppetStrings::Yard::Util.scrub_string(docstring.to_s), nil)
else

View File

@ -151,7 +151,7 @@ end
Puppet::ResourceApi.register_type(
name: 'apt_key',
desc: <<-EOS,
docs: <<-EOS,
@summary Example resource type using the new API.
@raise SomeError
This type provides Puppet with the capabilities to manage GPG keys needed

View File

@ -236,7 +236,7 @@ end
Puppet::ResourceApi.register_type(
name: 'apt_key',
desc: <<-EOS,
docs: <<-EOS,
@summary Example resource type using the new API.
@raise SomeError
This type provides Puppet with the capabilities to manage GPG keys needed
@ -288,10 +288,4 @@ SOURCE
end
end
end
describe 'rendering markdown to stdout' do
it 'should output the expected markdown content' do
expect{ PuppetStrings::Markdown.render }.to output(baseline).to_stdout
end
end
end

View File

@ -19,7 +19,7 @@ describe PuppetStrings::Yard::Handlers::Puppet::ClassHandler do
let(:source) { 'class foo{' }
it 'should log an error' do
expect{ subject }.to output(/\[error\]: Failed to parse \(stdin\): Syntax error at end of file/).to_stdout_from_any_process
expect{ subject }.to output(/\[error\]: Failed to parse \(stdin\): Syntax error at end of (file|input)/).to_stdout_from_any_process
expect(subject.empty?).to eq(true)
end
end

View File

@ -19,7 +19,7 @@ describe PuppetStrings::Yard::Handlers::Puppet::DefinedTypeHandler do
let(:source) { 'define foo{' }
it 'should log an error' do
expect{ subject }.to output(/\[error\]: Failed to parse \(stdin\): Syntax error at end of file/).to_stdout_from_any_process
expect{ subject }.to output(/\[error\]: Failed to parse \(stdin\): Syntax error at end of (file|input)/).to_stdout_from_any_process
expect(subject.empty?).to eq(true)
end
end

View File

@ -133,19 +133,19 @@ SOURCE
expect(object.properties[1].docstring).to eq('What state the database should be in.')
expect(object.properties[1].isnamevar).to eq(false)
expect(object.properties[1].default).to eq('up')
expect(object.properties[1].values).to eq(['Enum[present, absent, up, down]'])
expect(object.properties[1].data_type).to eq('Enum[present, absent, up, down]')
expect(object.properties[1].aliases).to eq({})
expect(object.properties[2].name).to eq('file')
expect(object.properties[2].docstring).to eq('The database file to use.')
expect(object.properties[2].isnamevar).to eq(false)
expect(object.properties[2].default).to be_nil
expect(object.properties[2].values).to eq(['String'])
expect(object.properties[2].data_type).to eq('String')
expect(object.properties[2].aliases).to eq({})
expect(object.properties[3].name).to eq('log_level')
expect(object.properties[3].docstring).to eq('The log level to use.')
expect(object.properties[3].isnamevar).to eq(false)
expect(object.properties[3].default).to eq('warn')
expect(object.properties[3].values).to eq(['Enum[debug, warn, error]'])
expect(object.properties[3].data_type).to eq('Enum[debug, warn, error]')
expect(object.properties[3].aliases).to eq({})
expect(object.parameters.size).to eq(5)
expect(object.parameters[0].name).to eq('dynamic_param')
@ -156,25 +156,25 @@ SOURCE
expect(object.parameters[1].docstring).to eq('The database server name.')
expect(object.parameters[1].isnamevar).to eq(true)
expect(object.parameters[1].default).to be_nil
expect(object.parameters[1].values).to eq(['String'])
expect(object.parameters[1].data_type).to eq('String')
expect(object.parameters[1].aliases).to eq({})
expect(object.parameters[2].name).to eq('encrypt')
expect(object.parameters[2].docstring).to eq('Whether or not to encrypt the database.')
expect(object.parameters[2].isnamevar).to eq(false)
expect(object.parameters[2].default).to eq(false)
expect(object.parameters[2].values).to eq(["Boolean"])
expect(object.parameters[2].data_type).to eq("Boolean")
expect(object.parameters[2].aliases).to eq({})
expect(object.parameters[3].name).to eq('encryption_key')
expect(object.parameters[3].docstring).to eq('The encryption key to use.')
expect(object.parameters[3].isnamevar).to eq(false)
expect(object.parameters[3].default).to be_nil
expect(object.parameters[3].values).to eq(["Optional[String]"])
expect(object.parameters[3].data_type).to eq("Optional[String]")
expect(object.parameters[3].aliases).to eq({})
expect(object.parameters[4].name).to eq('backup')
expect(object.parameters[4].docstring).to eq('How often to backup the database.')
expect(object.parameters[4].isnamevar).to eq(false)
expect(object.parameters[4].default).to eq('never')
expect(object.parameters[4].values).to eq(["Enum[daily, monthly, never]"])
expect(object.parameters[4].data_type).to eq("Enum[daily, monthly, never]")
end
end

View File

@ -29,7 +29,7 @@ SOURCE
}
it 'should raise an exception' do
expect{ subject.parse }.to output(/\[error\]: Failed to parse test.pp: Syntax error at end of file/).to_stdout_from_any_process
expect{ subject.parse }.to output(/\[error\]: Failed to parse test.pp: Syntax error at end of (file|input)/).to_stdout_from_any_process
end
end