cartoonist 0.0.18 → 0.0.19

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: cb529e2b4ff66b21d80a22172a26f3898d27d460
4
- data.tar.gz: 04b4b4f22d5f9885b933542cbdfa1c21fb548902
3
+ metadata.gz: 2bb9fd86c97df55571e625a98fc8922e44a3339c
4
+ data.tar.gz: 576c5902bb5a1d1eb3379045871855277963fad6
5
5
  SHA512:
6
- metadata.gz: 0da7d89aeb9db0d9fe7b17c27832591cbd48b7f2be0adb05c4deee29a1cb42d91d0136c56dce89c51a5371be56113351b372a6b6661c0eb42dfb9b8457725a08
7
- data.tar.gz: 4e9b1285503bb4624b82e9f38451de02bfa71d80333cf4115ae125cec4161cfb1af9f4bd0a954f865923085ba6c50547b9c4adaf7bd3340bb5b876ed57ee6a92
6
+ metadata.gz: 7fcfd49c48767c5c21d2f6a67ec2d2beac9ce016c45d61065d6a4e777c442168f1f9aa10c868b70e9f8c0388e22350354f140bed545af8335ad9ef89e2fe7325
7
+ data.tar.gz: 64e43dc9b00272c249fdcda75e5fccd71c45f4d3f01008885292fdfdbe6096c49589087b69570ecc7991cd072cda0b19c0b06d9a66814e70e3be47e475ce7aaf
@@ -1,6 +1,6 @@
1
1
  class Admin::AccountsController < AdminCartoonistController
2
2
  def index
3
- @users = User.order(:name).all
3
+ @users = User.order(:name).to_a
4
4
  end
5
5
 
6
6
  def new
@@ -40,6 +40,7 @@ class Admin::SettingsController < AdminCartoonistController
40
40
  Setting[:domain] = params[:domain]
41
41
  Setting[:site_name] = params[:site_name]
42
42
  Setting[:secret_token] = SecureRandom.hex 30
43
+ Setting[:secret_key_base] = SecureRandom.hex 64
43
44
  Setting[:devise_pepper] = SecureRandom.hex 64
44
45
  # This MUST go AFTER we set the pepper
45
46
  User.create! :email => params[:admin_email], :password => params[:admin_password], :password_confirmation => params[:admin_confirm_password], :name => params[:admin_name]
@@ -1,6 +1,4 @@
1
1
  class DatabaseFile < ActiveRecord::Base
2
- attr_accessible :filename, :extension, :content
3
-
4
2
  def to_backup_entries
5
3
  if filename
6
4
  meta_name = "#{filename}.meta"
@@ -1,6 +1,4 @@
1
1
  class Setting < ActiveRecord::Base
2
- attr_accessible :label, :value, :locked
3
-
4
2
  def zip_title
5
3
  label
6
4
  end
data/app/models/user.rb CHANGED
@@ -1,9 +1,6 @@
1
1
  class User < ActiveRecord::Base
2
2
  devise :database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :omniauthable
3
3
 
4
- # Setup accessible (or protected) attributes for your model
5
- attr_accessible :email, :password, :password_confirmation, :remember_me, :name
6
-
7
4
  def zip_title
8
5
  name
9
6
  end
data/cartoonist.gemspec CHANGED
@@ -11,11 +11,12 @@ Gem::Specification.new do |s|
11
11
  s.files = `git ls-files`.split("\n")
12
12
  s.require_paths = ["lib"]
13
13
  s.homepage = "http://reasonnumber.com/cartoonist"
14
- s.add_dependency "devise", "~> 2.2"
14
+ s.add_dependency "actionpack-page_caching", "~> 1.0"
15
+ s.add_dependency "devise", "~> 3.0"
15
16
  s.add_dependency "jquery-rails", "~> 3.0"
16
17
  s.add_dependency "omniauth-openid", "~> 1.0"
17
- s.add_dependency "railties", "~> 3.2"
18
- s.add_dependency "redcarpet", "~> 2.3"
18
+ s.add_dependency "railties", "~> 4.0"
19
+ s.add_dependency "redcarpet", "~> 3.0"
19
20
  s.add_dependency "rubyzip", "~> 0.9"
20
21
  s.add_dependency "minitar", "~> 0.5"
21
22
  end
@@ -119,6 +119,7 @@ en:
119
119
  disqus_comic_category: "Disqus Comic Category: "
120
120
  disqus_blog_post_category: "Disqus Blog Post Category: "
121
121
  disqus_page_category: "Disqus Page Category: "
122
+ secret_key_base: "Secret Key Base: "
122
123
  secret_token: "Secret Token: "
123
124
  devise_pepper: "Devise Pepper: "
124
125
  tabs:
@@ -0,0 +1,5 @@
1
+ class CreateSecretKeyBase < ActiveRecord::Migration
2
+ def change
3
+ Setting[:secret_key_base] = SecureRandom.hex 64
4
+ end
5
+ end
@@ -1,3 +1,5 @@
1
+ require "actionpack/page_caching"
2
+
1
3
  module Cartoonist
2
4
  class Engine < ::Rails::Engine
3
5
  # Use this hook to configure devise mailer, warden hooks and so forth.
@@ -225,7 +227,12 @@ module Cartoonist
225
227
  # Add in various configuration from plugins
226
228
  Rails.application.config.assets.precompile += ["admin.css", "cartoonist.js"]
227
229
  Rails.application.config.assets.precompile += Cartoonist::Asset.all
228
- Rails.application.config.paths["db/migrate"] += Cartoonist::Migration.all
230
+ Rails.application.config.action_controller.page_cache_directory = File.join Rails.root, "public"
231
+
232
+ Cartoonist::Migration.all.flatten.each do |path|
233
+ Rails.application.config.paths["db/migrate"] << path
234
+ end
235
+
229
236
  Rails.application.config.action_controller.include_all_helpers = false
230
237
 
231
238
  if File.directory? File.join(Rails.root, "public/errors")
@@ -249,6 +256,14 @@ module Cartoonist
249
256
  Rails.application.config.secret_token = Setting[:secret_token]
250
257
  end
251
258
 
259
+ secret_key_base_changed = lambda do
260
+ # Your secret key for verifying the integrity of signed cookies.
261
+ # If you change this key, all old signed cookies will become invalid!
262
+ # Make sure the secret is at least 64 characters and all random,
263
+ # no regular words or you'll be exposed to dictionary attacks.
264
+ Rails.application.config.secret_key_base = Setting[:secret_key_base]
265
+ end
266
+
252
267
  devise_pepper_changed = lambda do
253
268
  Devise.setup do |devise_config|
254
269
  devise_config.mailer_sender = "no-reply@#{Setting[:domain]}"
@@ -283,10 +298,12 @@ module Cartoonist
283
298
 
284
299
  Setting::Tab.define :advanced, :order => 2 do
285
300
  Setting.define :secret_token, :default => "ThisTokenMustBeRegenerated....", :onchange => secret_token_changed
301
+ Setting.define :secret_key_base, :default => "ThisTokenMustBeRegenerated....", :onchange => secret_key_base_changed
286
302
  Setting.define :devise_pepper, :default => "ThisTokenMustBeRegenerated....", :onchange => devise_pepper_changed
287
303
  end
288
304
 
289
305
  secret_token_changed.call
306
+ secret_key_base_changed.call
290
307
  devise_pepper_changed.call
291
308
  end
292
309
 
@@ -317,9 +334,9 @@ module Cartoonist
317
334
  end
318
335
 
319
336
  Cartoonist::Routes.add do
320
- match "favicon" => "site#favicon", :defaults => { :format => "ico" }
321
- match "sitemap" => "site#sitemap", :defaults => { :format => "xml" }
322
- match "robots" => "site#robots", :defaults => { :format => "text" }
337
+ get "favicon" => "site#favicon", :defaults => { :format => "ico" }
338
+ get "sitemap" => "site#sitemap", :defaults => { :format => "xml" }
339
+ get "robots" => "site#robots", :defaults => { :format => "text" }
323
340
 
324
341
  resource :admin, :controller => :admin, :only => [:show] do
325
342
  collection do
@@ -2,7 +2,7 @@ module Cartoonist
2
2
  class Version
3
3
  class << self
4
4
  def to_s
5
- "0.0.18"
5
+ "0.0.19"
6
6
  end
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,29 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cartoonist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
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-06-03 00:00:00.000000000 Z
11
+ date: 2013-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: actionpack-page_caching
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: devise
15
29
  requirement: !ruby/object:Gem::Requirement
16
30
  requirements:
17
31
  - - ~>
18
32
  - !ruby/object:Gem::Version
19
- version: '2.2'
33
+ version: '3.0'
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - ~>
25
39
  - !ruby/object:Gem::Version
26
- version: '2.2'
40
+ version: '3.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: jquery-rails
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +72,28 @@ dependencies:
58
72
  requirements:
59
73
  - - ~>
60
74
  - !ruby/object:Gem::Version
61
- version: '3.2'
75
+ version: '4.0'
62
76
  type: :runtime
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - ~>
67
81
  - !ruby/object:Gem::Version
68
- version: '3.2'
82
+ version: '4.0'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: redcarpet
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ~>
74
88
  - !ruby/object:Gem::Version
75
- version: '2.3'
89
+ version: '3.0'
76
90
  type: :runtime
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - ~>
81
95
  - !ruby/object:Gem::Version
82
- version: '2.3'
96
+ version: '3.0'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: rubyzip
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -176,6 +190,7 @@ files:
176
190
  - db/migrate/20120417075756_devise_create_users.rb
177
191
  - db/migrate/20120524032959_add_extension_to_database_files.rb
178
192
  - db/migrate/20121205091909_add_omniautable_to_users.rb
193
+ - db/migrate/20130724085513_create_secret_key_base.rb
179
194
  - lib/cartoonist.rb
180
195
  - lib/cartoonist/engine.rb
181
196
  - lib/cartoonist/nginxtra.rb