mirror of
https://github.com/ms-ati/docile
synced 2023-03-27 23:21:52 -04:00
minor Rakefile additions
Signed-off-by: Marc Siegel <marc@usainnov.com>
This commit is contained in:
parent
c72679b3e0
commit
e621833e89
3 changed files with 8 additions and 3 deletions
|
@ -5,3 +5,5 @@
|
|||
|
||||
--markup-provider=redcarpet
|
||||
--markup=markdown
|
||||
|
||||
--main=README.md
|
|
@ -13,7 +13,7 @@ Let's make our Ruby DSLs more docile...
|
|||
Let's treat an Array's methods as its own DSL:
|
||||
|
||||
``` ruby
|
||||
Docile.dsl_eval [] do
|
||||
Docile.dsl_eval([]) do
|
||||
push 1
|
||||
push 2
|
||||
pop
|
||||
|
@ -36,7 +36,7 @@ Then you can use this same PizzaBuilder class as a DSL:
|
|||
|
||||
``` ruby
|
||||
@sauce_level = :extra
|
||||
pizza = Docile.dsl_eval PizzaBuilder.new do
|
||||
pizza = Docile.dsl_eval(PizzaBuilder.new) do
|
||||
cheese
|
||||
pepperoni
|
||||
sauce @sauce_level
|
||||
|
|
5
Rakefile
5
Rakefile
|
@ -1,4 +1,5 @@
|
|||
require "bundler/gem_tasks"
|
||||
require "rspec/core/rake_task"
|
||||
require "github/markup"
|
||||
require "redcarpet"
|
||||
require "yard"
|
||||
|
@ -7,5 +8,7 @@ require "yard/rake/yardoc_task"
|
|||
YARD::Rake::YardocTask.new do |t|
|
||||
OTHER_PATHS = %w()
|
||||
t.files = ['lib/**/*.rb', OTHER_PATHS]
|
||||
t.options = %w(--markup-provider=redcarpet --markup=markdown)
|
||||
t.options = %w(--markup-provider=redcarpet --markup=markdown --main=README.md)
|
||||
end
|
||||
|
||||
RSpec::Core::RakeTask.new
|
||||
|
|
Loading…
Add table
Reference in a new issue