homeland-site 0.3.0 → 0.3.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: 40c71bf6deffd894bf5261deb02a8ec60b106f3a066afd16d2b8504af0385234
4
- data.tar.gz: a9603686ccf52a4abfc0bcbd542e340f0ae39126c1b126555aaa1ced2ff07549
3
+ metadata.gz: 159bbd88daba311bad975142cd69345e51fa16ed603d9e0cb5d60b9c2da43037
4
+ data.tar.gz: 819ce44a7c94a86332b4bfb507755d2a15cda532176f041a270c6bf314a18e4c
5
5
  SHA512:
6
- metadata.gz: 4e258f8bc22fdfb98fb95b1f1c7abb001275b29dec6b68639f797613569384be4fc50ee241646882656fa882e1d4f5d53ebfaa28261beab10ce35914b0474eb3
7
- data.tar.gz: 4449d9f8e0b0f3b44216bb3c10c0488f4fc316e973a3435c534ba86e10850bc6399530d6dbc4007e2d1bfbf600bf691c37d6d41969f26a03b70f2a57387580c0
6
+ metadata.gz: e2d5bb794b99f1916bc77bf4eee0e5f050f69f943d8ac993ecf17476f3aa974fe815ac100f96be2cc75fc47af1d9a79fff328b878c131f6caf1af309b917582c
7
+ data.tar.gz: a5e01cd7cf5912be1636e58488a81ea62f546ea3476c443141040dee7ba924a2789f78e1c7316f8feb925a54c0774951c9954caf2a7689ed313c999e340426d7
data/app/models/site.rb CHANGED
@@ -18,7 +18,9 @@ class Site < ApplicationRecord
18
18
 
19
19
  def favicon_url
20
20
  return "" if url.blank?
21
- domain = URI.parse(url).host.sub("www.", "")
21
+ domain = URI.parse(url.strip).host.sub("www.", "")
22
22
  "https://favicon.ruby-china.com/ip2/#{domain}.ico"
23
+ rescue
24
+ ""
23
25
  end
24
26
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Homeland
4
4
  module Site
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  NAME = "site"
7
7
  DESCRIPTION = "Site for Homeland."
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: homeland-site
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee