orthorings 0.2.0 → 0.3.0

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.
data/README.markdown CHANGED
@@ -9,7 +9,7 @@ The 2 main things you can do with Orthorings are:
9
9
 
10
10
  ## Installation
11
11
 
12
- As a gem (from gemcutter.org)
12
+ As a gem
13
13
 
14
14
  gem install orthorings
15
15
 
@@ -36,14 +36,14 @@ Here is some example usage (more docs to come, this is still a WIP and some aspe
36
36
  keywords "your, site, specific, keywords"
37
37
  description "what's your site doing?"
38
38
 
39
- page "/", "Home"
40
- page "/about", "About Us"
39
+ page "/", "home"
40
+ page "/about"
41
41
 
42
- feed "/blog.rss", "Blog" do
43
- id "our-blog"
42
+ feed "/blog.rss", "our-blog" do
43
+ name "Our Blog Feed"
44
44
  end
45
45
 
46
- static_page "/about-us", "About Us" do
46
+ static_page "/about-us" do
47
47
  view "public/about_us"
48
48
  end
49
49
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.3.0
data/lib/orthor/object.rb CHANGED
@@ -6,11 +6,10 @@ module Orthor
6
6
  attr_accessor :path
7
7
  dsl_accessor :name, :id, :view
8
8
 
9
- def initialize(path, object_name = nil, &block)
9
+ def initialize(path, id = nil, &block)
10
10
  @path = path
11
11
  raise "Path required" unless @path
12
- @id = @path.split("/").last # by default, can be passed in
13
- name(object_name)
12
+ @id = id || @path.split("/").last
14
13
 
15
14
  instance_eval &block if block_given?
16
15
  end
@@ -27,4 +26,4 @@ module Orthor
27
26
  raise "This must be overriden in any Orthor::Object subclass"
28
27
  end
29
28
  end
30
- end
29
+ end
data/orthorings.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{orthorings}
8
- s.version = "0.2.0"
8
+ s.version = "0.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Anthony Langhorne"]
12
- s.date = %q{2010-04-04}
12
+ s.date = %q{2010-04-06}
13
13
  s.email = %q{anthony@orthor.com}
14
14
  s.extra_rdoc_files = [
15
15
  "LICENSE",
@@ -173,8 +173,10 @@ describe Orthor::Site, "orthor site dsl" do
173
173
  describe "pages" do
174
174
  before(:all) do
175
175
  Orthor::Site.define do
176
- page "/about-us", "About us"
177
- page "/contact", "Contact Us"
176
+ page "/about-us", "about" do
177
+ name "About us"
178
+ end
179
+ page "/contact"
178
180
  page "/" do
179
181
  name "Home"
180
182
  cache_for 3600
@@ -205,9 +207,12 @@ describe Orthor::Site, "orthor site dsl" do
205
207
  end
206
208
 
207
209
  it "id should be inferred from the path if none is given" do
208
- @page_1.id.should == "about-us"
209
210
  @page_2.id.should == "contact"
210
211
  end
212
+
213
+ it "id should be 2nd argument if any is given" do
214
+ @page_1.id.should == "about"
215
+ end
211
216
 
212
217
  it 'should allow setting specific http cache lengths' do
213
218
  @page_1.cache_for.should == 0 # sites default
@@ -36,7 +36,9 @@ describe OrthorHelper do
36
36
  keywords "site keywords"
37
37
  description "site description"
38
38
 
39
- feed "/news.rss", "News"
39
+ feed "/news.rss" do
40
+ name "News"
41
+ end
40
42
 
41
43
  category "/writings" do
42
44
  feed "/writings.rss" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthorings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Langhorne
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-04 00:00:00 +11:00
12
+ date: 2010-04-06 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency