platformos-check 0.4.1 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4b8c8794beec4b24d3a6d3c2fcc3e60c1cf99fb7715e40ba0e19d64a06672c0
4
- data.tar.gz: 3cb2767ff31c8e7bb29d2228eafade454bef87354f1696b27e63147ce66e504d
3
+ metadata.gz: f12754f0e3326691fee2d9617ccf751a81081cbd70f96a3d28947cf11891a226
4
+ data.tar.gz: 98ac7d17842ab1d83695a4149b8e899a2a23141e15d9059c76f5f8822d385938
5
5
  SHA512:
6
- metadata.gz: 22fd46e588b5f7f1b34e3f27ec45959764a2f7eda2a92e7c0c59f633ca851a2b92be02827e425247fd6ed96c65640705c566ca77a5e02d446685e0fd87a37e17
7
- data.tar.gz: 063f81097a541ebc9da495957c9f0af31099170573e4e02caa8f84d586b4440c8e07bb09d936573b0258dffc4b20e4e8caff6d2d5e819dc0bd477cda84c82bd0
6
+ metadata.gz: b16b77525b11cf49605c930eda3d4e8e09afac0eea51600361b961075c580a599059a559853b70002fd83ee1806d9b9b748f78433d42c1e69bd3eaee0a84ed03
7
+ data.tar.gz: 584f000e09cac687570ed8688a8a30a7296f87dc14d1fbb44bc4dd616ae71ed6fa0cd9cfee11ee755019c82b5ffd33fcb15218f76a9941eed691cc539e69d97b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ v0.4.3 / 2023-09-25
2
+ ==================
3
+
4
+ * Do not remove variable if it's later used via hash_assign
5
+
6
+ v0.4.2 / 2023-09-21
7
+ ==================
8
+
9
+ * Do not crash when creating a new directory
10
+
1
11
  v0.4.1 / 2023-09-19
2
12
  ==================
3
13
 
@@ -174,6 +174,8 @@ module PlatformosCheck
174
174
  return unless paths
175
175
 
176
176
  paths.each do |path|
177
+ next if File.directory?(path)
178
+
177
179
  relative_path = @storage.relative_path(path)
178
180
  file_system_content = Pathname.new(path).read(mode: 'rb', encoding: 'UTF-8')
179
181
  @storage.write(relative_path, file_system_content, nil)
@@ -12,7 +12,7 @@ module PlatformosCheck
12
12
  super
13
13
  raise Liquid::SyntaxError, "Syntax Error in 'hash_assign' - Valid syntax: hash_assign hash[key] = value" unless markup =~ SYNTAX
14
14
 
15
- @to = Regexp.last_match(1)
15
+ @to = Liquid::Variable.new(Regexp.last_match(1), options)
16
16
  @from = Liquid::Variable.new(Regexp.last_match(4), options)
17
17
  raw_keys = Regexp.last_match(3)
18
18
  raise Liquid::SyntaxError, "Syntax Error in 'hash_assign' - Valid syntax: hash_assign hash[key] = value" unless raw_keys
@@ -66,6 +66,7 @@ module PlatformosCheck
66
66
  class ParseTreeVisitor < Liquid::ParseTreeVisitor
67
67
  def children
68
68
  [
69
+ @node.to,
69
70
  @node.from
70
71
  ] + @node.keys
71
72
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PlatformosCheck
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: platformos-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Bliszczyk
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2023-09-19 00:00:00.000000000 Z
13
+ date: 2023-09-25 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: graphql