rails_sitemap 0.3.3 → 0.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 19c7a1af95d5c42ad4b2d13fa3933661677fb65f
4
- data.tar.gz: a5573f873602cdbfa1419abd27b5334816ab907c
3
+ metadata.gz: 40990c72f5bb32fbddc227b97e5b62e415b891ce
4
+ data.tar.gz: 8c0f0f08200ea985dda080fa802156220d9c3bc8
5
5
  SHA512:
6
- metadata.gz: becf75991bd08f28c75a9ba8ca97921c2ae92692de6d478047ab8c43d1c0657a162bc834df0050bf48fdf37c1649d309ad956a6c61c2925562ada90df8afa167
7
- data.tar.gz: b21227f4b5743bac681d74156227da2a63143ac9762d6bc3adb1948691db677580e92a55fc35f1dee22f9049d342f9d54251ef24f232ba73eacb4b2386ac1c92
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.html_safe? ? 'https://' : 'http://'
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
@@ -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)
@@ -1,3 +1,3 @@
1
1
  module RailsSitemap
2
- VERSION = '0.3.3'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -21,4 +21,5 @@ RailsSitemap.setup do |config|
21
21
  ]
22
22
 
23
23
  config.excluded_paths = ['/fakes(.:format)']
24
+ config.domain = 'http://www.example.com/'
24
25
  end