utopia 2.5.0 → 2.5.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
  SHA256:
3
- metadata.gz: 37d97837ade8d210c7f13ac156ca9a1bdbc8f1f3f9eb9ef195dcc688b6ea933c
4
- data.tar.gz: 6d3bb1d8a49183df2b3decdba70d8d42d996f1868fb44e4a184ca413f799760a
3
+ metadata.gz: bb03df255a2bcf40880744f8ae366b887b551a9537744494c478ca845de8aff5
4
+ data.tar.gz: 3259c21a917eb9d09745807d4b0049cefd6428c12cc8aa5826493a01228f3902
5
5
  SHA512:
6
- metadata.gz: 93a81c8a0cf74142599575da2421eeb8e62ec0190de34c470451e44381855f304b2ba3390142ae41a98da80125c5a78623fd6dc75d2d2d2430c8114eea54b05e
7
- data.tar.gz: 34ee51883e8abfbee0bb6be8fddaebeb358c644ba6e264d7f86aa4a95f0baad4bc3cd5d2e1408d3b285fc58df8812168b8e7bf3312c30311ab7dac85ea063d4d
6
+ metadata.gz: a81f5b0019ee72ab4917b7dbe4b1c64b58dd7c96524463fe0273d11d5ad5adb44e17abcfc2915104a229abb296215155333241e0f05da0530ba114745eb08aa6
7
+ data.tar.gz: 7cfe391c6567fa58a76b7951905ddb94b8b86c24561817e02e7739984e9a95bf1ed6189e57f2ee3a81ba6361b6ae9fa633d393cc618e4b3321334eec816cd548
@@ -28,7 +28,9 @@ module Utopia
28
28
  end
29
29
 
30
30
  def content_length_of(body)
31
- return body.map(&:bytesize).reduce(0, :+)
31
+ if body.respond_to?(:map)
32
+ return body.map(&:bytesize).reduce(0, :+)
33
+ end
32
34
  end
33
35
 
34
36
  def call(env)
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Utopia
22
- VERSION = "2.5.0"
22
+ VERSION = "2.5.1"
23
23
  end
data/setup/site/config.ru CHANGED
@@ -29,13 +29,14 @@ use Utopia::Redirection::Errors,
29
29
  404 => '/errors/file-not-found'
30
30
 
31
31
  use Utopia::Localization,
32
- :default_locale => 'en',
33
- :locales => ['en', 'de', 'ja', 'zh']
32
+ default_locale: 'en',
33
+ locales: ['en', 'de', 'ja', 'zh']
34
34
 
35
35
  require 'utopia/session'
36
36
  use Utopia::Session,
37
- :expires_after => 3600 * 24,
38
- :secret => ENV['UTOPIA_SESSION_SECRET']
37
+ expires_after: 3600 * 24,
38
+ secret: ENV['UTOPIA_SESSION_SECRET'],
39
+ secure: true
39
40
 
40
41
  use Utopia::Controller
41
42
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-27 00:00:00.000000000 Z
11
+ date: 2018-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni
@@ -734,7 +734,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
734
734
  version: '0'
735
735
  requirements: []
736
736
  rubyforge_project:
737
- rubygems_version: 2.7.6
737
+ rubygems_version: 2.7.7
738
738
  signing_key:
739
739
  specification_version: 4
740
740
  summary: Utopia is a framework for building dynamic content-driven websites.