asciidoctor-pdf 1.5.0.alpha.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.adoc +22 -0
  3. data/NOTICE.adoc +76 -0
  4. data/README.adoc +263 -0
  5. data/Rakefile +78 -0
  6. data/bin/asciidoctor-pdf +15 -0
  7. data/bin/optimize-pdf +63 -0
  8. data/data/fonts/LICENSE-liberation-fonts-2.00.1 +102 -0
  9. data/data/fonts/LICENSE-mplus-testflight-58 +16 -0
  10. data/data/fonts/LICENSE-noto-fonts-2014-01-30 +201 -0
  11. data/data/fonts/liberationmono-bold-latin.ttf +0 -0
  12. data/data/fonts/liberationmono-bolditalic-latin.ttf +0 -0
  13. data/data/fonts/liberationmono-italic-latin.ttf +0 -0
  14. data/data/fonts/liberationmono-regular-latin.ttf +0 -0
  15. data/data/fonts/mplus1mn-bold-ascii.ttf +0 -0
  16. data/data/fonts/mplus1mn-bolditalic-ascii.ttf +0 -0
  17. data/data/fonts/mplus1mn-italic-ascii.ttf +0 -0
  18. data/data/fonts/mplus1mn-regular-ascii-conums.ttf +0 -0
  19. data/data/fonts/mplus1p-bold-latin.ttf +0 -0
  20. data/data/fonts/mplus1p-light-latin.ttf +0 -0
  21. data/data/fonts/mplus1p-regular-latin.ttf +0 -0
  22. data/data/fonts/mplus1p-regular-multilingual.ttf +0 -0
  23. data/data/fonts/notoserif-bold-latin.ttf +0 -0
  24. data/data/fonts/notoserif-bolditalic-latin.ttf +0 -0
  25. data/data/fonts/notoserif-italic-latin.ttf +0 -0
  26. data/data/fonts/notoserif-regular-latin.ttf +0 -0
  27. data/data/themes/asciidoctor-theme.yml +174 -0
  28. data/data/themes/default-theme.yml +182 -0
  29. data/examples/chronicles.adoc +429 -0
  30. data/examples/chronicles.pdf +0 -0
  31. data/examples/example-pdf-screenshot.png +0 -0
  32. data/examples/example.adoc +27 -0
  33. data/examples/example.pdf +0 -0
  34. data/examples/sample-title-logo.jpg +0 -0
  35. data/examples/wolpertinger.jpg +0 -0
  36. data/lib/asciidoctor-pdf.rb +3 -0
  37. data/lib/asciidoctor-pdf/asciidoctor_ext.rb +1 -0
  38. data/lib/asciidoctor-pdf/asciidoctor_ext/section.rb +26 -0
  39. data/lib/asciidoctor-pdf/converter.rb +1365 -0
  40. data/lib/asciidoctor-pdf/core_ext/array.rb +5 -0
  41. data/lib/asciidoctor-pdf/core_ext/ostruct.rb +9 -0
  42. data/lib/asciidoctor-pdf/implicit_header_processor.rb +59 -0
  43. data/lib/asciidoctor-pdf/pdfmarks.rb +30 -0
  44. data/lib/asciidoctor-pdf/prawn_ext.rb +3 -0
  45. data/lib/asciidoctor-pdf/prawn_ext/coderay_encoder.rb +94 -0
  46. data/lib/asciidoctor-pdf/prawn_ext/extensions.rb +529 -0
  47. data/lib/asciidoctor-pdf/prawn_ext/formatted_text/formatter.rb +29 -0
  48. data/lib/asciidoctor-pdf/prawn_ext/formatted_text/parser.rb +1012 -0
  49. data/lib/asciidoctor-pdf/prawn_ext/formatted_text/parser.treetop +115 -0
  50. data/lib/asciidoctor-pdf/prawn_ext/formatted_text/transform.rb +178 -0
  51. data/lib/asciidoctor-pdf/roman_numeral.rb +107 -0
  52. data/lib/asciidoctor-pdf/theme_loader.rb +103 -0
  53. data/lib/asciidoctor-pdf/version.rb +5 -0
  54. metadata +248 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0d25db647f4e7f34a63b63d2a09c5986b519f59a
4
+ data.tar.gz: a574664f50ad919a6f9472a8977fb0ee94f510cd
5
+ SHA512:
6
+ metadata.gz: 3b8e6ccb9e7492587c046a195386170683c4609a567270e2b7233338075400e1715e6a1b125a4eb14390df2130ff6720becc43f9c1afe6ac9d64fab0aea71730
7
+ data.tar.gz: a431f5501e7fd364ab272310a18613bc3203b025bfd13103750930af5177763c18fc157096a79cbc40190fb8a082f126434d14dfe44ace690943b6dc3f0bb909
data/LICENSE.adoc ADDED
@@ -0,0 +1,22 @@
1
+ .The MIT License
2
+ ....
3
+ Copyright (C) 2014 OpenDevise Inc. and the Asciidoctor Project
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
22
+ ....
data/NOTICE.adoc ADDED
@@ -0,0 +1,76 @@
1
+ = Asciidoctor PDF
2
+ OpenDevise Inc.; Asciidoctor Project
3
+
4
+ Copyright (C) 2014 OpenDevise Inc. and the Asciidoctor Project.
5
+
6
+ Please visit the Asciidoctor project site for more information:
7
+
8
+ - http://asciidoctor.org
9
+
10
+ OpenDevise Inc. and the Asciidoctor Project licenses this product to you under the MIT License (the "License").
11
+ You may not use this product except in compliance with the License.
12
+ You may obtain a copy of the License at:
13
+
14
+ http://opensource.org/licenses/MIT
15
+
16
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ See the License for the specific language governing permissions and limitations under the License.
18
+
19
+ == Third-party licensed work
20
+
21
+ M+ OUTLINE FONTS (M+ TESTFLIGHT 058)::
22
+ The M+ OUTLINE FONTS are used for section titles, literal text and code annotation numbers and bundled in the EPUB3 archive.
23
+ These fonts are free software and are designed and maintained by Coji Morishita.
24
+ Unlimited permission is granted to use, copy, and distribute them, with or without modification, either commercially or noncommercially.
25
+ THESE FONTS ARE PROVIDED "AS IS" WITHOUT WARRANTY.
26
+
27
+ - http://mplus-fonts.sourceforge.jp/mplus-outline-fonts/index-en.html
28
+
29
+ Noto Serif Font (v2014-01-30)::
30
+ Noto is font family developed by the Google Internationalization Team that aims to support all the world's languages.
31
+ The Noto Serif font is used for body copy and bundled in the EPUB3 archive.
32
+ The Noto fonts are licensed under the Apache 2.0 License.
33
+ You may obtain a copy of the license at:
34
+
35
+ http://www.apache.org/licenses/LICENSE-2.0
36
+
37
+ - https://code.google.com/p/noto/
38
+
39
+ Font Awesome Icon Font (v4.0.3)::
40
+ Font Awesome (@fontawesome), the iconic font designed for Bootstrap by David Gandy (@davegandy), is used for the admonition icons and other icons in author's content and bundled in the PDF file.
41
+ Font Awesome is fully open source and GPL compatible.
42
+ The font is licensed under the SIL Open Font 1.1 License (OFL).
43
+ You may obtain a copy of the license at:
44
+
45
+ http://scripts.sil.org/OFL
46
+
47
+ - http://fontawesome.io
48
+
49
+ Liberation Fonts (v2.00.1)::
50
+ The Liberation(tm) Fonts 2.00.1, which are used by default, are licensed under the SIL Open Font License, Version 1.1.
51
+ You may obtain a copy of the license at:
52
+
53
+ http://scripts.sil.org/OFL
54
+
55
+ - https://fedorahosted.org/liberation-fonts
56
+
57
+ RomanNumeral class::
58
+ The RomanNumeral class, which is used for numbering of ordered lists, is borrowed from the roman-numerals RubyGem and modified for the purpose of this application.
59
+ The original RomanNumerals class was written by Andrew Vos and is licensed under the MIT License.
60
+
61
+ http://opensource.org/licenses/MIT
62
+
63
+ - https://github.com/AndrewVos/roman-numerals
64
+
65
+ PrawnCodeRayEncoder class::
66
+ The PrawnCodeRayEncoder class, which is used for syntax highlighting source code for use with Prawn, is borrowed from the Prawn project and modified for the purpose of this application.
67
+ The PrawnEncoder was written by Felipe Doria and is licensed under the GPLv3 license.
68
+
69
+ http://www.gnu.org/licenses/gpl-3.0.html
70
+
71
+ - https://github.com/prawnpdf/prawn
72
+
73
+ Bootstrap (v3.0.3)::
74
+ The default theme is based on Bootstrap 3.0.3.
75
+
76
+ - http://getbootstrap.com
data/README.adoc ADDED
@@ -0,0 +1,263 @@
1
+ = Asciidoctor PDF: A _native_ PDF converter for AsciiDoc
2
+ Dan Allen <https://github.com/mojavelinux[@mojavelinux]>; Sarah White <https://github.com/graphitefriction[@graphitefriction]>
3
+ // Settings:
4
+ :compat-mode!:
5
+ :experimental:
6
+ :idprefix:
7
+ :idseparator: -
8
+ // Aliases:
9
+ :project-name: Asciidoctor PDF
10
+ :project-handle: asciidoctor-pdf
11
+ // URIs:
12
+ :uri-project: https://github.com/asciidoctor/asciidoctor-pdf
13
+ :uri-project-repo: https://github.com/asciidoctor/asciidoctor-pdf
14
+ :uri-project-issues: {uri-project-repo}/issues
15
+ :uri-prawn: http://prawn.majesticseacreature.com
16
+ :uri-rvm: http://rvm.io
17
+ :uri-asciidoctor: http://asciidoctor.org
18
+ :repo-base-uri: {uri-project-repo}/blob/master/
19
+ ifdef::env-github[:repo-base-uri: link:]
20
+ :uri-notice: {repo-base-uri}NOTICE.adoc
21
+ :uri-license: {repo-base-uri}LICENSE.adoc
22
+ :uri-worklog: {repo-base-uri}WORKLOG.adoc
23
+
24
+ _Lo and behold_, a native PDF converter for AsciiDoc built with {uri-asciidoctor}[Asciidoctor] and {uri-prawn}[Prawn]! +
25
+ _No more DocBook toolchain._ +
26
+ _No more middleman._ +
27
+ It's just AsciiDoc straight to PDF!
28
+
29
+ .Project status
30
+ CAUTION: {project-name} is currently _alpha_ software.
31
+ Use accordingly.
32
+ Though the bulk of AsciiDoc content is converter, there's still work needed to fill in gaps where conversion is incomplete, incorrect or not implemented.
33
+ Once it's ready, the project will be moved into the Asciidoctor organization on GitHub.
34
+
35
+ == Prawn, the majestic PDF generator
36
+
37
+ {uri-project}[{project-name}] is made possible by the amazing Prawn RubyGem.
38
+ _What a gem it is!_
39
+
40
+ {uri-prawn}[Prawn] is a nimble PDF writer for Ruby.
41
+ More important, it's a hackable platform that offers both high level APIs for the most common needs and low level APIs for bending the document model to accomodate special circumstances.
42
+
43
+ With Prawn, you can write text, draw lines and shapes and place images _anywhere_ on the page and add as much color as you like.
44
+ In addition, it brings a fluent API and aggressive code re-use to the printable document space.
45
+
46
+ To give you a picture, here's an example that shows how to use Prawn to create a basic PDF document.
47
+
48
+ .Create a basic PDF document using Prawn
49
+ [source,ruby]
50
+ ----
51
+ require 'prawn'
52
+
53
+ Prawn::Document.generate 'example.pdf' do
54
+ text 'Hello, PDF creation!'
55
+ end
56
+ ----
57
+
58
+ It's that easy.
59
+ And it's just the beginning.
60
+
61
+ Simply put, *Prawn is the killer library for PDF generation* we've needed to close this critical gap in Asciidoctor.
62
+ It absolutely takes the pain out of creating printable documents.
63
+ Picking up from there, {project-name} takes the pain out of creating printable documents _from AsciiDoc_.
64
+
65
+ == Notable Features
66
+
67
+ * Direct AsciiDoc to PDF conversion
68
+ * Configuration-driven style and layout
69
+ * PDF document outline (i.e., bookmarks)
70
+ * Document metadata (title, authors, subject, keywords, etc)
71
+ * Internal cross reference links
72
+ * Syntax highlighting with CodeRay or Pygments
73
+ * Page breaks avoided in block content
74
+ * Orphan section titles avoided
75
+ * Table border settings honored
76
+
77
+ === Missing Features
78
+
79
+ See {uri-worklog}[WORKLOG].
80
+
81
+ == Prerequisites
82
+
83
+ All that's needed is Ruby 1.9.3 or better (2.1.2 recommended) and a few RubyGems, which we explain how to install in the next section.
84
+
85
+ To check you have Ruby available, use the +ruby+ command to query the version installed:
86
+
87
+ $ ruby --version
88
+
89
+ If you're using {uri-rvm}[RVM], we recommend creating a new gemset to work with Asciidoctor and {project-name}:
90
+
91
+ $ rvm use 2.1@asciidoctor-pdf --create
92
+
93
+ We like RVM because it keeps the dependencies required by various projects isolated.
94
+
95
+ == Getting Started
96
+
97
+ The {project-name} project is published in pre-release on RubyGems.org.
98
+ You can either install the pre-release version using the following command:
99
+
100
+ $ gem install --pre asciidoctor-pdf
101
+
102
+ Assuming all the required gems install properly, verify you can run the +asciidoctor-pdf+ script:
103
+
104
+ $ asciidoctor-pdf -v
105
+
106
+ If you see the version of Asciidoctor PDF printed, you're ready to use {project-name}!
107
+
108
+ Skip ahead to the <<example-asciidoc-document>> section to start putting {project-name} to use.
109
+ Alternatively, you can follow the steps below to install the project from source.
110
+
111
+ === Retrieve the source code
112
+
113
+ You can retrieve the {project-name} project in one of two ways:
114
+
115
+ . Clone the git repository
116
+ . Download a zip archive of the repository
117
+
118
+ ==== Option 1: Fetch using git clone
119
+
120
+ If you want to clone the git repository, simply copy the {uri-project-repo}[GitHub repository URL] and pass it to +git clone+ command:
121
+
122
+ $ git clone https://github.com/asciidoctor/asciidoctor-pdf
123
+
124
+ Next, change to the project directory:
125
+
126
+ $ cd asciidoctor-pdf
127
+
128
+ ==== Option 2: Download the archive
129
+
130
+ If you want to download a zip archive, click the btn:[Download Zip] button on the right-hand side of the repository page on GitHub.
131
+ Once the download finishes, extract the archive, open a console and change to that directory.
132
+
133
+ TIP: Instead of working out of the {project-handle} directory, you can simply add the absolute path of the [path]_bin_ directory to your +PATH+ environment variable.
134
+
135
+ We'll leverage the project configuration to install the necessary dependencies.
136
+
137
+ === Install the Dependencies
138
+
139
+ The dependencies needed to use {project-name} are defined in the [file]_Gemfile_ at the root of the project.
140
+ We can use Bundler to install the dependencies for us.
141
+
142
+ To check you have Bundler available, use the +bundle+ command to query the version installed:
143
+
144
+ $ bundle --version
145
+
146
+ If it's not installed, use the +gem+ command to install it.
147
+
148
+ $ gem install bundler
149
+
150
+ Then use the +bundle+ command to install the project dependencies:
151
+
152
+ $ bundle
153
+
154
+ Assuming all the required gems install properly, verify you can run the +asciidoctor-pdf+ script using Ruby:
155
+
156
+ $ ruby ./bin/asciidoctor-pdf -v
157
+
158
+ If you see the version of Asciidoctor PDF printed, you're ready to use {project-name}!
159
+
160
+ Let's grab an AsciiDoc document to distill.
161
+
162
+ === Example AsciiDoc document
163
+
164
+ If you don't already have an AsciiDoc document, you can use the [file]_example.adoc_ file found in the examples directory of this project.
165
+
166
+ .example.adoc
167
+ [source,asciidoc]
168
+ ....
169
+ = Document Title
170
+ Doc Writer <doc@example.com>
171
+ :doctype: book
172
+ :source-highlighter: coderay
173
+ :listing-caption: Listing
174
+
175
+ A simple http://asciidoc.org[AsciiDoc] document.
176
+
177
+ == Introduction
178
+
179
+ A paragraph followed by a simple list with square bullets.
180
+
181
+ [square]
182
+ * item 1
183
+ * item 2
184
+
185
+ Here's how you say "`Hello, World!`" in Prawn:
186
+
187
+ .Create a basic PDF document using Prawn
188
+ [source,ruby]
189
+ ----
190
+ require 'prawn'
191
+
192
+ Prawn::Document.generate 'example.pdf' do
193
+ text 'Hello, World!'
194
+ end
195
+ ----
196
+ ....
197
+
198
+ It's time to convert the AsciiDoc document directly to PDF.
199
+
200
+ === Convert AsciiDoc to PDF
201
+
202
+ Converting to PDF is a simple as running the +./bin/asciidoctor-pdf+ script using Ruby and passing our AsciiDoc document as the first argument.
203
+
204
+ $ ruby ./bin/asciidoctor-pdf example.adoc
205
+
206
+ When the script completes, you should see the file [file]_example.pdf_ in the same directory.
207
+ Open that file with a PDF viewer to see the result.
208
+
209
+ .Example PDF document rendered in a PDF viewer
210
+ image::examples/example-pdf-screenshot.png[Screenshot of PDF document,width=800,scaledwidth=100%]
211
+
212
+ You're also encouraged to try converting this link:README.adoc[README] as well as the documents in the examples directory to see more of what {project-name} can do.
213
+ Another good example is the https://github.com/cdi-spec/cdi/tree/master/spec[CDI Specification].
214
+
215
+ The pain of the DocBook toolchain should be melting away about now.
216
+
217
+ == Themes
218
+
219
+ The layout and styling of the PDF is driven by a YAML configuration file.
220
+
221
+ See the files [file]_default-theme.yml_ and [file]_asciidoctor-theme.yml_ found in the [file]_data/themes_ directory for examples.
222
+
223
+ == Optional Scripts
224
+
225
+ {project-name} also provides a shell script that invokes GhostScript (+gs+) to optimize and compress the generated PDF with minimal impact on quality.
226
+ You must have Ghostscript installed to use it.
227
+
228
+ Here's an example usage:
229
+
230
+ $ ./bin/optimize-pdf example.pdf
231
+
232
+ The command will generate the file [file]_example-optimized.pdf_ in the current directory.
233
+
234
+ WARNING: The +optimize-pdf+ script currently requires a Bash shell (Linux, OSX, etc).
235
+ We plan to rewrite the script in Ruby so it works across platforms (see https://github.com/asciidoctor/asciidoctor-pdf/issues/1[issue #1])
236
+
237
+ IMPORTANT: The +optimize-pdf+ script relies on Ghostscript >= 9.10.
238
+ Otherwise, it may actually make the PDF larger.
239
+ Also, you should only consider using it if the file size of the original PDF is > 5MB.
240
+
241
+ If a file is found with the extension +.pdfmarks+ and the same rootname as the input file, it is used to add metadata to the generated PDF document.
242
+ This file is necessary to preserve the document metadata since Ghostscript will otherwise drop it.
243
+ That's why Asciidoctor PDF always creates this file in addition to the PDF.
244
+
245
+ == Contributing
246
+
247
+ In the spirit of free software, _everyone_ is encouraged to help improve this project.
248
+
249
+ To contribute code, simply fork the project on GitHub, hack away and send a pull request with your proposed changes.
250
+
251
+ Feel free to use the {uri-project-issues}[issue tracker] or http://discuss.asciidoctor.org[Asciidoctor mailing list] to provide feedback or suggestions in other ways.
252
+
253
+ == Authors
254
+
255
+ {project-name} was written by https://github.com/mojavelinux[Dan Allen] and https://github.com/graphitefriction[Sarah White] of OpenDevise Inc. on behalf of the Asciidoctor Project.
256
+
257
+ == Copyright
258
+
259
+ Copyright (C) 2014 OpenDevise Inc. and the Asciidoctor Project.
260
+ Free use of this software is granted under the terms of the MIT License.
261
+
262
+ For the full text of the license, see the {uri-license}[LICENSE] file.
263
+ Refer to the {uri-notice}[NOTICE] file for information about third-party Open Source software in use.
data/Rakefile ADDED
@@ -0,0 +1,78 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('lib/asciidoctor-pdf/version', File.dirname(__FILE__))
3
+
4
+ require 'rake/clean'
5
+
6
+ default_tasks = []
7
+
8
+ begin
9
+ require 'bundler/gem_tasks'
10
+
11
+ task :commit_release do
12
+ Bundler::GemHelper.new.send :guard_clean
13
+ sh %(git commit --allow-empty -a -m 'Release #{Asciidoctor::Pdf::VERSION}')
14
+ end
15
+
16
+ # Enhance the release task to create an explicit commit for the release
17
+ Rake::Task[:release].enhance [:commit_release]
18
+ rescue LoadError
19
+ end
20
+
21
+ begin
22
+ require 'rdoc/task'
23
+ Rake::RDocTask.new do |t|
24
+ t.rdoc_dir = 'rdoc'
25
+ t.title = %(Asciidoctor EPUB3 #{Asciidoctor::Pdf::VERSION})
26
+ t.main = %(README.adoc)
27
+ t.rdoc_files.include 'README.adoc', 'LICENSE.adoc', 'NOTICE.adoc', 'lib/**/*.rb', 'bin/**/*'
28
+ end
29
+ rescue LoadError
30
+ end
31
+
32
+ =begin NOT CURRENTLY IN USE
33
+ begin
34
+ require 'rake/testtask'
35
+ Rake::TestTask.new do |t|
36
+ t.libs << 'test'
37
+ t.pattern = 'test/**/*_test.rb'
38
+ t.verbose = true
39
+ t.warning = true
40
+ if RUBY_VERSION >= '2'
41
+ t.options = '--tty=no'
42
+ end
43
+ end
44
+ default_tasks << :test
45
+ rescue LoadError
46
+ end
47
+
48
+ begin
49
+ require 'cucumber'
50
+ require 'cucumber/rake/task'
51
+ CUKE_RESULTS_FILE = 'feature-results.html'
52
+ ARUBA_TMP_DIR = 'tmp'
53
+ CLEAN << CUKE_RESULTS_FILE if File.file? CUKE_RESULTS_FILE
54
+ CLEAN << ARUBA_TMP_DIR if File.directory? ARUBA_TMP_DIR
55
+ desc 'Run features'
56
+ Cucumber::Rake::Task.new :features do |t|
57
+ opts = %(features --format html -o #{CUKE_RESULTS_FILE} --format progress -x --tags ~@pending)
58
+ opts = %(#{opts} --tags #{ENV['TAGS']}) if ENV['TAGS']
59
+ t.cucumber_opts = opts
60
+ t.fork = false
61
+ end
62
+
63
+ desc 'Run features tagged as work-in-progress (@wip)'
64
+ Cucumber::Rake::Task.new 'features:wip' do |t|
65
+ #t.cucumber_opts = %(features --format html -o #{CUKE_RESULTS_FILE} --format pretty -x -s --tags @wip)
66
+ t.cucumber_opts = %(features --format html -o #{CUKE_RESULTS_FILE} --format progress -x --tags @wip)
67
+ t.fork = false
68
+ end
69
+
70
+ default_tasks << :features
71
+ task :cucumber => :features
72
+ task 'cucumber:wip' => 'features:wip'
73
+ task :wip => 'features:wip'
74
+ rescue LoadError
75
+ end
76
+ =end
77
+
78
+ task :default => default_tasks unless default_tasks.empty?