Sha256: c84dbe3906e99acf7b12ca1dd92ce19ef5a3e2bba2ddd1f37601a15c99ba6482

Contents?: true

Size: 1001 Bytes

Versions: 5

Compression:

Stored size: 1001 Bytes

Contents

begin
  require 'simplecov'
rescue LoadError
  # ignore
end

begin
  case
  when RUBY_PLATFORM == 'java'
    # require 'debug'
    # Debugger.start
  when defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
    require 'rubinius/debugger'
  when RUBY_VERSION < '2.0'
    require 'debugger'
  else
    require 'byebug'
  end
rescue LoadError
  # ignore
end

require 'nokogiri'
require 'citeproc'
require 'citeproc/ruby'
require 'csl/styles'

module MimicksCiteProcJS
  def processor
    @processor ||= CiteProc::Processor.new :style => @style,
      :format => default_format, :locale => default_locale_path
  end

  def default_format
    unless @format
      @format = CiteProc::Ruby::Format.load('citeprocjs')
      @format.config[:bib_indent] = nil
    end

    @format
  end

  def default_locale_path
    File.expand_path('../../../spec/fixtures/locales/locales-en-US.xml', __FILE__)
  end

  def default_locale
    @locale ||= CSL::Locale.load default_locale_path
  end
end

World(MimicksCiteProcJS)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
citeproc-1.0.6 features/support/env.rb
citeproc-1.0.5 features/support/env.rb
citeproc-1.0.4 features/support/env.rb
citeproc-1.0.3 features/support/env.rb
citeproc-1.0.2 features/support/env.rb