ensure_domain 1.0.0 → 1.0.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
  SHA1:
3
- metadata.gz: 7160402686c9fb8edd2e426907c496c473599368
4
- data.tar.gz: 37cd236c0568e0db37ae26a744686c11496a18ef
3
+ metadata.gz: 25b4063243441d8631d94a628aad5120d57c7574
4
+ data.tar.gz: 6135ccd0f1b4b3c6f1190e285b98837789d251da
5
5
  SHA512:
6
- metadata.gz: 8c10f3a78cc47455a1f1cd2dccca920f9d3902d31f3faba73b6010259eabde57158552cbe0e2df02fe1e007c2bd2a06d7c6e517580121de0a92586ca0908cd05
7
- data.tar.gz: 640b3fc81fabb1d61475f4e85234fdb2d69b603684bb7d7d588fc4db7ceaec50b3779e212c85e506afe1bf2f2148f6ded63aa6ef0149a1afd73f4aafa9f2bac6
6
+ metadata.gz: f92f7231dc0025a3bb2f1e5f35fe836b8ac75b87b375b324a5ec20d8cc1b9dad75d0ce6b864da5a041df13ad3faf7ac066ac1f33af30796a05f5646eae3238bf
7
+ data.tar.gz: 13da2170a5dfb032c1bd4bf5d06b5a50ccd854a88033e7126c18cba408d2276b170d6ef3ff183c6759e78cf053b96183756ddebb9ae210448dfab19316e08214
@@ -1,3 +1,3 @@
1
1
  module EnsureDomain
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/ensure_domain.rb CHANGED
@@ -11,7 +11,7 @@ module EnsureDomain
11
11
  puts "WARNING: You must set config.action_mailer.default_url_options = { host: 'www.yourdomain.com' } in order to the 'ensure_domain' gem to work as intended"
12
12
  elsif Rails.env.production? && request.host != default_url_options[:host]
13
13
  querystring = "?#{request.query_string}" unless request.query_string.empty?
14
- redirect_to "#{request.protocol}#{default_host}#{request.path}#{querystring}", status: 301
14
+ redirect_to "#{request.protocol}#{default_url_options[:host]}#{request.path}#{querystring}", status: 301
15
15
  end
16
16
  end
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ensure_domain
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aske Hansen