Skip to content

Commit

Permalink
Merge pull request rtomayko#113 from GunioRobot/clean
Browse files Browse the repository at this point in the history
Hi! We cleaned up your code for you!
  • Loading branch information
rtomayko committed Oct 21, 2011
2 parents 58288ce + 3922e7d commit 8aae306
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion COPYING
Expand Up @@ -13,6 +13,6 @@ all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -184,7 +184,7 @@ template, but if you depend on a specific implementation, you should use #prefer

# Prefer BlueCloth for all its registered extensions (markdown, mkd, md)
Tilt.prefer Tilt::BlueClothTemplate

# Prefer Erubis for .erb only:
Tilt.prefer Tilt::ErubisTemplate, 'erb'

Expand Down
6 changes: 3 additions & 3 deletions TEMPLATES.md
Expand Up @@ -57,7 +57,7 @@ implementations.
### Example

Hello <%= world %>!

### Usage

ERB templates support custom evaluation scopes and locals:
Expand Down Expand Up @@ -379,7 +379,7 @@ engine, which is a Ruby extension written in C.
### Example

h1. Hello Textile Templates

Hello World. This is a paragraph.

### Usage
Expand Down Expand Up @@ -434,7 +434,7 @@ Markdown formatted texts are converted to HTML with one of these libraries:
* Maruku - `Tilt::MarukuTemplate`

Tilt will use fallback mode (as documented in the README) for determining which
library to use. RDiscount has highest priority - Maruku has lowest.
library to use. RDiscount has highest priority - Maruku has lowest.

### Example

Expand Down
12 changes: 6 additions & 6 deletions test/tilt_fallback_test.rb
Expand Up @@ -5,7 +5,7 @@ class TiltFallbackTest < Test::Unit::TestCase
class FailTemplate < Tilt::Template
def self.engine_initialized?; false end
def prepare; end

def initialize_engine
raise LoadError, "can't load #{self.class}"
end
Expand All @@ -22,7 +22,7 @@ def prepare; end
def set_ivar(obj, name, value)
obj.instance_variable_set("@#{name}", value)
end

def clear_ivar(obj, name)
ivar = "@#{name}"
value = obj.instance_variable_get(ivar)
Expand All @@ -49,7 +49,7 @@ def clear_ivar(obj, name)
test "returns the last registered template" do
Tilt.register("md", WinTemplate)
Tilt.register("md", WinTemplate2)

template = Tilt["md"]
assert_equal WinTemplate2, template
end
Expand Down Expand Up @@ -87,7 +87,7 @@ def clear_ivar(obj, name)
test ".prefer accepts multiple extensions" do
extensions = %w[md mkd markdown]
Tilt.prefer(FailTemplate, *extensions)

extensions.each do |ext|
template = Tilt[ext]
assert_equal FailTemplate, template
Expand All @@ -96,7 +96,7 @@ def clear_ivar(obj, name)

test ".prefer with no extension should use already registered extensions" do
extensions = %w[md mkd markdown]

extensions.each do |ext|
Tilt.register(ext, FailTemplate)
Tilt.register(ext, WinTemplate)
Expand All @@ -109,7 +109,7 @@ def clear_ivar(obj, name)
assert_equal FailTemplate, template
end
end

test ".prefer should only override extensions the preferred library is registered for" do
Tilt.register("md", WinTemplate)
Tilt.register("mkd", FailTemplate)
Expand Down
4 changes: 2 additions & 2 deletions test/tilt_markdown_test.rb
Expand Up @@ -26,7 +26,7 @@ def nrender(text, options = {})
html.encode!("UTF-8") if html.respond_to?(:encode)
normalize(html)
end

def test_escape_html
html = nrender "Hello <b>World</b>"
assert_equal "<p>Hello <b>World</b></p>", html
Expand Down Expand Up @@ -133,7 +133,7 @@ class MarkdownKramdownTest < Test::Unit::TestCase
# It should already be warned in the main tests
end


begin
require 'maruku'

Expand Down
2 changes: 1 addition & 1 deletion test/tilt_stringtemplate_test.rb
Expand Up @@ -119,7 +119,7 @@ class Scope
assert_equal "Hello\nWorld!\n", template.render(Scope.new)
end


test "template with '}'" do
template = Tilt::StringTemplate.new { "Hello }" }
assert_equal "Hello }", template.render
Expand Down

0 comments on commit 8aae306

Please sign in to comment.