rack-plastic 0.1.0 → 0.1.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.
Files changed (4) hide show
  1. data/CHANGELOG +3 -0
  2. data/Rakefile +1 -1
  3. data/lib/plastic_test_helper.rb +23 -6
  4. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ 0.1.1 (July 18, 2010)
2
+ * Tweaked documentation but did not change code.
3
+
1
4
  0.1.0 (July 18, 2010)
2
5
  * Added convenience methods for testing middleware based on Rack::Plastic.
3
6
 
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ begin
13
13
  require 'jeweler'
14
14
  Jeweler::Tasks.new do |s|
15
15
  s.name = "rack-plastic"
16
- s.version = "0.1.0"
16
+ s.version = "0.1.1"
17
17
  s.author = "Wyatt Greene"
18
18
  s.email = "techiferous@gmail.com"
19
19
  s.summary = "Helps you write Rack middleware using Nokogiri."
@@ -5,7 +5,7 @@ require 'colored'
5
5
  # Mix this module into Test::Unit::TestCase to have access to these
6
6
  # test helpers when using Test::Unit.
7
7
  #
8
- # Here's an example of how you can use these convenience methods:
8
+ # Here's an example of how you can use these helper methods:
9
9
  #
10
10
  # def test_basic_document
11
11
  # before_html = %Q{
@@ -38,20 +38,37 @@ require 'colored'
38
38
  # assert_html_equal expected_html, after_html
39
39
  # end
40
40
  #
41
+ # And here's an example of how you'd mix these helper methods into
42
+ # Test::Unit::TestCase:
43
+ #
44
+ # require 'test/unit'
45
+ # require 'rubygems'
46
+ # require 'plastic_test_helper'
47
+ #
48
+ # module Test
49
+ # module Unit
50
+ # class TestCase
51
+ #
52
+ # include PlasticTestHelper
53
+ #
54
+ # end
55
+ # end
56
+ # end
57
+ #
41
58
  module PlasticTestHelper
42
59
 
43
60
  # This takes care of the "plumbing" involved in testing your middleware.
44
- # All you have to provide is an HTML string, the class of
61
+ # All you have to provide is an input HTML string, the class of
45
62
  # your middleware (not the name of your class or an object, but
46
63
  # the class itself), and finally some optional options to use when
47
64
  # instantiating your middleware class.
48
65
  #
49
- # This method will return the resulting HTML string (the body of the
50
- # middleware's response).
66
+ # This method will run the input HTML string through the middleware
67
+ # and return the resulting HTML string (the body of the middleware's response).
51
68
  #
52
69
  # Examples:
53
- # resulting_html = process_html(html, Rack::Linkify)
54
- # resulting_html = process_html(html, Rack::Linkify, :twitter => true)
70
+ # resulting_html = process_html(input_html, Rack::Linkify)
71
+ # resulting_html = process_html(input_html, Rack::Linkify, :twitter => true)
55
72
  #
56
73
  def process_html(html, middleware_class, options={})
57
74
  app = lambda { |env| [200, {'Content-Type' => 'text/html'}, html] }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-plastic
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Wyatt Greene