Commit Graph

69 Commits

Author SHA1 Message Date
Ryan Tomayko
f144e7e3b2 Merge remote branch 'mikewest/test' 2010-10-19 03:35:46 -07:00
Ryan Tomayko
236fb2731c Merge remote branch 'mikewest/template'
Conflicts:
	lib/rocco.rb
2010-10-19 03:35:33 -07:00
Ryan Tomayko
6266408828 Merge remote branch 'mikewest/master' 2010-10-19 03:35:13 -07:00
Mike West
6cf8de0a02 Adding a basic test suite. 2010-10-17 20:46:28 +02:00
Mike West
bb9b167b13 Variables for use in Mustache templates.
Added:

*   `docs?`:    True if `docs` contains text of any sort, False if
                it's empty.

*   `code?`:    True if `code` contains text of any sort, False if
                it's empty.

*   `empty?`:   True if both `code` and `docs` are empty.  False
                otherwise.

*   `header?`:  True if `docs` contains _only_ a HTML header.  False
                otherwise.
2010-10-17 13:16:45 +02:00
Mike West
bb8fcb9ef0 Adding CLI argument template
In v0.5, the Mustache template is hardcoded as
`./lib/rocco/layout.mustache`.  This makes it quite difficult to
style generated content as one must edit the layout file inside the
gem itself to make changes.

I propose leaving that file as a sensible default, but allowing the user
to specify an absolute or relative (to the current working directory)
path to a mustach template of her choosing.  That's implemented in this
commit.
2010-10-17 12:25:35 +02:00
Mike West
b9b69d98fb Fixing (among other things) alternate header syntax
The following works in Docco, but not in Rocco:

    Level 1 Heading
    ===============

    Level 2 Heading
    ---------------

Happily, the fix is trivial.  In Docco, the regex for comments is:

    # Does the line begin with a comment?
    l.comment_matcher = new RegExp('^\\s*' + l.symbol + '\\s?')

Changing Rocco's comment pattern to:

    @comment_pattern = Regexp.new("^\\s*#{@options[:comment_chars]}\s?")

Solves the problem for me.
2010-10-14 18:57:35 +02:00
Mike West
198be61e7c Fixing code highlighting in bash mode
Rocco splits against `<span class="c.">`, which works fine for Ruby
where the `span` has a class of `c1`, but fails for Bash (and probably
other languages), where the `span` has a class of `c`.  The fix is
trivial.
2010-10-14 18:31:20 +02:00
Mike West
939e7f0e8a Integrate pilcrow change from Docco
Rocco uses the Docco CSS directly, so when they make an update to the
HTML/CSS, Rocco needs to play along.  In this case, Docco changed from
`#` to `¶`, and changed classnames as well (in
[f8a88d66b381a1c04358][]).

This commit migrates that change to Rocco.

[f8a88d66b381a1c04358]:
f8a88d66b3
2010-10-14 18:21:31 +02:00
Ryan Tomayko
e57b208570 0.5 release 2010-09-10 10:32:31 -07:00
Colin Shea
6aa7bd6a33 Really support extension-less files (and still support -o) 2010-04-03 08:14:44 +08:00
Ryan Tomayko
889fcb286b Merge Ruby 1.9 fixes from evaryont/master 2010-04-02 16:02:27 -07:00
Ryan Tomayko
eed5d48981 avoid which(1) 2010-04-02 15:59:52 -07:00
Ryan Tomayko
957e5cf197 Merge a bunch of stuff from burke/master 2010-04-02 15:53:39 -07:00
Ryan Tomayko
feb22ad147 create output dirs before writing files 2010-04-02 15:46:12 -07:00
Marko Mikulicic
367437fec5 honour -o 2010-04-02 15:39:16 -07:00
Burke Libbey
c1a4dd756a prefer .blank? to == '' 2010-03-30 15:26:31 -05:00
Burke Libbey
3dc4f87c12 code DIVIDER is now language-agnostic. 2010-03-30 15:18:17 -05:00
Burke Libbey
6595d5f885 bin/rocco works for extensionless files now (again?) too. README -> README.html. 2010-03-30 15:01:01 -05:00
Burke Libbey
8c948bbb95 fixed -o option 2010-03-30 14:55:26 -05:00
Burke Libbey
55700ff584 change a class in a regex to deal with the way pygments outputs C code. 2010-03-30 14:38:01 -05:00
Burke Libbey
2f54f4c424 send @options['language'] to pygments.appspot.com, not just 'ruby'. 2010-03-30 14:08:12 -05:00
Burke Libbey
17eeb9e75f fixed syntax error, re-added warning for webservice 2010-03-30 14:07:30 -05:00
Burke Libbey
68b1529714 Removed warning about pygmentize not being installed. 2010-03-30 13:57:45 -05:00
Burke Libbey
fb4b5404ae just use the pygments.appspot.com if there's no pygmentize on the path, rather than as a command line flag 2010-03-30 13:46:24 -05:00
Colin Shea
c1837853d6 Use spaces, not tabs. 2010-03-29 08:22:42 -04:00
Colin Shea
4fa61ea14a Use readlines, not read 2010-03-29 08:21:58 -04:00
Simon Rozet
bc8bdccb7d allow to use pygments.appspot.com instead of pygmentize(1) 2010-03-19 15:53:51 -07:00
Ryan Tomayko
545fd53b88 0.4 release 2010-03-19 12:08:37 -07:00
Ryan Tomayko
2f8337f49c Merge custom langs and comment chars from jdp/master 2010-03-19 12:05:25 -07:00
jdp
1978a5fe98 made filename munging more idiomatic, rake tasks work properly again 2010-03-17 02:35:06 -04:00
jdp
3af16f3afe table of contents generation works properly again 2010-03-17 00:41:06 -04:00
jdp
3b48e38cba leading tabs in code are now replaced with two spaces! 2010-03-16 22:58:29 -04:00
Ryan Tomayko
bda3a62e42 0.3 release 2010-03-16 08:25:52 -07:00
Ryan Tomayko
b6ece339b9 comments are considered doc only when # is followed by space
This lets you force comments over to the code side by using any
character other than ' ' after the '#' character.
2010-03-16 08:24:30 -07:00
jdp
37aeba2247 updated usage for bin/rocco 2010-03-16 05:27:49 -04:00
jdp
bf401ef38b quick cleanup of docs i never erased 2010-03-16 05:19:53 -04:00
jdp
cf12978037 generalized it so that pygment lexer and comment characters can be specified, made shebang line ignore more clear 2010-03-16 05:17:17 -04:00
Samuel Reis
02dc9c6c4c fix shebang line on documentation side 2010-03-15 21:10:27 -07:00
Ryan Tomayko
832048d946 implement the file switcher thingy 2010-03-11 08:01:46 -08:00
Ryan Tomayko
27b2ee03db rocco command gets --output <dir> option + usage message 2010-03-11 07:58:25 -08:00
Ryan Tomayko
73c433f484 0.2 release 2010-03-11 06:30:02 -08:00
Ryan Tomayko
459b492390 holla 2010-03-11 06:30:02 -08:00
Ryan Tomayko
895bf7a759 Rocco::make and Rocco::Task for intelligent rocco builds in Rake 2010-03-11 06:30:02 -08:00
Ryan Tomayko
a7282e4606 generated rocco.rb doc links to sources for effect 2010-03-11 06:30:02 -08:00
Ryan Tomayko
ef7dbdcda0 rake task to update gh-pages branch 2010-03-11 06:29:58 -08:00
Ryan Tomayko
8559a79837 clean up gemspec generation 2010-03-11 03:11:28 -08:00
Ryan Tomayko
e467978b69 ascii art is a requirement 2010-03-10 12:33:25 -08:00
Ryan Tomayko
cc09e0ff1e and that's it 2010-03-10 04:07:21 -08:00
Ryan Tomayko
399a7ebff0 octothorpe thpptt pow. let there be permalinks and backgrounds. 2010-03-10 04:07:08 -08:00