openvox-editor-services 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cda59eba9edbedf441cecc12f6e9008896fe7cbebee4fa7f54973c24042f5190
4
- data.tar.gz: 95b0094bfba3986aaa34b9672de8f606e49b54e7e78e98cbe8905e6236e61f1f
3
+ metadata.gz: 45f1302baf3215f01f4a9c4addc74551d9ec009b2707f00a3bb0576ca98b0f4d
4
+ data.tar.gz: f9559f9445a8db6bee287a416ef424cf7e880b10c3055d187e4f810b41556b01
5
5
  SHA512:
6
- metadata.gz: 9f8a477f7f92a7cbd9ccd0f48678a94da073c1115dd2e2873a539349e57e6fa079ea91829350cd0db18aacddb7e5d7ffd6d64ca800ebf4aa61e4af8dfeaa8d56
7
- data.tar.gz: 38d3f0bacdfa3cfcf46a66e702c17c95c1d7e83dd45501db9a0d540ea1c755a80d615d6d3d962fa7c18958dbbe8d663af71374abf8fbdac523ee1a4a205d7794
6
+ metadata.gz: 063ffa9274f4b198a2e365dfa6034811ee55a69c3a9ac9c16613c09c8b08d97dc4f897824b5f3cd74fea1a3c5cd3b930ca04647bc6fbc4ec961e1e036288d6cd
7
+ data.tar.gz: af25e6e058b839432325c8139becb1575f14c15e2017f655fffaa599c85e44bcd4d28cc3995e9374e1556d0f8fdebe162d4edf7b3d9fc90fb85314f8942a4a73
data/CHANGELOG.md CHANGED
@@ -1,8 +1,17 @@
1
1
  # Changelog
2
2
 
3
- ## [3.1.0](https://github.com/voxpupuli/openvox-editor-services/tree/3.1.0) (2026-07-03)
3
+ ## [3.1.1](https://github.com/voxpupuli/openvox-editor-services/tree/3.1.1) (2026-07-18)
4
4
 
5
- [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.0.0...3.1.0)
5
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.1.0...3.1.1)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - fix: use relative flag to fix autoload layout bug [\#14](https://github.com/voxpupuli/openvox-editor-services/pull/14) ([rwaffen](https://github.com/rwaffen))
10
+ - fix: patch autoload behavior [\#13](https://github.com/voxpupuli/openvox-editor-services/pull/13) ([rwaffen](https://github.com/rwaffen))
11
+
12
+ ## [v3.1.0](https://github.com/voxpupuli/openvox-editor-services/tree/v3.1.0) (2026-07-03)
13
+
14
+ [Full Changelog](https://github.com/voxpupuli/openvox-editor-services/compare/v3.0.0...v3.1.0)
6
15
 
7
16
  **Implemented enhancements:**
8
17
 
@@ -57,6 +57,7 @@ module PuppetLanguageServer
57
57
  results = case document_store.document_type(job_object.file_uri)
58
58
  when :manifest
59
59
  options[:tasks_mode] = document_store.plan_file?(job_object.file_uri)
60
+ options[:document_uri] = job_object.file_uri
60
61
  PuppetLanguageServer::Manifest::ValidationProvider.validate(session_state, content, options)
61
62
  when :epp
62
63
  PuppetLanguageServer::Epp::ValidationProvider.validate(content)
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'puppet-languageserver/puppet_lint'
4
+ require 'puppet-languageserver/uri_helper'
4
5
  module PuppetLanguageServer
5
6
  module Manifest
6
7
  module ValidationProvider
@@ -13,11 +14,11 @@ module PuppetLanguageServer
13
14
  # [ <Int> Number of problems fixed,
14
15
  # <String> New Content
15
16
  # ]
16
- def self.fix_validate_errors(session_state, content)
17
- init_puppet_lint(session_state.documents.store_root_path, ['--fix'])
17
+ def self.fix_validate_errors(session_state, content, document_uri = nil)
18
+ init_puppet_lint(session_state.documents.store_root_path, ['--fix', '--relative'])
18
19
 
19
20
  linter = PuppetLint::Checks.new
20
- problems = linter.run(LINT_FILENAME, content)
21
+ problems = linter.run(lint_filename(document_uri), content)
21
22
  problems_fixed = problems.nil? ? 0 : problems.count { |item| item[:kind] == :fixed }
22
23
 
23
24
  [problems_fixed, linter.manifest]
@@ -33,11 +34,11 @@ module PuppetLanguageServer
33
34
  # TODO: Need to implement max_problems
34
35
  problems = 0
35
36
 
36
- init_puppet_lint(session_state.documents.store_root_path, [])
37
+ init_puppet_lint(session_state.documents.store_root_path, ['--relative'])
37
38
 
38
39
  begin
39
40
  linter = PuppetLint::Checks.new
40
- problems = linter.run(LINT_FILENAME, content)
41
+ problems = linter.run(lint_filename(options[:document_uri]), content)
41
42
  unless problems.nil?
42
43
  problems.each do |problem|
43
44
  # Syntax errors are better handled by the puppet parser, not puppet lint
@@ -125,6 +126,13 @@ module PuppetLanguageServer
125
126
  linter_options.parse!(lint_options)
126
127
  end
127
128
  private_class_method :init_puppet_lint
129
+
130
+ def self.lint_filename(document_uri)
131
+ PuppetLanguageServer::UriHelper.uri_path(document_uri) || LINT_FILENAME
132
+ rescue URI::InvalidURIError
133
+ LINT_FILENAME
134
+ end
135
+ private_class_method :lint_filename
128
136
  end
129
137
  end
130
138
  end
@@ -133,7 +133,7 @@ module PuppetLanguageServer
133
133
 
134
134
  case documents.document_type(file_uri)
135
135
  when :manifest
136
- changes, new_content = PuppetLanguageServer::Manifest::ValidationProvider.fix_validate_errors(session_state, content)
136
+ changes, new_content = PuppetLanguageServer::Manifest::ValidationProvider.fix_validate_errors(session_state, content, file_uri)
137
137
  else
138
138
  raise "Unable to fixDiagnosticErrors on #{file_uri}"
139
139
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PuppetEditorServices
4
- PUPPETEDITORSERVICESVERSION = '3.1.0' unless defined? PUPPETEDITORSERVICESVERSION
4
+ PUPPETEDITORSERVICESVERSION = '3.1.1' unless defined? PUPPETEDITORSERVICESVERSION
5
5
 
6
6
  # @api public
7
7
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openvox-editor-services
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenVox Project contributors