paraxial 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paraxial/cli.rb +32 -1
- data/lib/paraxial/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51fd89540b5bb3bea0b1487cc67e255c6b8597f87215ff70256370a1499b78c9
|
4
|
+
data.tar.gz: 863d248900cb324777b4bfe11dc7bd0dfffd9bc4766642c2d63502b2804fbfe2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33df2b745e8cc43b41a4bb36cff045039fc8db0d807676d025d38553ecaf39a9f2fde3b26aafe11f12b9ddd1ff5560c18146b7d481a695c14184a6943bbf85cb
|
7
|
+
data.tar.gz: be45476d228f23b7dc49436a97802c284abcaa6561f76ab49b5bfa1a729ecdaefb3d8f84d043737920eb2b72411e40eb84e42eec8eba1e433a0b801dce7f7df9
|
data/lib/paraxial/cli.rb
CHANGED
@@ -39,6 +39,25 @@ module Paraxial
|
|
39
39
|
puts '[Paraxial] .paraxial-rubocop.yml is valid, .erb files will be scanned.'
|
40
40
|
end
|
41
41
|
|
42
|
+
paraxial_config = get_paraxial_configuration
|
43
|
+
|
44
|
+
if paraxial_config && paraxial_config["ignore-gems"]
|
45
|
+
puts '[Paraxial] .paraxial.yml configuration file found.'
|
46
|
+
puts '[Paraxial] Gems ignored by dependency scan:'
|
47
|
+
puts paraxial_config["ignore-gems"]
|
48
|
+
elsif paraxial_config == :error
|
49
|
+
puts '[Paraxial] .paraxial.yml file is not well formed and is being ignored.'
|
50
|
+
paraxial_config = false
|
51
|
+
elsif paraxial_config
|
52
|
+
puts '[Paraxial] .paraxial.yml does not define a valid configuration. Using default configuration.'
|
53
|
+
paraxial_config = false
|
54
|
+
elsif paraxial_config == false
|
55
|
+
puts '[Paraxial] .paraxial.yml configuration file was not found. Using default configuration.'
|
56
|
+
else
|
57
|
+
puts '[Paraxial] .paraxial.yml configuration is empty. Using default configuration.'
|
58
|
+
paraxial_config = false
|
59
|
+
end
|
60
|
+
|
42
61
|
if Paraxial::Helpers.get_api_key.nil?
|
43
62
|
puts '[Paraxial] Environment variable PARAXIAL_API_KEY not found'
|
44
63
|
else
|
@@ -64,7 +83,7 @@ module Paraxial
|
|
64
83
|
uri = URI.parse(Paraxial::Helpers.get_paraxial_url + '/api/ruby_scan')
|
65
84
|
headers = { 'Content-Type': 'application/json' }
|
66
85
|
|
67
|
-
body = { rubocop: rubocop, lockfile: lockfile, api_key: api_key, timestamp: Paraxial.get_timestamp }
|
86
|
+
body = { rubocop: rubocop, lockfile: lockfile, api_key: api_key, paraxial_config: paraxial_config, timestamp: Paraxial.get_timestamp }
|
68
87
|
response = Net::HTTP.post(uri, body.to_json, headers)
|
69
88
|
m = JSON.parse(response.body)
|
70
89
|
|
@@ -130,6 +149,18 @@ module Paraxial
|
|
130
149
|
|
131
150
|
private
|
132
151
|
|
152
|
+
def get_paraxial_configuration
|
153
|
+
config_file = File.join(Dir.pwd, '.paraxial.yml')
|
154
|
+
|
155
|
+
return false unless File.exist?(config_file)
|
156
|
+
|
157
|
+
begin
|
158
|
+
YAML.load_file(config_file)
|
159
|
+
rescue
|
160
|
+
:error
|
161
|
+
end
|
162
|
+
end
|
163
|
+
|
133
164
|
def check_rubocop_configuration
|
134
165
|
# return values:
|
135
166
|
# :does_not_exist, :found_no_erb, :found_with_erb
|
data/lib/paraxial/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paraxial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Lubas
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|