padrino-core 0.12.0.rc1 → 0.12.0.rc2
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.
- checksums.yaml +4 -4
- data/lib/padrino-core/application.rb +8 -3
- data/lib/padrino-core/cli/rake_tasks.rb +10 -0
- data/lib/padrino-core/logger.rb +1 -1
- data/lib/padrino-core/mounter.rb +1 -1
- data/lib/padrino-core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36ae10f9e389e527fa9dcec4bba7bf0d043d5e53
|
4
|
+
data.tar.gz: e35bacd38ed575f456711d63a3f2c4482980bf16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 076b43b1a789f3c6a84f04f578cd4b592ea45bb3fbde45d29bee659a1064240acd6df9c99c654485138b42d3fcc5f7e5bd3c148f69bfdb6f65fbc4214a48dea8
|
7
|
+
data.tar.gz: 673d23844abf49d4e2aa1f2c7bae616cfe25b177e78bfdf338ec045b620fc7c69a4f225cc5656e81387c5fb246c13088fc3b80f25722d941b67643de9023ea23
|
@@ -365,9 +365,9 @@ module Padrino
|
|
365
365
|
|
366
366
|
# throw an exception if the protect_from_csrf is active but sessions not.
|
367
367
|
def check_csrf_protection_dependency
|
368
|
-
if protect_from_csrf? && !sessions?
|
369
|
-
|
370
|
-
`protect_from_csrf` is activated, but `sessions`
|
368
|
+
if (protect_from_csrf? && !sessions?) && !defined?(Padrino::IGNORE_CSRF_SETUP_WARNING)
|
369
|
+
warn(<<-ERROR)
|
370
|
+
`protect_from_csrf` is activated, but `sessions` seem to be off. To enable csrf
|
371
371
|
protection, use:
|
372
372
|
|
373
373
|
enable :sessions
|
@@ -375,6 +375,11 @@ protection, use:
|
|
375
375
|
or deactivate protect_from_csrf:
|
376
376
|
|
377
377
|
disable :protect_from_csrf
|
378
|
+
|
379
|
+
If you use a different session store, ignore this warning using:
|
380
|
+
|
381
|
+
# in boot.rb:
|
382
|
+
Padrino::IGNORE_CSRF_SETUP_WARNING = true
|
378
383
|
ERROR
|
379
384
|
end
|
380
385
|
end
|
@@ -16,6 +16,16 @@ task :environment do
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
# Loads skeleton Padrino environment, no models, no application settings.
|
20
|
+
task :skeleton do
|
21
|
+
module Padrino::Reloader
|
22
|
+
def self.safe_load(file, options)
|
23
|
+
super unless file.include?('/models/')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
require File.expand_path('config/boot.rb', Rake.application.original_dir)
|
27
|
+
end
|
28
|
+
|
19
29
|
desc "Generate a secret key"
|
20
30
|
task :secret do
|
21
31
|
shell.say SecureRandom.hex(32)
|
data/lib/padrino-core/logger.rb
CHANGED
@@ -280,7 +280,7 @@ module Padrino
|
|
280
280
|
|
281
281
|
stream = case config[:stream]
|
282
282
|
when :to_file
|
283
|
-
FileUtils.mkdir_p(Padrino.root('log')) unless File.
|
283
|
+
FileUtils.mkdir_p(Padrino.root('log')) unless File.exist?(Padrino.root('log'))
|
284
284
|
File.new(Padrino.root('log', "#{Padrino.env}.log"), 'a+')
|
285
285
|
when :null then StringIO.new
|
286
286
|
when :stdout then $stdout
|
data/lib/padrino-core/mounter.rb
CHANGED
@@ -87,7 +87,7 @@ module Padrino
|
|
87
87
|
app_obj.set :app_name, app_data.app_obj.app_name.to_s
|
88
88
|
app_obj.set :app_file, app_data.app_file unless ::File.exist?(app_obj.app_file)
|
89
89
|
app_obj.set :root, app_data.app_root unless app_data.app_root.blank?
|
90
|
-
app_obj.set :public_folder, Padrino.root('public', app_data.uri_root) unless File.
|
90
|
+
app_obj.set :public_folder, Padrino.root('public', app_data.uri_root) unless File.exist?(app_obj.public_folder)
|
91
91
|
app_obj.set :static, File.exist?(app_obj.public_folder) if app_obj.nil?
|
92
92
|
app_obj.set :cascade, app_data.cascade
|
93
93
|
app_obj.setup_application! # Initializes the app here with above settings.
|
data/lib/padrino-core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: padrino-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.0.
|
4
|
+
version: 0.12.0.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Padrino Team
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date:
|
14
|
+
date: 2014-01-05 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: tilt
|