Skip to content

Commit 6bf7a67

Browse files
committed
Readme.md. Update “Rake tasks” section
1 parent 5b3b397 commit 6bf7a67

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,23 @@ end
856856

857857
## Rake Tasks
858858

859+
There are a few Rake tasks available out of the box:
860+
859861
* `rake dynamoid:create_tables`
860862
* `rake dynamoid:ping`
861863

864+
In order to use them in non-Rails application they should be required explicitly:
865+
866+
```ruby
867+
# Rakefile
868+
869+
Rake::Task.define_task(:environment)
870+
require 'dynamoid/tasks'
871+
```
872+
873+
The Rake tasks depend on `:environment` task so it should be declared
874+
as well.
875+
862876
## Test Environment
863877

864878
In test environment you will most likely want to clean the database between test runs to keep tests completely isolated. This can be achieved like so

0 commit comments

Comments
 (0)