padrino-core 0.12.0.rc1 → 0.12.0.rc2

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: 07676eda48ccc772dcca11b4d6ebe2267cb86fe9
4
- data.tar.gz: 669c9795dd7cd5eab46986a28fed64ea87400311
3
+ metadata.gz: 36ae10f9e389e527fa9dcec4bba7bf0d043d5e53
4
+ data.tar.gz: e35bacd38ed575f456711d63a3f2c4482980bf16
5
5
  SHA512:
6
- metadata.gz: a4b95dfbdd3ea29423c1f09424ac28a4fce32e08732830b739b08ec159d6205f84f423a04224c9b17ed889c5b4d6850678e94943f8960c6ee94ad2fe8cf69709
7
- data.tar.gz: 3c5da6330346fe9950be1bb42dc706c4bca7e682e452d42c7d1c9e6fc18f82b71c482c7eceaaac2838285db1629bf8ecab76d04061201e00afa4b7edc070237f
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
- raise(<<-ERROR)
370
- `protect_from_csrf` is activated, but `sessions` are not. To enable csrf
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)
@@ -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.exists?(Padrino.root('log'))
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
@@ -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.exists?(app_obj.public_folder)
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.
@@ -6,7 +6,7 @@
6
6
  #
7
7
  module Padrino
8
8
  # The version constant for the current version of Padrino.
9
- VERSION = '0.12.0.rc1' unless defined?(Padrino::VERSION)
9
+ VERSION = '0.12.0.rc2' unless defined?(Padrino::VERSION)
10
10
 
11
11
  #
12
12
  # The current Padrino version.
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.rc1
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: 2013-12-31 00:00:00.000000000 Z
14
+ date: 2014-01-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: tilt