ixtlan-configuration 0.1.2 → 0.2.0

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.
Files changed (2) hide show
  1. data/lib/ixtlan/configuration/resource.rb +18 -2
  2. metadata +10 -10
@@ -30,19 +30,25 @@ module Ixtlan
30
30
 
31
31
  property :id, Serial
32
32
 
33
+ property :base_url, String, :default => 'http://localhost:3000', :length => 64
34
+
33
35
  if defined? Ixtlan::Session
34
36
  property :idle_session_timeout, Integer, :required => true, :default => 15
35
37
  end
36
38
 
37
39
  if defined? Ixtlan::Audit
38
- property :audits_keep_logs, Integer, :required => true, :default => 30
40
+ property :audit_keep_logs, Integer, :required => true, :default => 30
39
41
  end
40
42
 
41
43
  if defined? Ixtlan::Errors
42
44
  property :errors_keep_dumps, Integer, :required => true, :default => 30
43
- property :errors_base_url, String, :required => false, :length => 128, :default => "http://localhost:3000/errors"
45
+ property :errors_base_path, String, :required => false, :length => 128, :default => "/errors"
44
46
  property :errors_from_email, String, :required => false, :length => 128, :default => 'no-reply@example.com'
45
47
  property :errors_to_emails, String, :required => false, :length => 255, :default => 'developer@example.com'
48
+
49
+ def errors_base_url
50
+ base_url + errors_base_path
51
+ end
46
52
  end
47
53
 
48
54
  if defined? Ixtlan::Remote
@@ -50,6 +56,16 @@ module Ixtlan
50
56
  property :users_token, String, :required => true, :length => 64, :default => "behappy"
51
57
  end
52
58
 
59
+ if defined? Rack::Session::EncryptedCookie
60
+ require 'openssl'
61
+
62
+ property :encrypted_cookie_secret, String, :required => true, :length => 64, :writer => :protected, :default => Proc.new { OpenSSL::Random.random_bytes(16).inspect }
63
+
64
+ def reset_encrypted_cookie_secret
65
+ self.encrypted_cookie_secret = OpenSSL::Random.random_bytes(16).inspect
66
+ end
67
+ end
68
+
53
69
  if defined? Ixtlan::Gettext
54
70
  property :flash_url, String, :required => false, :length => 128, :default => "http://localhost:3000"
55
71
  property :translations_url, String, :required => false, :length => 128, :default => "http://localhost:3000"
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: ixtlan-configuration
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.2
5
+ version: 0.2.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Christian Meier
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-24 00:00:00.000000000 Z
12
+ date: 2013-06-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slf4r
@@ -35,18 +35,18 @@ extensions: []
35
35
  extra_rdoc_files: []
36
36
  files:
37
37
  - README.md
38
- - lib/ixtlan-configuration.rb
39
38
  - lib/ixtlan-configuration.rb~
40
- - lib/ixtlan/configuration.rb
41
- - lib/ixtlan/configuration.rb~
39
+ - lib/ixtlan-configuration.rb
42
40
  - lib/ixtlan/core.rb~
43
- - lib/ixtlan/configuration/cuba.rb~
44
- - lib/ixtlan/configuration/cuba.rb
45
- - lib/ixtlan/configuration/resource.rb~
46
- - lib/ixtlan/configuration/resource.rb
47
- - lib/ixtlan/configuration/filter.rb
41
+ - lib/ixtlan/configuration.rb~
42
+ - lib/ixtlan/configuration.rb
48
43
  - lib/ixtlan/configuration/filter.rb~
44
+ - lib/ixtlan/configuration/resource.rb
45
+ - lib/ixtlan/configuration/resource.rb~
46
+ - lib/ixtlan/configuration/cuba.rb
49
47
  - lib/ixtlan/configuration/serializer.rb
48
+ - lib/ixtlan/configuration/cuba.rb~
49
+ - lib/ixtlan/configuration/filter.rb
50
50
  homepage: http://github.com/mkristian/ixtlan-configuration
51
51
  licenses:
52
52
  - MIT