Skip to content

Commit 95781f6

Browse files
committed
Merge remote-tracking branch 'upstream/master' into main
2 parents 0a85dac + 8c1d417 commit 95781f6

File tree

4 files changed

+34
-20
lines changed

4 files changed

+34
-20
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,19 @@ env:
2727
- PUPPET_GEM_VERSION="~> 6.0"
2828
RUBY_VER=2.5.1
2929
RAKE_TASK="gem_revendor test_languageserver test_languageserver_sidecar test_debugserver"
30+
# Latest 7.x Puppet
31+
- PUPPET_GEM_VERSION="~> 7.0"
32+
RUBY_VER=2.7.2
33+
RAKE_TASK="gem_revendor test_languageserver test_languageserver_sidecar test_debugserver"
3034

3135
# Specific Puppet version testing
3236
- PUPPET_GEM_VERSION="5.1.0"
3337
RUBY_VER=2.4.1
3438
RAKE_TASK="gem_revendor test_languageserver"
3539

3640
# Acceptance tests.
37-
- PUPPET_GEM_VERSION="~> 6.0"
38-
RUBY_VER=2.5.1
41+
- PUPPET_GEM_VERSION="~> 7.0"
42+
RUBY_VER=2.7.2
3943
RAKE_TASK="gem_revendor acceptance_languageserver"
4044

4145
# Ruby tasks (style). Puppet version is irrelevant

appveyor.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ version: 99.99.0-appv.{build}
22
clone_depth: 10
33
init:
44
- SET
5+
image:
6+
- Visual Studio 2019
57

68
environment:
79
matrix:
@@ -15,17 +17,22 @@ environment:
1517
RUBY_VER: 25-x64
1618
RAKE_TASK: "gem_revendor test_languageserver test_languageserver_sidecar test_debugserver"
1719

18-
# Specific Puppet version testing
20+
# Latest 7.x Puppet
21+
- PUPPET_GEM_VERSION: "~> 7.0"
22+
RUBY_VER: 27-x64
23+
RAKE_TASK: "gem_revendor test_languageserver test_languageserver_sidecar test_debugserver"
24+
25+
# Specific Puppet version testing
1926
- PUPPET_GEM_VERSION: "5.1.0"
2027
RUBY_VER: 24-x64
2128
RAKE_TASK: "gem_revendor test_languageserver"
2229

23-
# Acceptance tests.
24-
- PUPPET_GEM_VERSION: "~> 6.0"
25-
RUBY_VER: 25-x64
30+
# Acceptance tests
31+
- PUPPET_GEM_VERSION: "~> 7.0"
32+
RUBY_VER: 27-x64
2633
RAKE_TASK: "gem_revendor acceptance_languageserver"
2734

28-
# Ruby tasks (style, build release archives)
35+
# Ruby tasks (style, build release archives)
2936
- PUPPET_GEM_VERSION: "> 0.0" # Version is irrelevant
3037
RUBY_VER: 25-x64
3138
RAKE_TASK: rubocop build
@@ -37,7 +44,7 @@ install:
3744
- ps: |
3845
if ($ENV:APPVEYOR_PULL_REQUEST_NUMBER -ne $null) {
3946
Write-Host "Setting build version..."
40-
$ENV:APPVEYOR_BUILD_VERSION | Out-File -FilePath 'lib\puppet-editor-services\VERSION' -Encoding ASCII -Confirm:$false -Force
47+
$ENV:APPVEYOR_BUILD_VERSION | Out-File -FilePath 'lib\puppet_editor_services\VERSION' -Encoding ASCII -Confirm:$false -Force
4148
}
4249
4350
if ($ENV:RUBY_VER -ne $null) {

lib/puppet-languageserver-sidecar/puppet_strings_helper.rb

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,16 +230,19 @@ def populate_functions_from_yard_registry!
230230

231231
sig.key = signature[:signature]
232232
sig.doc = signature[:docstring][:text]
233-
signature[:docstring][:tags].each do |tag|
234-
case tag[:tag_name]
235-
when 'param'
236-
sig.parameters << PuppetLanguageServer::Sidecar::Protocol::PuppetFunctionSignatureParameter.new.from_h!(
237-
'name' => tag[:name],
238-
'types' => tag[:types],
239-
'doc' => tag[:text]
240-
)
241-
when 'return'
242-
sig.return_types = tag[:types]
233+
234+
unless signature[:docstring][:tags].nil?
235+
signature[:docstring][:tags].each do |tag|
236+
case tag[:tag_name]
237+
when 'param'
238+
sig.parameters << PuppetLanguageServer::Sidecar::Protocol::PuppetFunctionSignatureParameter.new.from_h!(
239+
'name' => tag[:name],
240+
'types' => tag[:types],
241+
'doc' => tag[:text]
242+
)
243+
when 'return'
244+
sig.return_types = tag[:types]
245+
end
243246
end
244247
end
245248
calculate_signature_parameter_locations!(sig)

spec/languageserver-sidecar/integration/puppet-languageserver-sidecar/puppet-languageserver-sidecar_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ def run_sidecar(cmd_options)
1313

1414
cmd.unshift('puppet-languageserver-sidecar')
1515
cmd.unshift('ruby')
16-
stdout, _stderr, status = Open3.capture3(*cmd)
16+
stdout, stderr, status = Open3.capture3(*cmd)
1717

18-
raise "Expected exit code of 0, but got #{status.exitstatus} #{_stderr}" unless status.exitstatus.zero?
18+
raise "Expected exit code of 0, but got #{status.exitstatus} #{stderr}" unless status.exitstatus.zero?
1919
return stdout.bytes.pack('U*')
2020
end
2121

0 commit comments

Comments
 (0)