bundler_audit_notifier 0.0.8 → 0.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83662d8b0c27607eef30e58e354ce77df50b8311f4223dff287d0273f584e8c9
|
4
|
+
data.tar.gz: 171045640fd3c1de6de2e109900e2b85b5c919cbf8346a66312476ad6060d440
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d78130742746beaeee50d35621a4e38e41a1441f33ae94aef8d3eacb95e16d9918d58fac6a06c249f01327f9088b38c6d475a4eaae08e4f2abf0ebcd382c975
|
7
|
+
data.tar.gz: b82b1e59f390f430374e6b70e131245ae9386ea17454cc69e0b4855304cd2d043a1ec63de1c1ed71ab888d9aad7b76a7084a047c30ee9938fcf5160d98ff758a
|
@@ -16,7 +16,7 @@ class BundlerAuditIssuesController < ActionController::Base
|
|
16
16
|
if params[:token].present?
|
17
17
|
bundler_audit_issue = BundlerAuditIssue.where(token: params[:token]).first
|
18
18
|
if bundler_audit_issue
|
19
|
-
|
19
|
+
::Rails.logger.info("Authorized accesss to api for bundler audit issue: #{params[:token]}")
|
20
20
|
return true
|
21
21
|
else
|
22
22
|
::Rails.logger.warn("Unauthorized accesss to api for bundler audit issue: #{params[:token]}")
|
@@ -2,15 +2,16 @@
|
|
2
2
|
require "active_support"
|
3
3
|
require 'rake'
|
4
4
|
require "bundler_audit_notifier/engine"
|
5
|
-
require "auditer_script"
|
6
5
|
|
7
6
|
module BundlerAuditNotifier
|
8
7
|
def self.audit_parse
|
9
8
|
r, w = IO.pipe
|
9
|
+
audit_script_file = File.join(File.dirname(__FILE__), 'auditer_script.rb')
|
10
10
|
# Spawn executes specified command and return its pid
|
11
11
|
# This line will execute code that runs bundler-audit and then write the output into the IO pipe
|
12
12
|
# Spawning a process to read the output of bundler-audit update and check because after the commands finish running exit 1 is called and the output can no longer be read.
|
13
|
-
pid = spawn(RbConfig.ruby,
|
13
|
+
pid = spawn(RbConfig.ruby, audit_script_file, :out => w, :err => [:child, :out])
|
14
|
+
|
14
15
|
Process.wait2(pid)
|
15
16
|
w.close
|
16
17
|
# At this point, the results of the bundler-audit check command are written in the IO pipe
|