ohloh_scm 3.0.16 → 3.0.17
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/lib/ohloh_scm/bzr/scm.rb +4 -0
 - data/lib/ohloh_scm/git/scm.rb +5 -1
 - data/lib/ohloh_scm/git_svn/scm.rb +5 -1
 - data/lib/ohloh_scm/hg/scm.rb +5 -1
 - data/lib/ohloh_scm/version.rb +1 -1
 - data/spec/ohloh_scm/git/scm_spec.rb +13 -0
 - data/spec/ohloh_scm/hg/scm_spec.rb +13 -0
 - data/spec/scm_fixtures/git.tgz +0 -0
 - data/spec/scm_fixtures/hg.tgz +0 -0
 - metadata +3 -4
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 376633ab1bce231fd0d3dbcb685a6270c6f90b41bb99f2e4062965a2011476b4
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 159827abd46fd1f87d7c85cb226ea410071ba6d8a6e73c2db0a598c2f44d1465
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 520a3bc2a9c827959f715ad2febf37df9f63ef9f817743c0b9e82d69f486632b2cbf7b72d89c604848b1680d5ab37aa15f8b58c3408da0b90960f504a14d451a
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a346e6eb4db5eb8e69ed3e8dbe66043c3a69350bfc8760abffbbd8202b9bb8f4e58099a8ae6279adec67a4d897be3052e822838c3eb5aa7e638ddfc63e42a791
         
     | 
    
        data/lib/ohloh_scm/bzr/scm.rb
    CHANGED
    
    
    
        data/lib/ohloh_scm/git/scm.rb
    CHANGED
    
    | 
         @@ -23,6 +23,11 @@ module OhlohScm 
     | 
|
| 
       23 
23 
     | 
    
         
             
                    "#{url}/.git"
         
     | 
| 
       24 
24 
     | 
    
         
             
                  end
         
     | 
| 
       25 
25 
     | 
    
         | 
| 
      
 26 
     | 
    
         
            +
                  def checkout_files(names)
         
     | 
| 
      
 27 
     | 
    
         
            +
                    filenames = names.map { |name| "*#{name}" }.join(' ')
         
     | 
| 
      
 28 
     | 
    
         
            +
                    run "cd #{url} && git checkout $(git ls-files #{filenames})"
         
     | 
| 
      
 29 
     | 
    
         
            +
                  end
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
       26 
31 
     | 
    
         
             
                  private
         
     | 
| 
       27 
32 
     | 
    
         | 
| 
       28 
33 
     | 
    
         
             
                  def clone_or_fetch(remote_scm, callback)
         
     | 
| 
         @@ -72,7 +77,6 @@ module OhlohScm 
     | 
|
| 
       72 
77 
     | 
    
         
             
                  # Deletes everything but the *.git* folder in the working directory.
         
     | 
| 
       73 
78 
     | 
    
         
             
                  def clean_up_disk
         
     | 
| 
       74 
79 
     | 
    
         
             
                    return unless Dir.exist?(url)
         
     | 
| 
       75 
     | 
    
         
            -
                    sleep 1
         
     | 
| 
       76 
80 
     | 
    
         | 
| 
       77 
81 
     | 
    
         
             
                    run "cd #{url} && find . -maxdepth 1 -not -name .git -not -name . -print0"\
         
     | 
| 
       78 
82 
     | 
    
         
             
                          ' | xargs -0 rm -rf --'
         
     | 
| 
         @@ -21,6 +21,11 @@ module OhlohScm 
     | 
|
| 
       21 
21 
     | 
    
         
             
                    "#{url}/.git"
         
     | 
| 
       22 
22 
     | 
    
         
             
                  end
         
     | 
| 
       23 
23 
     | 
    
         | 
| 
      
 24 
     | 
    
         
            +
                  def checkout_files(names)
         
     | 
| 
      
 25 
     | 
    
         
            +
                    filenames = names.map { |name| "*#{name}" }.join(' ')
         
     | 
| 
      
 26 
     | 
    
         
            +
                    run "cd #{url} && git checkout $(git ls-files #{filenames})"
         
     | 
| 
      
 27 
     | 
    
         
            +
                  end
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
       24 
29 
     | 
    
         
             
                  private
         
     | 
| 
       25 
30 
     | 
    
         | 
| 
       26 
31 
     | 
    
         
             
                  def convert_to_git(callback)
         
     | 
| 
         @@ -82,7 +87,6 @@ module OhlohScm 
     | 
|
| 
       82 
87 
     | 
    
         | 
| 
       83 
88 
     | 
    
         
             
                  def clean_up_disk
         
     | 
| 
       84 
89 
     | 
    
         
             
                    return unless  File.exist?(url)
         
     | 
| 
       85 
     | 
    
         
            -
                    sleep 1
         
     | 
| 
       86 
90 
     | 
    
         | 
| 
       87 
91 
     | 
    
         
             
                    run "cd #{url} && find . -maxdepth 1 -not -name .git -not -name . -print0"\
         
     | 
| 
       88 
92 
     | 
    
         
             
                          ' | xargs -0 rm -rf --'
         
     | 
    
        data/lib/ohloh_scm/hg/scm.rb
    CHANGED
    
    | 
         @@ -18,6 +18,11 @@ module OhlohScm 
     | 
|
| 
       18 
18 
     | 
    
         
             
                    "#{url}/.hg"
         
     | 
| 
       19 
19 
     | 
    
         
             
                  end
         
     | 
| 
       20 
20 
     | 
    
         | 
| 
      
 21 
     | 
    
         
            +
                  def checkout_files(names)
         
     | 
| 
      
 22 
     | 
    
         
            +
                    pattern = "(#{ names.join('|') })"
         
     | 
| 
      
 23 
     | 
    
         
            +
                    run "cd #{url} && hg revert $(hg manifest | grep -P '#{pattern}')"
         
     | 
| 
      
 24 
     | 
    
         
            +
                  end
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
       21 
26 
     | 
    
         
             
                  private
         
     | 
| 
       22 
27 
     | 
    
         | 
| 
       23 
28 
     | 
    
         
             
                  def clone_or_fetch(remote_scm, callback)
         
     | 
| 
         @@ -42,7 +47,6 @@ module OhlohScm 
     | 
|
| 
       42 
47 
     | 
    
         | 
| 
       43 
48 
     | 
    
         
             
                  def clean_up_disk
         
     | 
| 
       44 
49 
     | 
    
         
             
                    return unless FileTest.exist?(url)
         
     | 
| 
       45 
     | 
    
         
            -
                    sleep 1
         
     | 
| 
       46 
50 
     | 
    
         | 
| 
       47 
51 
     | 
    
         
             
                    run "cd #{url} && find . -maxdepth 1 -not -name .hg -not -name . -print0"\
         
     | 
| 
       48 
52 
     | 
    
         
             
                          ' | xargs -0 rm -rf --'
         
     | 
    
        data/lib/ohloh_scm/version.rb
    CHANGED
    
    
| 
         @@ -77,4 +77,17 @@ describe 'Git::Scm' do 
     | 
|
| 
       77 
77 
     | 
    
         
             
                  end
         
     | 
| 
       78 
78 
     | 
    
         
             
                end
         
     | 
| 
       79 
79 
     | 
    
         
             
              end
         
     | 
| 
      
 80 
     | 
    
         
            +
             
     | 
| 
      
 81 
     | 
    
         
            +
              it 'must checkout_files matching given names' do
         
     | 
| 
      
 82 
     | 
    
         
            +
                with_git_repository('git') do |src_core|
         
     | 
| 
      
 83 
     | 
    
         
            +
                  dir = src_core.scm.url
         
     | 
| 
      
 84 
     | 
    
         
            +
                  core = OhlohScm::Factory.get_core(scm_type: :git, url: dir)
         
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
                  core.scm.checkout_files(['Gemfile.lock', 'package.json', 'Godeps.json', 'doesnt-exist'])
         
     | 
| 
      
 87 
     | 
    
         
            +
             
     | 
| 
      
 88 
     | 
    
         
            +
                  assert system("ls #{dir}/Gemfile.lock > /dev/null")
         
     | 
| 
      
 89 
     | 
    
         
            +
                  assert system("ls #{dir}/nested/nested_again/package.json > /dev/null")
         
     | 
| 
      
 90 
     | 
    
         
            +
                  assert system("ls #{dir}/Godeps/Godeps.json > /dev/null")
         
     | 
| 
      
 91 
     | 
    
         
            +
                end
         
     | 
| 
      
 92 
     | 
    
         
            +
              end
         
     | 
| 
       80 
93 
     | 
    
         
             
            end
         
     | 
| 
         @@ -20,4 +20,17 @@ describe 'Hg::Scm' do 
     | 
|
| 
       20 
20 
     | 
    
         
             
                  end
         
     | 
| 
       21 
21 
     | 
    
         
             
                end
         
     | 
| 
       22 
22 
     | 
    
         
             
              end
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              it 'must checkout_files matching given names' do
         
     | 
| 
      
 25 
     | 
    
         
            +
                with_git_repository('hg') do |src_core|
         
     | 
| 
      
 26 
     | 
    
         
            +
                  dir = src_core.scm.url
         
     | 
| 
      
 27 
     | 
    
         
            +
                  core = OhlohScm::Factory.get_core(scm_type: :hg, url: dir)
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
                  core.scm.checkout_files(['Gemfile.lock', 'package.json', 'Godeps.json', 'doesnt-exist'])
         
     | 
| 
      
 30 
     | 
    
         
            +
             
     | 
| 
      
 31 
     | 
    
         
            +
                  assert system("ls #{dir}/Gemfile.lock > /dev/null")
         
     | 
| 
      
 32 
     | 
    
         
            +
                  assert system("ls #{dir}/nested/nested_again/package.json > /dev/null")
         
     | 
| 
      
 33 
     | 
    
         
            +
                  assert system("ls #{dir}/Godeps/Godeps.json > /dev/null")
         
     | 
| 
      
 34 
     | 
    
         
            +
                end
         
     | 
| 
      
 35 
     | 
    
         
            +
              end
         
     | 
| 
       23 
36 
     | 
    
         
             
            end
         
     | 
    
        data/spec/scm_fixtures/git.tgz
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/spec/scm_fixtures/hg.tgz
    CHANGED
    
    | 
         Binary file 
     | 
    
        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.17
         
     | 
| 
       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 
     | 
    
         
            +
            date: 2022-09-27 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies: []
         
     | 
| 
       13 
13 
     | 
    
         
             
            description: |-
         
     | 
| 
       14 
14 
     | 
    
         
             
              The OpenHub source control management library for \
         
     | 
| 
         @@ -190,8 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement 
     | 
|
| 
       190 
190 
     | 
    
         
             
                - !ruby/object:Gem::Version
         
     | 
| 
       191 
191 
     | 
    
         
             
                  version: '0'
         
     | 
| 
       192 
192 
     | 
    
         
             
            requirements: []
         
     | 
| 
       193 
     | 
    
         
            -
             
     | 
| 
       194 
     | 
    
         
            -
            rubygems_version: 2.7.6
         
     | 
| 
      
 193 
     | 
    
         
            +
            rubygems_version: 3.0.3.1
         
     | 
| 
       195 
194 
     | 
    
         
             
            signing_key: 
         
     | 
| 
       196 
195 
     | 
    
         
             
            specification_version: 4
         
     | 
| 
       197 
196 
     | 
    
         
             
            summary: Source Control Management
         
     |