Skip to content

Commit

Permalink
Merge pull request #164 from eputnam/update_travis
Browse files Browse the repository at this point in the history
(PDOC-223) prepare travis for dropping old version support
  • Loading branch information
hunner committed Mar 22, 2018
2 parents 76b337a + be444fa commit 67f249c
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 25 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet-strings/yard/handlers/ruby/rsapi_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/puppet-strings/json_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ class klass(Integer $param1, $param2, String $param3 = hi) inherits foo::bar {
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
Expand Down
8 changes: 1 addition & 7 deletions spec/unit/puppet-strings/markdown_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ class noparams () {}
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
Expand Down Expand Up @@ -288,10 +288,4 @@ class noparams () {}
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,19 @@
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')
Expand All @@ -156,25 +156,25 @@
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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class foo {
}

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

Expand Down

0 comments on commit 67f249c

Please sign in to comment.