Sha256: 290c3382b3143ad2e31ac83a50c8dd73985114df4910e40c8a009155d2292c48

Contents?: true

Size: 1.46 KB

Versions: 11

Compression:

Stored size: 1.46 KB

Contents

namespace :test do
  Rake::TestTask.new(:all => "db:test:prepare") do |t|
    t.libs << "test"
    t.pattern = 'test/**/*_test.rb'
    t.verbose = true
  end
  Rake::Task['test:all'].comment = "Run all tests at once"
end

namespace :cms do
  
  desc "DEPRECATED"
  task :install do
    puts "This task has been deprecated, please use 'rake install' instead"
  end
  
  desc "Bumps the build number in lib/cms/init.rb"
  task :bump_build_number do
    init_file = Rails.root.join("lib/cms/init.rb")
    s = File.read(init_file)
    open(init_file, 'w') do |f| 
      f << s.sub(/def build_number; (\d+) end/) do |s|
        new_build_number = $1.to_i + 1
        puts "Build number bumped to #{new_build_number}"
        "def build_number; #{new_build_number} end"
      end
    end
  end
  
  desc "Generate guides for the CMS"
  task :guides do
    require 'rubygems'

    gem "actionpack", '>= 2.3'
    require "action_controller"
    require "action_view"

    gem 'RedCloth', '>= 4.1.1'
    require 'redcloth'

    $: << File.join(File.dirname(__FILE__), '../../doc/guides')

    module CmsGuides
      autoload :Generator, "cms_guides/generator"
      autoload :Indexer, "cms_guides/indexer"
      autoload :Helpers, "cms_guides/helpers"
      autoload :TextileExtensions, "cms_guides/textile_extensions"
      autoload :Levenshtein, "cms_guides/levenshtein"
    end

    RedCloth.send(:include, CmsGuides::TextileExtensions)

    CmsGuides::Generator.new.generate

  end    
    
end

Version data entries

11 entries across 11 versions & 6 rubygems

Version Path
SFEley-browsercms-3.0.2 lib/tasks/cms.rake
buzzware-browsercms-3.0.2 lib/tasks/cms.rake
coredumplings-browsercms-3.0.0 lib/tasks/cms.rake
we5-browsercms-3.0.1.1 lib/tasks/cms.rake
webficient-browsercms-3.0.1 lib/tasks/cms.rake
webficient-browsercms-3.0.2 lib/tasks/cms.rake
webficient-browsercms-3.0.3 lib/tasks/cms.rake
webficient-browsercms-3.0.4 lib/tasks/cms.rake
we5-browsercms-3.0.2 lib/tasks/cms.rake
browsercms-3.0.2 lib/tasks/cms.rake
browsercms-3.0.1 lib/tasks/cms.rake