ohloh_scm 2.4.1 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8d51dc67baf8863f7210a845fdcaf36f198839d
4
- data.tar.gz: 88a4858964e5e0ce728fb8dab1a520d7174c2036
3
+ metadata.gz: 6ca7f42fcd9f22befb6a03ef35aeea2fae669bac
4
+ data.tar.gz: d8f226bf6718b5cbb3787692e1669d1c6d149e1c
5
5
  SHA512:
6
- metadata.gz: bb9a2b2051ba005758c45f78fb0e1dc9d2761424e88e928a8b5b45b7d879e7b6847f0f8d17d621ff315a194ff1eb7eb479e4c906136ab4f7048b710b4ef4a1b9
7
- data.tar.gz: 4a430f3725a3edcf569895cc2df0a100f39692c32eba26c357c9aa5deb1dc637d5aec8acb35f01a28aab67cc46551e6a0feaeb519aef87c5f4252fef7badfe42
6
+ metadata.gz: 7911b3775c0bd4898d9bbf1bfcd92772fc38f090858974b6b1b980680ce4d51728832cfde6f71d4188155e489566a3b85ca488b504dca1faea42e53e1a12baa9
7
+ data.tar.gz: 10474e25bc367e512ab7eeb51c7f474d46e88cb846a2ca1b2c44ee7db21793d032b85bda4c649fc8ca85d01435d68b0339e3a1f47ef21ecaeb2e3e29be86c4c0
@@ -8,9 +8,5 @@ module OhlohScm::Adapters
8
8
  def tags
9
9
  []
10
10
  end
11
-
12
- def escape_single_quote(str)
13
- str.to_s.gsub("'", "'\''")
14
- end
15
11
  end
16
12
  end
@@ -11,7 +11,7 @@ module OhlohScm::Adapters
11
11
  private
12
12
 
13
13
  def cat(revision, file_path)
14
- run("cd #{self.url} && git show #{ revision }:'#{ escape_single_quote(file_path) }'").strip
14
+ run("cd #{self.url} && git show #{ revision }:\"#{ file_path }\"").strip
15
15
  end
16
16
 
17
17
  def git_commit(commit)
@@ -149,7 +149,8 @@ module OhlohScm::Adapters
149
149
  doc.xpath('//lists/list/entry').map do |entry|
150
150
  tag_name = entry.xpath('name').text
151
151
  revision = entry.xpath('commit').attr('revision').text
152
- date_string = Time.parse(entry.xpath("commit/date").text)
152
+ commit_time = entry.xpath("commit/date").text
153
+ date_string = Time.parse(commit_time) unless commit_time.to_s.strip.empty?
153
154
  [tag_name, revision, date_string]
154
155
  end
155
156
  end
@@ -7,12 +7,16 @@ module OhlohScm::Parsers
7
7
  def self.internal_parse(buffer, opts)
8
8
  e = nil
9
9
  state = :data
10
+ previous_state = nil
11
+ previous_line = nil
10
12
 
11
13
  buffer.each_line do |l|
12
14
  l.chomp!
13
15
  next_state = state
14
16
  if state == :data
15
17
  if l =~ /^r(\d+) \| (.*) \| (\d+-\d+-\d+ .*) \(.*\) \| .*/
18
+ yield e if e && block_given?
19
+
16
20
  e = OhlohScm::Commit.new
17
21
  e.token = $1.to_i
18
22
  e.committer_name = $2
@@ -21,6 +25,13 @@ module OhlohScm::Parsers
21
25
  next_state = :diffs
22
26
  elsif l.empty?
23
27
  next_state = :comment
28
+ elsif previous_state == :comment
29
+ next_state = :comment
30
+ e.message ||= ''
31
+ e.message << "\n"
32
+ e.message << previous_line
33
+ e.message << "\n"
34
+ e.message << l
24
35
  end
25
36
 
26
37
  elsif state == :diffs
@@ -42,8 +53,6 @@ module OhlohScm::Parsers
42
53
 
43
54
  elsif state == :comment
44
55
  if l =~ /------------------------------------------------------------------------/
45
- yield e if block_given?
46
- e = nil
47
56
  next_state = :data
48
57
  elsif l =~ /============================ .* log start =+/
49
58
  e.message << "\n"
@@ -58,7 +67,9 @@ module OhlohScm::Parsers
58
67
  end
59
68
  end
60
69
  end
70
+ previous_state = state
61
71
  state = next_state
72
+ previous_line = l
62
73
  end
63
74
  yield e if block_given?
64
75
  end
@@ -1,5 +1,5 @@
1
1
  module OhlohScm
2
2
  module Version
3
- STRING = '2.4.1'
3
+ STRING = '2.4.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohloh_scm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - BlackDuck Software
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-22 00:00:00.000000000 Z
11
+ date: 2018-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: posix-spawn