sitepress-server 3.0.1 → 3.1.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: f3fa4d51dbfb27ea33c3c0dcff41cc7b53cb3b5bfcbee4b51648bfa9b1ce2241
4
- data.tar.gz: 52a6aa42781d8d1870501157e882a5b42e5c4aaba573afaed53d1ed8e32fa9ca
3
+ metadata.gz: 30f4e23fb8f70825308e4df34833298c6775b631042446ee5410900df9039435
4
+ data.tar.gz: 6f82fb4453d914e51c91a8b8a4c9e61aa7dc6b55e37f06a7c5a1bd1e3fcca05b
5
5
  SHA512:
6
- metadata.gz: 24e340fc32128491b9e9384476c377dd488bcf5f825f66af32b21c9b0f6c007113513e987094530cedae94cbb27466cbf88a2781f8c1c36b29fd97722fe7fada
7
- data.tar.gz: 3890401d7d843ebd7128297680801383035452522c6142a510207d3b7e006015a67c3c68bbb506fc81c9f7cce391d4e9d6373a942328b9ee775dbcea5ca20cb4
6
+ metadata.gz: 6bd62f362ead356633a072debdaf2695ec488bb7d51748eda7c8442ab1315a4b27e9c45f298cec9a36f95fb46fb1a8a79586a5d870e6056ed59da1a0a318cd19
7
+ data.tar.gz: 941ea02ff27b2c890c0893dd02a3e83d9736cefaf200c0eec10d62a2c2acb0640e7a20e8c7b22d66497a33b5b70eaac17df41db8f8cbf5a206119a4302acbb1d
@@ -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.1
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-08-05 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.1
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.1
41
41
  description:
42
42
  email:
43
43
  - bradgessler@gmail.com