Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Cool Fire
nanobot4
Commits
11adfa6d
Commit
11adfa6d
authored
Mar 08, 2017
by
Cool Fire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use built-in jruby parser when running jruby
parent
f1af5dea
Pipeline
#253
passed with stages
in 1 minute and 55 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
scheck.rb
scheck.rb
+17
-2
No files found.
.gitlab-ci.yml
View file @
11adfa6d
...
...
@@ -54,7 +54,7 @@ jruby_1.7:
-
master
script
:
-
ruby -v
-
JRUBY_OPTS="-J-Djruby.launch.inproc=true"
ruby scheck.rb
-
ruby scheck.rb
--jruby
jruby_9.1
:
image
:
jruby:9.1
...
...
@@ -65,7 +65,7 @@ jruby_9.1:
-
master
script
:
-
ruby -v
-
JRUBY_OPTS="-J-Djruby.launch.inproc=true"
ruby scheck.rb
-
ruby scheck.rb
--jruby
rubocop
:
stage
:
linting
...
...
scheck.rb
View file @
11adfa6d
#!/usr/bin/env ruby
ret
=
0
jruby
=
ARGV
.
length
==
1
ret
=
0
require
'jruby'
if
jruby
Dir
[
"**/*.rb"
].
each
do
|
f
|
res
=
`ruby -c
#{
f
}
`
res
=
String
.
new
if
jruby
begin
JRuby
.
parse
(
File
.
read
(
f
))
res
=
'Syntax OK'
rescue
SyntaxError
=>
e
puts
e
.
to_s
end
else
res
=
`ruby -c
#{
f
}
`
end
if
res
.
empty?
ret
=
1
puts
"
#{
f
}
FAILED!"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment