Module: Migrake

Defined in:
lib/migrake.rb,
lib/migrake/dsl.rb,
lib/migrake/version.rb

Defined Under Namespace

Modules: DSL Classes: FileSystemStore

Constant Summary collapse

VERSION =
"0.2.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.storeObject

Public: Get/Set the store where Migrake checks for which tasks shouldn’t be run. This should implement Migrake::FileSystemStore’s interface.



10
11
12
# File 'lib/migrake.rb', line 10

def store
  @store
end

Class Method Details

.run(set, store) ⇒ Object

Public: Run all the rake tasks in ‘set` that haven’t been stored in ‘store`.

set - A Set with tasks to be run. store - A Store (such as Migrake::FileSystemStore), to know which tasks

have already been run.

Returns the Set of tasks that were run.



21
22
23
24
25
26
# File 'lib/migrake.rb', line 21

def self.run(set, store)
  (set - store.all).each do |task|
    Rake::Task[task].invoke
    store.put(task)
  end
end