pronto-stylelint 0.10.1 → 0.10.3
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 +4 -4
- data/lib/pronto/stylelint/version.rb +1 -1
- data/lib/pronto/stylelint.rb +11 -3
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5ad38e5da7c10bbef01da03be23e6ead8c5431b1b65c541ebde43c8674163c0
|
4
|
+
data.tar.gz: a4202206e230e6bd161afa0484fb89f00e324c6bc8fa154174293008ed9ca97a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 778c62a73c78c2774029a74b68c774258bd16d3504861970a1b79c98f11150c1a01bd3eee1bc6b504e933307aac151e9599ec784af9b24e9a25efd6933bf189b
|
7
|
+
data.tar.gz: 138b5c5af183660f358106edbe24b9e4bc62e0767c34255750fb06b8388449d06e328eb9b3db9789ef11c834d4e0c770d3f134c8cc3d071456bd6aa00cad0756
|
data/lib/pronto/stylelint.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'pronto'
|
2
2
|
require 'shellwords'
|
3
|
+
require 'open3'
|
3
4
|
|
4
5
|
module Pronto
|
5
6
|
class Stylelint < Runner
|
@@ -81,9 +82,16 @@ module Pronto
|
|
81
82
|
def run_stylelint(patch)
|
82
83
|
Dir.chdir(git_repo_path) do
|
83
84
|
escaped_file_path = Shellwords.escape(patch.new_file_full_path.to_s)
|
84
|
-
|
85
|
-
|
86
|
-
|
85
|
+
Open3.popen3("#{stylelint_executable} #{escaped_file_path} #{cli_options}") do |_stdin, stdout, stderr, thread|
|
86
|
+
status = thread.value
|
87
|
+
json = stdout.read
|
88
|
+
if status.to_i == 0 && json.length == 0
|
89
|
+
[]
|
90
|
+
else
|
91
|
+
json = stderr.read if json.length == 0
|
92
|
+
JSON.parse(json)
|
93
|
+
end
|
94
|
+
end
|
87
95
|
end
|
88
96
|
end
|
89
97
|
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-stylelint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Jalbert
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.10'
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
22
|
+
version: '0.12'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0.10'
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
32
|
+
version: '0.12'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rugged
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
110
|
version: '0'
|
105
111
|
requirements:
|
106
112
|
- stylelint (in PATH)
|
107
|
-
rubygems_version: 3.
|
113
|
+
rubygems_version: 3.3.3
|
108
114
|
signing_key:
|
109
115
|
specification_version: 4
|
110
116
|
summary: Pronto runner for stylelint, the mighty, modern CSS linter.
|