vcs2json 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/exceptions/parse_error.rb +4 -0
- data/lib/srcML/srcml.rb +2 -2
- data/lib/vcs2json/git.rb +1 -1
- data/lib/vcs2json/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65f6cfd1b92fbdb6c2f8e8bb1cb9040a4dc800d1
|
4
|
+
data.tar.gz: 5f4d239254102130cff469548a62396cbba645b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37cf26b739c34a0d956a0e73dd28f34a7f2c41ea3f8f8ee875ebf2c0b9a7d9b2fa1915f7649afd20737cbdbbd937ff807fd504f5387996fb5a41c176f39cf6c4
|
7
|
+
data.tar.gz: 25926a6d256ee211ac5dd063b82bd7635c5382d4abc30efffabba4930e70a906b78004de7e77af900667389b9bb73b5be92b6f820b0c8fd43bd0e7a434bc0e4b
|
data/lib/srcML/srcml.rb
CHANGED
@@ -101,7 +101,7 @@ module SrcML
|
|
101
101
|
if language = LANGUAGES[File.extname(path)]
|
102
102
|
ast,e,s = Open3.capture3("bash -c '#{SRCML} --language #{language} <(git show #{revision}:#{path})'")
|
103
103
|
if !s.success?
|
104
|
-
raise
|
104
|
+
raise SrcML::ParseError, "Failed to parse #{revision}:#{path} using the #{language} parser"
|
105
105
|
end
|
106
106
|
else
|
107
107
|
raise SrcML::UnsupportedLanguageError, "Language in the file '#{path}' not supported (guessed language from file type)"
|
@@ -109,7 +109,7 @@ module SrcML
|
|
109
109
|
else
|
110
110
|
ast,e,s = Open3.capture3("#{SRCML} #{path}")
|
111
111
|
if !s.success?
|
112
|
-
raise
|
112
|
+
raise SrcML::ParseError, "Failed to parse #{path}"
|
113
113
|
end
|
114
114
|
end
|
115
115
|
# turn into structured xml
|
data/lib/vcs2json/git.rb
CHANGED
@@ -169,7 +169,7 @@ module Vcs2Json
|
|
169
169
|
else
|
170
170
|
SrcML.changed_methods_git(file_name,id).each {|m| output_hash[:changes] << m}
|
171
171
|
end
|
172
|
-
rescue SrcML::UnsupportedLanguageError
|
172
|
+
rescue SrcML::UnsupportedLanguageError, SrcML::ParseError
|
173
173
|
output_hash[:changes] << file_name
|
174
174
|
end
|
175
175
|
else
|
data/lib/vcs2json/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcs2json
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Rolfsnes
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/exceptions/no_date_field.rb
|
151
151
|
- lib/exceptions/no_file_section.rb
|
152
152
|
- lib/exceptions/no_time_data_in_chafiles_field.rb
|
153
|
+
- lib/exceptions/parse_error.rb
|
153
154
|
- lib/exceptions/unsupported_language.rb
|
154
155
|
- lib/srcML/srcml.rb
|
155
156
|
- lib/vcs2json/git.rb
|