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 +4 -4
- data/lib/srcML/srcml.rb +3 -10
- data/lib/vcs2json/git.rb +11 -0
- data/lib/vcs2json/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab389feb10eca7d3bae067bffb53f91198d9c0db
|
4
|
+
data.tar.gz: 965ecacd7dc2cc024ccf10c55d8071fd3891db9a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
#
|
21
|
-
|
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)
|
data/lib/vcs2json/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2017-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|