caboodle 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.8
@@ -42,7 +42,7 @@ module Caboodle
42
42
 
43
43
  end
44
44
 
45
- class Post
45
+ class PosterousPost
46
46
 
47
47
  attr_accessor :attributes
48
48
 
@@ -60,12 +60,12 @@ module Caboodle
60
60
  STDERR.puts "Opts: #{opts.inspect}"
61
61
  STDERR.puts "Perma: #{perma}"
62
62
  opts["date"] = Date.parse(perma)
63
- Post.new(opts)
63
+ PosterousPost.new(opts)
64
64
  end
65
65
 
66
66
  def self.page(num)
67
67
  raise "must be page 1 or more" if num.to_i < 1
68
- Post.all(:page=>num.to_i)
68
+ PosterousPost.all(:page=>num.to_i)
69
69
  end
70
70
 
71
71
  def self.all(opts={})
@@ -79,7 +79,7 @@ module Caboodle
79
79
  end
80
80
 
81
81
  def self.get(slug)
82
- Post.new(PosterousAPI.new.all().perform.parse)
82
+ PosterousPost.new(PosterousAPI.new.all().perform.parse)
83
83
  end
84
84
 
85
85
  def [] k
@@ -129,18 +129,18 @@ module Caboodle
129
129
  self.link.split(".posterous.com/").last.split("/").last
130
130
  end
131
131
  end
132
-
132
+
133
133
  class Posterous < Caboodle::Kit
134
134
 
135
135
  get "/blog/:page_number" do |page_number|
136
- @posts = Post.page(page_number) rescue nil
136
+ @posts = PosterousPost.page(page_number) rescue nil
137
137
  not_found if @posts.class == Array && @posts.blank?
138
138
  haml :posts
139
139
  end
140
140
 
141
141
  get "/:year/:month/:slug" do |year, month, slug|
142
142
  STDERR.puts "Get a post"
143
- post = Post.from_slug(slug) rescue nil
143
+ post = PosterousPost.from_slug(slug) rescue nil
144
144
  STDERR.puts "Slug not found: #{slug}"
145
145
  not_found unless post
146
146
  @title = post.title
@@ -148,7 +148,7 @@ module Caboodle
148
148
  end
149
149
 
150
150
  menu "Blog", "/blog" do
151
- @posts = Post.all(:page=>(params[:page] || 1))
151
+ @posts = PosterousPost.all(:page=>(params[:page] || 1))
152
152
  haml :posts.to_sym
153
153
  end
154
154
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboodle
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - steflewandowski