Sha256: 8f86765104576b3faf60295ba5fe2b8bdc10fa4822de16a5cd39b13cc8ef6d1b

Contents?: true

Size: 562 Bytes

Versions: 10

Compression:

Stored size: 562 Bytes

Contents

require 'fileutils'

module Ckeditor
  module Utils
    CKEDITOR_INSTALL_DIRECTORY = File.join(RAILS_ROOT, '/public/javascripts/ckeditor/')
    
    ##################################################################
    # remove the existing install (if any)
    def  self.destroy
      if File.exist?(CKEDITOR_INSTALL_DIRECTORY)
        FileUtils.rm_r(CKEDITOR_INSTALL_DIRECTORY)
      end
    end
    
    def self.escape_single_quotes(str)
      str.gsub('\\','\0\0').gsub('</','<\/').gsub(/\r\n|\n|\r/, "\\n").gsub(/["']/) { |m| "\\#{m}" }
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
artemk-ckeditor-3.5.5 lib/ckeditor/utils.rb
ckeditor-jess-3.4.3 lib/ckeditor/utils.rb
artemk-ckeditor-3.5.4 lib/ckeditor/utils.rb
artemk-ckeditor-3.4.4 lib/ckeditor/utils.rb
artemk-ckeditor-3.4.3 lib/ckeditor/utils.rb
ckeditor-3.4.3 lib/ckeditor/utils.rb
ckeditor-3.4.2 lib/ckeditor/utils.rb
ckeditor-3.4.1 lib/ckeditor/utils.rb
ckeditor-3.4.0 lib/ckeditor/utils.rb
ckeditor-3.3.2 lib/ckeditor/utils.rb