Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 377
- Log:
Various files are in the gem, but apparently not in the source distribution
on GitHub. These have been copied in from the working gem.
- Author:
- rool
- Date:
- Mon Mar 21 13:46:18 +0000 2011
- Size:
- 2047 Bytes
1 | class ArchiveDataset < Dataset::Base |
2 | uses :home_page |
3 | |
4 | def load |
5 | create_page "Archive", :class_name => "ArchivePage" do |
6 | create_page "Year Index", :class_name => "ArchiveYearIndexPage", :title => "%Y Archive" |
7 | create_page "Month Index", :class_name => "ArchiveMonthIndexPage", :title => "%B %Y Archive" |
8 | create_page "Day Index", :class_name => "ArchiveDayIndexPage", :title => "%B %d, %Y Archive" |
9 | (1..5).each do |i| |
10 | create_page "Article #{i}", :published_at => Time.local(1999+i, i, i).to_s(:db) |
11 | end |
12 | create_page "Draft Article", :status_id => Status[:draft].id, :published_at => nil |
13 | end |
14 | end |
15 | |
16 | helpers do |
17 | describe "Archive index page", :shared => true do |
18 | it "should be virtual" do |
19 | @page.should be_virtual |
20 | end |
21 | |
22 | it "should render <r:archive:children:first /> as unimplemented" do |
23 | @page.should render('<r:archive:children:first><r:slug /></r:archive:children:first>').as('unimplemented') |
24 | end |
25 | |
26 | it "should render <r:archive:children:last /> as unimplemented" do |
27 | @page.should render('<r:archive:children:last><r:slug /></r:archive:children:last>').as('unimplemented') |
28 | end |
29 | |
30 | it "should <r:archive:children:count /> as unimplemented" do |
31 | @page.should render('<r:archive:children:count><r:slug /></r:archive:children:count>').as('unimplemented') |
32 | end |
33 | |
34 | it "should render the <r:archive:year /> tag" do |
35 | @page.should render("<r:archive:year />").as("2000").on("/archive/2000/") |
36 | end |
37 | |
38 | it "should render the <r:archive:month /> tag" do |
39 | @page.should render("<r:archive:month />").as("June").on("/archive/2000/06/") |
40 | end |
41 | |
42 | it "should render the <r:archive:day /> tag" do |
43 | @page.should render('<r:archive:day />').as("9").on('/archive/2000/06/09/') |
44 | end |
45 | |
46 | it "should render the <r:archive:day_of_week /> tag" do |
47 | @page.should render('<r:archive:day_of_week />').as('Friday').on("/archive/2000/06/09/") |
48 | end |
49 | end |
50 | end |
51 | end |