cartoonist-comics 0.0.20 → 0.0.20.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 027df587db0be45a5606cdcc978eb15eb0b05b57
4
- data.tar.gz: bb791e7a87e4cea918e53dd1b6f8f8379d646c16
3
+ metadata.gz: dd60e352cab5cf5a0cdff8db846e3e829781d7a9
4
+ data.tar.gz: de5b1a5111b03a2cf639a5c5c06014b5ce3353e6
5
5
  SHA512:
6
- metadata.gz: b2423d491a8c957e4bee5757a3d468a2e24dc008f93fd89f84d39be8857592f360f77230a6970ba36712899602381d44ed6641532d973082b394f84ca8080e63
7
- data.tar.gz: 127a0ea05dca55529a9befa9b8e19744dacea43289147ad145fa83bb25c8a1ced9a5c9f4bbd659465e00d629cfae8e2589d5765f7113676206870541de38f34c
6
+ metadata.gz: 8474bd47ab8e165c35413565a31790905da4fc2acaeddd3989ea0b28de8f5e4e2bda4946db9d87e28fe30f1dc751cec12b5c4ef9955591fb7679f6657fb1b875
7
+ data.tar.gz: 3900b68be1aa083ee3f8f59f27cacf3f4827a8dc333bceec7d1ec1493c4194339bad7bee99b44aea40cb5be1bc0a7ef3562ed55dfdeab614af64c2be33204001
@@ -1,3 +1,5 @@
1
+ require "RMagick"
2
+
1
3
  class Comic < ActiveRecord::Base
2
4
  include Postable
3
5
  include Entity
@@ -52,6 +54,21 @@ class Comic < ActiveRecord::Base
52
54
  end
53
55
  end
54
56
 
57
+ def magick
58
+ return @magick if @magick
59
+ images = Magick::Image.from_blob database_file.content
60
+ raise "Only 1 image is allowed!" if images.size != 1
61
+ @magick = images.first
62
+ end
63
+
64
+ def img_width
65
+ magick.columns
66
+ end
67
+
68
+ def img_height
69
+ magick.rows
70
+ end
71
+
55
72
  def img_url
56
73
  "/comic/#{number}.png"
57
74
  end
@@ -4,6 +4,20 @@
4
4
  <% content_for(:next, @comic.next_number.to_s) %>
5
5
  <% enable_disqus! :path => "comic/#{@comic.number}", :title => @comic.title, :category => Setting[:disqus_comic_category] %>
6
6
 
7
+ <% content_for :additional_meta_tags do %>
8
+ <% if Kernel.const_defined? :Twitter %>
9
+ <% if Twitter.current_user && Twitter.current_user.screen_name %>
10
+ <meta name="twitter:card" content="photo">
11
+ <meta name="twitter:site" content="@<%= Twitter.current_user.screen_name %>">
12
+ <meta name="twitter:creator" content="@<%= Twitter.current_user.screen_name %>">
13
+ <meta name="twitter:title" content="<%= @comic.title %>">
14
+ <meta name="twitter:image" content="<%= @comic.absolute_img_url %>">
15
+ <meta name="twitter:image:width" content="<%= @comic.img_width %>">
16
+ <meta name="twitter:image:height" content="<%= @comic.img_height %>">
17
+ <% end %>
18
+ <% end %>
19
+ <% end %>
20
+
7
21
  <h1 class="number"><%= @comic.title %></h1>
8
22
 
9
23
  <p class="comic">
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cartoonist-comics"
3
- s.version = "0.0.20"
3
+ s.version = "0.0.20.1"
4
4
  s.date = Time.now.strftime "%Y-%m-%d"
5
5
  s.summary = "Cartoonist Comics"
6
6
  s.description = "This core plugin for Cartoonist adds comics."
@@ -10,5 +10,6 @@ Gem::Specification.new do |s|
10
10
  s.files = `git ls-files`.split("\n")
11
11
  s.require_paths = ["lib"]
12
12
  s.homepage = "http://reasonnumber.com/cartoonist"
13
- s.add_dependency "cartoonist", "~> 0.0.20.0"
13
+ s.add_dependency "cartoonist", "~> 0.0.20.1"
14
+ s.add_dependency "rmagick", "~> 2.13"
14
15
  end
@@ -2,7 +2,7 @@ module CartoonistComics
2
2
  class Version
3
3
  class << self
4
4
  def to_s
5
- "0.0.20"
5
+ "0.0.20.1"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist-comics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.20
4
+ version: 0.0.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Virata-Stone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-19 00:00:00.000000000 Z
11
+ date: 2013-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cartoonist
@@ -16,14 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: 0.0.20.0
19
+ version: 0.0.20.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: 0.0.20.0
26
+ version: 0.0.20.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: rmagick
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '2.13'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '2.13'
27
41
  description: This core plugin for Cartoonist adds comics.
28
42
  email: reasonnumber@gmail.com
29
43
  executables: []
@@ -71,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
71
85
  version: '0'
72
86
  requirements: []
73
87
  rubyforge_project:
74
- rubygems_version: 2.0.3
88
+ rubygems_version: 2.1.11
75
89
  signing_key:
76
90
  specification_version: 4
77
91
  summary: Cartoonist Comics