Sha256: c833fa59de4072321a8634ec515617b77f59fb3fc6682a36d40038e40301eedd

Contents?: true

Size: 983 Bytes

Versions: 1004

Compression:

Stored size: 983 Bytes

Contents

# Babosa has a conflict with the unicode-string_width gem. unicode-string_width defines
# a module called `Unicode`, but Babosa uses the presence of this constant as
# the sign that it should try to require the `unicode` gem, which will not be present.
#
# We don't want to introduce the `unicode` gem because it depends on native extensions.
#
# This works around the possibility that the unicode-string_width gem may already be
# loaded by temporarily undefining the `Unicode` constant while we load Babosa,
# then restoring it to its previous state if necessary.
#
# Can be removed once https://github.com/norman/babosa/pull/42 is merged and released
class BabosaFix
  def apply
    unicode_removed = false

    if defined? Unicode
      orig_unicode = Unicode
      Object.send(:remove_const, :Unicode)
      unicode_removed = true
    end

    require 'babosa'

    if unicode_removed
      Object.send(:const_set, :Unicode, orig_unicode)
    end
  end
end

BabosaFix.new.apply

Version data entries

1,004 entries across 1,004 versions & 3 rubygems

Version Path
fastlane-2.131.0.beta.20190905200113 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.131.0.beta.20190904200040 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.131.0.beta.20190903200013 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.131.0.beta.20190902200022 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.131.0.beta.20190901200035 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.131.0.beta.20190831200041 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.131.0.beta.20190830200038 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190829200051 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190828200015 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190827200051 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190826200016 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190825200030 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190824200021 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190823200017 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190822200101 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190821200034 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190820200024 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190819200109 spaceship/lib/spaceship/babosa_fix.rb
fastlane-2.130.0.beta.20190818200034 spaceship/lib/spaceship/babosa_fix.rb