cartoonist-comics 0.0.12 → 0.0.13
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.
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
class Admin::ComicController <
|
|
1
|
+
class Admin::ComicController < AdminCartoonistController
|
|
2
2
|
helper :comic
|
|
3
3
|
before_filter :preview!, :only => [:preview, :preview_random]
|
|
4
|
-
before_filter :ensure_ssl!
|
|
5
|
-
before_filter :check_admin!
|
|
6
4
|
|
|
7
5
|
def index
|
|
8
6
|
@unposted = Comic.unposted.numerical
|
data/app/models/comic.rb
CHANGED
|
@@ -81,6 +81,10 @@ class Comic < ActiveRecord::Base
|
|
|
81
81
|
|
|
82
82
|
VALID_DAYS = [MONDAY, WEDNESDAY, FRIDAY]
|
|
83
83
|
|
|
84
|
+
def search(query)
|
|
85
|
+
reverse_numerical.where "LOWER(title) LIKE :query OR LOWER(description) LIKE :query OR LOWER(scene_description) LIKE :query OR LOWER(dialogue) LIKE :query OR LOWER(title_text) LIKE :query", :query => "%#{query.downcase}%"
|
|
86
|
+
end
|
|
87
|
+
|
|
84
88
|
def create_comic(params)
|
|
85
89
|
last = current_created
|
|
86
90
|
create :number => next_number(last), :title => params[:title], :posted_at => next_post_date(last), :description => params[:description], :scene_description => params[:scene_description], :dialogue => params[:dialogue], :title_text => params[:title_text], :database_file => DatabaseFile.create_from_param(params[:image], :allowed_extensions => ["png"]), :locked => true
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<% content_for :post_date, @comic.formatted_posted_at %>
|
|
3
3
|
<% content_for(:prev, @comic.previous_number.to_s) %>
|
|
4
4
|
<% content_for(:next, @comic.next_number.to_s) %>
|
|
5
|
-
<% enable_disqus! :path => "#{@comic.number}", :title => @comic.title, :category => Setting[:disqus_comic_category]
|
|
5
|
+
<% enable_disqus! :path => "#{@comic.number}", :title => @comic.title, :category => Setting[:disqus_comic_category] %>
|
|
6
6
|
|
|
7
7
|
<h1 class="number"><%= @comic.title %></h1>
|
|
8
8
|
|
data/lib/cartoonist-comics.rb
CHANGED
|
@@ -30,7 +30,7 @@ module CartoonistComics
|
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
Cartoonist::Routes.add do
|
|
33
|
-
resources :comic do
|
|
33
|
+
resources :comic, :only => [:index, :show] do
|
|
34
34
|
collection do
|
|
35
35
|
get "random"
|
|
36
36
|
get "feed", :defaults => { :format => "rss" }
|
|
@@ -38,7 +38,7 @@ module CartoonistComics
|
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
namespace :admin do
|
|
41
|
-
resources :comic do
|
|
41
|
+
resources :comic, :only => [:create, :edit, :index, :new, :update] do
|
|
42
42
|
member do
|
|
43
43
|
post "lock"
|
|
44
44
|
get "preview"
|
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.13
|
|
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-
|
|
12
|
+
date: 2012-11-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: cartoonist
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &15022640 !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.13
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *15022640
|
|
25
25
|
description: This core plugin for Cartoonist adds comics.
|
|
26
26
|
email: reasonnumber@gmail.com
|
|
27
27
|
executables: []
|
|
@@ -47,6 +47,7 @@ files:
|
|
|
47
47
|
- db/migrate/20120606023300_move_comic_title_setting.rb
|
|
48
48
|
- lib/cartoonist-comics.rb
|
|
49
49
|
- lib/cartoonist-comics/engine.rb
|
|
50
|
+
- lib/cartoonist-comics/version.rb
|
|
50
51
|
homepage: http://reasonnumber.com/cartoonist
|
|
51
52
|
licenses: []
|
|
52
53
|
post_install_message:
|