refinerycms-blog 1.0.rc16 → 1.0.1

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.
Files changed (50) hide show
  1. data/app/controllers/blog/categories_controller.rb +2 -2
  2. data/app/controllers/blog/posts_controller.rb +23 -13
  3. data/app/controllers/blog_controller.rb +3 -2
  4. data/app/helpers/blog_posts_helper.rb +28 -0
  5. data/app/models/blog/comment_mailer.rb +1 -1
  6. data/app/models/blog_category.rb +4 -4
  7. data/app/models/blog_comment.rb +29 -20
  8. data/app/models/blog_post.rb +21 -12
  9. data/app/views/admin/blog/_submenu.html.erb +9 -4
  10. data/app/views/admin/blog/categories/_form.html.erb +3 -11
  11. data/app/views/admin/blog/categories/edit.html.erb +1 -1
  12. data/app/views/admin/blog/categories/index.html.erb +1 -1
  13. data/app/views/admin/blog/categories/new.html.erb +1 -1
  14. data/app/views/admin/blog/comments/_comment.html.erb +2 -2
  15. data/app/views/admin/blog/comments/index.html.erb +5 -5
  16. data/app/views/admin/blog/comments/show.html.erb +5 -2
  17. data/app/views/admin/blog/posts/_form.css.erb +7 -0
  18. data/app/views/admin/blog/posts/_form.html.erb +10 -30
  19. data/app/views/admin/blog/posts/_form.js.erb +13 -0
  20. data/app/views/admin/blog/posts/index.html.erb +1 -1
  21. data/app/views/blog/categories/show.html.erb +1 -1
  22. data/app/views/blog/posts/_nav.html.erb +13 -0
  23. data/app/views/blog/posts/_post.html.erb +34 -0
  24. data/app/views/blog/posts/archive.html.erb +19 -0
  25. data/app/views/blog/posts/index.html.erb +4 -1
  26. data/app/views/blog/posts/show.html.erb +28 -47
  27. data/app/views/blog/shared/_categories.html.erb +1 -1
  28. data/app/views/blog/shared/_post.html.erb +16 -6
  29. data/app/views/blog/shared/_posts.html.erb +1 -1
  30. data/app/views/blog/shared/_rss_feed.html.erb +1 -1
  31. data/config/routes.rb +26 -64
  32. data/{spec → features/support}/factories/blog_categories.rb +2 -2
  33. data/{spec → features/support}/factories/blog_comments.rb +1 -1
  34. data/{spec → features/support}/factories/blog_posts.rb +1 -1
  35. data/features/support/paths.rb +24 -0
  36. data/generators/{refinery_blog/refinery_blog_generator.rb → refinerycms_blog/refinerycms_blog_generator.rb} +4 -4
  37. data/generators/{refinery_blog → refinerycms_blog}/templates/db/migrate/migration.rb +0 -0
  38. data/generators/{refinery_blog → refinerycms_blog}/templates/db/seeds/seed.rb +0 -0
  39. data/lib/gemspec.rb +2 -2
  40. data/lib/generators/{refinery_blog → refinerycms_blog}/templates/db/migrate/migration_number_create_singular_name.rb +0 -0
  41. data/lib/generators/{refinery_blog → refinerycms_blog}/templates/db/seeds/seed.rb +0 -0
  42. data/lib/generators/{refinery_blog_generator.rb → refinerycms_blog_generator.rb} +3 -3
  43. data/lib/refinerycms-blog.rb +2 -2
  44. data/public/javascripts/refinerycms-blog.js +25 -0
  45. data/public/stylesheets/refinerycms-blog.css +72 -1
  46. data/readme.md +18 -8
  47. data/spec/models/blog_categories_spec.rb +7 -6
  48. data/spec/models/blog_comments_spec.rb +7 -6
  49. data/spec/models/blog_posts_spec.rb +2 -1
  50. metadata +25 -24
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.homepage = %q{http://refinerycms.com}
18
18
  s.authors = %w(Resolve\\ Digital Neoteric\\ Design)
19
19
  s.require_paths = %w(lib)
20
- s.add_dependency 'refinerycms', '>= 0.9.7.13'
20
+ s.add_dependency 'refinerycms', '~> 0.9.7.13'
21
21
  s.add_dependency 'filters_spam', '~> 0.2'
22
22
 
23
23
  s.files = %w(
@@ -29,4 +29,4 @@ Gem::Specification.new do |s|
29
29
  end
30
30
  EOF
31
31
 
32
- File.open(File.expand_path("../../refinerycms-blog.gemspec", __FILE__), 'w').puts(gemspec)
32
+ File.open(File.expand_path("../../refinerycms-blog.gemspec", __FILE__), 'w').puts(gemspec)
@@ -1,9 +1,9 @@
1
1
  require 'rails/generators/migration'
2
2
 
3
- class RefineryBlogGenerator < Rails::Generators::NamedBase
3
+ class RefinerycmsBlogGenerator < Rails::Generators::NamedBase
4
4
  include Rails::Generators::Migration
5
5
 
6
- source_root File.expand_path('../refinery_blog/templates/', __FILE__)
6
+ source_root File.expand_path('../refinerycms_blog/templates/', __FILE__)
7
7
  argument :name, :type => :string, :default => 'blog_structure', :banner => ''
8
8
 
9
9
  def generate
@@ -77,4 +77,4 @@ module ActiveRecord
77
77
  end
78
78
  end
79
79
  end
80
- end
80
+ end
@@ -42,8 +42,8 @@ module Refinery
42
42
 
43
43
  class << self
44
44
  def version
45
- %q{1.0.rc16}
45
+ %q{1.0.1}
46
46
  end
47
47
  end
48
48
  end
49
- end
49
+ end
@@ -0,0 +1,25 @@
1
+ $(document).ready(function(){
2
+ $('#show_blog_post').height($('#show_blog_post').height());
3
+
4
+ $('#next_prev_article a:not(".home")').live('click', function(){
5
+ url = this.href + ".js";
6
+ $('#show_blog_post > *').fadeOut();
7
+ $.ajax({
8
+ url: url,
9
+ success: function(data) {
10
+ $('#show_blog_post').html(data);
11
+ new_height = 0;
12
+ $('#show_blog_post > *').each(function(){
13
+ new_height += $(this).height()
14
+ });
15
+ $('#show_blog_post').animate({
16
+ height: new_height
17
+ });
18
+ }
19
+ });
20
+ $('html, body').animate({
21
+ scrollTop: $('body').offset().top
22
+ }, 2000);
23
+ return false;
24
+ })
25
+ })
@@ -1,3 +1,7 @@
1
+ .blog_post .posted_at{
2
+ display:block;
3
+ margin:0 0 10px;
4
+ }
1
5
  .post_categories .filed_in {
2
6
  display: inline;
3
7
  }
@@ -18,4 +22,71 @@
18
22
  display: block;
19
23
  padding-left: 25px;
20
24
  background: url('/images/refinerycms-blog/rss-feed.png') no-repeat;
21
- }
25
+ }
26
+ #next_prev_article{
27
+ overflow:hidden;
28
+ margin:10px 0;
29
+ position:relative;
30
+ height:30px;
31
+ }
32
+ #next_prev_article a{
33
+ display:block;
34
+ width:33%;
35
+ height:30px;
36
+ line-height:30px;
37
+ position:absolute;
38
+ top:0;
39
+ }
40
+ #next_prev_article a.prev{
41
+ left:0;
42
+ }
43
+ #next_prev_article a.home{
44
+ left:33%;
45
+ text-align:center;
46
+ }
47
+ #next_prev_article a.next{
48
+ text-align:right;
49
+ right:0;
50
+ }
51
+
52
+ #message, .flash {
53
+ padding: 8px 8px 8px 30px;
54
+ margin-bottom: 15px;
55
+ position: relative;
56
+ }
57
+ .flash_notice, .flash_message {
58
+ border: 1px solid #00A017;
59
+ color: #00A017;
60
+ background: 7px 7px no-repeat url('/images/refinery/icons/accept.png') #E0F5E0;
61
+ }
62
+ .flash_notice, .flash_notice * {
63
+ color: #00A017;
64
+ }
65
+ .flash_error {
66
+ border: 1px solid #A00027;
67
+ color: #A00027;
68
+ background: 7px 7px no-repeat url('/images/refinery/icons/cancel.png') #FFB1B1;
69
+ }
70
+ .flash.flash_notice #flash_close, .flash.flash_error #flash_close {
71
+ text-transform: lowercase;
72
+ }
73
+ .flash.flash_message {
74
+ background: #E0F5E0;
75
+ padding: 9px;
76
+ position: relative;
77
+ margin-bottom: 32px;
78
+ }
79
+ .flash.flash_message h2 {
80
+ margin-top: 12px;
81
+ }
82
+ .flash_message, .flash_message * {
83
+ color: #262719;
84
+ font-size: 14px;
85
+ }
86
+ .flash a, .flash a:hover {
87
+ color: #e20003;
88
+ border-bottom-color: #e20003;
89
+ }
90
+ .flash.flash_error a, .flash.flash_error a:hover {
91
+ display: none;
92
+ } /* FLASH MESSAGES */
data/readme.md CHANGED
@@ -1,24 +1,34 @@
1
- # About
1
+ # Refinery CMS Blog - Rails 2 branch
2
2
 
3
- Simple blog engine for [Refinery CMS](http://refinerycms.com). It supports posts, categories and comments.
3
+ Simple blog engine for [Refinery CMS](http://refinerycms.com).
4
+ It supports posts, categories and comments.
5
+
6
+ Refinery CMS Blog supports Rails 3 on the [master branch](http://github.com/resolve/refinerycms-blog).
4
7
 
5
8
  Options:
6
9
 
7
10
  * Comment moderation
8
11
  * [ShareThis.com](http://sharethis.com) support on posts. Set your key in Refinery's settings area to enable this.
9
12
 
13
+ ## Requirements
14
+
15
+ Please note that this requires a RefineryCMS installation between version >= 0.9.7.13
16
+ and < 0.9.8 as it works only with the later versions of Rails 2 compatible RefineryCMS.
17
+ Also note that any version of this engine 1.1 or greater is not compatible with Rails 2 at all
18
+ and is meant for Rails 3 (Refinery CMS >= 0.9.8).
19
+
10
20
  # Install
11
21
 
12
- Open up your ``Gemfile`` and add at the bottom this line
22
+ Open up your ``Gemfile`` and add at the bottom this line:
13
23
 
14
- gem 'refinerycms-blog', '~> 1.0.rc16'
24
+ gem 'refinerycms-blog', '~> 1.0.1'
15
25
 
16
- Now run ``bundle install``
26
+ Now, run ``bundle install``
17
27
 
18
- Next to install the blog plugin run:
28
+ Next, to install the blog plugin:
19
29
 
20
- ruby script/generate refinery_blog
30
+ ruby script/generate refinerycms_blog
21
31
 
22
32
  Finally migrate your database and you're done.
23
33
 
24
- rake db:migrate
34
+ rake db:migrate
@@ -1,20 +1,21 @@
1
1
  require 'spec_helper'
2
+ Dir[File.expand_path('../../../features/support/factories/*.rb', __FILE__)].each{|factory| require factory}
2
3
 
3
4
  describe BlogCategory do
4
5
  context "wiring up" do
5
-
6
+
6
7
  before(:each) do
7
8
  @category = Factory(:blog_category)
8
9
  end
9
-
10
+
10
11
  it "saves" do
11
12
  @category.should_not be_nil
12
13
  end
13
-
14
+
14
15
  it "has a blog post" do
15
16
  BlogPost.last.categories.should include(@category)
16
17
  end
17
-
18
+
18
19
  end
19
-
20
- end
20
+
21
+ end
@@ -1,20 +1,21 @@
1
1
  require 'spec_helper'
2
+ Dir[File.expand_path('../../../features/support/factories/*.rb', __FILE__)].each{|factory| require factory}
2
3
 
3
4
  describe BlogComment do
4
-
5
+
5
6
  context "wiring up" do
6
-
7
+
7
8
  before(:each) do
8
9
  @comment = Factory(:blog_comment)
9
10
  end
10
-
11
+
11
12
  it "saves" do
12
13
  @comment.should_not be_nil
13
14
  end
14
-
15
+
15
16
  it "has a blog post" do
16
17
  @comment.post.should_not be_nil
17
18
  end
18
-
19
+
19
20
  end
20
- end
21
+ end
@@ -1,4 +1,5 @@
1
1
  require 'spec_helper'
2
+ Dir[File.expand_path('../../../features/support/factories/*.rb', __FILE__)].each{|factory| require factory}
2
3
 
3
4
  describe BlogPost do
4
5
  context "wiring up" do
@@ -12,4 +13,4 @@ describe BlogPost do
12
13
  end
13
14
 
14
15
  end
15
- end
16
+ end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-blog
3
3
  version: !ruby/object:Gem::Version
4
- hash: -398340063
5
- prerelease: true
4
+ prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - rc16
10
- version: 1.0.rc16
8
+ - 1
9
+ version: 1.0.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Resolve Digital
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2010-11-15 00:00:00 +13:00
18
+ date: 2010-12-03 00:00:00 +13:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -25,9 +24,8 @@ dependencies:
25
24
  requirement: &id001 !ruby/object:Gem::Requirement
26
25
  none: false
27
26
  requirements:
28
- - - ">="
27
+ - - ~>
29
28
  - !ruby/object:Gem::Version
30
- hash: 1
31
29
  segments:
32
30
  - 0
33
31
  - 9
@@ -44,7 +42,6 @@ dependencies:
44
42
  requirements:
45
43
  - - ~>
46
44
  - !ruby/object:Gem::Version
47
- hash: 15
48
45
  segments:
49
46
  - 0
50
47
  - 2
@@ -67,6 +64,7 @@ files:
67
64
  - app/controllers/blog/categories_controller.rb
68
65
  - app/controllers/blog/posts_controller.rb
69
66
  - app/controllers/blog_controller.rb
67
+ - app/helpers/blog_posts_helper.rb
70
68
  - app/mailers/blog/comment_mailer.rb
71
69
  - app/models/blog/comment_mailer.rb
72
70
  - app/models/blog_category.rb
@@ -83,7 +81,9 @@ files:
83
81
  - app/views/admin/blog/comments/_sortable_list.html.erb
84
82
  - app/views/admin/blog/comments/index.html.erb
85
83
  - app/views/admin/blog/comments/show.html.erb
84
+ - app/views/admin/blog/posts/_form.css.erb
86
85
  - app/views/admin/blog/posts/_form.html.erb
86
+ - app/views/admin/blog/posts/_form.js.erb
87
87
  - app/views/admin/blog/posts/_post.html.erb
88
88
  - app/views/admin/blog/posts/_sortable_list.html.erb
89
89
  - app/views/admin/blog/posts/edit.html.erb
@@ -93,6 +93,9 @@ files:
93
93
  - app/views/blog/categories/show.html.erb
94
94
  - app/views/blog/comment_mailer/notification.html.erb
95
95
  - app/views/blog/posts/_comment.html.erb
96
+ - app/views/blog/posts/_nav.html.erb
97
+ - app/views/blog/posts/_post.html.erb
98
+ - app/views/blog/posts/archive.html.erb
96
99
  - app/views/blog/posts/index.html.erb
97
100
  - app/views/blog/posts/index.rss.builder
98
101
  - app/views/blog/posts/show.html.erb
@@ -105,15 +108,19 @@ files:
105
108
  - config/locales/nb.yml
106
109
  - config/locales/nl.yml
107
110
  - config/routes.rb
111
+ - features/support/factories/blog_categories.rb
112
+ - features/support/factories/blog_comments.rb
113
+ - features/support/factories/blog_posts.rb
114
+ - features/support/paths.rb
108
115
  - Gemfile
109
116
  - Gemfile.lock
110
- - generators/refinery_blog/refinery_blog_generator.rb
111
- - generators/refinery_blog/templates/db/migrate/migration.rb
112
- - generators/refinery_blog/templates/db/seeds/seed.rb
117
+ - generators/refinerycms_blog/refinerycms_blog_generator.rb
118
+ - generators/refinerycms_blog/templates/db/migrate/migration.rb
119
+ - generators/refinerycms_blog/templates/db/seeds/seed.rb
113
120
  - lib/gemspec.rb
114
- - lib/generators/refinery_blog/templates/db/migrate/migration_number_create_singular_name.rb
115
- - lib/generators/refinery_blog/templates/db/seeds/seed.rb
116
- - lib/generators/refinery_blog_generator.rb
121
+ - lib/generators/refinerycms_blog/templates/db/migrate/migration_number_create_singular_name.rb
122
+ - lib/generators/refinerycms_blog/templates/db/seeds/seed.rb
123
+ - lib/generators/refinerycms_blog_generator.rb
117
124
  - lib/refinerycms-blog.rb
118
125
  - public/images/refinerycms-blog/icons/cog.png
119
126
  - public/images/refinerycms-blog/icons/comment.png
@@ -130,13 +137,11 @@ files:
130
137
  - public/images/refinerycms-blog/icons/up.gif
131
138
  - public/images/refinerycms-blog/rss-feed.png
132
139
  - public/javascripts/refinery/refinerycms-blog.js
140
+ - public/javascripts/refinerycms-blog.js
133
141
  - public/stylesheets/refinery/refinerycms-blog.css
134
142
  - public/stylesheets/refinerycms-blog.css
135
143
  - rails/init.rb
136
144
  - readme.md
137
- - spec/factories/blog_categories.rb
138
- - spec/factories/blog_comments.rb
139
- - spec/factories/blog_posts.rb
140
145
  - spec/models/blog_categories_spec.rb
141
146
  - spec/models/blog_comments_spec.rb
142
147
  - spec/models/blog_posts_spec.rb
@@ -154,21 +159,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
159
  requirements:
155
160
  - - ">="
156
161
  - !ruby/object:Gem::Version
157
- hash: 3
158
162
  segments:
159
163
  - 0
160
164
  version: "0"
161
165
  required_rubygems_version: !ruby/object:Gem::Requirement
162
166
  none: false
163
167
  requirements:
164
- - - ">"
168
+ - - ">="
165
169
  - !ruby/object:Gem::Version
166
- hash: 25
167
170
  segments:
168
- - 1
169
- - 3
170
- - 1
171
- version: 1.3.1
171
+ - 0
172
+ version: "0"
172
173
  requirements: []
173
174
 
174
175
  rubyforge_project: