platformos-check 0.4.13 → 0.5.0

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.
@@ -1,2 +1,2 @@
1
1
 
2
- {"revision":"f54926032237f368cd5f4737ddb64d8522474225"}
2
+ {"revision":"1a08535d872a31f9df129d72df20919ca47309a6"}
@@ -53,13 +53,11 @@ module PlatformosCheck
53
53
  liquid_visitor = LiquidVisitor.new(@liquid_checks, @disabled_checks)
54
54
  html_visitor = HtmlVisitor.new(@html_checks)
55
55
 
56
- PlatformosCheck.with_liquid_c_disabled do
57
- @platformos_app.liquid.each_with_index do |liquid_file, i|
58
- yield(liquid_file.relative_path.to_s, i, total_file_count) if block_given?
59
- liquid_visitor.visit_liquid_file(liquid_file)
60
- html_visitor.visit_liquid_file(liquid_file)
61
- @warnings[liquid_file.path] = liquid_file.warnings if @store_warnings && !liquid_file.warnings&.empty?
62
- end
56
+ @platformos_app.liquid.each_with_index do |liquid_file, i|
57
+ yield(liquid_file.relative_path.to_s, i, total_file_count) if block_given?
58
+ liquid_visitor.visit_liquid_file(liquid_file)
59
+ html_visitor.visit_liquid_file(liquid_file)
60
+ @warnings[liquid_file.path] = liquid_file.warnings if @store_warnings && !liquid_file.warnings&.empty?
63
61
  end
64
62
 
65
63
  @platformos_app.yaml.each_with_index do |yaml_file, i|
@@ -87,39 +85,37 @@ module PlatformosCheck
87
85
  def analyze_files(files, only_single_file: false)
88
86
  reset
89
87
 
90
- PlatformosCheck.with_liquid_c_disabled do
91
- total = files.size
92
- offset = 0
93
-
94
- unless only_single_file
95
- # Call all checks that run on the whole platformos_app
96
- liquid_visitor = LiquidVisitor.new(@liquid_checks.whole_platformos_app, @disabled_checks)
97
- html_visitor = HtmlVisitor.new(@html_checks.whole_platformos_app)
98
- total += total_file_count
99
- offset = total_file_count
100
- @platformos_app.liquid.each_with_index do |liquid_file, i|
101
- yield(liquid_file.relative_path.to_s, i, total) if block_given?
102
- liquid_visitor.visit_liquid_file(liquid_file)
103
- html_visitor.visit_liquid_file(liquid_file)
104
- end
105
-
106
- @platformos_app.yaml.each_with_index do |yaml_file, i|
107
- yield(yaml_file.relative_path.to_s, liquid_file_count + i, total) if block_given?
108
- @yaml_checks.whole_platformos_app.call(:on_file, yaml_file)
109
- end
88
+ total = files.size
89
+ offset = 0
90
+
91
+ unless only_single_file
92
+ # Call all checks that run on the whole platformos_app
93
+ liquid_visitor = LiquidVisitor.new(@liquid_checks.whole_platformos_app, @disabled_checks)
94
+ html_visitor = HtmlVisitor.new(@html_checks.whole_platformos_app)
95
+ total += total_file_count
96
+ offset = total_file_count
97
+ @platformos_app.liquid.each_with_index do |liquid_file, i|
98
+ yield(liquid_file.relative_path.to_s, i, total) if block_given?
99
+ liquid_visitor.visit_liquid_file(liquid_file)
100
+ html_visitor.visit_liquid_file(liquid_file)
110
101
  end
111
102
 
112
- # Call checks that run on a single files, only on specified file
113
- liquid_visitor = LiquidVisitor.new(@liquid_checks.single_file, @disabled_checks, only_single_file:)
114
- html_visitor = HtmlVisitor.new(@html_checks.single_file)
115
- files.each_with_index do |app_file, i|
116
- yield(app_file.relative_path.to_s, offset + i, total) if block_given?
117
- if app_file.liquid?
118
- liquid_visitor.visit_liquid_file(app_file)
119
- html_visitor.visit_liquid_file(app_file)
120
- elsif app_file.yaml?
121
- @yaml_checks.single_file.call(:on_file, app_file)
122
- end
103
+ @platformos_app.yaml.each_with_index do |yaml_file, i|
104
+ yield(yaml_file.relative_path.to_s, liquid_file_count + i, total) if block_given?
105
+ @yaml_checks.whole_platformos_app.call(:on_file, yaml_file)
106
+ end
107
+ end
108
+
109
+ # Call checks that run on a single files, only on specified file
110
+ liquid_visitor = LiquidVisitor.new(@liquid_checks.single_file, @disabled_checks, only_single_file:)
111
+ html_visitor = HtmlVisitor.new(@html_checks.single_file)
112
+ files.each_with_index do |app_file, i|
113
+ yield(app_file.relative_path.to_s, offset + i, total) if block_given?
114
+ if app_file.liquid?
115
+ liquid_visitor.visit_liquid_file(app_file)
116
+ html_visitor.visit_liquid_file(app_file)
117
+ elsif app_file.yaml?
118
+ @yaml_checks.single_file.call(:on_file, app_file)
123
119
  end
124
120
  end
125
121
 
@@ -6,20 +6,20 @@ require "pathname"
6
6
 
7
7
  module PlatformosCheck
8
8
  class App
9
- API_CALLS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/api_call_notifications|api_calls)/(.+)\.liquid\z}
10
- ASSETS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)assets/}
11
- EMAILS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/email_notifications|emails)/(.+)\.liquid\z}
12
- GRAPHQL_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(graph_queries|graphql)s?/(.+)\.graphql\z}
13
-
14
- MIGRATIONS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)migrations/(.+)\.liquid\z}
15
- PAGES_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(pages|views/pages)/(.+).liquid\z}
16
- PARTIALS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(views/partials|lib)/(.+)\.liquid\z}
17
- FORMS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(form_configurations|forms)/(.+)\.liquid\z}
18
- LAYOUTS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(views/layouts)/(.+).liquid\z}
19
- SCHEMA_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(custom_model_types|model_schemas|schema)/(.+)\.yml\z}
20
- SMSES_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/sms_notifications|smses)/(.+)\.liquid\z}
9
+ API_CALLS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/api_call_notifications|api_calls)/(.+)\.liquid\z}
10
+ ASSETS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)assets/}
11
+ EMAILS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/email_notifications|emails)/(.+)\.liquid\z}
12
+ GRAPHQL_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(graph_queries|graphql)s?/(.+)\.graphql\z}
13
+
14
+ MIGRATIONS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)migrations/(.+)\.liquid\z}
15
+ PAGES_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(pages|views/pages)/(.+).liquid\z}
16
+ PARTIALS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(views/partials|lib)/(.+)\.liquid\z}
17
+ FORMS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(form_configurations|forms)/(.+)\.liquid\z}
18
+ LAYOUTS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(views/layouts)/(.+).liquid\z}
19
+ SCHEMA_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(custom_model_types|model_schemas|schema)/(.+)\.yml\z}
20
+ SMSES_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)(notifications/sms_notifications|smses)/(.+)\.liquid\z}
21
21
  USER_SCHEMA_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/)?)user.yml}
22
- TRANSLATIONS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|modules/(.+)(private|public|marketplace_builder|app)/)?)translations/(.+)\.yml}
22
+ TRANSLATIONS_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/|(app/)?modules/(.+)(private|public|marketplace_builder|app)/)?)translations/(.+)\.yml}
23
23
  CONFIG_REGEX = %r{\A(?-mix:^/?((marketplace_builder|app)/)?)config.yml}
24
24
 
25
25
  REGEXP_MAP = {
@@ -60,10 +60,19 @@ module PlatformosCheck
60
60
  next unless regexp
61
61
 
62
62
  f = klass.new(path, storage)
63
+
63
64
  if remove
64
65
  @grouped_files[klass].delete(f.name)
66
+ if f.module_overwrite_file? && storage.files.include?(f.module_original_file_path)
67
+ original_file = klass.new(f.module_original_file_path, storage)
68
+ @grouped_files[klass][original_file.name] = original_file
69
+ elsif f.module_original_file? && storage.files.include?(f.module_overwrite_file_path)
70
+ overwrite_file = klass.new(f.module_overwrite_file_path, storage)
71
+ @grouped_files[klass][overwrite_file.name] = overwrite_file
72
+ end
65
73
  else
66
- @grouped_files[klass][f.name] = f
74
+ # we want to keep the reference to a module overwrite, if exists
75
+ @grouped_files[klass][f.name] = f unless f.module_original_file? && @grouped_files[klass][f.name] && @grouped_files[klass][f.name].module_overwrite_file?
67
76
  end
68
77
  end
69
78
  @grouped_files
@@ -48,10 +48,31 @@ module PlatformosCheck
48
48
  end
49
49
 
50
50
  def module_name
51
- @module_name ||= begin
52
- dir_names = @relative_path.split(File::SEPARATOR).reject(&:empty?)
53
- dir_names.first == 'modules' ? dir_names[1] : nil
54
- end
51
+ @module_name ||= if module_original_file?
52
+ dir_names[1]
53
+ elsif module_overwrite_file?
54
+ return dir_names[2]
55
+ end
56
+ end
57
+
58
+ def module_original_file?
59
+ dir_names[0] == 'modules'
60
+ end
61
+
62
+ def module_overwrite_file?
63
+ dir_names[0] == 'app' && dir_names[1] == 'modules'
64
+ end
65
+
66
+ def module_overwrite_file_path
67
+ @module_overwrite_file_path ||= module_original_file? ? 'app/' + relative_path.to_s : nil
68
+ end
69
+
70
+ def module_original_file_path
71
+ @module_original_file_path ||= module_overwrite_file? ? dir_names[1..].join(File::SEPARATOR) : nil
72
+ end
73
+
74
+ def dir_names
75
+ @dir_names ||= @relative_path.split(File::SEPARATOR).reject(&:empty?)
55
76
  end
56
77
 
57
78
  # For the corrector to work properly, we should have a
@@ -4,7 +4,7 @@ require "zlib"
4
4
 
5
5
  module PlatformosCheck
6
6
  class AssetFile < AppFile
7
- DIR_PREFIX = %r{\A/?((marketplace_builder|app)/assets/|modules/((\w|-)*)/(private|public)/assets/)}
7
+ DIR_PREFIX = %r{\A/?((marketplace_builder|app)/assets/|(app/)?modules/((\w|-)*)/(private|public)/assets/)}
8
8
 
9
9
  def initialize(relative_path, storage)
10
10
  super
@@ -70,7 +70,7 @@ module PlatformosCheck
70
70
  def comment_text(node)
71
71
  case node.type_name
72
72
  when :comment
73
- node.value.nodelist.join
73
+ node.inner_markup
74
74
  when :inline_comment
75
75
  node.markup.sub(/\s*#+\s*/, '')
76
76
  end
@@ -31,7 +31,7 @@ module PlatformosCheck
31
31
 
32
32
  file(relative_path).dirname.mkpath unless file(relative_path).dirname.directory?
33
33
  file(relative_path).write(content, mode: 'w+b', encoding: 'UTF-8')
34
- @platformos_app&.update([relative_path])
34
+ @platformos_app&.update([relative_path], remove: !file_exists?(relative_path))
35
35
  end
36
36
 
37
37
  def remove(relative_path)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PlatformosCheck
4
4
  class FormFile < LiquidFile
5
- DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(form_configurations|forms)/|modules/((\w|-)*)/(private|public)/(form_configurations|forms)/)}
5
+ DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(form_configurations|forms)/|(app/)?modules/((\w|-)*)/(private|public)/(form_configurations|forms)/)}
6
6
 
7
7
  def form?
8
8
  true
@@ -4,7 +4,7 @@ require 'graphql'
4
4
 
5
5
  module PlatformosCheck
6
6
  class GraphqlFile < AppFile
7
- DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(graph_queries|graphql)s?/|modules/((\w|-)*)/(private|public)/(graph_queries|graphql)s?/)}
7
+ DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(graph_queries|graphql)s?/|(app/)?modules/((\w|-)*)/(private|public)/(graph_queries|graphql)s?/)}
8
8
 
9
9
  def write
10
10
  content = rewriter.to_s
@@ -28,6 +28,8 @@ module PlatformosCheck
28
28
 
29
29
  def cursor
30
30
  @cursor ||= (absolute_cursor - token&.start) || 0
31
+ rescue StandardError
32
+ 0
31
33
  end
32
34
 
33
35
  def content
@@ -11,34 +11,25 @@ module PlatformosCheck
11
11
  # The tolerant parser relies on a tolerant custom parse
12
12
  # context to creates a new 'Template' object, even when
13
13
  # a block is not closed.
14
- Liquid::Template.parse(content, custom_parse_context)
14
+ Liquid::Template.parse(content, environment: environment)
15
15
  end
16
16
 
17
17
  private
18
18
 
19
- def custom_parse_context
20
- ParseContext.new
19
+ def environment
20
+ @environment ||= Liquid::Environment.build(tags: Liquid::Environment.default.tags.merge(
21
+ {
22
+ 'case' => Tags::Case,
23
+ 'for' => Tags::For,
24
+ 'if' => Tags::If,
25
+ 'tablerow' => Tags::TableRow,
26
+ 'unless' => Tags::Unless
27
+ }
28
+ ))
21
29
  end
22
30
  end
23
31
  end
24
32
 
25
- class ParseContext < Liquid::ParseContext
26
- def new_block_body
27
- BlockBody.new
28
- end
29
- end
30
-
31
- class BlockBody < Liquid::BlockBody
32
- ##
33
- # The tags are statically defined and referenced at the
34
- # 'Liquid::Template', so the TolerantParser just uses the
35
- # redefined tags at this custom block body. Thus, there's
36
- # no side-effects between the regular and the tolerant parsers.
37
- def registered_tags
38
- Tags.new(super)
39
- end
40
- end
41
-
42
33
  class Tags
43
34
  module TolerantBlockBody
44
35
  ##
@@ -72,21 +63,6 @@ module PlatformosCheck
72
63
  class Unless < Liquid::Unless
73
64
  include TolerantBlockBody
74
65
  end
75
-
76
- def initialize(standard_tags)
77
- @standard_tags = standard_tags
78
- @tolerant_tags = {
79
- 'case' => Case,
80
- 'for' => For,
81
- 'if' => If,
82
- 'tablerow' => TableRow,
83
- 'unless' => Unless
84
- }
85
- end
86
-
87
- def [](key)
88
- @tolerant_tags[key] || @standard_tags[key]
89
- end
90
66
  end
91
67
  end
92
68
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PlatformosCheck
4
4
  class LayoutFile < LiquidFile
5
- DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(views/layouts)/|modules/((\w|-)*)/(private|public)/(views/layouts)/)}
5
+ DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(views/layouts)/|(app/)?modules/((\w|-)*)/(private|public)/(views/layouts)/)}
6
6
 
7
7
  def layout?
8
8
  true
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PlatformosCheck
4
4
  class PartialFile < LiquidFile
5
- DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(views/partials|liquid_views|views|lib)/|modules/((\w|-)*)/(private|public)/(views/partials|liquid_views|views|lib)/)}
5
+ DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(views/partials|liquid_views|views|lib)/|(app/)?modules/((\w|-)*)/(private|public)/(views/partials|liquid_views|views|lib)/)}
6
6
 
7
7
  def partial?
8
8
  true
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlatformosCheck
4
+ module Tags
5
+ class Rollback < Liquid::Tag
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PlatformosCheck
4
+ module Tags
5
+ class Transaction < Liquid::Block
6
+ end
7
+ end
8
+ end
@@ -2,8 +2,6 @@
2
2
 
3
3
  module PlatformosCheck
4
4
  module Tags
5
- # Copied tags parsing code from storefront-renderer
6
-
7
5
  class ContentFor < BaseBlock; end
8
6
 
9
7
  class Yield < Base; end
@@ -26,40 +24,42 @@ module PlatformosCheck
26
24
  end
27
25
 
28
26
  def register_tag(name, klass)
29
- Liquid::Template.register_tag(name, klass)
27
+ Liquid::Environment.default.register_tag(name, klass)
30
28
  end
31
29
 
32
30
  def register_tags!
33
31
  return if !register_tags? || (defined?(@registered_tags) && @registered_tags)
34
32
 
35
33
  @registered_tags = true
34
+ register_tag('background', Background)
35
+ register_tag('cache', Cache)
36
+ register_tag('content_for', ContentFor)
37
+ register_tag('context', Context)
38
+ register_tag('context_rc', Context)
39
+ register_tag('export', Export)
36
40
  register_tag('form', Form)
41
+ register_tag('function', Function)
42
+ register_tag('graphql', Graphql)
43
+ register_tag('hash_assign', HashAssign)
37
44
  register_tag('include_form', IncludeForm)
38
- register_tag('render', Render)
39
- register_tag('theme_render', ThemeRender)
40
- register_tag('theme_render_rc', ThemeRender)
41
45
  register_tag('log', Log)
42
- register_tag('cache', Cache)
43
- register_tag('print', Print)
44
46
  register_tag('parse_json', ParseJson)
45
- register_tag('try_rc', Try)
46
- register_tag('try', Try)
47
- register_tag('export', Export)
48
- register_tag('return', Return)
47
+ register_tag('print', Print)
49
48
  register_tag('redirect_to', RedirectTo)
49
+ register_tag('render', Render)
50
50
  register_tag('response_headers', ResponseHeaders)
51
51
  register_tag('response_status', ResponseStatus)
52
- register_tag('hash_assign', HashAssign)
53
- register_tag('background', Background)
54
- register_tag('content_for', ContentFor)
52
+ register_tag('return', Return)
53
+ register_tag('rollback', Rollback)
55
54
  register_tag('session', Session)
56
- register_tag('context', Context)
57
- register_tag('context_rc', Context)
58
55
  register_tag('sign_in', SignIn)
59
- register_tag('yield', Yield)
60
- register_tag('graphql', Graphql)
61
- register_tag('function', Function)
62
56
  register_tag('spam_protection', SpamProtection)
57
+ register_tag('theme_render', ThemeRender)
58
+ register_tag('theme_render_rc', ThemeRender)
59
+ register_tag('transaction', Transaction)
60
+ register_tag('try', Try)
61
+ register_tag('try_rc', Try)
62
+ register_tag('yield', Yield)
63
63
  end
64
64
  end
65
65
  self.register_tags = true
@@ -2,7 +2,7 @@
2
2
 
3
3
  module PlatformosCheck
4
4
  class TranslationFile < YamlFile
5
- DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(translations)/|modules/((\w|-)*)/(private|public)/(translations)/)}
5
+ DIR_PREFIX = %r{\A/?((marketplace_builder|app)/(translations)/|(app/)?modules/((\w|-)*)/(private|public)/(translations)/)}
6
6
  TRANSLATION_FILTERS = Set.new(%w[t t_escape translate translate_escape]).freeze
7
7
  attr_reader :language
8
8
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlatformosCheck
4
- VERSION = "0.4.13"
4
+ VERSION = "0.5.0"
5
5
  end
@@ -62,10 +62,12 @@ require_relative "platformos_check/tags/render"
62
62
  require_relative "platformos_check/tags/response_headers"
63
63
  require_relative "platformos_check/tags/response_status"
64
64
  require_relative "platformos_check/tags/return"
65
+ require_relative "platformos_check/tags/rollback"
65
66
  require_relative "platformos_check/tags/session"
66
67
  require_relative "platformos_check/tags/sign_in"
67
68
  require_relative "platformos_check/tags/spam_protection"
68
69
  require_relative "platformos_check/tags/theme_render"
70
+ require_relative "platformos_check/tags/transaction"
69
71
  require_relative "platformos_check/tags/try"
70
72
  require_relative "platformos_check/tags"
71
73
  require_relative "platformos_check/liquid_node"
@@ -86,9 +88,6 @@ require_relative "platformos_check/language_server"
86
88
 
87
89
  Dir[__dir__ + "/platformos_check/checks/*.rb"].each { |file| require file }
88
90
 
89
- Encoding.default_external = Encoding::UTF_8
90
- Encoding.default_internal = Encoding::UTF_8
91
-
92
91
  module PlatformosCheck
93
92
  def self.debug?
94
93
  ENV["PLATFORMOS_CHECK_DEBUG"] == "true"
@@ -98,16 +97,6 @@ module PlatformosCheck
98
97
  ENV.fetch("PLATFORMOS_CHECK_DEBUG_LOG_FILE", nil)
99
98
  end
100
99
 
101
- def self.with_liquid_c_disabled
102
- if defined?(Liquid::C)
103
- was_enabled = Liquid::C.enabled
104
- Liquid::C.enabled = false if was_enabled
105
- end
106
- yield
107
- ensure
108
- Liquid::C.enabled = true if defined?(Liquid::C) && was_enabled
109
- end
110
-
111
100
  def self.log(message)
112
101
  bridge = LanguageServer::Bridge.new(LanguageServer::IOMessenger.new)
113
102
  bridge.log("###############\n #{message}\n##################")
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_dependency('graphql', '~> 2.0.0')
31
- spec.add_dependency('liquid', '5.4.0')
31
+ spec.add_dependency('liquid', '5.8.6')
32
32
  spec.add_dependency('nokogiri', '>= 1.12')
33
33
  spec.add_dependency('parser', '~> 3')
34
34
 
metadata CHANGED
@@ -1,16 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platformos-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.13
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Bliszczyk
8
8
  - Dariusz Gorzęba
9
9
  - Maciej Krajowski-Kukiel
10
- autorequire:
11
10
  bindir: exe
12
11
  cert_chain: []
13
- date: 2024-10-07 00:00:00.000000000 Z
12
+ date: 2025-08-20 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: graphql
@@ -32,14 +31,14 @@ dependencies:
32
31
  requirements:
33
32
  - - '='
34
33
  - !ruby/object:Gem::Version
35
- version: 5.4.0
34
+ version: 5.8.6
36
35
  type: :runtime
37
36
  prerelease: false
38
37
  version_requirements: !ruby/object:Gem::Requirement
39
38
  requirements:
40
39
  - - '='
41
40
  - !ruby/object:Gem::Version
42
- version: 5.4.0
41
+ version: 5.8.6
43
42
  - !ruby/object:Gem::Dependency
44
43
  name: nokogiri
45
44
  requirement: !ruby/object:Gem::Requirement
@@ -68,7 +67,6 @@ dependencies:
68
67
  - - "~>"
69
68
  - !ruby/object:Gem::Version
70
69
  version: '3'
71
- description:
72
70
  email:
73
71
  - support@platformos.com
74
72
  executables:
@@ -341,10 +339,12 @@ files:
341
339
  - lib/platformos_check/tags/response_headers.rb
342
340
  - lib/platformos_check/tags/response_status.rb
343
341
  - lib/platformos_check/tags/return.rb
342
+ - lib/platformos_check/tags/rollback.rb
344
343
  - lib/platformos_check/tags/session.rb
345
344
  - lib/platformos_check/tags/sign_in.rb
346
345
  - lib/platformos_check/tags/spam_protection.rb
347
346
  - lib/platformos_check/tags/theme_render.rb
347
+ - lib/platformos_check/tags/transaction.rb
348
348
  - lib/platformos_check/tags/try.rb
349
349
  - lib/platformos_check/translation_file.rb
350
350
  - lib/platformos_check/user_schema_file.rb
@@ -358,7 +358,6 @@ licenses:
358
358
  metadata:
359
359
  allowed_push_host: https://rubygems.org
360
360
  rubygems_mfa_required: 'true'
361
- post_install_message:
362
361
  rdoc_options: []
363
362
  require_paths:
364
363
  - lib
@@ -373,8 +372,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
373
372
  - !ruby/object:Gem::Version
374
373
  version: '0'
375
374
  requirements: []
376
- rubygems_version: 3.5.18
377
- signing_key:
375
+ rubygems_version: 3.6.5
378
376
  specification_version: 4
379
377
  summary: A platformOS App Linter
380
378
  test_files: []