cartoonist-comics 0.0.6 → 0.0.7
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/app/controllers/comic_admin_controller.rb +1 -1
- data/app/controllers/comic_controller.rb +2 -2
- data/app/models/comic.rb +1 -1
- data/app/models/comic_feed.rb +9 -1
- data/app/views/layouts/comic.html.erb +1 -1
- data/config/locales/en.yml +1 -1
- data/lib/cartoonist-comics/engine.rb +1 -1
- metadata +5 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class ComicController <
|
|
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
|
|
data/app/models/comic_feed.rb
CHANGED
|
@@ -2,7 +2,15 @@ class ComicFeed
|
|
|
2
2
|
attr_reader :pub_date, :items
|
|
3
3
|
|
|
4
4
|
def initialize(feed)
|
|
5
|
-
|
|
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
|
data/config/locales/en.yml
CHANGED
|
@@ -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 => "
|
|
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.
|
|
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-
|
|
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: &
|
|
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.
|
|
21
|
+
version: 0.0.7
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *11099940
|
|
25
25
|
description: This core plugin for Cartoonist adds comics.
|
|
26
26
|
email: reasonnumber@gmail.com
|
|
27
27
|
executables: []
|