cartoonist 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,9 +4,8 @@ class SiteController < ApplicationController
4
4
  format.html { redirect_to "/" }
5
5
 
6
6
  format.ico do
7
- path = ActionController::Base.helpers.asset_path Cartoonist::Theme.favicon
8
- path = File.join Rails.root, "public", path
9
- send_data File.read(path), :filename => "favicon.ico", :type => "image/x-icon", :disposition => "inline"
7
+ data = ActionController::Base.helpers.asset_paths.asset_environment[Cartoonist::Theme.favicon].to_s
8
+ send_data data, :filename => "favicon.ico", :type => "image/x-icon", :disposition => "inline"
10
9
  cache_page_as "static/favicon.ico"
11
10
  end
12
11
  end
@@ -1,2 +1,3 @@
1
1
  class DatabaseFile < ActiveRecord::Base
2
+ attr_accessible :filename, :content
2
3
  end
@@ -1,4 +1,6 @@
1
1
  class Setting < ActiveRecord::Base
2
+ attr_accessible :label, :value, :locked
3
+
2
4
  class << self
3
5
  def [](label)
4
6
  raise "Invalid label" unless label.present?
@@ -229,6 +229,7 @@ module Cartoonist
229
229
  Rails.application.config.assets.precompile += ["admin.css"]
230
230
  Rails.application.config.assets.precompile += Cartoonist::Asset.all
231
231
  Rails.application.config.paths["db/migrate"] += Cartoonist::Migration.all
232
+ Rails.application.config.action_controller.include_all_helpers = false
232
233
 
233
234
  if File.directory? File.join(Rails.root, "public/errors")
234
235
  Rails.application.config.exceptions_app = ActionDispatch::PublicExceptions.new(File.join Rails.root, "public/errors")
@@ -246,7 +247,7 @@ module Cartoonist
246
247
  # If you change this key, all old signed cookies will become invalid!
247
248
  # Make sure the secret is at least 30 characters and all random,
248
249
  # no regular words or you'll be exposed to dictionary attacks.
249
- Cartoonist::Application.config.secret_token = Setting[:secret_token]
250
+ Rails.application.config.secret_token = Setting[:secret_token]
250
251
  end
251
252
 
252
253
  twitter_auth_changed = lambda do
@@ -312,6 +313,7 @@ module Cartoonist
312
313
  end
313
314
  end
314
315
 
316
+ Mime::Type.register "image/x-icon", :ico
315
317
  Cartoonist::Admin::Tab.add :general, :url => "/admin", :order => 3
316
318
  Cartoonist::Navigation::Link.add :url => (lambda { "https://twitter.com/#{Setting[:twitter_handle]}" }), :class => "follow-us", :label => "application.layout.navigation.follow_on_twitter", :title => "application.layout.navigation.follow_on_twitter_title", :order => 2
317
319
  Cartoonist::Migration.add_for self
@@ -329,7 +331,9 @@ module Cartoonist
329
331
  end
330
332
 
331
333
  Cartoonist::Routes.add_begin do
332
- root :to => Cartoonist::RootPath.current
334
+ if Setting.table_exists?
335
+ root :to => Cartoonist::RootPath.current
336
+ end
333
337
  end
334
338
 
335
339
  Cartoonist::Routes.add do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-17 00:00:00.000000000 Z
12
+ date: 2012-04-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: devise
16
- requirement: &16995580 !ruby/object:Gem::Requirement
16
+ requirement: &17891860 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 2.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *16995580
24
+ version_requirements: *17891860
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &16993360 !ruby/object:Gem::Requirement
27
+ requirement: &17890900 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *16993360
35
+ version_requirements: *17890900
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: railties
38
- requirement: &16988280 !ruby/object:Gem::Requirement
38
+ requirement: &17890160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 3.2.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *16988280
46
+ version_requirements: *17890160
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: redcarpet
49
- requirement: &16987660 !ruby/object:Gem::Requirement
49
+ requirement: &17889400 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.1.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *16987660
57
+ version_requirements: *17889400
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: twitter
60
- requirement: &16986940 !ruby/object:Gem::Requirement
60
+ requirement: &17888660 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: 2.2.0
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *16986940
68
+ version_requirements: *17888660
69
69
  description: This provides the main functionality and plugin api for Cartoonist.
70
70
  email: reasonnumber@gmail.com
71
71
  executables: []