ohloh_scm 3.0.19 → 4.0.1

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: 9617a76fcacb0cbb50e36d0008042ed686372e29f0e101ca62d52ab7cf1e853a
4
- data.tar.gz: 1c11aa29232ba00d508329f3c24c773d5e7ffa0b02fac7fff0a060d0476ec5c6
3
+ metadata.gz: 8809bbfd25b951cbd16c88eaefec1c70bbc2f255f1b0bb7d3d67380e9e107aed
4
+ data.tar.gz: 6f27491d2f3b158f19f290bdd4f1c1d988ce1c067f79c3c5846c72174e5af920
5
5
  SHA512:
6
- metadata.gz: 148dc5b5c6a6a8b1437465abfe66081821de1347c1ee1b8bb7ea40bdd98dd73d925d0577b314044ccf9ba4042e7e1e62dd9b8c5ca8de058cd773097985779a1c
7
- data.tar.gz: c8d67b1091edb45525e4022c4eb39f24845ca2c73c442fde92a137ba4e43bdbbe30cbedf54f29aa3531a843a3fde91d4ab2b36f8134db2d12a1b2b1200c2f608
6
+ metadata.gz: 7793a60e5457ccd198a9be366b4d9e02926a472f874428328d724baba8c6a228da5eb42030db850d19d981a8844d23c69b5972c0b9c724d42493be6b37696e60
7
+ data.tar.gz: cbe7febaf85256dfce20c7ef059bf1e58952ee3dac0556da0fbb821b3e5d2cac8803f1764126eec2ee0c5ee668b185389f52b9ca46e59f2f603d76d294ce18d9
@@ -0,0 +1,20 @@
1
+ name: CI Pipeline
2
+
3
+ on:
4
+ pull_request:
5
+ types:
6
+ - opened
7
+ - synchronize
8
+ push:
9
+ branches: [main]
10
+
11
+ jobs:
12
+ ci_task:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Run rubocop and tests
17
+ run: |
18
+ docker pull ohdeployer/ohloh_scm:latest
19
+ cmd='/etc/init.d/ssh start; bundle exec rubocop; rake test 2> /dev/null'
20
+ docker run --rm -P -v $(pwd):/home/app/ohloh_scm -i ohdeployer/ohloh_scm:latest /bin/sh -c "$cmd"
data/.rubocop.yml CHANGED
@@ -11,3 +11,6 @@ Documentation:
11
11
 
12
12
  Style/RegexpLiteral:
13
13
  Enabled: false
14
+
15
+ Metrics/ClassLength:
16
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.3
1
+ 2.6.9
data/Dockerfile CHANGED
@@ -1,35 +1,49 @@
1
- FROM ubuntu:18.04
1
+ FROM ubuntu:22.04
2
2
  MAINTAINER OpenHub <info@openhub.net>
3
3
 
4
- ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV HOME /home
5
+ ENV LC_ALL en_US.UTF-8
6
+ ENV APP_HOME $HOME/app/ohloh_scm
7
+ ENV DEBIAN_FRONTEND noninteractive
8
+ ENV PATH $HOME/.rbenv/shims:$HOME/.rbenv/bin:$HOME/.rbenv/plugins/ruby-build/bin:$PATH
5
9
 
6
10
  RUN apt-get update
7
- RUN apt-get install -y build-essential software-properties-common locales
11
+ RUN apt-get install -y build-essential software-properties-common locales ragel \
12
+ libxml2-dev libpcre3 libpcre3-dev swig gperf openssh-server expect libreadline-dev \
13
+ zlib1g-dev git git-svn subversion cvs ca-certificates
14
+
15
+ RUN apt-get install -y python2.7 python2-dev python-pip \
16
+ && ln -s /usr/bin/python2.7 /usr/local/bin/python
17
+
8
18
  RUN locale-gen en_US.UTF-8
9
19
 
10
- RUN apt-add-repository -y ppa:brightbox/ruby-ng
11
- RUN apt-get update
12
- RUN apt-get install -y ruby2.5 ruby2.5-dev
20
+ RUN cd $HOME \
21
+ && git clone https://github.com/rbenv/rbenv.git $HOME/.rbenv \
22
+ && git clone https://github.com/sstephenson/ruby-build.git $HOME/.rbenv/plugins/ruby-build \
23
+ && echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc \
24
+ && echo 'gem: --no-rdoc --no-ri' >> $HOME/.gemrc \
25
+ && echo 'export PATH="$HOME/.rbenv/shims:$HOME/.rbenv/bin:/home/.rbenv/plugins/ruby-build/bin:$PATH"' >> $HOME/.bash_profile \
26
+ && rbenv install 2.6.9 && rbenv global 2.6.9
13
27
 
14
- RUN apt-get install -y ragel libxml2-dev libpcre3 libpcre3-dev swig gperf openssh-server expect
15
- RUN apt-get install -y git git-svn subversion cvs mercurial bzr
28
+ RUN git config --global --add safe.directory '*'
16
29
 
17
- RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa
18
- RUN cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
19
- RUN echo 'StrictHostKeyChecking no' >> ~/.ssh/config
30
+ RUN ssh-keygen -q -t rsa -N '' -f /root/.ssh/id_rsa \
31
+ && cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys \
32
+ && echo 'StrictHostKeyChecking no' >> /root/.ssh/config
20
33
 
21
- RUN mkdir -p ~/.bazaar/plugins
22
- RUN cd ~/.bazaar/plugins
23
- RUN bzr branch lp:bzr-xmloutput ~/.bazaar/plugins/xmloutput
34
+ RUN pip2 install bzr "mercurial==4.9.1"
35
+ RUN mkdir -p ~/.bazaar/plugins \
36
+ && cd ~/.bazaar/plugins \
37
+ && bzr branch lp:bzr-xmloutput ~/.bazaar/plugins/xmloutput
24
38
 
25
39
  RUN ln -s /usr/bin/cvs /usr/bin/cvsnt
26
40
 
27
- RUN gem install rake
28
- RUN gem install bundler -v '~> 1.17'
29
-
30
- RUN mkdir -p /home/app/ohloh_scm
31
- WORKDIR /home/app/ohloh_scm
32
- ADD . /home/app/ohloh_scm
41
+ # Run bundle install before copying source to keep this step cached.
42
+ RUN mkdir -p $APP_HOME
43
+ COPY Gemfile* $APP_HOME/
44
+ RUN gem install rake bundler:1.17.3 \
45
+ && bundle config --global silence_root_warning 1 \
46
+ && cd $APP_HOME && bundle install
33
47
 
34
- RUN bundle config --global silence_root_warning 1
35
- RUN bundle install
48
+ ADD . $APP_HOME
49
+ WORKDIR $APP_HOME
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- [![Ohloh SCM on OpenHub](https://www.openhub.net/p/ohloh_scm/widgets/project_partner_badge.gif)](https://www.openhub.net/p/ohloh_scm) [![Build Status](https://travis-ci.org/blackducksoftware/ohloh_scm.svg?branch=main)](https://travis-ci.org/blackducksoftware/ohloh_scm)
1
+ [![Ohloh SCM on OpenHub](https://www.openhub.net/p/ohloh_scm/widgets/project_partner_badge.gif)](https://www.openhub.net/p/ohloh_scm)
2
+ ![Coverity Scan Build](https://github.com/blackducksoftware/ohloh_scm/actions/workflows/coverity.yml/badge.svg?branch=main)
3
+ ![Build Status](https://github.com/blackducksoftware/ohloh_scm/actions/workflows/ci.yml/badge.svg?branch=main)
2
4
 
3
5
  # Ohloh SCM
4
6
 
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Metrics/ClassLength
4
3
  module OhlohScm
5
4
  module Bzr
6
5
  class Activity < OhlohScm::Activity
@@ -75,7 +74,8 @@ module OhlohScm
75
74
  end
76
75
 
77
76
  def head_token
78
- run("bzr log --limit 1 --show-id #{url} 2> /dev/null | grep ^revision-id | cut -f2 -d' '").strip
77
+ run("bzr log --limit 1 --show-id #{url} 2> /dev/null"\
78
+ " | grep ^revision-id | cut -f2 -d' '").strip
79
79
  end
80
80
 
81
81
  def head
@@ -187,4 +187,3 @@ module OhlohScm
187
187
  end
188
188
  end
189
189
  end
190
- # rubocop:enable Metrics/ClassLength
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'ohloh_scm/data/git_ignore_list'
4
-
5
- # rubocop:disable Metrics/ClassLength
6
4
  module OhlohScm
7
5
  module Git
8
6
  class Activity < OhlohScm::Activity
@@ -314,4 +312,3 @@ module OhlohScm
314
312
  end
315
313
  end
316
314
  end
317
- # rubocop:enable Metrics/ClassLength
@@ -57,6 +57,7 @@ module OhlohScm
57
57
  end
58
58
 
59
59
  # We need very high reliability and this sequence gets the job done every time.
60
+ # rubocop:disable Metrics/AbcSize
60
61
  def clean_and_checkout_branch
61
62
  return unless status.scm_dir_exist?
62
63
 
@@ -67,19 +68,22 @@ module OhlohScm
67
68
  run "cd '#{url}' && git checkout #{branch_name} --"
68
69
  run "cd '#{url}' && git reset --hard heads/#{branch_name} --"
69
70
  end
71
+ # rubocop:enable Metrics/AbcSize
70
72
 
71
73
  def create_tracking_branch(branch_name)
72
74
  return if branch_name.to_s.empty?
73
75
  return if activity.branches.include?(branch_name)
74
76
 
75
- run "cd '#{url}' && git remote update && git branch -f #{branch_name} origin/#{branch_name}"
77
+ run("cd '#{url}' && git remote update && "\
78
+ "git branch -f #{branch_name} origin/#{branch_name}")
76
79
  end
77
80
 
78
81
  # Deletes everything but the *.git* folder in the working directory.
79
82
  def clean_up_disk
80
83
  return unless Dir.exist?(url)
81
84
 
82
- run "cd #{url} && find . -maxdepth 1 -not -name .git -not -name '*.nfs*' -not -name . -print0"\
85
+ run "cd #{url} && "\
86
+ "find . -maxdepth 1 -not -name .git -not -name '*.nfs*' -not -name . -print0"\
83
87
  ' | xargs -0 rm -rf --'
84
88
  end
85
89
 
@@ -88,7 +88,8 @@ module OhlohScm
88
88
  def clean_up_disk
89
89
  return unless File.exist?(url)
90
90
 
91
- run "cd #{url} && find . -maxdepth 1 -not -name .git -not -name '*.nfs*' -not -name . -print0"\
91
+ run "cd #{url} && "\
92
+ "find . -maxdepth 1 -not -name .git -not -name '*.nfs*' -not -name . -print0"\
92
93
  ' | xargs -0 rm -rf --'
93
94
  end
94
95
  end
@@ -1,8 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'shellwords'
4
-
5
- # rubocop:disable Metrics/ClassLength
6
4
  module OhlohScm
7
5
  module Hg
8
6
  class Activity < OhlohScm::Activity
@@ -185,4 +183,3 @@ module OhlohScm
185
183
  end
186
184
  end
187
185
  end
188
- # rubocop:enable Metrics/ClassLength
@@ -19,7 +19,7 @@ module OhlohScm
19
19
  end
20
20
 
21
21
  def checkout_files(names)
22
- pattern = "(#{ names.join('|') })"
22
+ pattern = "(#{names.join('|')})"
23
23
  run "cd #{url} && hg revert $(hg manifest | grep -P '#{pattern}')"
24
24
  end
25
25
 
@@ -48,7 +48,8 @@ module OhlohScm
48
48
  def clean_up_disk
49
49
  return unless FileTest.exist?(url)
50
50
 
51
- run "cd #{url} && find . -maxdepth 1 -not -name .hg -not -name '*.nfs*' -not -name . -print0"\
51
+ run "cd #{url} && "\
52
+ "find . -maxdepth 1 -not -name .hg -not -name '*.nfs*' -not -name . -print0"\
52
53
  ' | xargs -0 rm -rf --'
53
54
  end
54
55
  end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Metrics/ClassLength
4
3
  module OhlohScm
5
4
  class CvsParser < Parser
6
5
  class << self
@@ -158,4 +157,3 @@ module OhlohScm
158
157
  end
159
158
  end
160
159
  end
161
- # rubocop:enable Metrics/ClassLength
@@ -10,13 +10,20 @@ class HglibPipeServer:
10
10
  self.repository = hg.repository(self.ui, repository_url)
11
11
 
12
12
  def get_file_content(self, filename, revision):
13
- c = self.repository.changectx(revision)
13
+ c = self.changectx(revision)
14
14
  fc = c[filename]
15
15
  contents = fc.data()
16
16
  return contents
17
17
 
18
+ def changectx(self, revision):
19
+ if hasattr(self.repository, 'changectx'):
20
+ return self.repository.changectx(revision)
21
+ else:
22
+ rev_no = self.repository.revs(revision).first()
23
+ return self.repository[rev_no]
24
+
18
25
  def get_parent_tokens(self, revision):
19
- c = self.repository.changectx(revision)
26
+ c = self.changectx(revision)
20
27
  parents = [p.hex() for p in c.parents() if p.hex() != '0000000000000000000000000000000000000000']
21
28
  return parents
22
29
 
@@ -2,11 +2,11 @@
2
2
 
3
3
  module OhlohScm
4
4
  module Version
5
- STRING = '3.0.19'
6
- GIT = '2.17.1'
7
- SVN = '1.9.7'
8
- CVSNT = '2.5.04'
9
- HG = '4.5.3'
10
- BZR = '2.8.0'
5
+ STRING = '4.0.1'
6
+ GIT = '2.34.1'
7
+ SVN = '1.14.1'
8
+ CVSNT = '1.12.13'
9
+ HG = '4.9.1'
10
+ BZR = '2.7.0'
11
11
  end
12
12
  end
@@ -7,8 +7,9 @@ describe 'Git::Activity' do
7
7
  with_git_repository('git') do |git|
8
8
  tmpdir do |dir|
9
9
  git.activity.export(dir)
10
- Dir.entries(dir).sort.must_equal ['.', '..', '.gitignore', 'COPYING', 'README',
11
- 'helloworld.c', 'makefile', 'ohloh_token']
10
+ entries = ['.', '..', '.gitignore', 'COPYING', 'Gemfile.lock', 'Godeps', 'README',
11
+ 'helloworld.c', 'makefile', 'nested', 'ohloh_token']
12
+ Dir.entries(dir).sort.must_equal entries
12
13
  end
13
14
  end
14
15
  end
@@ -79,8 +80,8 @@ describe 'Git::Activity' do
79
80
  it 'must return correct head' do
80
81
  with_git_repository('git') do |git|
81
82
  assert git.status.exist?
82
- git.activity.head_token.must_equal '1df547800dcd168e589bb9b26b4039bff3a7f7e4'
83
- git.activity.head.token.must_equal '1df547800dcd168e589bb9b26b4039bff3a7f7e4'
83
+ git.activity.head_token.must_equal 'a2690f4471a0852723f0f0e95d97f7f1f3981639'
84
+ git.activity.head.token.must_equal 'a2690f4471a0852723f0f0e95d97f7f1f3981639'
84
85
  assert git.activity.head.diffs.any?
85
86
  end
86
87
  end
@@ -93,9 +94,9 @@ describe 'Git::Activity' do
93
94
 
94
95
  it 'commit_count' do
95
96
  with_git_repository('git') do |git|
96
- git.activity.commit_count.must_equal 4
97
- git.activity.commit_count(after: 'b6e9220c3cabe53a4ed7f32952aeaeb8a822603d').must_equal 2
98
- git.activity.commit_count(after: '1df547800dcd168e589bb9b26b4039bff3a7f7e4').must_equal 0
97
+ git.activity.commit_count.must_equal 5
98
+ git.activity.commit_count(after: 'b6e9220c3cabe53a4ed7f32952aeaeb8a822603d').must_equal 3
99
+ git.activity.commit_count(after: '1df547800dcd168e589bb9b26b4039bff3a7f7e4').must_equal 1
99
100
  end
100
101
  end
101
102
 
@@ -104,12 +105,13 @@ describe 'Git::Activity' do
104
105
  git.activity.commit_tokens.must_equal %w[089c527c61235bd0793c49109b5bd34d439848c6
105
106
  b6e9220c3cabe53a4ed7f32952aeaeb8a822603d
106
107
  2e9366dd7a786fdb35f211fff1c8ea05c51968b1
107
- 1df547800dcd168e589bb9b26b4039bff3a7f7e4]
108
+ 1df547800dcd168e589bb9b26b4039bff3a7f7e4
109
+ a2690f4471a0852723f0f0e95d97f7f1f3981639]
108
110
 
109
111
  git.activity.commit_tokens(after: '2e9366dd7a786fdb35f211fff1c8ea05c51968b1')
110
- .must_equal ['1df547800dcd168e589bb9b26b4039bff3a7f7e4']
112
+ .must_equal %w[1df547800dcd168e589bb9b26b4039bff3a7f7e4 a2690f4471a0852723f0f0e95d97f7f1f3981639]
111
113
 
112
- git.activity.commit_tokens(after: '1df547800dcd168e589bb9b26b4039bff3a7f7e4').must_be :empty?
114
+ git.activity.commit_tokens(after: 'a2690f4471a0852723f0f0e95d97f7f1f3981639').must_be :empty?
113
115
  end
114
116
  end
115
117
 
@@ -118,12 +120,13 @@ describe 'Git::Activity' do
118
120
  git.activity.commits.collect(&:token).must_equal %w[089c527c61235bd0793c49109b5bd34d439848c6
119
121
  b6e9220c3cabe53a4ed7f32952aeaeb8a822603d
120
122
  2e9366dd7a786fdb35f211fff1c8ea05c51968b1
121
- 1df547800dcd168e589bb9b26b4039bff3a7f7e4]
123
+ 1df547800dcd168e589bb9b26b4039bff3a7f7e4
124
+ a2690f4471a0852723f0f0e95d97f7f1f3981639]
122
125
 
123
126
  git.activity.commits(after: '2e9366dd7a786fdb35f211fff1c8ea05c51968b1').collect(&:token)
124
- .must_equal ['1df547800dcd168e589bb9b26b4039bff3a7f7e4']
127
+ .must_equal %w[1df547800dcd168e589bb9b26b4039bff3a7f7e4 a2690f4471a0852723f0f0e95d97f7f1f3981639]
125
128
 
126
- git.activity.commits(after: '1df547800dcd168e589bb9b26b4039bff3a7f7e4').must_be :empty?
129
+ git.activity.commits(after: 'a2690f4471a0852723f0f0e95d97f7f1f3981639').must_be :empty?
127
130
  end
128
131
  end
129
132
 
@@ -3,8 +3,8 @@ require 'spec_helper'
3
3
  describe 'Hg::Activity' do
4
4
  it 'must fetch tags' do
5
5
  with_hg_repository('hg') do |hg|
6
- time = Time.parse('Fri Jul 22 18:00:18 2016 +0530')
7
- hg.activity.tags.first.must_equal ['tip', '5', time]
6
+ time = Time.parse('Mon Sep 19 15:27:19 2022 +0000')
7
+ hg.activity.tags.first.must_equal ['tip', '6', time]
8
8
  hg.activity.tags.last.first(2).must_equal ['tagname with space', '2']
9
9
  end
10
10
  end
@@ -13,7 +13,8 @@ describe 'Hg::Activity' do
13
13
  with_hg_repository('hg') do |hg|
14
14
  Dir.mktmpdir do |dir|
15
15
  hg.activity.export(dir)
16
- Dir.entries(dir).sort.must_equal ['.', '..', 'README', 'makefile', 'two']
16
+ entries = ['.', '..', '.hgtags', 'Gemfile.lock', 'Godeps', 'README', 'makefile', 'nested', 'two']
17
+ Dir.entries(dir).sort.must_equal entries
17
18
  end
18
19
  end
19
20
  end
@@ -21,18 +22,18 @@ describe 'Hg::Activity' do
21
22
  describe 'commits' do
22
23
  it 'commit_count' do
23
24
  with_hg_repository('hg') do |hg|
24
- hg.activity.commit_count.must_equal 5
25
- hg.activity.commit_count(after: 'b14fa4692f949940bd1e28da6fb4617de2615484').must_equal 3
26
- hg.activity.commit_count(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').must_equal 0
25
+ hg.activity.commit_count.must_equal 6
26
+ hg.activity.commit_count(after: 'b14fa4692f949940bd1e28da6fb4617de2615484').must_equal 4
27
+ hg.activity.commit_count(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').must_equal 1
27
28
  end
28
29
  end
29
30
 
30
31
  it 'commit_count_with_empty_branch' do
31
32
  with_hg_repository('hg', '') do |hg|
32
33
  hg.scm.branch_name.must_be_nil
33
- hg.activity.commit_count.must_equal 5
34
- hg.activity.commit_count(after: 'b14fa4692f949940bd1e28da6fb4617de2615484').must_equal 3
35
- hg.activity.commit_count(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').must_equal 0
34
+ hg.activity.commit_count.must_equal 6
35
+ hg.activity.commit_count(after: 'b14fa4692f949940bd1e28da6fb4617de2615484').must_equal 4
36
+ hg.activity.commit_count(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').must_equal 1
36
37
  end
37
38
  end
38
39
 
@@ -42,15 +43,16 @@ describe 'Hg::Activity' do
42
43
  b14fa4692f949940bd1e28da6fb4617de2615484
43
44
  468336c6671cbc58237a259d1b7326866afc2817
44
45
  75532c1e1f1de55c2271f6fd29d98efbe35397c4
45
- 655f04cf6ad708ab58c7b941672dce09dd369a18])
46
+ 655f04cf6ad708ab58c7b941672dce09dd369a18
47
+ 1f45520fff3982761cfe7a0502ad0888d5783efe])
46
48
 
47
- after = '75532c1e1f1de55c2271f6fd29d98efbe35397c4'
48
- hg.activity.commits(after: after).map(&:token).must_equal ['655f04cf6ad708ab58c7b941672dce09dd369a18']
49
+ after = '655f04cf6ad708ab58c7b941672dce09dd369a18'
50
+ hg.activity.commits(after: after).map(&:token).must_equal ['1f45520fff3982761cfe7a0502ad0888d5783efe']
49
51
 
50
52
  # Check that the diffs are not populated
51
- hg.activity.commits(after: '75532c1e1f1de55c2271f6fd29d98efbe35397c4').first.diffs.must_be :empty?
53
+ hg.activity.commits(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').first.diffs.must_be :empty?
52
54
 
53
- hg.activity.commits(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').must_be :empty?
55
+ hg.activity.commits(after: '1f45520fff3982761cfe7a0502ad0888d5783efe').must_be :empty?
54
56
  end
55
57
  end
56
58
 
@@ -113,7 +115,8 @@ describe 'Hg::Activity' do
113
115
  b14fa4692f949940bd1e28da6fb4617de2615484
114
116
  468336c6671cbc58237a259d1b7326866afc2817
115
117
  75532c1e1f1de55c2271f6fd29d98efbe35397c4
116
- 655f04cf6ad708ab58c7b941672dce09dd369a18])
118
+ 655f04cf6ad708ab58c7b941672dce09dd369a18
119
+ 1f45520fff3982761cfe7a0502ad0888d5783efe])
117
120
  end
118
121
  end
119
122
 
@@ -138,7 +141,8 @@ describe 'Hg::Activity' do
138
141
  commits << c
139
142
  end
140
143
  commits.map(&:token).must_equal(%w[75532c1e1f1de55c2271f6fd29d98efbe35397c4
141
- 655f04cf6ad708ab58c7b941672dce09dd369a18])
144
+ 655f04cf6ad708ab58c7b941672dce09dd369a18
145
+ 1f45520fff3982761cfe7a0502ad0888d5783efe])
142
146
  end
143
147
  end
144
148
 
@@ -166,8 +170,8 @@ describe 'Hg::Activity' do
166
170
  describe 'head' do
167
171
  it 'hg_head_and_parents' do
168
172
  with_hg_repository('hg') do |hg|
169
- hg.activity.head_token.must_equal '655f04cf6ad708ab58c7b941672dce09dd369a18'
170
- hg.activity.head.token.must_equal '655f04cf6ad708ab58c7b941672dce09dd369a18'
173
+ hg.activity.head_token.must_equal '1f45520fff3982761cfe7a0502ad0888d5783efe'
174
+ hg.activity.head.token.must_equal '1f45520fff3982761cfe7a0502ad0888d5783efe'
171
175
  assert hg.activity.head.diffs.any? # diffs should be populated
172
176
  end
173
177
  end
@@ -187,18 +191,20 @@ describe 'Hg::Activity' do
187
191
  b14fa4692f949940bd1e28da6fb4617de2615484
188
192
  468336c6671cbc58237a259d1b7326866afc2817
189
193
  75532c1e1f1de55c2271f6fd29d98efbe35397c4
190
- 655f04cf6ad708ab58c7b941672dce09dd369a18])
194
+ 655f04cf6ad708ab58c7b941672dce09dd369a18
195
+ 1f45520fff3982761cfe7a0502ad0888d5783efe])
191
196
 
192
197
  after = '01101d8ef3cea7da9ac6e9a226d645f4418f05c9'
193
198
  hg.activity.commit_tokens(after: after).must_equal(%w[b14fa4692f949940bd1e28da6fb4617de2615484
194
199
  468336c6671cbc58237a259d1b7326866afc2817
195
200
  75532c1e1f1de55c2271f6fd29d98efbe35397c4
196
- 655f04cf6ad708ab58c7b941672dce09dd369a18])
201
+ 655f04cf6ad708ab58c7b941672dce09dd369a18
202
+ 1f45520fff3982761cfe7a0502ad0888d5783efe])
197
203
 
198
- after = '75532c1e1f1de55c2271f6fd29d98efbe35397c4'
199
- hg.activity.commit_tokens(after: after).must_equal ['655f04cf6ad708ab58c7b941672dce09dd369a18']
204
+ after = '655f04cf6ad708ab58c7b941672dce09dd369a18'
205
+ hg.activity.commit_tokens(after: after).must_equal ['1f45520fff3982761cfe7a0502ad0888d5783efe']
200
206
 
201
- hg.activity.commit_tokens(after: '655f04cf6ad708ab58c7b941672dce09dd369a18').must_be :empty?
207
+ hg.activity.commit_tokens(after: '1f45520fff3982761cfe7a0502ad0888d5783efe').must_be :empty?
202
208
  end
203
209
  end
204
210
 
@@ -161,31 +161,31 @@ describe 'HgParser' do
161
161
  protected
162
162
 
163
163
  def assert_styled_commits(commits, with_diffs = false)
164
- commits.size.must_equal 5
164
+ commits.size.must_equal 6
165
165
 
166
- commits[1].token.must_equal '75532c1e1f1de55c2271f6fd29d98efbe35397c4'
167
- commits[1].committer_name.must_equal 'Robin Luckey'
168
- commits[1].committer_email.must_equal 'robin@ohloh.net'
166
+ commits[1].token.must_equal '655f04cf6ad708ab58c7b941672dce09dd369a18'
167
+ commits[1].committer_name.must_equal 'Alex'
168
+ commits[1].committer_email.must_equal 'alex@example.com'
169
169
  assert Time.utc(2009, 1, 20, 19, 34, 53) - commits[1].committer_date < 1 # Don't care about milliseconds
170
- commits[1].message.must_equal "deleted helloworld.c\n"
170
+ commits[1].message.must_equal "Adding file two\n"
171
171
 
172
172
  if with_diffs
173
173
  commits[1].diffs.size.must_equal 1
174
- commits[1].diffs[0].action.must_equal 'D'
175
- commits[1].diffs[0].path.must_equal 'helloworld.c'
174
+ commits[1].diffs[0].action.must_equal 'A'
175
+ commits[1].diffs[0].path.must_equal 'two'
176
176
  else
177
177
  commits[1].diffs.must_equal []
178
178
  end
179
179
 
180
- commits[2].token.must_equal '468336c6671cbc58237a259d1b7326866afc2817'
180
+ commits[2].token.must_equal '75532c1e1f1de55c2271f6fd29d98efbe35397c4'
181
181
  assert Time.utc(2009, 1, 20, 19, 34, 4) - commits[2].committer_date < 1
182
182
 
183
183
  if with_diffs
184
- commits[2].diffs.size.must_equal 2
185
- commits[2].diffs[0].action.must_equal 'M'
186
- commits[2].diffs[0].path.must_equal 'helloworld.c'
187
- commits[2].diffs[1].action.must_equal 'A'
188
- commits[2].diffs[1].path.must_equal 'README'
184
+ commits[3].diffs.size.must_equal 2
185
+ commits[3].diffs[0].action.must_equal 'M'
186
+ commits[3].diffs[0].path.must_equal 'helloworld.c'
187
+ commits[3].diffs[1].action.must_equal 'A'
188
+ commits[3].diffs[1].path.must_equal 'README'
189
189
  else
190
190
  commits[0].diffs.must_equal []
191
191
  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: 3.0.19
4
+ version: 4.0.1
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: 2022-11-28 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  The OpenHub source control management library for \
@@ -25,6 +25,7 @@ files:
25
25
  - ".bin/run-tests"
26
26
  - ".bin/string_encoder"
27
27
  - ".git_hooks/pre-commit"
28
+ - ".github/workflows/ci.yml"
28
29
  - ".github/workflows/coverity.yml"
29
30
  - ".gitignore"
30
31
  - ".rubocop.yml"
@@ -174,8 +175,8 @@ homepage: https://github.com/blackducksoftware/ohloh_scm/
174
175
  licenses:
175
176
  - GPL-2.0
176
177
  metadata: {}
177
- post_install_message: Ohloh SCM is depending on Git 2.17.1, SVN 1.9.7, CVSNT 2.5.04,
178
- Mercurial 4.5.3 and Bazaar 2.8.0. If the installed version is different, Ohloh SCM
178
+ post_install_message: Ohloh SCM is depending on Git 2.34.1, SVN 1.14.1, CVSNT 1.12.13,
179
+ Mercurial 4.9.1 and Bazaar 2.7.0. If the installed version is different, Ohloh SCM
179
180
  may not operate as expected.
180
181
  rdoc_options: []
181
182
  require_paths: