cartoonist-comics 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- class ComicAdminController < ApplicationController
1
+ class ComicAdminController < CartoonistController
2
2
  helper :comic
3
3
  before_filter :preview!, :only => [:preview, :preview_random]
4
4
  before_filter :ensure_ssl!
@@ -1,4 +1,4 @@
1
- class ComicController < ApplicationController
1
+ class ComicController < CartoonistController
2
2
  def index
3
3
  @comic = Comic.current
4
4
  @disabled_prev = true if @comic.oldest?
@@ -42,7 +42,7 @@ class ComicController < ApplicationController
42
42
 
43
43
  format.rss do
44
44
  @feed = feed_contents
45
- render :content_type => "application/xml"
45
+ render :content_type => "application/xml", :layout => "cartoonist"
46
46
  end
47
47
  end
48
48
  end
data/app/models/comic.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Comic < ActiveRecord::Base
2
- attr_accessible :number, :posted_at, :title, :description, :scene_description, :dialogue, :title_text, :database_file_id, :tweet, :tweeted_at, :locked
2
+ attr_accessible :number, :posted_at, :title, :description, :scene_description, :dialogue, :title_text, :database_file_id, :database_file, :tweet, :tweeted_at, :locked
3
3
  belongs_to :database_file
4
4
  include Tweetable
5
5
 
@@ -2,7 +2,15 @@ class ComicFeed
2
2
  attr_reader :pub_date, :items
3
3
 
4
4
  def initialize(feed)
5
- @pub_date = feed.first.posted_at.to_time.strftime "%a, %d %b %Y 00:00:01 %z"
5
+ first = feed.first
6
+
7
+ if first
8
+ first_date = first.posted_at
9
+ else
10
+ first_date = Date.today
11
+ end
12
+
13
+ @pub_date = first_date.to_time.strftime "%a, %d %b %Y 00:00:01 %z"
6
14
  @items = feed.map do |item|
7
15
  ComicFeed::Item.new item
8
16
  end
@@ -75,4 +75,4 @@
75
75
  <% end %>
76
76
  <% end %>
77
77
 
78
- <%= render :template => "layouts/application" %>
78
+ <%= render :template => "layouts/cartoonist" %>
@@ -17,7 +17,7 @@ en:
17
17
  layout:
18
18
  tab:
19
19
  comics: Comics
20
- application:
20
+ cartoonist:
21
21
  layout:
22
22
  navigation:
23
23
  comic: Comic
@@ -2,7 +2,7 @@ module CartoonistComics
2
2
  class Engine < ::Rails::Engine
3
3
  Cartoonist::Admin::Tab.add :comics, :url => "/comic_admin", :order => 0
4
4
  Cartoonist::RootPath.add :comics, "comic#index"
5
- Cartoonist::Navigation::Link.add :url => "/comic", :preview_url => "/comic_admin/preview", :class => "comic", :label => "application.layout.navigation.comic", :order => 0
5
+ Cartoonist::Navigation::Link.add :url => "/comic", :preview_url => "/comic_admin/preview", :class => "comic", :label => "cartoonist.layout.navigation.comic", :order => 0
6
6
  Cartoonist::Migration.add_for self
7
7
 
8
8
  Cartoonist::Backup.for :comics do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist-comics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,19 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-18 00:00:00.000000000 Z
12
+ date: 2012-04-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cartoonist
16
- requirement: &16089320 !ruby/object:Gem::Requirement
16
+ requirement: &11099940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - =
20
20
  - !ruby/object:Gem::Version
21
- version: 0.0.6
21
+ version: 0.0.7
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16089320
24
+ version_requirements: *11099940
25
25
  description: This core plugin for Cartoonist adds comics.
26
26
  email: reasonnumber@gmail.com
27
27
  executables: []