ohloh_scm 3.0.1 → 3.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2173a9ecad75fe5931641a605c4e8706bdfb309223d19b2684e011adcfb9fae9
4
- data.tar.gz: 2aef4446cfc221a4a98c999234b8ca68f2ec9d0497802b79ee2b3014605af3c1
3
+ metadata.gz: 4f4cbf7d314828522ff7a9b64256e889f2f109c7048d751c7d54d707ea085a96
4
+ data.tar.gz: aae75e139e32baa7a7eb2fff86a4f11d8a85edc65da8ee03519b6bcc752a2ebf
5
5
  SHA512:
6
- metadata.gz: f165668f9034a61e88147e16573cc8e1ac04200868e31cd1de2f7b0ce52518c4ebd53e3255b87c7d18d80b6c912a442ef0c6aed5c23c7c248f3da8ab8bf7a8c1
7
- data.tar.gz: ed2815782e55330b3ad564b37c450d6e5402418816580aa2bb0006081672c12ed60a62539ba79c41bf939e647b74b991cdc56cb8d5ed0476ae8fdc293ac4a310
6
+ metadata.gz: 5eeef15c64ca8f7eb7f0e6953dc30433854b72412a29ccb9a9bf42d136cddca3d8d900fea3cf4f48bbb13cd4b3cdf031b8ecf1fe111372650b7662687f7232c1
7
+ data.tar.gz: dcdb7fbbb147a63dc16d7106ab23a404ccad769f24ca96f5e91f110e776b5f368e8b50b00155dca07d2d2040c2f6009b2fbd6404d0874c5e8fc67ac8efc1d65a
@@ -12,9 +12,10 @@ module OhlohScm
12
12
  end
13
13
 
14
14
  def exist?
15
- return unless scm_dir_exist?
16
-
17
15
  !activity.head_token.to_s.empty?
16
+ rescue RuntimeError
17
+ logger.debug { $ERROR_INFO.inspect }
18
+ false
18
19
  end
19
20
 
20
21
  def scm_dir_exist?
@@ -20,9 +20,7 @@ module OhlohScm
20
20
 
21
21
  private
22
22
 
23
- def validate_server_connection
24
- return unless valid?
25
- end
23
+ def validate_server_connection; end
26
24
 
27
25
  # rubocop:disable Metrics/AbcSize
28
26
  def validate_attributes
@@ -2,7 +2,7 @@
2
2
 
3
3
  module OhlohScm
4
4
  module Version
5
- STRING = '3.0.1'
5
+ STRING = '3.0.2'
6
6
  GIT = '2.17.1'
7
7
  SVN = '1.9.7'
8
8
  CVSNT = '2.5.04'
@@ -7,9 +7,10 @@ describe 'Bzr::Scm' do
7
7
  with_bzr_repository('bzr') do |src|
8
8
  tmpdir do |dest_dir|
9
9
  core = OhlohScm::Factory.get_core(scm_type: :bzr, url: dest_dir)
10
- refute core.status.exist?
10
+ refute core.status.scm_dir_exist?
11
11
 
12
12
  core.scm.pull(src.scm, TestCallback.new)
13
+ assert core.status.scm_dir_exist?
13
14
  assert core.status.exist?
14
15
  end
15
16
  end
@@ -5,9 +5,10 @@ describe 'Git::Scm' do
5
5
  with_git_repository('git') do |src_core|
6
6
  tmpdir do |dest_dir|
7
7
  core = OhlohScm::Factory.get_core(scm_type: :git, url: dest_dir)
8
- refute core.status.exist?
8
+ refute core.status.scm_dir_exist?
9
9
 
10
10
  core.scm.pull(src_core.scm, TestCallback.new)
11
+ assert core.status.scm_dir_exist?
11
12
  assert core.status.exist?
12
13
  end
13
14
  end
@@ -19,7 +20,7 @@ describe 'Git::Scm' do
19
20
  with_git_repository('git_with_multiple_branch', 'test') do |src_core|
20
21
  tmpdir do |dest_dir|
21
22
  core = OhlohScm::Factory.get_core(scm_type: :git, url: dest_dir, branch_name: 'test')
22
- refute core.status.exist?
23
+ refute core.status.scm_dir_exist?
23
24
  core.scm.pull(src_core.scm, TestCallback.new)
24
25
 
25
26
  remote_master_branch_sha = `cd #{dest_dir} && git rev-parse origin/master`
@@ -36,8 +37,9 @@ describe 'Git::Scm' do
36
37
  with_cvs_repository('cvs', 'simple') do |src_core|
37
38
  tmpdir do |dest_dir|
38
39
  core = OhlohScm::Factory.get_core(scm_type: :git, url: dest_dir)
39
- refute core.status.exist?
40
+ refute core.status.scm_dir_exist?
40
41
  core.scm.pull(src_core.scm, TestCallback.new)
42
+ assert core.status.scm_dir_exist?
41
43
  assert core.status.exist?
42
44
 
43
45
  dest_commits = core.activity.commits
@@ -1,12 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe 'Git::Validation' do
4
- it 'must handle non existent remote source' do
5
- core = OhlohScm::Factory.get_core(scm_type: :git, url: 'https://github.com/Person/foobar')
6
- core.validate
7
- core.errors.wont_be :empty?
8
- end
9
-
10
4
  it 'wont have errors for valid url' do
11
5
  core = OhlohScm::Factory.get_core(scm_type: :git, url: 'https://github.com/ruby/ruby')
12
6
  core.validation.send(:validate_attributes)
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.1
4
+ version: 3.0.2
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-07-13 00:00:00.000000000 Z
11
+ date: 2019-07-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  The OpenHub source control management library for \