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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a355a0742b48e9e0205d3bd3c4ffb6dee5e2eafcbadf6f38104455a807f2142f
4
- data.tar.gz: a33e29534f3587b6434f496d702aefae3ea203747890402380cb7ecdd7fc4ad0
3
+ metadata.gz: 1011282c5531aecf6d4adf8105e1bbc7fbce07012cb46aa087d6310156fc5d6d
4
+ data.tar.gz: bf05860e5c4118ecd595008348ca845b4b2073a2240f62a38005807ac47ce433
5
5
  SHA512:
6
- metadata.gz: b3c17e75d2c59625f815d5b8b59a490b815dfcc1ec7d1031ee95040340a7b67d0be67b1b4012fc1953cd8705ea2c9289710986caacf21c6bc788800af882d8fe
7
- data.tar.gz: 5d3db3fd91b90b1491b3144eee0936121394ce7e61f9f83fcc216eee3dc1a08414ba86315f3bd52a96a21d43677717cb813142aa9150e6d98ceafe967658be33
6
+ metadata.gz: 8985e61bb540f28626d8c92b6d47e5477a6656469e6055bf8020c702ab547229e4d739f2b216f574a87fa8a90543731789c6087038595b54b0678b0456588d45
7
+ data.tar.gz: 5f250e570b82f93f679ef66122de1ddb01857283377d9ad12ba25221f334dcc6bc294bd591cc0a19658ed545906a68a3803d5b6ddb7ea53b86cb8efc738fb5cc
data/Gemfile CHANGED
@@ -11,5 +11,4 @@ group :development do
11
11
  gem 'rubocop', '~> 0.67'
12
12
  gem 'rubocop-performance'
13
13
  gem 'simplecov'
14
- gem 'rspec'
15
14
  end
@@ -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
@@ -2,7 +2,7 @@
2
2
 
3
3
  module OhlohScm
4
4
  module Git
5
- class Scm < OhlohScm::Scm # rubocop:disable Metrics/ClassLength
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.scm_dir_exist?
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
- clean_git_lock_file
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
- def clean_git_lock_file
66
- run "rm #{url}/.git/index.lock" if File.exist?("#{url}/.git/index.lock")
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)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module OhlohScm
4
4
  module Version
5
- STRING = '3.0.6'
5
+ STRING = '3.0.7'
6
6
  GIT = '2.17.1'
7
7
  SVN = '1.9.7'
8
8
  CVSNT = '2.5.04'
@@ -1,5 +1,4 @@
1
1
  require 'spec_helper'
2
- require 'byebug'
3
2
 
4
3
  describe 'Git::Scm' do
5
4
  it 'must pull git repository' do
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.6
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-08-22 00:00:00.000000000 Z
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
- rubygems_version: 3.0.2
193
+ rubyforge_project:
194
+ rubygems_version: 2.7.6
194
195
  signing_key:
195
196
  specification_version: 4
196
197
  summary: Source Control Management