pronto-jscs 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 1c7463f2c6d872b380f9cdaac4f9ae2e02bafd36
4
- data.tar.gz: 1e9c6a2c6c60e181739d5264201b80a9469ca00b
3
+ metadata.gz: 54183aa2fba02980a7554a60de68074ae251e49f
4
+ data.tar.gz: c3994cc371f36a59ff99d6a055d5d4562ed0064b
5
5
  SHA512:
6
- metadata.gz: f149830484001df5d30cb0ba902a6e8d0629599c73c2203cdbec6434c0f03c806b1062fb18895c64a4bae7ed63ea83721e604b2e084c47e9d894d8f54aac6ba6
7
- data.tar.gz: eed0d534dac7fa25788df073563157acd58ace7b9086593764048f2c61c18fb31682a1361c4e85209fb6ac4c9c8766e543a7e3a92d2c1545060c05a99aa2fc0e
6
+ metadata.gz: e5464c915abb62941dac376929e46d1f8316f7bac356a7290069967fc21b118f8c7a7770f1b10687cc0df28316668d19657166a72ea414dbc4ea71cdc87a0e72
7
+ data.tar.gz: 87b8e92eb93829e33e5191c7b616e32f1f2f2bedf917ad6ef8e8192f20f51be286e54a095dcab9a4f93906179dc5db5263eb820b687bbc3a17a82cd304ae98c3
@@ -1,5 +1,5 @@
1
1
  module Pronto
2
2
  module JSCS
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
5
5
  end
@@ -1,3 +1,4 @@
1
+ require 'open3'
1
2
  module Pronto
2
3
  module JSCS
3
4
  class Wrapper
@@ -10,8 +11,10 @@ module Pronto
10
11
  path = @patch.new_file_full_path.to_s
11
12
  params = '--reporter=json'
12
13
  params << ' -p airbnb' unless File.exist?('.jscsrc')
13
- output = `jscs "#{path}" #{params}`
14
- JSON.parse(output)
14
+ stdout, stderr, _status = Open3.capture3("jscs \"#{path}\" #{params}")
15
+ puts "WARN: pronto-jscs: #{stderr}" if stderr && stderr.size > 0
16
+ return [] if stdout.nil? || stdout.size == 0
17
+ JSON.parse(stdout)
15
18
  rescue => e
16
19
  puts "ERROR: pronto-jscs failed to process a diff: #{e}"
17
20
  []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-jscs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Varaneckas