github-markup 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module GitHub
2
2
  module Markup
3
- Version = VERSION = '0.5.1'
3
+ Version = VERSION = '0.5.2'
4
4
  end
5
5
  end
@@ -18,6 +18,10 @@ markup(:creole, /creole/) do |content|
18
18
  Creole.creolize(content)
19
19
  end
20
20
 
21
+ markup(:wikicloth, /mediawiki|wiki/) do |content|
22
+ WikiCloth::WikiCloth.new({:data => content}).to_html
23
+ end
24
+
21
25
  command(:rest2html, /re?st(\.txt)?/)
22
26
 
23
27
  command('asciidoc -s --backend=xhtml11 -o - -', /asciidoc/)
@@ -0,0 +1,24 @@
1
+ [[Home|» JRuby Project Wiki Home Page]]
2
+ <h1>Embedding JRuby</h1>
3
+ Using Java from Ruby is JRuby's best-known feature---but you can also go in the other direction, and use Ruby from Java. There are several different ways to do this. You can execute entire Ruby scripts, call individual Ruby methods, or even implement a Java interface in Ruby (thus allowing you to treat Ruby objects like Java ones). We refer to all these techniques generically as "embedding." This section will explain how to embed JRuby in your Java project.
4
+
5
+ __TOC__
6
+
7
+ = Red Bridge (JRuby Embed) =
8
+
9
+ JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the [[DirectJRubyEmbedding|legacy API]] should still work, but we strongly recommend Red Bridge for all new projects.
10
+
11
+ == Features of Red Bridge ==
12
+ Red Bridge consists of two layers: Embed Core on the bottom, and implementations of [http://www.jcp.org/en/jsr/detail?id=223 JSR223] and [http://jakarta.apache.org/bsf/ BSF] on top. Embed Core is JRuby-specific, and can take advantage of much of JRuby's power. JSR223 and BSF are more general interfaces that provide a common ground across scripting languages.
13
+
14
+ Which API should you use? For projects where Ruby is the only scripting language involved, we recommend Embed Core for the following reasons:
15
+
16
+ # With Embed Core, you can create several Ruby environments in one JVM, and configure them individually (via <code>org.jruby.RubyInstanceConfig</code>. With the other APIs, configuration options can only be set globally, via the <code>System</code> properties.
17
+ # Embed Core offers several shortcuts, such as loading scripts from a <code>java.io.InputStream</code>, or returning Java-friendly objects from Ruby code. These allow you to skip a lot of boilerplate.
18
+
19
+ For projects requiring multiple scripting languages, JSR223 is a good fit. Though the API is language-independent, JRuby's implementation of it allows you to set some Ruby-specific options. In particular, you can control the threading model of the scripting engine, the lifetime of local variables, compilation mode, and how line numbers are displayed.
20
+
21
+ The full [http://jruby-embed.kenai.com/docs/ API documentation] has all the gory details. It's worth talking about a couple of the finer points here.
22
+
23
+ = Previous Embedding JRuby Page=
24
+ We recommend using Embed Core; however, if you're maintaining code that uses the old API, you can find its documentation on the [[JavaIntegration|legacy embedding]] page.
@@ -0,0 +1,35 @@
1
+ <p>
2
+ <a href="javascript:void(0)">&raquo; JRuby Project Wiki Home Page</a>
3
+
4
+ <h1>Embedding JRuby</h1>
5
+
6
+ Using Java from Ruby is JRuby's best-known feature---but you can also go in the other direction, and use Ruby from Java. There are several different ways to do this. You can execute entire Ruby scripts, call individual Ruby methods, or even implement a Java interface in Ruby (thus allowing you to treat Ruby objects like Java ones). We refer to all these techniques generically as "embedding." This section will explain how to embed JRuby in your Java project.
7
+
8
+ </p><p>
9
+ <table id="toc" class="toc" summary="Contents"><tr><td><div style="font-weight:bold">Table of Contents</div><ul></ul></td></tr></table>
10
+
11
+ </p><p>
12
+ <h1><span class="editsection">&#91;<a href="?section=Red_Bridge_JRuby_Embed">edit</a>&#93;</span> <span class="mw-headline" id="Red_Bridge_JRuby_Embed">Red Bridge (JRuby Embed)</span></h1>
13
+
14
+ JRuby has long had a private embedding API, which was closely tied to the runtime's internals and therefore changed frequently as JRuby evolved. Since version 1.4, however, we have also provided a more stable public API, known as Red Bridge or JRuby Embed. Existing Java programs written to the <a href="javascript:void(0)">legacy API</a> should still work, but we strongly recommend Red Bridge for all new projects.
15
+
16
+ </p><p>
17
+ <h2><span class="editsection">&#91;<a href="?section=Features_of_Red_Bridge">edit</a>&#93;</span> <span class="mw-headline" id="Features_of_Red_Bridge">Features of Red Bridge</span></h2>Red Bridge consists of two layers: Embed Core on the bottom, and implementations of <a href="http://www.jcp.org/en/jsr/detail?id=223">JSR223</a> and <a href="http://jakarta.apache.org/bsf/">BSF</a> on top. Embed Core is JRuby-specific, and can take advantage of much of JRuby's power. JSR223 and BSF are more general interfaces that provide a common ground across scripting languages.
18
+
19
+ </p><p>
20
+ Which API should you use? For projects where Ruby is the only scripting language involved, we recommend Embed Core for the following reasons:
21
+
22
+ </p><p>
23
+ <ol><li> With Embed Core, you can create several Ruby environments in one JVM, and configure them individually (via <code>org.jruby.RubyInstanceConfig</code>. With the other APIs, configuration options can only be set globally, via the <code>System</code> properties.
24
+
25
+ </li><li> Embed Core offers several shortcuts, such as loading scripts from a <code>java.io.InputStream</code>, or returning Java-friendly objects from Ruby code. These allow you to skip a lot of boilerplate.
26
+
27
+ </p><p>
28
+ </li></ol> For projects requiring multiple scripting languages, JSR223 is a good fit. Though the API is language-independent, JRuby's implementation of it allows you to set some Ruby-specific options. In particular, you can control the threading model of the scripting engine, the lifetime of local variables, compilation mode, and how line numbers are displayed.
29
+
30
+ </p><p>
31
+ The full <a href="http://jruby-embed.kenai.com/docs/">API documentation</a> has all the gory details. It's worth talking about a couple of the finer points here.
32
+
33
+ </p><p>
34
+ <h1><span class="editsection">&#91;<a href="?section=Previous_Embedding_JRuby_Page">edit</a>&#93;</span> <span class="mw-headline" id="Previous_Embedding_JRuby_Page">Previous Embedding JRuby Page</span></h1>We recommend using Embed Core; however, if you're maintaining code that uses the old API, you can find its documentation on the <a href="javascript:void(0)">legacy embedding</a> page.
35
+ </p>
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-markup
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 15
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 5
8
- - 1
9
- version: 0.5.1
9
+ - 2
10
+ version: 0.5.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - Chris Wanstrath
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-12-10 00:00:00 -08:00
18
+ date: 2010-12-31 00:00:00 -06:00
18
19
  default_executable:
19
20
  dependencies: []
20
21
 
@@ -45,6 +46,8 @@ files:
45
46
  - test/markups/README.creole.html
46
47
  - test/markups/README.markdown
47
48
  - test/markups/README.markdown.html
49
+ - test/markups/README.mediawiki
50
+ - test/markups/README.mediawiki.html
48
51
  - test/markups/README.noformat
49
52
  - test/markups/README.noformat.html
50
53
  - test/markups/README.org
@@ -71,23 +74,27 @@ rdoc_options: []
71
74
  require_paths:
72
75
  - lib
73
76
  required_ruby_version: !ruby/object:Gem::Requirement
77
+ none: false
74
78
  requirements:
75
79
  - - ">="
76
80
  - !ruby/object:Gem::Version
81
+ hash: 3
77
82
  segments:
78
83
  - 0
79
84
  version: "0"
80
85
  required_rubygems_version: !ruby/object:Gem::Requirement
86
+ none: false
81
87
  requirements:
82
88
  - - ">="
83
89
  - !ruby/object:Gem::Version
90
+ hash: 3
84
91
  segments:
85
92
  - 0
86
93
  version: "0"
87
94
  requirements: []
88
95
 
89
96
  rubyforge_project:
90
- rubygems_version: 1.3.6
97
+ rubygems_version: 1.3.7
91
98
  signing_key:
92
99
  specification_version: 3
93
100
  summary: The code GitHub uses to render README.markup