web_stat 0.2.7 → 0.2.8

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: 32af8e84a325614bf546a76fdf603e592abbf4201a559857bc0964fe49226cc1
4
- data.tar.gz: 8b63075dbd78d2e4b7368cb6a0a4aa2f8ae655cf7f85b526bd413a5fa210fbc0
3
+ metadata.gz: 9e61766ccec49b9f0922d5c0a9079223dcf101a2616f5848a362687a1f4f8c6f
4
+ data.tar.gz: 01abea92ddd971a7df4c14af19b9de6b34c84cf955f54413a3d67305897413a5
5
5
  SHA512:
6
- metadata.gz: 45a0fe16c58679cbea01c56710324a461da3bd5c48caa1ca44cf981b2f5443b6ed06ce1db84577edac968e7651cd47ec998ef331dbf47c7306b243a1190fa76d
7
- data.tar.gz: c391ce77bf97673c708821fa9067ba64e5b89fbf67d3490376341931f3b9ee6ecebf4a51e0abe69dcc827f7f35d7d6986af353ea2ab4f1d0945f4de2a7d34b2f
6
+ metadata.gz: d290e8f22cb52191c8bdd9526c4dd41d070a10d24b7322950da622b3d2dbc96a193bea9a4814931139dc4b621ffde7eb391df58516da1000c484fd7db2d116e5
7
+ data.tar.gz: bcfe0a28afddfdaaf9c2143aedf160495a80a79b4a53f9adecbca510abb26a710637c5995513d123ffb32e816c22991b4433da959524a4bbba01d358fdbbbc4e
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "final_redirect_url", :git => "git@github.com:yubele/final_redirect_url.git"
3
+ gem "final_redirect_url", :git => "git@github.com:yubele/final_redirect_url"
4
4
 
5
5
  # Specify your gem's dependencies in web_stat.gemspec
6
6
  gemspec
data/Gemfile.lock CHANGED
@@ -1,13 +1,13 @@
1
1
  GIT
2
- remote: git@github.com:yubele/final_redirect_url.git
3
- revision: a8e8fb256f044606313d9726278516a0f24449d4
2
+ remote: git@github.com:yubele/final_redirect_url
3
+ revision: 45df878ec9495ebbfa06dc0a60cc5043c2519e16
4
4
  specs:
5
- final_redirect_url (0.1.0)
5
+ final_redirect_url (0.1.1)
6
6
 
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- web_stat (0.2.7)
10
+ web_stat (0.2.8)
11
11
  bundler (>= 2.0.2)
12
12
  cld (>= 0.8.0)
13
13
  mechanize (>= 2.7)
data/README.md CHANGED
@@ -1,3 +1,10 @@
1
+ # !!!!! Precautions when using with Rails !!!!!
2
+
3
+ Write this line your Gemfile.
4
+ ```
5
+ gem "final_redirect_url", :git => "git@github.com:yubele/final_redirect_url"
6
+ ```
7
+
1
8
  # WebStat
2
9
 
3
10
  Fetch the web pages and stat.
@@ -41,7 +41,7 @@ module WebStat
41
41
  break
42
42
  end
43
43
  end
44
- if path.match(/^\//)
44
+ if ! path.nil? && path.match(/^\//)
45
45
  "#{URI.parse(@url).scheme}://#{URI.parse(@url).host}#{path}"
46
46
  else
47
47
  path
@@ -82,7 +82,7 @@ module WebStat
82
82
  # Get the informations of @url
83
83
  # @param [Hash] Specify a dictionary for each language code. example ) {"ja": /***/**.dic, "other": /***/***.dic}
84
84
  def stat(userdics: nil)
85
- clean_content = content.scrub('').gsub(/[\s ]/, "")
85
+ clean_content = content.scrub('').gsub(/[\n\t\r ]/, "").gsub(/\s{2,}/, "\s")
86
86
  language_code = CLD.detect_language(clean_content)[:code]
87
87
  if userdics && userdics.has_key?(language_code)
88
88
  tag = WebStat::Tag.new("#{title} #{content}", userdic: userdics[language_code])
@@ -1,3 +1,3 @@
1
1
  module WebStat
2
- VERSION = "0.2.7"
2
+ VERSION = "0.2.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - yusuke abe