utopia 1.9.3 → 1.9.4

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: 1144177e365248c9b24dae032a7c40cb7d2d3397
4
- data.tar.gz: 9255986187c7c87a7504e0c945fa258b82622dd0
3
+ metadata.gz: 9a4f99328db2c8c6246dd0106078a47f172e08c7
4
+ data.tar.gz: 7af566aaf349482f40cc5dcfde3104b3f384d223
5
5
  SHA512:
6
- metadata.gz: b57a7bec393a3980a1101e62508ce74e066bc2078df20f01084bcc2557615788e244827dd3d056feaf77624094a921e0b284eb7b0d5f02ed841a9d376e36fa0c
7
- data.tar.gz: c4c81fa608bbbb2e487c2191d3bd03081f06b2bcebcbb28859d03b6fa7b0cc1e8e602f31575c23c00a447d32dc87d0ef37f09d016aa0e8de3decd0087f736339
6
+ metadata.gz: b117b99e129ffcc91b35f29d6e49d69b142cec155c1fa177db4acf02724c2f84006dfedecefce709f0003d8aaf00bddb48c4dbccbd587846bb95219291609bcd
7
+ data.tar.gz: 4c87195b6a26203e983f339255ae1f8cb768ba47f4400d82c0ce5ef5ac2b4e1cadf8b0eb871576fd317056d36f207f9d45a2045196688b9fe94f10551e86db13
@@ -16,6 +16,9 @@ pre code.syntax-theme-base {
16
16
  .syntax-theme-base {
17
17
  font-family: Menlo, Monaco, Consolas, monospace;
18
18
  line-height: 1.15em; }
19
+ .syntax-theme-base a {
20
+ text-decoration: none;
21
+ color: inherit; }
19
22
  .syntax-theme-base .function {
20
23
  color: #33f; }
21
24
  .syntax-theme-base .keyword, .syntax-theme-base .access {
@@ -9,7 +9,7 @@ Syntax.register('nginx', function(brush) {
9
9
  pattern: /((\w+).*?);/g,
10
10
  matches: Syntax.extractMatches(
11
11
  {klass: 'directive', allow: '*'},
12
- {klass: 'function'}
12
+ {klass: 'function', process: Syntax.lib.webLinkProcess("http://nginx.org/r/")}
13
13
  )
14
14
  });
15
15
 
@@ -969,7 +969,7 @@ Syntax.Brush.prototype.process = function(text, matches, options) {
969
969
  var lines = top.splitLines();
970
970
 
971
971
  var html = document.createElement('code');
972
- html.className = 'syntax';
972
+ html.className = 'syntax highlighted';
973
973
 
974
974
  for (var i = 0; i < lines.length; i += 1) {
975
975
  var line = lines[i].reduce(null, function (container, match) {
@@ -19,6 +19,7 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  require 'openssl'
22
+ require 'securerandom'
22
23
  require 'digest/sha2'
23
24
 
24
25
  require_relative 'session/lazy_hash'
@@ -35,12 +36,17 @@ module Utopia
35
36
  # At least, the session will be updated every 1 hour:
36
37
  DEFAULT_UPDATE_TIMEOUT = 3600
37
38
 
38
- def initialize(app, session_name: nil, secret:, expires_after: nil, update_timeout: nil, **options)
39
+ def initialize(app, session_name: nil, secret: nil, expires_after: nil, update_timeout: nil, **options)
39
40
  @app = app
40
41
 
41
42
  @session_name = session_name || RACK_SESSION
42
43
  @cookie_name = @session_name + ".encrypted"
43
44
 
45
+ if secret.nil?
46
+ secret = SecureRandom.hex(32)
47
+ warn "#{self.class} secret is nil, generating transient secret key!"
48
+ end
49
+
44
50
  # This generates a 32-byte key suitable for aes.
45
51
  @key = Digest::SHA2.digest(secret)
46
52
 
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Utopia
22
- VERSION = "1.9.3"
22
+ VERSION = "1.9.4"
23
23
  end
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: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-04 00:00:00.000000000 Z
11
+ date: 2016-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trenni