ohloh_scm 3.0.6 → 3.0.7
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/Gemfile +0 -1
- data/Gemfile.lock +0 -15
- data/lib/ohloh_scm/git/scm.rb +6 -10
- data/lib/ohloh_scm/version.rb +1 -1
- data/spec/ohloh_scm/git/scm_spec.rb +0 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1011282c5531aecf6d4adf8105e1bbc7fbce07012cb46aa087d6310156fc5d6d
|
4
|
+
data.tar.gz: bf05860e5c4118ecd595008348ca845b4b2073a2240f62a38005807ac47ce433
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8985e61bb540f28626d8c92b6d47e5477a6656469e6055bf8020c702ab547229e4d739f2b216f574a87fa8a90543731789c6087038595b54b0678b0456588d45
|
7
|
+
data.tar.gz: 5f250e570b82f93f679ef66122de1ddb01857283377d9ad12ba25221f334dcc6bc294bd591cc0a19658ed545906a68a3803d5b6ddb7ea53b86cb8efc738fb5cc
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -3,7 +3,6 @@ GEM
|
|
3
3
|
specs:
|
4
4
|
ast (2.4.0)
|
5
5
|
byebug (11.0.1)
|
6
|
-
diff-lcs (1.3)
|
7
6
|
docile (1.3.1)
|
8
7
|
jaro_winkler (1.5.2)
|
9
8
|
json (2.2.0)
|
@@ -20,19 +19,6 @@ GEM
|
|
20
19
|
psych (3.1.0)
|
21
20
|
rainbow (3.0.0)
|
22
21
|
rake (12.3.2)
|
23
|
-
rspec (3.8.0)
|
24
|
-
rspec-core (~> 3.8.0)
|
25
|
-
rspec-expectations (~> 3.8.0)
|
26
|
-
rspec-mocks (~> 3.8.0)
|
27
|
-
rspec-core (3.8.2)
|
28
|
-
rspec-support (~> 3.8.0)
|
29
|
-
rspec-expectations (3.8.4)
|
30
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
-
rspec-support (~> 3.8.0)
|
32
|
-
rspec-mocks (3.8.1)
|
33
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
-
rspec-support (~> 3.8.0)
|
35
|
-
rspec-support (3.8.2)
|
36
22
|
rubocop (0.67.2)
|
37
23
|
jaro_winkler (~> 1.5.1)
|
38
24
|
parallel (~> 1.10)
|
@@ -60,7 +46,6 @@ DEPENDENCIES
|
|
60
46
|
mocha
|
61
47
|
nokogiri
|
62
48
|
rake
|
63
|
-
rspec
|
64
49
|
rubocop (~> 0.67)
|
65
50
|
rubocop-performance
|
66
51
|
simplecov
|
data/lib/ohloh_scm/git/scm.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
module OhlohScm
|
4
4
|
module Git
|
5
|
-
class Scm < OhlohScm::Scm
|
5
|
+
class Scm < OhlohScm::Scm
|
6
6
|
def initialize(core:, url:, branch_name:, username:, password:)
|
7
7
|
super
|
8
8
|
@branch_name = branch_name || 'master'
|
@@ -27,7 +27,7 @@ module OhlohScm
|
|
27
27
|
|
28
28
|
def clone_or_fetch(remote_scm, callback)
|
29
29
|
callback.update(0, 1)
|
30
|
-
if status.branch?(branch_name)
|
30
|
+
if status.exist? && status.branch?(branch_name)
|
31
31
|
clean_and_checkout_branch # must be on correct branch, but we want to be careful.
|
32
32
|
fetch_new_commits(remote_scm)
|
33
33
|
else
|
@@ -43,7 +43,7 @@ module OhlohScm
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def clone_and_create_tracking_branch(remote_scm)
|
46
|
-
unless status.
|
46
|
+
unless status.exist?
|
47
47
|
run "rm -rf '#{url}'"
|
48
48
|
run "git clone -q -n '#{remote_scm.url}' '#{url}'"
|
49
49
|
end
|
@@ -54,16 +54,12 @@ module OhlohScm
|
|
54
54
|
# We need very high reliability and this sequence gets the job done every time.
|
55
55
|
def clean_and_checkout_branch
|
56
56
|
return unless status.scm_dir_exist?
|
57
|
-
return unless status.branch?(branch_name)
|
58
57
|
|
59
58
|
run "cd '#{url}' && git clean -f -d -x"
|
60
|
-
|
61
|
-
run "cd '#{url}' && git reset --hard HEAD"
|
62
|
-
run "cd '#{url}' && git checkout #{branch_name} --"
|
63
|
-
end
|
59
|
+
return unless status.branch?(branch_name)
|
64
60
|
|
65
|
-
|
66
|
-
run "
|
61
|
+
run "cd '#{url}' && git checkout #{branch_name} --"
|
62
|
+
run "cd '#{url}' && git reset --hard heads/#{branch_name} --"
|
67
63
|
end
|
68
64
|
|
69
65
|
def create_tracking_branch(branch_name)
|
data/lib/ohloh_scm/version.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenHub Team at Synopsys
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |-
|
14
14
|
The OpenHub source control management library for \
|
@@ -190,7 +190,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
- !ruby/object:Gem::Version
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
|
-
|
193
|
+
rubyforge_project:
|
194
|
+
rubygems_version: 2.7.6
|
194
195
|
signing_key:
|
195
196
|
specification_version: 4
|
196
197
|
summary: Source Control Management
|