rails_sitemap 0.3.3 → 0.4.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40990c72f5bb32fbddc227b97e5b62e415b891ce
|
4
|
+
data.tar.gz: 8c0f0f08200ea985dda080fa802156220d9c3bc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bd4e2416e3f24576ace09e340f717ec05bfd616c8f8dd11d815f915eb85659ca7e2350849865e0359b2b56763fe42672d9570ba55822706e551cd759f3d993e
|
7
|
+
data.tar.gz: 29e50abc60c62bc2cc8bbe7755e1f2b5b8aa6cbb50ae222de39824fe8e0c030242f790afe5d0d450f6186c4211e9fff98640ec13da75b49097a35986c77f2a17
|
@@ -8,8 +8,8 @@ module RailsSitemap
|
|
8
8
|
protected
|
9
9
|
|
10
10
|
def set_current_domain
|
11
|
-
uri = URI.parse(request.original_url)
|
12
|
-
pre_html = uri.
|
11
|
+
uri = URI.parse(RailsSitemap.domain || request.original_url)
|
12
|
+
pre_html = uri.to_s.include?('https://') ? 'https://' : 'http://'
|
13
13
|
|
14
14
|
@current_domain = pre_html + uri.hostname
|
15
15
|
end
|
data/lib/rails_sitemap/engine.rb
CHANGED
@@ -19,7 +19,8 @@ module RailsSitemap
|
|
19
19
|
:update_frequency_for_models,
|
20
20
|
:locations,
|
21
21
|
:hd_images,
|
22
|
-
:excluded_paths
|
22
|
+
:excluded_paths,
|
23
|
+
:domain
|
23
24
|
|
24
25
|
self.models_for_sitemap = []
|
25
26
|
self.updated_at = DateTime.now.to_s
|
@@ -29,6 +30,7 @@ module RailsSitemap
|
|
29
30
|
self.locations = []
|
30
31
|
self.hd_images = []
|
31
32
|
self.excluded_paths = []
|
33
|
+
self.domain = nil
|
32
34
|
end
|
33
35
|
|
34
36
|
def self.setup(&block)
|