ohloh_scm 2.4.1 → 2.4.3
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 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 6ca7f42fcd9f22befb6a03ef35aeea2fae669bac
         | 
| 4 | 
            +
              data.tar.gz: d8f226bf6718b5cbb3787692e1669d1c6d149e1c
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 7911b3775c0bd4898d9bbf1bfcd92772fc38f090858974b6b1b980680ce4d51728832cfde6f71d4188155e489566a3b85ca488b504dca1faea42e53e1a12baa9
         | 
| 7 | 
            +
              data.tar.gz: 10474e25bc367e512ab7eeb51c7f474d46e88cb846a2ca1b2c44ee7db21793d032b85bda4c649fc8ca85d01435d68b0339e3a1f47ef21ecaeb2e3e29be86c4c0
         | 
| @@ -11,7 +11,7 @@ module OhlohScm::Adapters | |
| 11 11 | 
             
                private
         | 
| 12 12 |  | 
| 13 13 | 
             
                def cat(revision, file_path)
         | 
| 14 | 
            -
                  run("cd #{self.url} && git show #{ revision } | 
| 14 | 
            +
                  run("cd #{self.url} && git show #{ revision }:\"#{ file_path }\"").strip
         | 
| 15 15 | 
             
                end
         | 
| 16 16 |  | 
| 17 17 | 
             
                def git_commit(commit)
         | 
| @@ -149,7 +149,8 @@ module OhlohScm::Adapters | |
| 149 149 | 
             
                  doc.xpath('//lists/list/entry').map do |entry|
         | 
| 150 150 | 
             
                    tag_name = entry.xpath('name').text
         | 
| 151 151 | 
             
                    revision = entry.xpath('commit').attr('revision').text
         | 
| 152 | 
            -
                     | 
| 152 | 
            +
                    commit_time = entry.xpath("commit/date").text
         | 
| 153 | 
            +
                    date_string = Time.parse(commit_time) unless commit_time.to_s.strip.empty?
         | 
| 153 154 | 
             
                    [tag_name, revision, date_string]
         | 
| 154 155 | 
             
                  end
         | 
| 155 156 | 
             
                end
         | 
| @@ -7,12 +7,16 @@ module OhlohScm::Parsers | |
| 7 7 | 
             
            		def self.internal_parse(buffer, opts)
         | 
| 8 8 | 
             
            			e = nil
         | 
| 9 9 | 
             
            			state = :data
         | 
| 10 | 
            +
                  previous_state = nil
         | 
| 11 | 
            +
                  previous_line = nil
         | 
| 10 12 |  | 
| 11 13 | 
             
            			buffer.each_line do |l|
         | 
| 12 14 | 
             
            				l.chomp!
         | 
| 13 15 | 
             
            				next_state = state
         | 
| 14 16 | 
             
            				if state == :data
         | 
| 15 17 | 
             
            					if l =~ /^r(\d+) \| (.*) \| (\d+-\d+-\d+ .*) \(.*\) \| .*/
         | 
| 18 | 
            +
            						yield e if e && block_given?
         | 
| 19 | 
            +
             | 
| 16 20 | 
             
            						e = OhlohScm::Commit.new
         | 
| 17 21 | 
             
            						e.token = $1.to_i
         | 
| 18 22 | 
             
            						e.committer_name = $2
         | 
| @@ -21,6 +25,13 @@ module OhlohScm::Parsers | |
| 21 25 | 
             
            						next_state = :diffs
         | 
| 22 26 | 
             
            					elsif l.empty?
         | 
| 23 27 | 
             
            						next_state = :comment
         | 
| 28 | 
            +
                      elsif previous_state == :comment
         | 
| 29 | 
            +
            						next_state = :comment
         | 
| 30 | 
            +
                        e.message ||= ''
         | 
| 31 | 
            +
                        e.message << "\n"
         | 
| 32 | 
            +
                        e.message << previous_line
         | 
| 33 | 
            +
                        e.message << "\n"
         | 
| 34 | 
            +
                        e.message << l
         | 
| 24 35 | 
             
            					end
         | 
| 25 36 |  | 
| 26 37 | 
             
            				elsif state == :diffs
         | 
| @@ -42,8 +53,6 @@ module OhlohScm::Parsers | |
| 42 53 |  | 
| 43 54 | 
             
            				elsif state == :comment
         | 
| 44 55 | 
             
            					if l =~ /------------------------------------------------------------------------/
         | 
| 45 | 
            -
            						yield e if block_given?
         | 
| 46 | 
            -
            						e = nil
         | 
| 47 56 | 
             
            						next_state = :data
         | 
| 48 57 | 
             
            					elsif l =~ /============================ .* log start =+/
         | 
| 49 58 | 
             
            						e.message << "\n"
         | 
| @@ -58,7 +67,9 @@ module OhlohScm::Parsers | |
| 58 67 | 
             
            						end
         | 
| 59 68 | 
             
            					end
         | 
| 60 69 | 
             
            				end
         | 
| 70 | 
            +
                    previous_state = state
         | 
| 61 71 | 
             
            				state = next_state
         | 
| 72 | 
            +
                    previous_line = l
         | 
| 62 73 | 
             
            			end
         | 
| 63 74 | 
             
            			yield e if block_given?
         | 
| 64 75 | 
             
            		end
         | 
    
        data/lib/ohloh_scm/version.rb
    CHANGED
    
    
    
        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. | 
| 4 | 
            +
              version: 2.4.3
         | 
| 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-02- | 
| 11 | 
            +
            date: 2018-02-23 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: posix-spawn
         |