bleach 0.0.2 → 0.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d495ae25dc8b22b7f30ff8e9ccaac5267a1c435bef32903f53ae53d0b3b25da
4
- data.tar.gz: 104bec8e24cf10dd466238c6c193a4ad9de47116c9d166ef217ac4042ef549c9
3
+ metadata.gz: 80516ec059d3fa347cd4bd87df44e5d01d804d597feb2bc6213eac6cf9d62c95
4
+ data.tar.gz: 8f451bb5ffcf4a6372640aa391a949cbe8351e350a63bfffa17fc17f7c2c938b
5
5
  SHA512:
6
- metadata.gz: 2237b13fcec791ac257681a9f5144dc47178bb2f79baa5ce010d0e29b05d4a08d650fbebc855a3a7c9d8d1c3337af2f743438af477ffe4e113ac9ce30cfb12a0
7
- data.tar.gz: 3fa27adb09c3d254af71ff040b5d8f8dbd311ef39f22272099da4b30e12c263f3d9c5649f10dae81f93f3a3a7977face32adf100deedc69000f177e7bd938d0f
6
+ metadata.gz: fce0fefc24748d59bc87b0eba82e059d1672f61706c4ecc660876b83974ea638339cb8993d49e26ac5c4d789aeaf467b1c74599bc96850ee0ff0efc59f0d53c1
7
+ data.tar.gz: b38ef4512757c151380094883a482c823bbc88f64ce2723c9a2e1798cba956bf3b8a4ac86d793d74e1ec0c18d95e8593161c76dad0005d0717f3f29a0383b5ad
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bleach
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luis Flores
@@ -66,9 +66,6 @@ files:
66
66
  - "./languages/javascript/eslint/Dockerfile"
67
67
  - "./languages/javascript/eslint/check-file"
68
68
  - "./languages/javascript/eslint/config.json"
69
- - "./languages/javascript/jshint/Dockerfile"
70
- - "./languages/javascript/jshint/check-file"
71
- - "./languages/javascript/jshint/config.json"
72
69
  - "./languages/ruby/brakeman/Dockerfile"
73
70
  - "./languages/ruby/brakeman/check-file"
74
71
  - "./languages/ruby/brakeman/config.json"
@@ -77,7 +74,6 @@ files:
77
74
  - "./languages/ruby/rubocop/config.json"
78
75
  - "./lib/command/check_file.rb"
79
76
  - "./lib/command/code_check/javascript/eslint.rb"
80
- - "./lib/command/code_check/javascript/jshint.rb"
81
77
  - "./lib/command/code_check/ruby/brakeman.rb"
82
78
  - "./lib/command/code_check/ruby/rubocop.rb"
83
79
  - "./lib/command/docker_build.rb"
@@ -1,4 +0,0 @@
1
- FROM alpine:3.12.4
2
- RUN apk update
3
- RUN apk add npm
4
- RUN npm install -g jshint
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- # Discover lib files to be included
5
- Dir.glob("#{__dir__}/../../../lib/**/*.rb").each do |lib_file|
6
- require File.expand_path(lib_file, __dir__)
7
- end
8
-
9
- require 'optparse'
10
- require 'json'
11
-
12
- options = {}
13
- OptionParser.new do |opts|
14
- opts.banner = "Usage: #{File.basename(__FILE__)} [OPTIONS]"
15
-
16
- opts.on('-f', '--file [STRING]', 'File.') do |value|
17
- options[:file] = value
18
- end
19
- end.parse!
20
-
21
- required_options = [:file]
22
- required_options.each do |option|
23
- unless options[option]
24
- warn "Can not run #{option} was not given."
25
- exit 1
26
- end
27
- end
28
-
29
- file = File.basename(options[:file])
30
- dir = File.dirname(options[:file])
31
-
32
- config_file = "#{dir}/config.json"
33
- config = JSON.parse(File.read(config_file))
34
-
35
- image_name = config['imageName']
36
- tool_config = config['requiredFiles'].find do |record|
37
- record['type'] == 'JSHint Config'
38
- end['file']
39
-
40
- check_command = CodeCheck::JSHint.new(
41
- pwd: dir,
42
- image_name: image_name,
43
- config_file: tool_config,
44
- source_files: "/code/#{file}"
45
- )
46
- exit 1 unless check_command.system
@@ -1,9 +0,0 @@
1
- {
2
- "imageName" : "bleach/jshint",
3
- "requiredFiles" : [
4
- {
5
- "type" : "JSHint Config",
6
- "file" : ".jshintrc"
7
- }
8
- ]
9
- }
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- module CodeCheck
5
- # Template for JSHint check
6
- class JSHint < AbstractCommand
7
- def template
8
- 'docker run ' \
9
- '--rm ' \
10
- '--volume %<pwd>s:/code ' \
11
- '%<image_name>s ' \
12
- 'jshint ' \
13
- '--config /code/%<config_file>s ' \
14
- '%<source_files>s'
15
- end
16
- end
17
- end