Sha256: 92b5e4c5e44da6c85ee9e3d2a4660594a5f0192e76b7ad433ae2cc06cd48ce50

Contents?: true

Size: 813 Bytes

Versions: 22

Compression:

Stored size: 813 Bytes

Contents

#
#  Helpers for rake tasks.
#
#  GemInfo - class where info about gem is stored.
#
#  TestAppChecker - helps to check if test app is ready for testing
#

class GemInfo
  def self.gem_root
    @netzke_gem_root ||= File.expand_path('../..', __FILE__)
  end
  def self.test_app_root
    @test_app_root   ||= File.join(gem_root, 'spec', 'rails_app')
  end
end


class TestAppChecker
  def self.extjs_installed?
    ENV['EXTJS_SRC'] == 'cdn' || File.exists?(File.join(GemInfo.test_app_root, 'public', 'extjs'))
  end

  def self.ready?
    self.extjs_installed?
  end
end

# colorization
class String

  def colorize(color_code)
    "\e[#{color_code}m#{self}\e[0m"
  end

  def red
    colorize(31)
  end

  def green
    colorize(32)
  end

  def yellow
    colorize(33)
  end

  def pink
    colorize(35)
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
netzke-core-6.5.0.0 tasks/rake_helper.rb
netzke-core-6.5.0.0.rc2 tasks/rake_helper.rb
netzke-core-6.5.0.0.rc1 tasks/rake_helper.rb
netzke-core-1.0.1.0 tasks/rake_helper.rb
netzke-core-1.0.0.0 tasks/rake_helper.rb
netzke-core-1.0.0.0.pre4 tasks/rake_helper.rb
netzke-core-1.0.0.0.pre3 tasks/rake_helper.rb
netzke-core-1.0.0.0.pre2 tasks/rake_helper.rb
netzke-core-1.0.0.0.pre tasks/rake_helper.rb
netzke-core-0.12.3 tasks/rake_helper.rb
netzke-core-0.12.2 tasks/rake_helper.rb
netzke-core-0.12.1 tasks/rake_helper.rb
netzke-core-0.12.0 tasks/rake_helper.rb
netzke-core-0.12.0.rc1 tasks/rake_helper.rb
netzke-core-0.12.0.beta tasks/rake_helper.rb
netzke-core-0.11.0 tasks/rake_helper.rb
netzke-core-0.10.1 tasks/rake_helper.rb
netzke-core-0.10.0 tasks/rake_helper.rb
netzke-core-0.9.0 tasks/rake_helper.rb
netzke-core-0.10.0.rc2 tasks/rake_helper.rb