toto 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.md +9 -2
  2. data/VERSION +1 -1
  3. data/test/test_helper.rb +14 -8
  4. data/toto.gemspec +2 -2
  5. metadata +2 -2
data/README.md CHANGED
@@ -30,8 +30,10 @@ synopsis
30
30
  --------
31
31
 
32
32
  One would start by forking or cloning the toto-skeleton repo, to get a basic skeleton:
33
-
34
- $ git clone git://github.com/cloudhead/toto-skeleton.git
33
+
34
+ $ mkdir weblog/
35
+ $ cd weblog/
36
+ $ git clone git://github.com/cloudhead/toto-skeleton.git .
35
37
 
36
38
  One would then edit the template at will, it has the following structure:
37
39
 
@@ -94,6 +96,11 @@ Toto was designed to work well with heroku:(http://heroku.com), it makes the mos
94
96
  by setting the _Cache-Control_ and _Etag_ HTTP headers. Deploying on Heroku is really easy, just get the heroku gem,
95
97
  create a heroku app with `heroku create`, and push with `git push heroku master`.
96
98
 
99
+ $ heroku create
100
+ $ heroku rename weblog
101
+ $ git push heroku master
102
+ $ heroku open
103
+
97
104
  ### configuration
98
105
 
99
106
  You can configure toto, by modifying the _config.ru_ file. For example, if you want to set the blog author to 'John Galt',
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -7,13 +7,11 @@ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
7
7
 
8
8
  require 'toto'
9
9
 
10
- module Riot
11
- class Assertion
12
- assertion(:includes) do |actual, expected|
13
- actual.include?(expected) ? pass : fail("expected #{actual} to include #{expected}")
14
- end
10
+ module Toto
11
+ class IncludesHTMLMacro < Riot::AssertionMacro
12
+ register :includes_html
15
13
 
16
- assertion(:includes_html) do |actual, expected|
14
+ def evaluate(actual, expected)
17
15
  doc = Hpricot.parse(actual)
18
16
  expected = expected.to_a.flatten
19
17
 
@@ -25,13 +23,21 @@ module Riot
25
23
  pass
26
24
  end
27
25
  end
26
+ end
27
+
28
+ class IncludesElementsMacro < Riot::AssertionMacro
29
+ register :includes_elements
28
30
 
29
- assertion(:includes_elements) do |actual, selector, count|
31
+ def evaluate(actual, selector, count)
30
32
  doc = Hpricot.parse(actual)
31
33
  (doc/selector).size == count ? pass : fail("expected #{actual} to contain #{count} #{selector}(s)")
32
34
  end
35
+ end
36
+
37
+ class WithinMacro < Riot::AssertionMacro
38
+ register :within
33
39
 
34
- assertion(:within) do |actual, expected|
40
+ def evaluate(actual, expected)
35
41
  expected.include?(actual) ? pass : fail("expected #{actual} to be within #{expected}")
36
42
  end
37
43
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{toto}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["cloudhead"]
12
- s.date = %q{2009-12-16}
12
+ s.date = %q{2010-01-04}
13
13
  s.description = %q{the tiniest blog-engine in Oz.}
14
14
  s.email = %q{self@cloudhead.net}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: toto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - cloudhead
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-16 00:00:00 -05:00
12
+ date: 2010-01-04 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency