ohloh_scm 2.4.0 → 2.4.1
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 +4 -4
- data/.travis.yml +1 -0
- data/bin/accept_svn_ssl_certificate +12 -0
- data/lib/ohloh_scm/adapters/abstract/misc.rb +3 -0
- data/lib/ohloh_scm/adapters/git_svn/cat_file.rb +1 -1
- data/lib/ohloh_scm/adapters/git_svn/pull.rb +8 -1
- data/lib/ohloh_scm/adapters/hg/misc.rb +3 -1
- data/lib/ohloh_scm/version.rb +1 -1
- data/test/repositories/hg.tgz +0 -0
- data/test/unit/hg_misc_test.rb +2 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8d51dc67baf8863f7210a845fdcaf36f198839d
|
4
|
+
data.tar.gz: 88a4858964e5e0ce728fb8dab1a520d7174c2036
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb9a2b2051ba005758c45f78fb0e1dc9d2761424e88e928a8b5b45b7d879e7b6847f0f8d17d621ff315a194ff1eb7eb479e4c906136ab4f7048b710b4ef4a1b9
|
7
|
+
data.tar.gz: 4a430f3725a3edcf569895cc2df0a100f39692c32eba26c357c9aa5deb1dc637d5aec8acb35f01a28aab67cc46551e6a0feaeb519aef87c5f4252fef7badfe42
|
data/.travis.yml
CHANGED
@@ -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 }:'#{ file_path }'").strip
|
14
|
+
run("cd #{self.url} && git show #{ revision }:'#{ escape_single_quote(file_path) }'").strip
|
15
15
|
end
|
16
16
|
|
17
17
|
def git_commit(commit)
|
@@ -15,6 +15,7 @@ module OhlohScm::Adapters
|
|
15
15
|
yield(0, 1) if block_given?
|
16
16
|
|
17
17
|
if FileTest.exist?(git_path)
|
18
|
+
accept_certificate_if_prompted
|
18
19
|
fetch(&block)
|
19
20
|
else
|
20
21
|
clone(&block)
|
@@ -43,7 +44,13 @@ module OhlohScm::Adapters
|
|
43
44
|
def accept_certificate_if_prompted
|
44
45
|
# git svn does not support non iteractive and serv-certificate options
|
45
46
|
# Permanently accept svn certificate when it prompts
|
46
|
-
|
47
|
+
opts = "#{username_opts} #{password_opts}"
|
48
|
+
opts = '--xml' if opts.strip.empty?
|
49
|
+
run "#{accept_ssl_certificate_cmd} '#{opts}' '#{@source_scm.url}'"
|
50
|
+
end
|
51
|
+
|
52
|
+
def accept_ssl_certificate_cmd
|
53
|
+
File.expand_path('../../../../../bin/accept_svn_ssl_certificate', __FILE__)
|
47
54
|
end
|
48
55
|
|
49
56
|
def password_prompt
|
@@ -22,7 +22,9 @@ module OhlohScm::Adapters
|
|
22
22
|
def tags
|
23
23
|
tag_strings = run("cd '#{path}' && hg tags").split(/\n/)
|
24
24
|
tag_strings.map do |tag_string|
|
25
|
-
|
25
|
+
parsed_str = tag_string.split(' ')
|
26
|
+
rev_number_and_hash = parsed_str.pop
|
27
|
+
tag_name = parsed_str.join(' ')
|
26
28
|
rev = rev_number_and_hash.slice(/\A\d+/)
|
27
29
|
time_string = run("cd '#{ path }' && hg log -r #{ rev } | grep 'date:' | sed 's/date://'")
|
28
30
|
[tag_name, rev, Time.parse(time_string)]
|
data/lib/ohloh_scm/version.rb
CHANGED
data/test/repositories/hg.tgz
CHANGED
Binary file
|
data/test/unit/hg_misc_test.rb
CHANGED
@@ -40,7 +40,8 @@ module OhlohScm::Adapters
|
|
40
40
|
def test_tags
|
41
41
|
with_hg_repository('hg') do |hg|
|
42
42
|
time = Time.parse('Fri Jul 22 18:00:18 2016 +0530')
|
43
|
-
assert_equal [
|
43
|
+
assert_equal ['tip', '5', time], hg.tags.first
|
44
|
+
assert_equal ['tagname with space', '2'], hg.tags.last.first(2)
|
44
45
|
end
|
45
46
|
end
|
46
47
|
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.
|
4
|
+
version: 2.4.1
|
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-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: posix-spawn
|
@@ -69,6 +69,7 @@ description: The Ohloh source control management library for interacting with Gi
|
|
69
69
|
email:
|
70
70
|
- info@openhub.net
|
71
71
|
executables:
|
72
|
+
- accept_svn_ssl_certificate
|
72
73
|
- ohlog
|
73
74
|
- string_encoder
|
74
75
|
extensions: []
|
@@ -83,6 +84,7 @@ files:
|
|
83
84
|
- COPYING
|
84
85
|
- README.md
|
85
86
|
- Rakefile
|
87
|
+
- bin/accept_svn_ssl_certificate
|
86
88
|
- bin/ohlog
|
87
89
|
- bin/string_encoder
|
88
90
|
- lib/ohloh_scm.rb
|