vcs2json 2.2.6 → 2.2.7

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: 08174428a277ad239a11023de140d4328662907a
4
- data.tar.gz: 679d3c2db878a846b4dea46a33281238728c43b9
3
+ metadata.gz: ab389feb10eca7d3bae067bffb53f91198d9c0db
4
+ data.tar.gz: 965ecacd7dc2cc024ccf10c55d8071fd3891db9a
5
5
  SHA512:
6
- metadata.gz: 48e74d000dff612601c6c4b631b8993a6aa027a3aef290eca229fa026b4242de316ce006135ef9ddfa7c1d31d40a1a8893cc5038cfbbbbc9e2fb6d4e1f7313ad
7
- data.tar.gz: 1bad49b3f420cc7f833a7ce92959a8d5981864794572159fbfe5b002c9b4023d9fd69902ef5ad6d147380544c6320af7d0a4d4209a8291452a97de127abae3f7
6
+ metadata.gz: c55f4ea4d2685b16c7b800f336dd68bf4e735df12390bb85f79488e628df9e56705edc7d500bf2cf8ba69fc3b1b46669d015b92b8dcf6b5aab4b7a6f1be1b3c5
7
+ data.tar.gz: eb56f5bd44a04330755e6a9d7f8ab16c37417c20eebe05a700a7528d449207dbcc94e1e50a0c4a397a5e8dd9353ebfe516352da8de47e6cc7dd399effd116980
data/lib/srcML/srcml.rb CHANGED
@@ -17,15 +17,8 @@ module SrcML
17
17
  '.cs' => 'C#',
18
18
  '.c' => 'C'}
19
19
 
20
- # Check that SrcML is available
21
- begin
22
- version,e,s = Open3.capture3("srcml --version")
23
- $stderr.puts version
24
- SRCML = "srcml"
25
- rescue Errno::ENOENT
26
- $stderr.puts "SrcML is required, please install from www.srcml.com"
27
- exit
28
- end
20
+ # name of srcml command
21
+ SRCML = 'srcml'
29
22
 
30
23
  ##
31
24
  # PUBLIC INTERFACE
@@ -109,7 +102,7 @@ module SrcML
109
102
  else
110
103
  ast,e,s = Open3.capture3("#{SRCML} #{path}")
111
104
  if !s.success?
112
- raise SrcML::ParseError, "Failed to parse #{path}"
105
+ raise SrcML::ParseError, "Failed to parse #{path}, is srcml installed?"
113
106
  end
114
107
  end
115
108
  # turn into structured xml
data/lib/vcs2json/git.rb CHANGED
@@ -35,6 +35,17 @@ module Vcs2Json
35
35
  SrcML.ignore_comments = opts[:ignore_comments]
36
36
  SrcML.ignore_whitespace = opts[:ignore_whitespace]
37
37
  SrcML.residuals = opts[:residuals]
38
+
39
+ # Check that SrcML is available if fine grained is turned on
40
+ if self.fine_grained
41
+ begin
42
+ Open3.capture3("srcml --version")
43
+ rescue Errno::ENOENT
44
+ $stderr.puts "SrcML is required for fine grained change history extraction, please install from www.srcml.com"
45
+ $stderr.puts "Defaulting to file level"
46
+ self.fine_grained = false
47
+ end
48
+ end
38
49
  end
39
50
 
40
51
  def after=(after)
@@ -1,3 +1,3 @@
1
1
  module Vcs2Json
2
- VERSION = "2.2.6"
2
+ VERSION = "2.2.7"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vcs2json
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.6
4
+ version: 2.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Rolfsnes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-14 00:00:00.000000000 Z
11
+ date: 2017-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler