Sha256: 8c1c781dc9106e767b864b9e3972f4c86cd7824f5fb9075548f8bcaac42a933c

Contents?: true

Size: 411 Bytes

Versions: 118

Compression:

Stored size: 411 Bytes

Contents

module Pact
  module JRubySupport

    # Under jruby, JSON.pretty_generate inserts a blank new line between the opening and closing
    # brackets of an empty hash, like so:
    # {
    #   "empty": {
    #
    #   }
    # }
    # This screws up the UnixDiffFormatter, so we need to remove the blank lines.

    def fix_blank_lines_in_empty_hashes json
      json.gsub(/({\n)\n(\s*})/,'\1\2')
    end

  end
end

Version data entries

118 entries across 118 versions & 3 rubygems

Version Path
pact-support-1.20.2 lib/pact/shared/jruby_support.rb
pact-support-1.20.1 lib/pact/shared/jruby_support.rb
pact-support-1.20.0 lib/pact/shared/jruby_support.rb
pact-support-1.19.0 lib/pact/shared/jruby_support.rb
pact-support-1.18.1 lib/pact/shared/jruby_support.rb
pact-support-1.18.0 lib/pact/shared/jruby_support.rb
hs-pact-support-1.17.1 lib/pact/shared/jruby_support.rb
pact-support-1.17.0 lib/pact/shared/jruby_support.rb
pact-support-1.16.10 lib/pact/shared/jruby_support.rb
pact-support-1.16.9 lib/pact/shared/jruby_support.rb
pact-support-1.16.8 lib/pact/shared/jruby_support.rb
pact-support-1.16.7 lib/pact/shared/jruby_support.rb
pact-support-1.16.6 lib/pact/shared/jruby_support.rb
pact-support-1.16.5 lib/pact/shared/jruby_support.rb
pact-support-1.16.4 lib/pact/shared/jruby_support.rb
pact-support-1.16.3 lib/pact/shared/jruby_support.rb
pact-support-1.16.2 lib/pact/shared/jruby_support.rb
pact-support-1.17.0.pre.rc2 lib/pact/shared/jruby_support.rb
pact-support-1.17.0.pre.rc1 lib/pact/shared/jruby_support.rb
pact-support-1.16.1 lib/pact/shared/jruby_support.rb