ohloh_scm 2.4.5 → 2.4.6

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
- SHA256:
3
- metadata.gz: 7ce58eb162cb90bd87f81492e7b81ee43bc6a3d1ed5469a2e772d316d6aa084f
4
- data.tar.gz: ec0bc5a78784e98d1d381bbbfcd92d7e7d17c58a14660cdbe133f75bdd541c35
2
+ SHA1:
3
+ metadata.gz: 1eba74f2f8aefc6d482ec6425cf73836fdfb58cd
4
+ data.tar.gz: 7275ff1620338c7e4d4087040ee34c17ca536f71
5
5
  SHA512:
6
- metadata.gz: c6cf921619af3159e0bcd35627dc90c0d8e855da6a4191d7d02373d1fb7345723c15b8219783914faf5487cf4b94e2f2090f4cb1237dae025d2a9a6810e1ead1
7
- data.tar.gz: 925a9357f8960cfb4fc144a83ecb78c17983e33ef015217b91a551961206a6b95e2ca03236b21bd0dea31628dcb8f8819e35726fdfb5470a029191298b5c5746
6
+ metadata.gz: 3794d2921caf4d60a2b0f86060575fabde5a965a788a1c267e3ce5d4b1f2951fdfd7d39ec1298037b7034bce7a9af52ee020efbf439c2f85dd4a4639ed28b80c
7
+ data.tar.gz: 2920c4fc6623cfbc3dd40c7479f3992c7757af0210cc811c7c57992b2c4f8e31dd71fae3a238ce280f6cc82eb8714cf0c2895c2b47677121bfa252a44b431a18
@@ -36,8 +36,8 @@ module OhlohScm::Adapters
36
36
  if FileTest.exist? git_path
37
37
  run "cd '#{url}' && git clean -f -d -x"
38
38
  if self.has_branch?
39
- run "cd '#{url}' && git reset --hard heads/#{self.branch_name} --"
40
39
  run "cd '#{url}' && git checkout #{self.branch_name} --"
40
+ run "cd '#{url}' && git reset --hard heads/#{self.branch_name} --"
41
41
  end
42
42
  end
43
43
  end
@@ -1,5 +1,5 @@
1
1
  module OhlohScm
2
2
  module Version
3
- STRING = '2.4.5'
3
+ STRING = '2.4.6'
4
4
  end
5
5
  end
@@ -28,5 +28,23 @@ module OhlohScm::Adapters
28
28
  end
29
29
  end
30
30
  end
31
+
32
+ def test_basic_pull_of_non_default_branch
33
+ # This should not change current/default branch(e.g. master) to point to the branch commit being pulled
34
+ # In this case master should not point to test branch commit
35
+ with_git_repository('git_with_multiple_branch', 'test') do |src|
36
+ OhlohScm::ScratchDir.new do |dest_dir|
37
+ dest = GitAdapter.new(:url => dest_dir, branch_name: 'test').normalize
38
+ assert !dest.exist?
39
+ dest.pull(src)
40
+ remote_master_branch_sha = `cd #{dest_dir} && git rev-parse origin/master`
41
+ master_branch_sha = `cd #{dest_dir} && git rev-parse master`
42
+ test_branch_sha = `cd #{dest_dir} && git rev-parse test`
43
+
44
+ assert_not_equal master_branch_sha, test_branch_sha
45
+ assert_equal master_branch_sha, remote_master_branch_sha
31
46
  end
47
+ end
48
+ end
49
+ end
32
50
  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.5
4
+ version: 2.4.6
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-08-06 00:00:00.000000000 Z
11
+ date: 2018-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: posix-spawn
@@ -461,6 +461,7 @@ files:
461
461
  - test/repositories/git_with_empty_merge.tgz
462
462
  - test/repositories/git_with_invalid_encoding.tgz
463
463
  - test/repositories/git_with_master_tag.tgz
464
+ - test/repositories/git_with_multiple_branch.tgz
464
465
  - test/repositories/git_with_null_merge.tgz
465
466
  - test/repositories/hg.tgz
466
467
  - test/repositories/hg_dupe_delete.tgz
@@ -645,7 +646,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
645
646
  version: '0'
646
647
  requirements: []
647
648
  rubyforge_project:
648
- rubygems_version: 2.7.6
649
+ rubygems_version: 2.4.8
649
650
  signing_key:
650
651
  specification_version: 4
651
652
  summary: Source Control Management
@@ -932,6 +933,7 @@ test_files:
932
933
  - test/repositories/git_with_empty_merge.tgz
933
934
  - test/repositories/git_with_invalid_encoding.tgz
934
935
  - test/repositories/git_with_master_tag.tgz
936
+ - test/repositories/git_with_multiple_branch.tgz
935
937
  - test/repositories/git_with_null_merge.tgz
936
938
  - test/repositories/hg.tgz
937
939
  - test/repositories/hg_dupe_delete.tgz