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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 152a2cf67da66bb54679d65eafbf4b81d7313143
4
- data.tar.gz: 846128bdede88baf2e234c6635e0334bbd27ec79
3
+ metadata.gz: 65f6cfd1b92fbdb6c2f8e8bb1cb9040a4dc800d1
4
+ data.tar.gz: 5f4d239254102130cff469548a62396cbba645b3
5
5
  SHA512:
6
- metadata.gz: b42b0c16f1b0e59a89f2eb1efeb3da2879b1142965188ce93cbb51ba0795b2a9281bb7064374d35ae305e489a10eefdbfd404e51642084902b288bea59860dbd
7
- data.tar.gz: 3494ac6df6bafa9860ee4e8c58a7df158ea33f5ef731d60fcdb881fd54a5d4064507b4352fd0bd11999b1adf883d6ea12781a73e097a4138ce2d21e41d75437d
6
+ metadata.gz: 37cf26b739c34a0d956a0e73dd28f34a7f2c41ea3f8f8ee875ebf2c0b9a7d9b2fa1915f7649afd20737cbdbbd937ff807fd504f5387996fb5a41c176f39cf6c4
7
+ data.tar.gz: 25926a6d256ee211ac5dd063b82bd7635c5382d4abc30efffabba4930e70a906b78004de7e77af900667389b9bb73b5be92b6f820b0c8fd43bd0e7a434bc0e4b
@@ -0,0 +1,4 @@
1
+ module SrcML
2
+ class ParseError < StandardError
3
+ end
4
+ end
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 ArgumentError, e
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 ArgumentError, e
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
@@ -1,3 +1,3 @@
1
1
  module Vcs2Json
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
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.0
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