sitepress-server 3.0.1 → 3.1.3

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: f3fa4d51dbfb27ea33c3c0dcff41cc7b53cb3b5bfcbee4b51648bfa9b1ce2241
4
- data.tar.gz: 52a6aa42781d8d1870501157e882a5b42e5c4aaba573afaed53d1ed8e32fa9ca
3
+ metadata.gz: e9705fdc0d820f742c4616749297b41c4b4561dfe7e6d8d327139491495745a6
4
+ data.tar.gz: 9b42f064595566f7ca363fbfcd456d8d6191cb8348c6d51e0aef7014249704c0
5
5
  SHA512:
6
- metadata.gz: 24e340fc32128491b9e9384476c377dd488bcf5f825f66af32b21c9b0f6c007113513e987094530cedae94cbb27466cbf88a2781f8c1c36b29fd97722fe7fada
7
- data.tar.gz: 3890401d7d843ebd7128297680801383035452522c6142a510207d3b7e006015a67c3c68bbb506fc81c9f7cce391d4e9d6373a942328b9ee775dbcea5ca20cb4
6
+ metadata.gz: f63cc85855bcd85e73022288fd8d5484e52bd9c8c7e2bed2a80dca6ea80825323a4647309feae3f3e46fa29761b0537c77b4f1d2a0d92e3c66bcfc32ba4a5945
7
+ data.tar.gz: bc49c92370afa212193891339098342c611bc3b6d2a9c5d60194eb91b50f8dc252cc5fa08e8b6e0d9115717523d5841f40d078ff9767d3ddc9a0cec5415b724a
@@ -12,21 +12,32 @@ module Sitepress
12
12
  # Control whether or not to display friendly error reporting messages
13
13
  # in Sitepress. The development server turns this on an handles exception,
14
14
  # while the compile and other environments would likely have this disabled.
15
- config.enable_sitepress_error_reporting = false
15
+ config.enable_site_error_reporting = false
16
16
 
17
17
  # When in a development environment, we'll want to reload the site between
18
18
  # requests so we can see the latest changes; otherwise, load the site once
19
19
  # and we're done.
20
20
  config.enable_site_reloading = false
21
21
 
22
- # Paths unique to Sitepress
23
- config.root = File.join(File.dirname(__FILE__), "../../rails")
22
+ # Default to a development environment type of configuration, which would reload the site.
23
+ # This gets reset later depending on a preference in the `before_initialize` callback.
24
+ config.eager_load = true
25
+ config.cache_classes = true
26
+
27
+ config.before_initialize do
28
+ # Eager load classes, content, etc. to boost performance when site reloading is disabled.
29
+ config.eager_load = !config.enable_site_reloading
24
30
 
25
- # Boilerplate required to get Rails to boot.
26
- config.eager_load = false # necessary to silence warning
27
- config.cache_classes = false # reload everything since this is dev env.
31
+ # Cache classes for speed in production environments when site reloading is disabled.
32
+ config.cache_classes = !config.enable_site_reloading
33
+ end
34
+
35
+ # Path that points the the Sitepress UI rails app; which displays routes, error messages.
36
+ # etc. to the user if `enable_site_error_reporting` is enabled.
37
+ config.root = File.join(File.dirname(__FILE__), "../../rails")
28
38
 
29
- config.secret_key_base = SecureRandom.uuid # Rails won't start without this
39
+ # Rails won't start without this.
40
+ config.secret_key_base = SecureRandom.uuid
30
41
 
31
42
  # Setup routes. The `constraints` key is set to `nil` so the `SiteController` can
32
43
  # treat a page not being found as an exception, which it then handles. If the constraint
@@ -35,7 +35,7 @@ class SiteController < ApplicationController
35
35
  end
36
36
 
37
37
  def has_error_reporting_enabled?
38
- Sitepress::Server.config.enable_sitepress_error_reporting
38
+ Sitepress::Server.config.enable_site_error_reporting
39
39
  end
40
40
 
41
41
  def reload_site?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sitepress-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brad Gessler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-24 00:00:00.000000000 Z
11
+ date: 2022-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack-test
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.1
33
+ version: 3.1.3
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 3.0.1
40
+ version: 3.1.3
41
41
  description:
42
42
  email:
43
43
  - bradgessler@gmail.com
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
- rubygems_version: 3.3.7
80
+ rubygems_version: 3.3.20
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: Sitepress rack app for stand-alone of embedded usage.