pronto-jscs 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -0
- data/lib/pronto/jscs/version.rb +1 -1
- data/lib/pronto/jscs/wrapper.rb +7 -1
- data/lib/pronto/jscs.rb +1 -1
- data/pronto-jscs.gemspec +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7f8ae14d0ba4df47b6b18ab6d25b974871733e6
|
4
|
+
data.tar.gz: 22fe169238d9ff68888dbe00249ddfb6a749e345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e68d0b175d1aa291a85306b97ab11b585e38caecaba2e79f1dfe86e29ade00ad2155bd42bb5e3c2f9e1e9053144e2e255d509f23a1506696812da97b5a126f
|
7
|
+
data.tar.gz: a60d3d186648ebcb0a4eac891aceff1c9c1e14f05aa8130ab1f2fa2155a925cf5db7318def6ef119052661d5ecb8368d621787315c992e097c730523e996124a
|
data/README.md
CHANGED
@@ -9,3 +9,8 @@ Pronto runner for [JSCS](http://jscs.info/), JavaScript Code Style checker.
|
|
9
9
|
|
10
10
|
You'll need to be able to run `jscs` from command line. See [jscs.info](http://jscs.info).
|
11
11
|
|
12
|
+
## Config
|
13
|
+
|
14
|
+
If you have a *.jscsrc* file in the root of your project, that will be used.
|
15
|
+
Alternatively the environment variable *JSCSRC_LOCATION* can specify an alternative location.
|
16
|
+
Otherwise, the *airbnb* config is used.
|
data/lib/pronto/jscs/version.rb
CHANGED
data/lib/pronto/jscs/wrapper.rb
CHANGED
@@ -10,7 +10,13 @@ module Pronto
|
|
10
10
|
return [] if @patch.nil?
|
11
11
|
path = @patch.new_file_full_path.to_s
|
12
12
|
params = '--reporter=json'
|
13
|
-
|
13
|
+
if ENV['JSCSRC_LOCATION']
|
14
|
+
# Use a specific config file if specified
|
15
|
+
params << " --config=#{ENV['JSCSRC_LOCATION']}"
|
16
|
+
else
|
17
|
+
# Fall back to airbnb default
|
18
|
+
params << ' -p airbnb' unless File.exist?('.jscsrc')
|
19
|
+
end
|
14
20
|
stdout, stderr, _status = Open3.capture3("jscs \"#{path}\" #{params}")
|
15
21
|
puts "WARN: pronto-jscs: #{stderr}" if stderr && stderr.size > 0
|
16
22
|
return [] if stdout.nil? || stdout.size == 0
|
data/lib/pronto/jscs.rb
CHANGED
data/pronto-jscs.gemspec
CHANGED
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_runtime_dependency('pronto', '~> 0.5.0')
|
20
|
+
spec.add_runtime_dependency('pronto', '~> 0.5.0', '< 0.6.0')
|
21
21
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
22
22
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
23
|
spec.add_development_dependency 'rspec', '~> 3.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pronto-jscs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Varaneckas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pronto
|
@@ -17,6 +17,9 @@ dependencies:
|
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.5.0
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 0.6.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -24,6 +27,9 @@ dependencies:
|
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 0.5.0
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 0.6.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: bundler
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|