comfy_blog 0.1.2 → 0.1.3

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.md CHANGED
@@ -11,7 +11,7 @@ Add gem definition to your Gemfile:
11
11
  Then from the Rails project's root run:
12
12
 
13
13
  bundle install
14
- rails g blog
14
+ rails g comfy:blog
15
15
  rake db:migrate
16
16
 
17
17
  Now you should be able to go to `/admin/blog/posts` and add new blog posts.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -23,7 +23,7 @@ class Admin::Blog::PostsController < Admin::Blog::BaseController
23
23
  redirect_to :action => :edit, :id => @post
24
24
 
25
25
  rescue ActiveRecord::RecordInvalid
26
- flash[:error] = 'Failed to create Blog Post'
26
+ flash.now[:error] = 'Failed to create Blog Post'
27
27
  render :action => :new
28
28
  end
29
29
 
@@ -37,7 +37,7 @@ class Admin::Blog::PostsController < Admin::Blog::BaseController
37
37
  redirect_to :action => :edit, :id => @post
38
38
 
39
39
  rescue ActiveRecord::RecordInvalid
40
- flash[:error] = 'Failed to update Blog Post'
40
+ flash.now[:error] = 'Failed to update Blog Post'
41
41
  render :action => :edit
42
42
  end
43
43
 
@@ -21,7 +21,7 @@ class Admin::Blog::TagsController < Admin::Blog::BaseController
21
21
  redirect_to :action => :index
22
22
 
23
23
  rescue ActiveRecord::RecordInvalid
24
- flash[:error] = 'Failed to update Blog Tag'
24
+ flash.now[:error] = 'Failed to update Blog Tag'
25
25
  render :action => :edit
26
26
  end
27
27
 
@@ -31,7 +31,7 @@ class Admin::Blog::TagsController < Admin::Blog::BaseController
31
31
  redirect_to :action => :index
32
32
 
33
33
  rescue ActiveRecord::RecordInvalid
34
- flash[:error] = 'Failed to create Blog Tag'
34
+ flash.now[:error] = 'Failed to create Blog Tag'
35
35
  render :action => :new
36
36
  end
37
37
 
@@ -1,2 +1 @@
1
- <li><%= active_link_to 'Blog posts', admin_blog_posts_path %></li>
2
- <li><%= active_link_to 'Blog tags', admin_blog_tags_path %></li>
1
+ <li><%= active_link_to 'Blog posts', admin_blog_posts_path %></li>
@@ -11,9 +11,9 @@
11
11
  <% end %>
12
12
  <% end %>
13
13
  <% end %>
14
- <%= form.text_field :tag_names, :label => 'Tags' %>
14
+ <%= form.text_field :tag_names, :label => link_to('Tags', admin_blog_tags_path) %>
15
+ <%= form.text_area :excerpt, :class => 'short' %>
15
16
  <%= form.text_area :content, :class => 'rich_text' %>
16
- <%= form.text_field :excerpt %>
17
17
 
18
18
  <% if defined?(ComfortableMexicanSofa) %>
19
19
  <% content_for :right_column do %>
@@ -1,5 +1,6 @@
1
1
  <li>
2
2
  <div class='item'>
3
+ <div class='icon'></div>
3
4
  <div class='action_links'>
4
5
  <% unless ComfyBlog.disqus_enabled? %>
5
6
  <%= link_to pluralize(post.comments.count, 'comment'), admin_blog_post_comments_path(post) %>
data/comfy_blog.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "comfy_blog"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Oleg Khabarov", "The Working Group Inc."]
12
- s.date = "2012-01-31"
12
+ s.date = "2012-02-07"
13
13
  s.description = ""
14
14
  s.email = "oleg@twg.ca"
15
15
  s.extra_rdoc_files = [
@@ -24,9 +24,6 @@ Gem::Specification.new do |s|
24
24
  "VERSION",
25
25
  "app/assets/images/rails.png",
26
26
  "app/assets/javascripts/application.js",
27
- "app/assets/stylesheets/comfy_blog/admin.css",
28
- "app/assets/stylesheets/comfy_blog/application.css",
29
- "app/assets/stylesheets/comfy_blog/reset.css",
30
27
  "app/controllers/admin/blog/base_controller.rb",
31
28
  "app/controllers/admin/blog/comments_controller.rb",
32
29
  "app/controllers/admin/blog/posts_controller.rb",
@@ -40,7 +37,6 @@ Gem::Specification.new do |s|
40
37
  "app/models/blog/post.rb",
41
38
  "app/models/blog/tag.rb",
42
39
  "app/models/blog/tagging.rb",
43
- "app/views/admin/blog/_html_head.html.erb",
44
40
  "app/views/admin/blog/_navigation.html.erb",
45
41
  "app/views/admin/blog/comments/_comment.html.erb",
46
42
  "app/views/admin/blog/comments/destroy.js.erb",
@@ -72,7 +68,6 @@ Gem::Specification.new do |s|
72
68
  "config/database.yml",
73
69
  "config/environment.rb",
74
70
  "config/environments/development.rb",
75
- "config/environments/production.rb",
76
71
  "config/environments/test.rb",
77
72
  "config/initializers/comfy_blog.rb",
78
73
  "config/initializers/secret_token.rb",
@@ -87,8 +82,8 @@ Gem::Specification.new do |s|
87
82
  "lib/comfy_blog/core_ext/string.rb",
88
83
  "lib/comfy_blog/engine.rb",
89
84
  "lib/comfy_blog/form_builder.rb",
90
- "lib/generators/README",
91
- "lib/generators/blog_generator.rb",
85
+ "lib/generators/comfy/blog/README",
86
+ "lib/generators/comfy/blog/blog_generator.rb",
92
87
  "lib/tasks/comfy_blog.rake",
93
88
  "script/rails",
94
89
  "test/fixtures/.gitkeep",
@@ -46,9 +46,9 @@ class CreateComfyBlog < ActiveRecord::Migration
46
46
  end
47
47
 
48
48
  def self.down
49
- drop_table :sofa_blog_posts
50
- drop_table :sofa_blog_comments
51
- drop_table :sofa_blog_tags
52
- drop_table :sofa_blog_taggings
49
+ drop_table :blog_posts
50
+ drop_table :blog_comments
51
+ drop_table :blog_tags
52
+ drop_table :blog_taggings
53
53
  end
54
54
  end
@@ -13,7 +13,6 @@ module ComfyBlog
13
13
  end
14
14
  # Adding view hooks
15
15
  ComfortableMexicanSofa::ViewHooks.add(:navigation, '/admin/blog/navigation')
16
- ComfortableMexicanSofa::ViewHooks.add(:html_head, '/admin/blog/html_head')
17
16
  end
18
17
  end
19
18
  end
File without changes
@@ -0,0 +1,35 @@
1
+ module Comfy
2
+ module Generators
3
+ class BlogGenerator < Rails::Generators::Base
4
+ require 'rails/generators/active_record'
5
+ include Rails::Generators::Migration
6
+ include Thor::Actions
7
+
8
+ source_root File.expand_path('../../../../..', __FILE__)
9
+
10
+ def generate_migration
11
+ destination = File.expand_path('db/migrate/01_create_comfy_blog.rb', self.destination_root)
12
+ migration_dir = File.dirname(destination)
13
+ destination = self.class.migration_exists?(migration_dir, 'create_comfy_blog')
14
+
15
+ if destination
16
+ puts "\e[0m\e[31mFound existing create_comfy_blog.rb migration. Remove it if you want to regenerate.\e[0m"
17
+ else
18
+ migration_template 'db/migrate/01_create_comfy_blog.rb', 'db/migrate/create_comfy_blog.rb'
19
+ end
20
+ end
21
+
22
+ def generate_initialization
23
+ copy_file 'config/initializers/comfy_blog.rb', 'config/initializers/comfy_blog.rb'
24
+ end
25
+
26
+ def show_readme
27
+ readme 'lib/generators/comfy/blog/README'
28
+ end
29
+
30
+ def self.next_migration_number(dirname)
31
+ ActiveRecord::Generators::Base.next_migration_number(dirname)
32
+ end
33
+ end
34
+ end
35
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comfy_blog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-31 00:00:00.000000000Z
13
+ date: 2012-02-07 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70337561190460 !ruby/object:Gem::Requirement
17
+ requirement: &70093164285520 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.1.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70337561190460
25
+ version_requirements: *70093164285520
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rails_autolink
28
- requirement: &70337561188860 !ruby/object:Gem::Requirement
28
+ requirement: &70093164279580 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.0.4
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70337561188860
36
+ version_requirements: *70093164279580
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: jquery-rails
39
- requirement: &70337561187720 !ruby/object:Gem::Requirement
39
+ requirement: &70093164270340 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 1.0.0
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *70337561187720
47
+ version_requirements: *70093164270340
48
48
  description: ''
49
49
  email: oleg@twg.ca
50
50
  executables: []
@@ -60,9 +60,6 @@ files:
60
60
  - VERSION
61
61
  - app/assets/images/rails.png
62
62
  - app/assets/javascripts/application.js
63
- - app/assets/stylesheets/comfy_blog/admin.css
64
- - app/assets/stylesheets/comfy_blog/application.css
65
- - app/assets/stylesheets/comfy_blog/reset.css
66
63
  - app/controllers/admin/blog/base_controller.rb
67
64
  - app/controllers/admin/blog/comments_controller.rb
68
65
  - app/controllers/admin/blog/posts_controller.rb
@@ -76,7 +73,6 @@ files:
76
73
  - app/models/blog/post.rb
77
74
  - app/models/blog/tag.rb
78
75
  - app/models/blog/tagging.rb
79
- - app/views/admin/blog/_html_head.html.erb
80
76
  - app/views/admin/blog/_navigation.html.erb
81
77
  - app/views/admin/blog/comments/_comment.html.erb
82
78
  - app/views/admin/blog/comments/destroy.js.erb
@@ -108,7 +104,6 @@ files:
108
104
  - config/database.yml
109
105
  - config/environment.rb
110
106
  - config/environments/development.rb
111
- - config/environments/production.rb
112
107
  - config/environments/test.rb
113
108
  - config/initializers/comfy_blog.rb
114
109
  - config/initializers/secret_token.rb
@@ -123,8 +118,8 @@ files:
123
118
  - lib/comfy_blog/core_ext/string.rb
124
119
  - lib/comfy_blog/engine.rb
125
120
  - lib/comfy_blog/form_builder.rb
126
- - lib/generators/README
127
- - lib/generators/blog_generator.rb
121
+ - lib/generators/comfy/blog/README
122
+ - lib/generators/comfy/blog/blog_generator.rb
128
123
  - lib/tasks/comfy_blog.rake
129
124
  - script/rails
130
125
  - test/fixtures/.gitkeep
@@ -161,7 +156,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
156
  version: '0'
162
157
  segments:
163
158
  - 0
164
- hash: 4147721177865210323
159
+ hash: 1119342822693293236
165
160
  required_rubygems_version: !ruby/object:Gem::Requirement
166
161
  none: false
167
162
  requirements:
@@ -1,57 +0,0 @@
1
- /* === List items === */
2
- ul.list.posts li .item .label,
3
- ul.list.comments li .item .label {
4
- margin-left: 0px ! important;
5
- }
6
- ul.list.comments li .item .label .sublabel em {
7
- margin-left: 5px;
8
- }
9
- ul.list.comments li .item .content {
10
- font-size: 11px;
11
- font-weight: normal;
12
- margin: 5px 0px 0 35px;
13
- }
14
-
15
- /* === Tags === */
16
- span.tag {
17
- font-size: 10px;
18
- padding: 1px 5px;
19
- background-color: #d5d5d5;
20
- border-radius: 2px;
21
- -moz-border-radius: 2px;
22
- }
23
-
24
-
25
- /* === Autocomplete === */
26
- .ac_results {
27
- padding: 0px;
28
- border: 1px solid #999;
29
- background-color: white;
30
- overflow: hidden;
31
- z-index: 99999;
32
- color: #666;
33
- }
34
- .ac_results ul {
35
- width: 100%;
36
- list-style-position: outside;
37
- list-style: none;
38
- padding: 0;
39
- margin: 0;
40
- }
41
- .ac_results ul li {
42
- margin: 0px;
43
- padding: 2px 5px;
44
- cursor: default;
45
- display: block;
46
- font-size: 12px;
47
- line-height: 16px;
48
- overflow: hidden;
49
- }
50
-
51
- .ac_odd {
52
- background-color: #eee;
53
- }
54
- .ac_over {
55
- background-color: #C4EAF6;
56
- color: #000;
57
- }
@@ -1,73 +0,0 @@
1
- /*
2
- = require ./reset
3
- = require_self
4
- */
5
-
6
- body {
7
- padding: 25px;
8
- font: 13px/18px Arial, sans-serif;
9
- }
10
- h1 {
11
- font: bold 26px/34px Arial, sans-serif;
12
- margin-bottom: 15px;
13
- }
14
- h2 {
15
- font: bold 18px/20px Arial, sans-serif;
16
- margin-bottom: 10px;
17
- }
18
- a {
19
- color: #3875D7;
20
- text-decoration: none;
21
- }
22
- a:hover {
23
- text-decoration: underline;
24
- }
25
- table.formatted td,
26
- table.formatted th {
27
- padding: 2px 5px;
28
- border-bottom: 1px dotted #ccc;
29
- }
30
- table.formatted th {
31
- background-color: #666;
32
- color: #fff;
33
- }
34
- table.formatted td img {
35
- float: left;
36
- padding: 2px;
37
- margin-right: 2px;
38
- }
39
- table.formatted td .sublabel {
40
- font-size: 11px;
41
- line-height: 11px;
42
- color: #888;
43
- }
44
-
45
- .form_element {
46
- overflow: hidden;
47
- margin-bottom: 5px;
48
- }
49
- .form_element .label {
50
- width: 125px;
51
- float: left;
52
- text-align: right;
53
- }
54
- .form_element .value,
55
- .form_element .errors {
56
- margin-left: 135px;
57
- }
58
- .form_element .value input[type='text'],
59
- .form_element .value textarea {
60
- width: 400px;
61
- }
62
-
63
- .jcrop-holder {
64
- margin-bottom: 15px;
65
- }
66
-
67
- .flash{
68
- border: 2px solid #ccc;
69
- padding: 10px;
70
- margin-bottom: 15px;
71
- text-align: center;
72
- }
73
-
@@ -1 +0,0 @@
1
- html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}
@@ -1 +0,0 @@
1
- <%= stylesheet_link_tag 'comfy_blog/admin' %>
@@ -1,51 +0,0 @@
1
- defined?(ComfyBlog::Application) && ComfyBlog::Application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb
3
-
4
- # Code is not reloaded between requests
5
- config.cache_classes = true
6
-
7
- # Full error reports are disabled and caching is turned on
8
- config.consider_all_requests_local = false
9
- config.action_controller.perform_caching = true
10
-
11
- # Disable Rails's static asset server (Apache or nginx will already do this)
12
- config.serve_static_assets = false
13
-
14
- # Compress JavaScripts and CSS
15
- config.assets.compress = true
16
-
17
- # Specifies the header that your server uses for sending files
18
- # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
19
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
20
-
21
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
22
- # config.force_ssl = true
23
-
24
- # See everything in the log (default is :info)
25
- # config.log_level = :debug
26
-
27
- # Use a different logger for distributed setups
28
- # config.logger = SyslogLogger.new
29
-
30
- # Use a different cache store in production
31
- # config.cache_store = :mem_cache_store
32
-
33
- # Enable serving of images, stylesheets, and JavaScripts from an asset server
34
- # config.action_controller.asset_host = "http://assets.example.com"
35
-
36
- # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
37
- # config.assets.precompile += %w( search.js )
38
-
39
- # Disable delivery errors, bad email addresses will be ignored
40
- # config.action_mailer.raise_delivery_errors = false
41
-
42
- # Enable threaded mode
43
- # config.threadsafe!
44
-
45
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
46
- # the I18n.default_locale when a translation can not be found)
47
- config.i18n.fallbacks = true
48
-
49
- # Send deprecation notices to registered listeners
50
- config.active_support.deprecation = :notify
51
- end
@@ -1,31 +0,0 @@
1
- class BlogGenerator < Rails::Generators::Base
2
- require 'rails/generators/active_record'
3
- include Rails::Generators::Migration
4
- include Thor::Actions
5
-
6
- source_root File.expand_path('../../..', __FILE__)
7
-
8
- def generate_migration
9
- destination = File.expand_path('db/migrate/01_create_comfy_blog.rb', self.destination_root)
10
- migration_dir = File.dirname(destination)
11
- destination = self.class.migration_exists?(migration_dir, 'create_comfy_blog')
12
-
13
- if destination
14
- puts "\e[0m\e[31mFound existing create_comfy_blog.rb migration. Remove it if you want to regenerate.\e[0m"
15
- else
16
- migration_template 'db/migrate/01_create_comfy_blog.rb', 'db/migrate/create_comfy_blog.rb'
17
- end
18
- end
19
-
20
- def generate_initialization
21
- copy_file 'config/initializers/comfy_blog.rb', 'config/initializers/comfy_blog.rb'
22
- end
23
-
24
- def show_readme
25
- readme 'lib/generators/README'
26
- end
27
-
28
- def self.next_migration_number(dirname)
29
- ActiveRecord::Generators::Base.next_migration_number(dirname)
30
- end
31
- end