gorgyrella 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.bzr/README +3 -0
- data/.bzr/branch/branch.conf +2 -0
- data/.bzr/branch/format +1 -0
- data/.bzr/branch/last-revision +1 -0
- data/.bzr/branch/tags +0 -0
- data/.bzr/branch-format +1 -0
- data/.bzr/checkout/conflicts +1 -0
- data/.bzr/checkout/dirstate +0 -0
- data/.bzr/checkout/format +1 -0
- data/.bzr/checkout/merge-hashes +33 -0
- data/.bzr/repository/format +1 -0
- data/.bzr/repository/indices/7433d7509bfad4e7de61716fd159a28e.iix +0 -0
- data/.bzr/repository/indices/7433d7509bfad4e7de61716fd159a28e.rix +0 -0
- data/.bzr/repository/indices/7433d7509bfad4e7de61716fd159a28e.six +5 -0
- data/.bzr/repository/indices/7433d7509bfad4e7de61716fd159a28e.tix +0 -0
- data/.bzr/repository/indices/747331f41951a7f9509b3190e9082de2.iix +0 -0
- data/.bzr/repository/indices/747331f41951a7f9509b3190e9082de2.rix +0 -0
- data/.bzr/repository/indices/747331f41951a7f9509b3190e9082de2.six +5 -0
- data/.bzr/repository/indices/747331f41951a7f9509b3190e9082de2.tix +0 -0
- data/.bzr/repository/indices/94ae76525de86acde2f4722e88fec764.iix +0 -0
- data/.bzr/repository/indices/94ae76525de86acde2f4722e88fec764.rix +0 -0
- data/.bzr/repository/indices/94ae76525de86acde2f4722e88fec764.six +5 -0
- data/.bzr/repository/indices/94ae76525de86acde2f4722e88fec764.tix +0 -0
- data/.bzr/repository/indices/ae5f61661ebb8f30600ce7443b2ea000.iix +0 -0
- data/.bzr/repository/indices/ae5f61661ebb8f30600ce7443b2ea000.rix +0 -0
- data/.bzr/repository/indices/ae5f61661ebb8f30600ce7443b2ea000.six +5 -0
- data/.bzr/repository/indices/ae5f61661ebb8f30600ce7443b2ea000.tix +0 -0
- data/.bzr/repository/indices/e34ba77fcb41bb254463c3c177123bb1.iix +0 -0
- data/.bzr/repository/indices/e34ba77fcb41bb254463c3c177123bb1.rix +0 -0
- data/.bzr/repository/indices/e34ba77fcb41bb254463c3c177123bb1.six +5 -0
- data/.bzr/repository/indices/e34ba77fcb41bb254463c3c177123bb1.tix +0 -0
- data/.bzr/repository/indices/e409e77b2da885ef4e5bc5089a04e60e.iix +0 -0
- data/.bzr/repository/indices/e409e77b2da885ef4e5bc5089a04e60e.rix +0 -0
- data/.bzr/repository/indices/e409e77b2da885ef4e5bc5089a04e60e.six +5 -0
- data/.bzr/repository/indices/e409e77b2da885ef4e5bc5089a04e60e.tix +0 -0
- data/.bzr/repository/indices/fa740d26e5ddc0570df1ec65a7a2af1c.iix +0 -0
- data/.bzr/repository/indices/fa740d26e5ddc0570df1ec65a7a2af1c.rix +0 -0
- data/.bzr/repository/indices/fa740d26e5ddc0570df1ec65a7a2af1c.six +5 -0
- data/.bzr/repository/indices/fa740d26e5ddc0570df1ec65a7a2af1c.tix +0 -0
- data/.bzr/repository/obsolete_packs/24b89e5a96bc1f03a7ce1a200ab48dc9.iix +0 -0
- data/.bzr/repository/obsolete_packs/24b89e5a96bc1f03a7ce1a200ab48dc9.pack +0 -0
- data/.bzr/repository/obsolete_packs/24b89e5a96bc1f03a7ce1a200ab48dc9.rix +0 -0
- data/.bzr/repository/obsolete_packs/24b89e5a96bc1f03a7ce1a200ab48dc9.six +5 -0
- data/.bzr/repository/obsolete_packs/24b89e5a96bc1f03a7ce1a200ab48dc9.tix +0 -0
- data/.bzr/repository/obsolete_packs/3ed72fa820dea2da6169d4361433a5f3.iix +0 -0
- data/.bzr/repository/obsolete_packs/3ed72fa820dea2da6169d4361433a5f3.pack +0 -0
- data/.bzr/repository/obsolete_packs/3ed72fa820dea2da6169d4361433a5f3.rix +0 -0
- data/.bzr/repository/obsolete_packs/3ed72fa820dea2da6169d4361433a5f3.six +5 -0
- data/.bzr/repository/obsolete_packs/3ed72fa820dea2da6169d4361433a5f3.tix +0 -0
- data/.bzr/repository/obsolete_packs/acd9bdd28baefb868bf64371dde19d2b.iix +0 -0
- data/.bzr/repository/obsolete_packs/acd9bdd28baefb868bf64371dde19d2b.pack +0 -0
- data/.bzr/repository/obsolete_packs/acd9bdd28baefb868bf64371dde19d2b.rix +0 -0
- data/.bzr/repository/obsolete_packs/acd9bdd28baefb868bf64371dde19d2b.six +5 -0
- data/.bzr/repository/obsolete_packs/acd9bdd28baefb868bf64371dde19d2b.tix +0 -0
- data/.bzr/repository/obsolete_packs/c408af011313ac56380f5716caffaf43.iix +0 -0
- data/.bzr/repository/obsolete_packs/c408af011313ac56380f5716caffaf43.pack +0 -0
- data/.bzr/repository/obsolete_packs/c408af011313ac56380f5716caffaf43.rix +0 -0
- data/.bzr/repository/obsolete_packs/c408af011313ac56380f5716caffaf43.six +5 -0
- data/.bzr/repository/obsolete_packs/c408af011313ac56380f5716caffaf43.tix +0 -0
- data/.bzr/repository/obsolete_packs/cf2fbd7a25e9ab28e03fe483b1232f54.iix +0 -0
- data/.bzr/repository/obsolete_packs/cf2fbd7a25e9ab28e03fe483b1232f54.pack +0 -0
- data/.bzr/repository/obsolete_packs/cf2fbd7a25e9ab28e03fe483b1232f54.rix +0 -0
- data/.bzr/repository/obsolete_packs/cf2fbd7a25e9ab28e03fe483b1232f54.six +5 -0
- data/.bzr/repository/obsolete_packs/cf2fbd7a25e9ab28e03fe483b1232f54.tix +0 -0
- data/.bzr/repository/obsolete_packs/fedc9930335a072ae735da013bf94c74.iix +0 -0
- data/.bzr/repository/obsolete_packs/fedc9930335a072ae735da013bf94c74.pack +0 -0
- data/.bzr/repository/obsolete_packs/fedc9930335a072ae735da013bf94c74.rix +0 -0
- data/.bzr/repository/obsolete_packs/fedc9930335a072ae735da013bf94c74.six +5 -0
- data/.bzr/repository/obsolete_packs/fedc9930335a072ae735da013bf94c74.tix +0 -0
- data/.bzr/repository/pack-names +0 -0
- data/.bzr/repository/packs/7433d7509bfad4e7de61716fd159a28e.pack +0 -0
- data/.bzr/repository/packs/747331f41951a7f9509b3190e9082de2.pack +0 -0
- data/.bzr/repository/packs/94ae76525de86acde2f4722e88fec764.pack +0 -0
- data/.bzr/repository/packs/ae5f61661ebb8f30600ce7443b2ea000.pack +0 -0
- data/.bzr/repository/packs/e34ba77fcb41bb254463c3c177123bb1.pack +0 -0
- data/.bzr/repository/packs/e409e77b2da885ef4e5bc5089a04e60e.pack +0 -0
- data/.bzr/repository/packs/fa740d26e5ddc0570df1ec65a7a2af1c.pack +0 -0
- data/.bzrignore +5 -0
- data/History.txt +4 -0
- data/LICENSE +619 -0
- data/README.txt +27 -0
- data/Rakefile +59 -0
- data/bin/gorgyrella +6 -0
- data/gorgyrella-manual-0-0-1.pdf +0 -0
- data/gorgyrella.gemspec +36 -0
- data/lib/gorgyrella/builder.rb +49 -0
- data/lib/gorgyrella/composer.rb +79 -0
- data/lib/gorgyrella/formatters/coderay.rb +28 -0
- data/lib/gorgyrella/formatters/pygments.rb +35 -0
- data/lib/gorgyrella/formatters/pygments_guess_lexer.py +9 -0
- data/lib/gorgyrella/formatters/ultraviolet.rb +35 -0
- data/lib/gorgyrella/gorgyrella.rb +9 -0
- data/lib/gorgyrella/parser.rb +637 -0
- data/lib/gorgyrella/parser.rl +133 -0
- data/lib/gorgyrella.rb +46 -0
- data/lib/webby/gorgyrella_helper.rb +31 -0
- data/spec/builder_spec.rb +7 -0
- data/spec/composer_spec.rb +70 -0
- data/spec/data/coderay.css +126 -0
- data/spec/data/example-python.html +24 -0
- data/spec/data/example-ruby.html +30 -0
- data/spec/data/pygments.css +59 -0
- data/spec/data/test.py +21 -0
- data/spec/data/test.rb +13 -0
- data/spec/data/ultraviolet/css/active4d.css +114 -0
- data/spec/data/ultraviolet/css/all_hallows_eve.css +72 -0
- data/spec/data/ultraviolet/css/amy.css +147 -0
- data/spec/data/ultraviolet/css/blackboard.css +88 -0
- data/spec/data/ultraviolet/css/brilliance_black.css +605 -0
- data/spec/data/ultraviolet/css/brilliance_dull.css +599 -0
- data/spec/data/ultraviolet/css/cobalt.css +149 -0
- data/spec/data/ultraviolet/css/dawn.css +121 -0
- data/spec/data/ultraviolet/css/eiffel.css +121 -0
- data/spec/data/ultraviolet/css/espresso_libre.css +109 -0
- data/spec/data/ultraviolet/css/idle.css +62 -0
- data/spec/data/ultraviolet/css/iplastic.css +80 -0
- data/spec/data/ultraviolet/css/lazy.css +73 -0
- data/spec/data/ultraviolet/css/mac_classic.css +123 -0
- data/spec/data/ultraviolet/css/magicwb_amiga.css +104 -0
- data/spec/data/ultraviolet/css/pastels_on_dark.css +188 -0
- data/spec/data/ultraviolet/css/slush_poppies.css +85 -0
- data/spec/data/ultraviolet/css/spacecadet.css +51 -0
- data/spec/data/ultraviolet/css/sunburst.css +180 -0
- data/spec/data/ultraviolet/css/twilight.css +137 -0
- data/spec/data/ultraviolet/css/zenburnesque.css +91 -0
- data/spec/data/unmarked.rb +32 -0
- data/spec/gorgyrella_spec.rb +7 -0
- data/spec/parser_spec.rb +73 -0
- data/spec/spec_helper.rb +13 -0
- data/spec/tmp/example-python-processed-coderay.html +31 -0
- data/spec/tmp/example-python-processed-pygments.html +31 -0
- data/spec/tmp/example-python-processed-ultraviolet.html +31 -0
- data/spec/tmp/example-ruby-processed-coderay.html +31 -0
- data/spec/tmp/example-ruby-processed-pygments.html +37 -0
- data/spec/tmp/example-ruby-processed-ultraviolet.html +33 -0
- data/tasks/ann.rake +80 -0
- data/tasks/bones.rake +20 -0
- data/tasks/gem.rake +201 -0
- data/tasks/git.rake +40 -0
- data/tasks/notes.rake +27 -0
- data/tasks/post_load.rake +34 -0
- data/tasks/rdoc.rake +51 -0
- data/tasks/rubyforge.rake +55 -0
- data/tasks/setup.rb +292 -0
- data/tasks/spec.rake +54 -0
- data/tasks/svn.rake +47 -0
- data/tasks/test.rake +40 -0
- data/tasks/zentest.rake +36 -0
- data/webby/.DS_Store +0 -0
- data/webby/README.txt +6 -0
- data/webby/Sitefile +24 -0
- data/webby/content/css/blueprint/ie.css +26 -0
- data/webby/content/css/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/webby/content/css/blueprint/plugins/buttons/icons/key.png +0 -0
- data/webby/content/css/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/webby/content/css/blueprint/plugins/buttons/readme.txt +32 -0
- data/webby/content/css/blueprint/plugins/buttons/screen.css +97 -0
- data/webby/content/css/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/webby/content/css/blueprint/plugins/fancy-type/screen.css +71 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/webby/content/css/blueprint/plugins/link-icons/readme.txt +18 -0
- data/webby/content/css/blueprint/plugins/link-icons/screen.css +40 -0
- data/webby/content/css/blueprint/plugins/rtl/readme.txt +10 -0
- data/webby/content/css/blueprint/plugins/rtl/screen.css +109 -0
- data/webby/content/css/blueprint/print.css +30 -0
- data/webby/content/css/blueprint/screen.css +251 -0
- data/webby/content/css/blueprint/src/forms.css +49 -0
- data/webby/content/css/blueprint/src/grid.css +212 -0
- data/webby/content/css/blueprint/src/grid.png +0 -0
- data/webby/content/css/blueprint/src/ie.css +59 -0
- data/webby/content/css/blueprint/src/print.css +85 -0
- data/webby/content/css/blueprint/src/reset.css +38 -0
- data/webby/content/css/blueprint/src/typography.css +105 -0
- data/webby/content/css/pygments.txt +6 -0
- data/webby/content/css/site.css +78 -0
- data/webby/content/gorgyrella-manual.erb +33 -0
- data/webby/content/index.txt +15 -0
- data/webby/layouts/book.txt +29 -0
- data/webby/layouts/default.txt +27 -0
- data/webby/layouts/two_column.txt +25 -0
- data/webby/layouts/web.txt +42 -0
- data/webby/output/.cairn +0 -0
- data/webby/output/css/blueprint/ie.css +26 -0
- data/webby/output/css/blueprint/plugins/buttons/icons/cross.png +0 -0
- data/webby/output/css/blueprint/plugins/buttons/icons/key.png +0 -0
- data/webby/output/css/blueprint/plugins/buttons/icons/tick.png +0 -0
- data/webby/output/css/blueprint/plugins/buttons/readme.txt +32 -0
- data/webby/output/css/blueprint/plugins/buttons/screen.css +97 -0
- data/webby/output/css/blueprint/plugins/fancy-type/readme.txt +14 -0
- data/webby/output/css/blueprint/plugins/fancy-type/screen.css +71 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/doc.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/email.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/external.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/feed.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/im.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/pdf.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/visited.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/icons/xls.png +0 -0
- data/webby/output/css/blueprint/plugins/link-icons/readme.txt +18 -0
- data/webby/output/css/blueprint/plugins/link-icons/screen.css +40 -0
- data/webby/output/css/blueprint/plugins/rtl/readme.txt +10 -0
- data/webby/output/css/blueprint/plugins/rtl/screen.css +109 -0
- data/webby/output/css/blueprint/print.css +30 -0
- data/webby/output/css/blueprint/screen.css +251 -0
- data/webby/output/css/blueprint/src/forms.css +49 -0
- data/webby/output/css/blueprint/src/grid.css +212 -0
- data/webby/output/css/blueprint/src/grid.png +0 -0
- data/webby/output/css/blueprint/src/ie.css +59 -0
- data/webby/output/css/blueprint/src/print.css +85 -0
- data/webby/output/css/blueprint/src/reset.css +38 -0
- data/webby/output/css/blueprint/src/typography.css +105 -0
- data/webby/output/css/pygments.css +59 -0
- data/webby/output/css/site.css +62 -0
- data/webby/output/gorgyrella-manual.aux +17 -0
- data/webby/output/gorgyrella-manual.erb +51 -0
- data/webby/output/gorgyrella-manual.log +271 -0
- data/webby/output/gorgyrella-manual.out +2 -0
- data/webby/output/gorgyrella-manual.pdf +0 -0
- data/webby/output/gorgyrella-manual.tex +191 -0
- data/webby/output/index.html +41 -0
- data/webby/rsync-exclude +7 -0
- data/webby/tasks/latex.rake +14 -0
- data/webby/templates/article.erb +15 -0
- data/webby/templates/book.erb +16 -0
- data/webby/templates/page.erb +12 -0
- metadata +313 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
pre.twilight .DiffInserted {
|
|
2
|
+
background-color: #253B22;
|
|
3
|
+
color: #F8F8F8;
|
|
4
|
+
}
|
|
5
|
+
pre.twilight .DiffHeader {
|
|
6
|
+
background-color: #0E2231;
|
|
7
|
+
color: #F8F8F8;
|
|
8
|
+
font-style: italic;
|
|
9
|
+
}
|
|
10
|
+
pre.twilight .CssPropertyValue {
|
|
11
|
+
color: #F9EE98;
|
|
12
|
+
}
|
|
13
|
+
pre.twilight .CCCPreprocessorDirective {
|
|
14
|
+
color: #AFC4DB;
|
|
15
|
+
}
|
|
16
|
+
pre.twilight .Constant {
|
|
17
|
+
color: #CF6A4C;
|
|
18
|
+
}
|
|
19
|
+
pre.twilight .DiffChanged {
|
|
20
|
+
background-color: #4A410D;
|
|
21
|
+
color: #F8F8F8;
|
|
22
|
+
}
|
|
23
|
+
pre.twilight .EmbeddedSource {
|
|
24
|
+
background-color: #A3A6AD;
|
|
25
|
+
}
|
|
26
|
+
pre.twilight .Support {
|
|
27
|
+
color: #9B859D;
|
|
28
|
+
}
|
|
29
|
+
pre.twilight .MarkupList {
|
|
30
|
+
color: #F9EE98;
|
|
31
|
+
}
|
|
32
|
+
pre.twilight .CssConstructorArgument {
|
|
33
|
+
color: #8F9D6A;
|
|
34
|
+
}
|
|
35
|
+
pre.twilight .Storage {
|
|
36
|
+
color: #F9EE98;
|
|
37
|
+
}
|
|
38
|
+
pre.twilight .line-numbers {
|
|
39
|
+
background-color: #DDF0FF;
|
|
40
|
+
color: #000000;
|
|
41
|
+
}
|
|
42
|
+
pre.twilight .CssClass {
|
|
43
|
+
color: #9B703F;
|
|
44
|
+
}
|
|
45
|
+
pre.twilight .StringConstant {
|
|
46
|
+
color: #DDF2A4;
|
|
47
|
+
}
|
|
48
|
+
pre.twilight .CssAtRule {
|
|
49
|
+
color: #8693A5;
|
|
50
|
+
}
|
|
51
|
+
pre.twilight .MetaTagInline {
|
|
52
|
+
color: #E0C589;
|
|
53
|
+
}
|
|
54
|
+
pre.twilight .MarkupHeading {
|
|
55
|
+
color: #CF6A4C;
|
|
56
|
+
}
|
|
57
|
+
pre.twilight .CssTagName {
|
|
58
|
+
color: #CDA869;
|
|
59
|
+
}
|
|
60
|
+
pre.twilight .SupportConstant {
|
|
61
|
+
color: #CF6A4C;
|
|
62
|
+
}
|
|
63
|
+
pre.twilight .DiffDeleted {
|
|
64
|
+
background-color: #420E09;
|
|
65
|
+
color: #F8F8F8;
|
|
66
|
+
}
|
|
67
|
+
pre.twilight .CCCPreprocessorLine {
|
|
68
|
+
color: #8996A8;
|
|
69
|
+
}
|
|
70
|
+
pre.twilight .StringRegexpSpecial {
|
|
71
|
+
color: #CF7D34;
|
|
72
|
+
}
|
|
73
|
+
pre.twilight .EmbeddedSourceBright {
|
|
74
|
+
background-color: #9C9EA4;
|
|
75
|
+
}
|
|
76
|
+
pre.twilight .InvalidIllegal {
|
|
77
|
+
background-color: #241A24;
|
|
78
|
+
color: #F8F8F8;
|
|
79
|
+
}
|
|
80
|
+
pre.twilight .SupportFunction {
|
|
81
|
+
color: #DAD085;
|
|
82
|
+
}
|
|
83
|
+
pre.twilight .CssAdditionalConstants {
|
|
84
|
+
color: #CA7840;
|
|
85
|
+
}
|
|
86
|
+
pre.twilight .MetaTagAll {
|
|
87
|
+
color: #AC885B;
|
|
88
|
+
}
|
|
89
|
+
pre.twilight .StringRegexp {
|
|
90
|
+
color: #E9C062;
|
|
91
|
+
}
|
|
92
|
+
pre.twilight .StringEmbeddedSource {
|
|
93
|
+
color: #DAEFA3;
|
|
94
|
+
}
|
|
95
|
+
pre.twilight .EntityInheritedClass {
|
|
96
|
+
color: #9B5C2E;
|
|
97
|
+
font-style: italic;
|
|
98
|
+
}
|
|
99
|
+
pre.twilight .CssId {
|
|
100
|
+
color: #8B98AB;
|
|
101
|
+
}
|
|
102
|
+
pre.twilight .CssPseudoClass {
|
|
103
|
+
color: #8F9D6A;
|
|
104
|
+
}
|
|
105
|
+
pre.twilight .StringVariable {
|
|
106
|
+
color: #8A9A95;
|
|
107
|
+
}
|
|
108
|
+
pre.twilight .String {
|
|
109
|
+
color: #8F9D6A;
|
|
110
|
+
}
|
|
111
|
+
pre.twilight .Keyword {
|
|
112
|
+
color: #CDA869;
|
|
113
|
+
}
|
|
114
|
+
pre.twilight {
|
|
115
|
+
background-color: #141414;
|
|
116
|
+
color: #F8F8F8;
|
|
117
|
+
}
|
|
118
|
+
pre.twilight .CssPropertyName {
|
|
119
|
+
color: #C5AF75;
|
|
120
|
+
}
|
|
121
|
+
pre.twilight .DoctypeXmlProcessing {
|
|
122
|
+
color: #494949;
|
|
123
|
+
}
|
|
124
|
+
pre.twilight .InvalidDeprecated {
|
|
125
|
+
color: #D2A8A1;
|
|
126
|
+
font-style: italic;
|
|
127
|
+
}
|
|
128
|
+
pre.twilight .Variable {
|
|
129
|
+
color: #7587A6;
|
|
130
|
+
}
|
|
131
|
+
pre.twilight .Entity {
|
|
132
|
+
color: #9B703F;
|
|
133
|
+
}
|
|
134
|
+
pre.twilight .Comment {
|
|
135
|
+
color: #5F5A60;
|
|
136
|
+
font-style: italic;
|
|
137
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
pre.zenburnesque .InheritedClass {
|
|
2
|
+
}
|
|
3
|
+
pre.zenburnesque .TypeName {
|
|
4
|
+
color: #F09040;
|
|
5
|
+
}
|
|
6
|
+
pre.zenburnesque .FloatingPointPrefixOperators {
|
|
7
|
+
text-decoration: underline;
|
|
8
|
+
}
|
|
9
|
+
pre.zenburnesque .Number {
|
|
10
|
+
color: #22C0FF;
|
|
11
|
+
}
|
|
12
|
+
pre.zenburnesque .Directive {
|
|
13
|
+
font-weight: bold;
|
|
14
|
+
}
|
|
15
|
+
pre.zenburnesque .LibraryVariable {
|
|
16
|
+
}
|
|
17
|
+
pre.zenburnesque .Storage {
|
|
18
|
+
}
|
|
19
|
+
pre.zenburnesque .line-numbers {
|
|
20
|
+
background-color: #A0A0C0;
|
|
21
|
+
color: #000000;
|
|
22
|
+
}
|
|
23
|
+
pre.zenburnesque .LineNumberDirectives {
|
|
24
|
+
text-decoration: underline;
|
|
25
|
+
}
|
|
26
|
+
pre.zenburnesque .TagName {
|
|
27
|
+
}
|
|
28
|
+
pre.zenburnesque .StorageTypes {
|
|
29
|
+
color: #6080FF;
|
|
30
|
+
}
|
|
31
|
+
pre.zenburnesque .Operators {
|
|
32
|
+
color: #FFFFA0;
|
|
33
|
+
}
|
|
34
|
+
pre.zenburnesque {
|
|
35
|
+
background-color: #404040;
|
|
36
|
+
color: #DEDEDE;
|
|
37
|
+
}
|
|
38
|
+
pre.zenburnesque .LibraryConstant {
|
|
39
|
+
}
|
|
40
|
+
pre.zenburnesque .VariantTypes {
|
|
41
|
+
color: #4080A0;
|
|
42
|
+
}
|
|
43
|
+
pre.zenburnesque .Characters {
|
|
44
|
+
color: #FF8080;
|
|
45
|
+
}
|
|
46
|
+
pre.zenburnesque .FunctionArgument {
|
|
47
|
+
}
|
|
48
|
+
pre.zenburnesque .LanguageKeyword {
|
|
49
|
+
color: #FFFFA0;
|
|
50
|
+
}
|
|
51
|
+
pre.zenburnesque .BuiltInConstant {
|
|
52
|
+
}
|
|
53
|
+
pre.zenburnesque .FloatingPointNumbers {
|
|
54
|
+
text-decoration: underline;
|
|
55
|
+
}
|
|
56
|
+
pre.zenburnesque .ClassTypeName {
|
|
57
|
+
color: #F4A020;
|
|
58
|
+
}
|
|
59
|
+
pre.zenburnesque .TypeName1 {
|
|
60
|
+
color: #FFE000;
|
|
61
|
+
}
|
|
62
|
+
pre.zenburnesque .ModuleKeyword {
|
|
63
|
+
font-weight: bold;
|
|
64
|
+
color: #FF8000;
|
|
65
|
+
}
|
|
66
|
+
pre.zenburnesque .Invalid {
|
|
67
|
+
}
|
|
68
|
+
pre.zenburnesque .LibraryClassType {
|
|
69
|
+
}
|
|
70
|
+
pre.zenburnesque .LibraryFunction {
|
|
71
|
+
}
|
|
72
|
+
pre.zenburnesque .TagAttribute {
|
|
73
|
+
}
|
|
74
|
+
pre.zenburnesque .FloatingPointInfixOperators {
|
|
75
|
+
text-decoration: underline;
|
|
76
|
+
}
|
|
77
|
+
pre.zenburnesque .UserDefinedConstant {
|
|
78
|
+
}
|
|
79
|
+
pre.zenburnesque .String {
|
|
80
|
+
color: #FF2020;
|
|
81
|
+
}
|
|
82
|
+
pre.zenburnesque .FunctionName {
|
|
83
|
+
font-weight: bold;
|
|
84
|
+
color: #FFCC66;
|
|
85
|
+
}
|
|
86
|
+
pre.zenburnesque .Variable {
|
|
87
|
+
}
|
|
88
|
+
pre.zenburnesque .Comment {
|
|
89
|
+
color: #709070;
|
|
90
|
+
font-style: italic;
|
|
91
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
require 'rubygems'
|
|
2
|
+
require 'surpass'
|
|
3
|
+
|
|
4
|
+
book = Workbook.new(__FILE__.gsub(/rb$/, "xls"))
|
|
5
|
+
sheet = book.add_sheet
|
|
6
|
+
|
|
7
|
+
# Passing true for the style parameter to write will invoke autoformatting.
|
|
8
|
+
sheet.write(0, 0, "Hello World!", true)
|
|
9
|
+
sheet.write(1, 0, 1, true)
|
|
10
|
+
sheet.write(2, 0, 1.0, true)
|
|
11
|
+
sheet.write(3, 0, Date.today, true)
|
|
12
|
+
sheet.write(4, 0, DateTime.now, true)
|
|
13
|
+
sheet.write(5, 0, Time.now, true)
|
|
14
|
+
|
|
15
|
+
array_of_arrays = [
|
|
16
|
+
[1, 2, 3],
|
|
17
|
+
[1.0, 2.0, 3.0],
|
|
18
|
+
[Date.today, DateTime.now],
|
|
19
|
+
%w{a b c}
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
# Writing arrays will automatically autoformat.
|
|
23
|
+
sheet.write(7, 0, "With autoformat:")
|
|
24
|
+
sheet.write_arrays(8, 0, array_of_arrays)
|
|
25
|
+
|
|
26
|
+
# Unless you specify your own format, or nil for a generic default.
|
|
27
|
+
sheet.write(13, 0, "Without autoformat:")
|
|
28
|
+
sheet.write_arrays(14, 0, array_of_arrays, nil)
|
|
29
|
+
|
|
30
|
+
sheet.set_column_widths(0..2, 20)
|
|
31
|
+
|
|
32
|
+
book.save
|
data/spec/parser_spec.rb
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w[spec_helper])
|
|
2
|
+
|
|
3
|
+
def parse_text(text)
|
|
4
|
+
Gorgyrella::Parser.run_machine(text)
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def is_junk(text)
|
|
8
|
+
builder = parse_text(text)
|
|
9
|
+
builder.sections.last[:lines] === [[1, text]]
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
describe Gorgyrella::Parser, "error handling" do
|
|
13
|
+
it "should raise an error when an invalid command is passed" do
|
|
14
|
+
lambda { parse_text("### @x") }.should raise_error(/an error occurred parsing character 5/)
|
|
15
|
+
lambda { parse_text("%%% @x") }.should raise_error(/an error occurred parsing character 5/)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
it "should raise an error when an include does not have a filename" do
|
|
19
|
+
lambda { parse_text("### @include") }.should raise_error(/an error occurred parsing character 12/)
|
|
20
|
+
lambda { parse_text("%%% @include") }.should raise_error(/an error occurred parsing character 12/)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
describe Gorgyrella::Parser, "parsing general text" do
|
|
25
|
+
it "should ignore things that aren't commands" do
|
|
26
|
+
["### \n", "%%\n"].each do |s|
|
|
27
|
+
is_junk(s).should be_true
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
it "should append text which is not commands to lines" do
|
|
32
|
+
builder = parse_text("junk")
|
|
33
|
+
builder.sections.last[:lines].should eql([[1, "junk"]])
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
it "should append text which is not commands but starts like one" do
|
|
37
|
+
builder = parse_text("## @ fooled you!")
|
|
38
|
+
builder.sections.last[:lines].should eql([[1, "## @ fooled you!"]])
|
|
39
|
+
|
|
40
|
+
builder = parse_text("%% @ fooled you!")
|
|
41
|
+
builder.sections.last[:lines].should eql([[1, "%% @ fooled you!"]])
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
it "should not append commands to lines" do
|
|
45
|
+
builder = parse_text("### @end")
|
|
46
|
+
builder.sections.last[:lines].should eql([])
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
it "should be able to parse a string of length 1" do
|
|
50
|
+
builder = Gorgyrella::Parser.run_machine("x\n")
|
|
51
|
+
builder.sections.last[:lines].should eql([[1, "x"], [2, ""]])
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
describe Gorgyrella::Parser, "parsing commands" do
|
|
56
|
+
it "should parse a command where section is an identifier" do
|
|
57
|
+
builder = Gorgyrella::Parser.run_machine(%{### @include "my filename.txt" abc latex ruby})
|
|
58
|
+
st = builder.sections.last
|
|
59
|
+
st[:language].should eql("ruby")
|
|
60
|
+
st[:format].should eql("latex")
|
|
61
|
+
st[:section].should eql("abc")
|
|
62
|
+
st[:file].should eql("my filename.txt")
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
it "should parse a command where section is a string" do
|
|
66
|
+
builder = Gorgyrella::Parser.run_machine(%{### @include "filename.txt" "my spacey section"})
|
|
67
|
+
st = builder.sections.last
|
|
68
|
+
st[:section].should eql("my spacey section")
|
|
69
|
+
st[:file].should eql("filename.txt")
|
|
70
|
+
st[:language].should be_nil
|
|
71
|
+
st[:format].should be_nil
|
|
72
|
+
end
|
|
73
|
+
end
|
data/spec/spec_helper.rb
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require File.expand_path(
|
|
2
|
+
File.join(File.dirname(__FILE__), %w[.. lib gorgyrella]))
|
|
3
|
+
|
|
4
|
+
Spec::Runner.configure do |config|
|
|
5
|
+
# == Mock Framework
|
|
6
|
+
#
|
|
7
|
+
# RSpec uses it's own mocking framework by default. If you prefer to
|
|
8
|
+
# use mocha, flexmock or RR, uncomment the appropriate line:
|
|
9
|
+
#
|
|
10
|
+
# config.mock_with :mocha
|
|
11
|
+
# config.mock_with :flexmock
|
|
12
|
+
# config.mock_with :rr
|
|
13
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" href="../data/pygments.css" type="text/css" media="all" charset="utf-8">
|
|
4
|
+
<link rel="stylesheet" href="../data/coderay.css" type="text/css" media="all" charset="utf-8">
|
|
5
|
+
<link rel="stylesheet" href="../data/ultraviolet/css/amy.css" type="text/css" media="all" charset="utf-8">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<p>Here's a test.</p>
|
|
9
|
+
|
|
10
|
+
if __name__=='__main__':
|
|
11
|
+
print "my name is main"
|
|
12
|
+
a = MyClass()
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<p>Another test as raw text.</p>
|
|
16
|
+
<pre>
|
|
17
|
+
|
|
18
|
+
class MyClass:
|
|
19
|
+
def __init__(self):
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
<p>And again with html format</p>
|
|
25
|
+
<pre>
|
|
26
|
+
def main(self, args):
|
|
27
|
+
pass
|
|
28
|
+
|
|
29
|
+
</pre>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" href="../data/pygments.css" type="text/css" media="all" charset="utf-8">
|
|
4
|
+
<link rel="stylesheet" href="../data/coderay.css" type="text/css" media="all" charset="utf-8">
|
|
5
|
+
<link rel="stylesheet" href="../data/ultraviolet/css/amy.css" type="text/css" media="all" charset="utf-8">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<p>Here's a test.</p>
|
|
9
|
+
<div class="highlight"><pre><span class="k">if</span> <span class="n">__name__</span><span class="o">==</span><span class="s">'__main__'</span><span class="p">:</span>
|
|
10
|
+
<span class="k">print</span> <span class="s">"my name is main"</span>
|
|
11
|
+
<span class="n">a</span> <span class="o">=</span> <span class="n">MyClass</span><span class="p">()</span>
|
|
12
|
+
</pre></div>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<p>Another test as raw text.</p>
|
|
16
|
+
<pre>
|
|
17
|
+
class MyClass:
|
|
18
|
+
def __init__(self):
|
|
19
|
+
pass
|
|
20
|
+
|
|
21
|
+
</pre>
|
|
22
|
+
|
|
23
|
+
<p>And again with html format</p>
|
|
24
|
+
<pre>
|
|
25
|
+
<div class="highlight"><pre> <span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">args</span><span class="p">):</span>
|
|
26
|
+
<span class="k">pass</span>
|
|
27
|
+
</pre></div>
|
|
28
|
+
|
|
29
|
+
</pre>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" href="../data/pygments.css" type="text/css" media="all" charset="utf-8">
|
|
4
|
+
<link rel="stylesheet" href="../data/coderay.css" type="text/css" media="all" charset="utf-8">
|
|
5
|
+
<link rel="stylesheet" href="../data/ultraviolet/css/amy.css" type="text/css" media="all" charset="utf-8">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<p>Here's a test.</p>
|
|
9
|
+
<pre class="amy"><span class="line-numbers"> 1 </span>
|
|
10
|
+
<span class="line-numbers"> 2 </span> <span class="ControlKeyword">if</span> __name__<span class="KeywordOperator">==</span><span class="String"><span class="Punctuation">'</span>__main__<span class="Punctuation">'</span></span>:
|
|
11
|
+
<span class="line-numbers"> 3 </span> <span class="Keyword">print</span> <span class="String"><span class="Punctuation">"</span>my name is main<span class="Punctuation">"</span></span>
|
|
12
|
+
<span class="line-numbers"> 4 </span> a <span class="KeywordOperator">=</span> MyClass<span class="Punctuation">(</span><span class="Punctuation">)</span>
|
|
13
|
+
</pre>
|
|
14
|
+
|
|
15
|
+
<p>Another test as raw text.</p>
|
|
16
|
+
<pre>
|
|
17
|
+
|
|
18
|
+
class MyClass:
|
|
19
|
+
def __init__(self):
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
<p>And again with html format</p>
|
|
25
|
+
<pre>
|
|
26
|
+
<pre class="amy"><span class="line-numbers"> 1 </span> <span class="Storage">def</span> <span class="FunctionName">main</span><span class="Punctuation">(</span><span class="FunctionArgument">self</span><span class="Punctuation">,</span> <span class="FunctionArgument">args</span><span class="Punctuation">)</span><span class="Punctuation">:</span>
|
|
27
|
+
<span class="line-numbers"> 2 </span> <span class="ControlKeyword">pass</span>
|
|
28
|
+
</pre>
|
|
29
|
+
</pre>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" href="../data/pygments.css" type="text/css" media="all" charset="utf-8">
|
|
4
|
+
<link rel="stylesheet" href="../data/coderay.css" type="text/css" media="all" charset="utf-8">
|
|
5
|
+
<link rel="stylesheet" href="../data/ultraviolet/css/amy.css" type="text/css" media="all" charset="utf-8">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<p>Here's a test.</p>
|
|
9
|
+
<span class="c">__END__</span>
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
<p>Another test as raw text.</p>
|
|
13
|
+
<pre>
|
|
14
|
+
class MyClass
|
|
15
|
+
</pre>
|
|
16
|
+
|
|
17
|
+
<p>And again with html format</p>
|
|
18
|
+
<pre>
|
|
19
|
+
<span class="r">def</span> <span class="fu">main</span>(args)
|
|
20
|
+
puts <span class="s"><span class="dl">"</span><span class="k">hi!</span><span class="dl">"</span></span>
|
|
21
|
+
<span class="r">end</span>
|
|
22
|
+
</pre>
|
|
23
|
+
|
|
24
|
+
<p>And again to trigger cache</p>
|
|
25
|
+
<pre>
|
|
26
|
+
<span class="r">def</span> <span class="fu">main</span>(args)
|
|
27
|
+
puts <span class="s"><span class="dl">"</span><span class="k">hi!</span><span class="dl">"</span></span>
|
|
28
|
+
<span class="r">end</span>
|
|
29
|
+
</pre>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" href="../data/pygments.css" type="text/css" media="all" charset="utf-8">
|
|
4
|
+
<link rel="stylesheet" href="../data/coderay.css" type="text/css" media="all" charset="utf-8">
|
|
5
|
+
<link rel="stylesheet" href="../data/ultraviolet/css/amy.css" type="text/css" media="all" charset="utf-8">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<p>Here's a test.</p>
|
|
9
|
+
<div class="highlight"><pre><span class="cp">__END__</span>
|
|
10
|
+
</pre></div>
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
<p>Another test as raw text.</p>
|
|
14
|
+
<pre>
|
|
15
|
+
class MyClass
|
|
16
|
+
|
|
17
|
+
</pre>
|
|
18
|
+
|
|
19
|
+
<p>And again with html format</p>
|
|
20
|
+
<pre>
|
|
21
|
+
<div class="highlight"><pre> <span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
|
|
22
|
+
<span class="nb">puts</span> <span class="s2">"hi!"</span>
|
|
23
|
+
<span class="k">end</span>
|
|
24
|
+
</pre></div>
|
|
25
|
+
|
|
26
|
+
</pre>
|
|
27
|
+
|
|
28
|
+
<p>And again to trigger cache</p>
|
|
29
|
+
<pre>
|
|
30
|
+
<div class="highlight"><pre> <span class="k">def</span> <span class="nf">main</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
|
|
31
|
+
<span class="nb">puts</span> <span class="s2">"hi!"</span>
|
|
32
|
+
<span class="k">end</span>
|
|
33
|
+
</pre></div>
|
|
34
|
+
|
|
35
|
+
</pre>
|
|
36
|
+
</body>
|
|
37
|
+
</html>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<link rel="stylesheet" href="../data/pygments.css" type="text/css" media="all" charset="utf-8">
|
|
4
|
+
<link rel="stylesheet" href="../data/coderay.css" type="text/css" media="all" charset="utf-8">
|
|
5
|
+
<link rel="stylesheet" href="../data/ultraviolet/css/amy.css" type="text/css" media="all" charset="utf-8">
|
|
6
|
+
</head>
|
|
7
|
+
<body>
|
|
8
|
+
<p>Here's a test.</p>
|
|
9
|
+
<pre class="amy"><span class="line-numbers"> 1 </span> <span class="String">__END__</span>
|
|
10
|
+
</pre>
|
|
11
|
+
|
|
12
|
+
<p>Another test as raw text.</p>
|
|
13
|
+
<pre>
|
|
14
|
+
class MyClass
|
|
15
|
+
</pre>
|
|
16
|
+
|
|
17
|
+
<p>And again with html format</p>
|
|
18
|
+
<pre>
|
|
19
|
+
<pre class="amy"><span class="line-numbers"> 1 </span> <span class="ControlKeyword">def</span> <span class="FunctionName">main</span><span class="Punctuation">(</span><span class="FunctionArgument">args</span><span class="Punctuation">)</span>
|
|
20
|
+
<span class="line-numbers"> 2 </span> puts <span class="String"><span class="Punctuation">"</span>hi!<span class="Punctuation">"</span></span>
|
|
21
|
+
<span class="line-numbers"> 3 </span> <span class="ControlKeyword">end</span>
|
|
22
|
+
</pre>
|
|
23
|
+
</pre>
|
|
24
|
+
|
|
25
|
+
<p>And again to trigger cache</p>
|
|
26
|
+
<pre>
|
|
27
|
+
<pre class="amy"><span class="line-numbers"> 1 </span> <span class="ControlKeyword">def</span> <span class="FunctionName">main</span><span class="Punctuation">(</span><span class="FunctionArgument">args</span><span class="Punctuation">)</span>
|
|
28
|
+
<span class="line-numbers"> 2 </span> puts <span class="String"><span class="Punctuation">"</span>hi!<span class="Punctuation">"</span></span>
|
|
29
|
+
<span class="line-numbers"> 3 </span> <span class="ControlKeyword">end</span>
|
|
30
|
+
</pre>
|
|
31
|
+
</pre>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
data/tasks/ann.rake
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
|
|
2
|
+
begin
|
|
3
|
+
require 'bones/smtp_tls'
|
|
4
|
+
rescue LoadError
|
|
5
|
+
require 'net/smtp'
|
|
6
|
+
end
|
|
7
|
+
require 'time'
|
|
8
|
+
|
|
9
|
+
namespace :ann do
|
|
10
|
+
|
|
11
|
+
# A prerequisites task that all other tasks depend upon
|
|
12
|
+
task :prereqs
|
|
13
|
+
|
|
14
|
+
file PROJ.ann.file do
|
|
15
|
+
ann = PROJ.ann
|
|
16
|
+
puts "Generating #{ann.file}"
|
|
17
|
+
File.open(ann.file,'w') do |fd|
|
|
18
|
+
fd.puts("#{PROJ.name} version #{PROJ.version}")
|
|
19
|
+
fd.puts(" by #{Array(PROJ.authors).first}") if PROJ.authors
|
|
20
|
+
fd.puts(" #{PROJ.url}") if PROJ.url.valid?
|
|
21
|
+
fd.puts(" (the \"#{PROJ.release_name}\" release)") if PROJ.release_name
|
|
22
|
+
fd.puts
|
|
23
|
+
fd.puts("== DESCRIPTION")
|
|
24
|
+
fd.puts
|
|
25
|
+
fd.puts(PROJ.description)
|
|
26
|
+
fd.puts
|
|
27
|
+
fd.puts(PROJ.changes.sub(%r/^.*$/, '== CHANGES'))
|
|
28
|
+
fd.puts
|
|
29
|
+
ann.paragraphs.each do |p|
|
|
30
|
+
fd.puts "== #{p.upcase}"
|
|
31
|
+
fd.puts
|
|
32
|
+
fd.puts paragraphs_of(PROJ.readme_file, p).join("\n\n")
|
|
33
|
+
fd.puts
|
|
34
|
+
end
|
|
35
|
+
fd.puts ann.text if ann.text
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
desc "Create an announcement file"
|
|
40
|
+
task :announcement => ['ann:prereqs', PROJ.ann.file]
|
|
41
|
+
|
|
42
|
+
desc "Send an email announcement"
|
|
43
|
+
task :email => ['ann:prereqs', PROJ.ann.file] do
|
|
44
|
+
ann = PROJ.ann
|
|
45
|
+
from = ann.email[:from] || Array(PROJ.authors).first || PROJ.email
|
|
46
|
+
to = Array(ann.email[:to])
|
|
47
|
+
|
|
48
|
+
### build a mail header for RFC 822
|
|
49
|
+
rfc822msg = "From: #{from}\n"
|
|
50
|
+
rfc822msg << "To: #{to.join(',')}\n"
|
|
51
|
+
rfc822msg << "Subject: [ANN] #{PROJ.name} #{PROJ.version}"
|
|
52
|
+
rfc822msg << " (#{PROJ.release_name})" if PROJ.release_name
|
|
53
|
+
rfc822msg << "\n"
|
|
54
|
+
rfc822msg << "Date: #{Time.new.rfc822}\n"
|
|
55
|
+
rfc822msg << "Message-Id: "
|
|
56
|
+
rfc822msg << "<#{"%.8f" % Time.now.to_f}@#{ann.email[:domain]}>\n\n"
|
|
57
|
+
rfc822msg << File.read(ann.file)
|
|
58
|
+
|
|
59
|
+
params = [:server, :port, :domain, :acct, :passwd, :authtype].map do |key|
|
|
60
|
+
ann.email[key]
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
params[3] = PROJ.email if params[3].nil?
|
|
64
|
+
|
|
65
|
+
if params[4].nil?
|
|
66
|
+
STDOUT.write "Please enter your e-mail password (#{params[3]}): "
|
|
67
|
+
params[4] = STDIN.gets.chomp
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
### send email
|
|
71
|
+
Net::SMTP.start(*params) {|smtp| smtp.sendmail(rfc822msg, from, to)}
|
|
72
|
+
end
|
|
73
|
+
end # namespace :ann
|
|
74
|
+
|
|
75
|
+
desc 'Alias to ann:announcement'
|
|
76
|
+
task :ann => 'ann:announcement'
|
|
77
|
+
|
|
78
|
+
CLOBBER << PROJ.ann.file
|
|
79
|
+
|
|
80
|
+
# EOF
|
data/tasks/bones.rake
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
if HAVE_BONES
|
|
3
|
+
|
|
4
|
+
namespace :bones do
|
|
5
|
+
|
|
6
|
+
desc 'Show the PROJ open struct'
|
|
7
|
+
task :debug do |t|
|
|
8
|
+
atr = if t.application.top_level_tasks.length == 2
|
|
9
|
+
t.application.top_level_tasks.pop
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
if atr then Bones::Debug.show_attr(PROJ, atr)
|
|
13
|
+
else Bones::Debug.show PROJ end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
end # namespace :bones
|
|
17
|
+
|
|
18
|
+
end # HAVE_BONES
|
|
19
|
+
|
|
20
|
+
# EOF
|