Sha256: 44b63d776f486df663bc6fbaa5179735fd2069a9a259fca7030d99acee96fc8d

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 KB

Contents

require 'xcodeproj'
require 'xcodeproj/scheme'

class Xcodeproj::XCScheme::XML_Fromatter
  def write_element(node, output)
    @indentation = 3
    output << ' '*@level
    output << "<#{node.expanded_name}"

    @level += @indentation
    node.attributes.each_attribute do |attr|
      output << "\n"
      output << ' '*@level
      output << attr.to_string.sub(/=/, ' = ') # here's the patch (sub instead of gsub)
    end unless node.attributes.empty?

    output << ">"

    output << "\n"
    node.children.each { |child|
      next if child.kind_of?(REXML::Text) and child.to_s.strip.length == 0
      write(child, output)
      output << "\n"
    }
    @level -= @indentation
    output << ' '*@level
    output << "</#{node.expanded_name}>"
  end
end


class Xcodeproj::XCScheme
  alias construct_buildable_name_without_legacy_target construct_buildable_name

  def construct_buildable_name_with_legacy_target(build_target)
    if build_target.isa
      build_target.name
    else
      construct_buildable_name_without_legacy_target build_target
    end
  end

  alias construct_buildable_name construct_buildable_name_with_legacy_target

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pebblex-0.0.5 lib/pebble_x/monkey_patches.rb