siyelo-blogify 0.2.0 → 0.2.2

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.
@@ -2,54 +2,38 @@
2
2
 
3
3
  A Rails engine for embedding Posterous blog extracts
4
4
 
5
- == Dependencies
6
-
7
- Blogify needs;
8
-
9
- glennr-posterous (may also work with the original posterous gem)
10
- httparty (a requirement of the posterous gem)
11
- rufus-scheduler (for caching the blog posts in the background)
12
-
13
5
  == Installation
14
6
 
15
- All gems are on gemcutter, so you need to add gemcutter to your sources if you havent yet:
16
-
17
- sudo gem sources -a http://gemcutter.org/
18
-
19
- Install required gem if you dont already have them
7
+ Configure gems inside your app:
20
8
 
21
- sudo gem install httparty
22
- sudo gem install glennr-posterous
23
- sudo gem install rufus-scheduler
9
+ config.gem 'siyelo-blogify', :lib => "blogify"
24
10
 
25
- Install the blogify gem:
11
+ Then
12
+ $ rake gems:install
26
13
 
27
- sudo gem install siyelo-blogify
14
+ Or manually;
28
15
 
29
- Configure gems inside your app:
16
+ $ sudo gem install siyelo-blogify
30
17
 
31
- config.gem 'httparty'
32
- config.gem 'glennr-posterous', :lib => "posterous"
33
- config.gem 'rufus-scheduler'
34
- config.gem 'siyelo-blogify', :lib => "blogify"
18
+ == Generator
35
19
 
36
- Run the generator:
20
+ To set up your Rails project, run this generator:
37
21
 
38
22
  ruby script/generate blogify_install
39
23
 
40
- And you're ready to go. The generator will install an initializer which describes ALL Blogify's configuration options, so be sure to take a look at it.
24
+ This will install an initializer which describes ALL Blogify's configuration options, so be sure to take a look at it.
41
25
 
42
26
  == Basic Usage
43
27
 
44
- Once the rufus scheduler task is running, it will go off and cache your last N (BlogPost.post_limit) blog posts locally
28
+ As part of the generator, you get an initializer that kicks off a Rufus task every N hours (see config/initializiers/blogify.rb).
45
29
 
46
- Inside your relevant controller, all you need to do is read the cached posts from your database.
30
+ Once the rufus scheduler task is running, it will go off and cache your last N (BlogPost.post_limit) blog posts locally.
47
31
 
48
- @blog_posts = BlogPost.find(:all, :limit => BLOG_POST_LIMIT)
32
+ To display your posts, all you need to do is read the cached posts in your controller action.
49
33
 
50
- And render them in your view as you wish
34
+ @blog_posts = BlogPost.find(:all, :limit => BLOG_POST_LIMIT)
51
35
 
52
- For convenience, some partials are included
36
+ And render them in your view as you wish. For convenience, some view partials are included as examples;
53
37
 
54
38
  = render :partial => '/blog_posts/list', :locals => { :blog_posts => @news_posts }
55
39
 
data/Rakefile CHANGED
@@ -12,9 +12,9 @@ begin
12
12
  gem.email = "glenn.roberts@siyelo.com"
13
13
  gem.homepage = "http://github.com/siyelo/siyelo-blogify"
14
14
  gem.authors = ["Glenn Roberts"]
15
- gem.add_development_dependency "glennr-posterous", ">= 0.1.7"
16
- gem.add_development_dependency "httparty", '>=0.5.0'
17
- gem.add_development_dependency 'rufus-scheduler', '>=2.0.3'
15
+ gem.add_dependency "glennr-posterous", ">= 0.1.7"
16
+ gem.add_dependency "httparty", '>=0.5.0'
17
+ gem.add_dependency 'rufus-scheduler', '>=2.0.3'
18
18
  gem.files = FileList["[A-Z]*", "{app,config,generators,lib}/**/*", "init.rb"]
19
19
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
20
20
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.2
@@ -12,8 +12,7 @@ class BlogPost < ActiveRecord::Base
12
12
  cattr_accessor :debug
13
13
  @@debug = false
14
14
 
15
- attr_accessible :title, :body, :url, :comment_count, :posted
16
-
15
+ attr_accessible :title, :body, :url, :comment_count, :posted, :author, :author_pic_url, :views
17
16
 
18
17
  def self.cache_posts( posterous_user = default_posterous_user, count = post_limit )
19
18
  posts = self.read_posts( posterous_user, count)
@@ -4,7 +4,7 @@ class BlogifyCreateBlogPosts < ActiveRecord::Migration
4
4
  t.string :type
5
5
  t.string :title
6
6
  t.string :author
7
- t.string :authorpic
7
+ t.string :author_pic_url
8
8
  t.integer :views
9
9
  t.text :body
10
10
  t.integer :comment_count
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: siyelo-blogify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 2
10
+ version: 0.2.2
5
11
  platform: ruby
6
12
  authors:
7
13
  - Glenn Roberts
@@ -9,39 +15,57 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-03-16 00:00:00 +02:00
18
+ date: 2010-06-04 00:00:00 +02:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: glennr-posterous
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 21
30
+ segments:
31
+ - 0
32
+ - 1
33
+ - 7
23
34
  version: 0.1.7
24
- version:
35
+ type: :runtime
36
+ version_requirements: *id001
25
37
  - !ruby/object:Gem::Dependency
26
38
  name: httparty
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
30
42
  requirements:
31
43
  - - ">="
32
44
  - !ruby/object:Gem::Version
45
+ hash: 11
46
+ segments:
47
+ - 0
48
+ - 5
49
+ - 0
33
50
  version: 0.5.0
34
- version:
51
+ type: :runtime
52
+ version_requirements: *id002
35
53
  - !ruby/object:Gem::Dependency
36
54
  name: rufus-scheduler
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
40
58
  requirements:
41
59
  - - ">="
42
60
  - !ruby/object:Gem::Version
61
+ hash: 9
62
+ segments:
63
+ - 2
64
+ - 0
65
+ - 3
43
66
  version: 2.0.3
44
- version:
67
+ type: :runtime
68
+ version_requirements: *id003
45
69
  description: A Rails engine for embedding Posterous blog extracts
46
70
  email: glenn.roberts@siyelo.com
47
71
  executables: []
@@ -71,6 +95,9 @@ files:
71
95
  - generators/blogify_views/blogify_views_generator.rb
72
96
  - init.rb
73
97
  - lib/blogify.rb
98
+ - test/performance/browsing_test.rb
99
+ - test/test_helper.rb
100
+ - test/unit/blog_post_test.rb
74
101
  has_rdoc: true
75
102
  homepage: http://github.com/siyelo/siyelo-blogify
76
103
  licenses: []
@@ -81,21 +108,27 @@ rdoc_options:
81
108
  require_paths:
82
109
  - lib
83
110
  required_ruby_version: !ruby/object:Gem::Requirement
111
+ none: false
84
112
  requirements:
85
113
  - - ">="
86
114
  - !ruby/object:Gem::Version
115
+ hash: 3
116
+ segments:
117
+ - 0
87
118
  version: "0"
88
- version:
89
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
90
121
  requirements:
91
122
  - - ">="
92
123
  - !ruby/object:Gem::Version
124
+ hash: 3
125
+ segments:
126
+ - 0
93
127
  version: "0"
94
- version:
95
128
  requirements: []
96
129
 
97
130
  rubyforge_project:
98
- rubygems_version: 1.3.5
131
+ rubygems_version: 1.3.7
99
132
  signing_key:
100
133
  specification_version: 3
101
134
  summary: A Rails engine for embedding Posterous blog extracts