Sha256: ab6d43e52316b5234864ee512b48db4ff85da46f3de85fa71bd9833ce7eb184e

Contents?: true

Size: 688 Bytes

Versions: 23

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true

require_relative 'parser/array_writer'
require_relative 'parser/branch_number'

module OhlohScm
  class Parser
    class << self
      def parse(buffer = '', opts = {})
        buffer = StringIO.new(buffer) if buffer.is_a?(String)
        writer = ArrayWriter.new unless block_given?

        internal_parse(buffer, opts) do |commit|
          if commit
            yield commit if block_given?
            writer&.write_commit(commit)
          end
        end

        writer&.buffer
      end

      def internal_parse; end
    end
  end
end

require_relative 'parser/git_parser'
require_relative 'parser/cvs_parser'
require_relative 'parser/svn_parser'

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ohloh_scm-4.0.4 lib/ohloh_scm/parser.rb
ohloh_scm-4.0.3 lib/ohloh_scm/parser.rb
ohloh_scm-4.0.2 lib/ohloh_scm/parser.rb
ohloh_scm-4.0.1 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.21 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.19 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.17 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.16 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.15 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.14 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.13 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.12 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.11 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.10 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.9 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.8 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.7 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.6 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.5 lib/ohloh_scm/parser.rb
ohloh_scm-3.0.4 lib/ohloh_scm/parser.rb