web_stat 0.4.2 → 0.5.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
  SHA256:
3
- metadata.gz: 871e9eb97dc238635bd6a46571e86f6a9548c0ca32b6bf3576017ad71c81394f
4
- data.tar.gz: 7ed7e9750fc2030f486c14f4de9441ba2c2c98a8357565bf708e6d43f7ae620e
3
+ metadata.gz: d3f6f4f9692846a2c50a365125efb42dfd4a0b44fddef1c108621d94fd6dcde4
4
+ data.tar.gz: 2f6d400bce014144c940edcafbad9dc4e8c164fce356c70bfd7dbd1ad0c2f862
5
5
  SHA512:
6
- metadata.gz: 963dca0c991935d084ba40d2ff35de87c55d1584f9d39f3c54c7df0d89aa701ddef21014c1ea6b4a0a83d118b9abd6daf98cd084663992d0a3ae09c9b92e4267
7
- data.tar.gz: df4c99e70693d004d312219dd2550cd7a3b39e4eb64ac101cd0654a886ee0d6a4d667a82dbdb15574f825aa4cc71fb3d34d9e10f080a977fe026c6f7b7d6006e
6
+ metadata.gz: 6518aaed72267de7612257c43067a762b933d2e1a64d04defb07d7471eacd8bd1a4ca1cadc96dad5b279cc09a4bbc5a3453abfe10715bde5dc614d08d1953098
7
+ data.tar.gz: 3cd03188f34030da0c9ead6633bd1c67550524c22368b5c52dd69132e54be69edff6a28d7a91b6ff76ad02a6f3bb2becebb2df1e03db72fd7f3f16262d8137e2
data/Gemfile.lock CHANGED
@@ -1,10 +1,11 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- web_stat (0.4.2)
4
+ web_stat (0.5.0)
5
5
  bundler (>= 2.0.2)
6
6
  cld (>= 0.8.0)
7
- mechanize (>= 2.7)
7
+ google-api-client (>= 0.53.0)
8
+ mechanize (>= 2.7.7)
8
9
  natto (>= 1.1.2)
9
10
  nokogiri (>= 1.10.4)
10
11
  pdf-reader (= 2.4.0)
@@ -18,6 +19,12 @@ GEM
18
19
  remote: https://rubygems.org/
19
20
  specs:
20
21
  Ascii85 (1.0.3)
22
+ activesupport (6.1.3.2)
23
+ concurrent-ruby (~> 1.0, >= 1.0.2)
24
+ i18n (>= 1.6, < 2)
25
+ minitest (>= 5.1)
26
+ tzinfo (~> 2.0)
27
+ zeitwerk (~> 2.3)
21
28
  addressable (2.7.0)
22
29
  public_suffix (>= 2.0.2, < 5.0)
23
30
  afm (0.2.2)
@@ -26,40 +33,99 @@ GEM
26
33
  cld (0.8.0)
27
34
  ffi
28
35
  coderay (1.1.3)
29
- crack (0.4.3)
30
- safe_yaml (~> 1.0.0)
36
+ concurrent-ruby (1.1.9)
37
+ connection_pool (2.2.5)
38
+ crack (0.4.5)
39
+ rexml
31
40
  crass (1.0.6)
32
- diff-lcs (1.3)
41
+ declarative (0.0.20)
42
+ diff-lcs (1.4.4)
33
43
  domain_name (0.5.20190701)
34
44
  unf (>= 0.0.5, < 1.0.0)
35
- ffi (1.14.2)
45
+ faraday (1.4.2)
46
+ faraday-em_http (~> 1.0)
47
+ faraday-em_synchrony (~> 1.0)
48
+ faraday-excon (~> 1.1)
49
+ faraday-net_http (~> 1.0)
50
+ faraday-net_http_persistent (~> 1.1)
51
+ multipart-post (>= 1.2, < 3)
52
+ ruby2_keywords (>= 0.0.4)
53
+ faraday-em_http (1.0.0)
54
+ faraday-em_synchrony (1.0.0)
55
+ faraday-excon (1.1.0)
56
+ faraday-net_http (1.0.1)
57
+ faraday-net_http_persistent (1.1.0)
58
+ ffi (1.15.3)
59
+ gems (1.2.0)
60
+ google-api-client (0.53.0)
61
+ google-apis-core (~> 0.1)
62
+ google-apis-generator (~> 0.1)
63
+ google-apis-core (0.3.0)
64
+ addressable (~> 2.5, >= 2.5.1)
65
+ googleauth (~> 0.14)
66
+ httpclient (>= 2.8.1, < 3.0)
67
+ mini_mime (~> 1.0)
68
+ representable (~> 3.0)
69
+ retriable (>= 2.0, < 4.0)
70
+ rexml
71
+ signet (~> 0.14)
72
+ webrick
73
+ google-apis-discovery_v1 (0.4.0)
74
+ google-apis-core (~> 0.1)
75
+ google-apis-generator (0.3.0)
76
+ activesupport (>= 5.0)
77
+ gems (~> 1.2)
78
+ google-apis-core (~> 0.1)
79
+ google-apis-discovery_v1 (~> 0.0)
80
+ thor (>= 0.20, < 2.a)
81
+ googleauth (0.16.2)
82
+ faraday (>= 0.17.3, < 2.0)
83
+ jwt (>= 1.4, < 3.0)
84
+ memoist (~> 0.16)
85
+ multi_json (~> 1.11)
86
+ os (>= 0.9, < 2.0)
87
+ signet (~> 0.14)
36
88
  guess_html_encoding (0.0.11)
37
89
  hashdiff (1.0.1)
38
90
  hashery (2.1.2)
39
- http-cookie (1.0.3)
91
+ http-cookie (1.0.4)
40
92
  domain_name (~> 0.5)
41
- mechanize (2.7.6)
42
- domain_name (~> 0.5, >= 0.5.1)
43
- http-cookie (~> 1.0)
44
- mime-types (>= 1.17.2)
45
- net-http-digest_auth (~> 1.1, >= 1.1.1)
46
- net-http-persistent (>= 2.5.2)
47
- nokogiri (~> 1.6)
48
- ntlm-http (~> 0.1, >= 0.1.1)
49
- webrobots (>= 0.0.9, < 0.2)
93
+ httpclient (2.8.3)
94
+ i18n (1.8.10)
95
+ concurrent-ruby (~> 1.0)
96
+ jwt (2.2.3)
97
+ mechanize (2.8.1)
98
+ addressable (~> 2.7)
99
+ domain_name (~> 0.5, >= 0.5.20190701)
100
+ http-cookie (~> 1.0, >= 1.0.3)
101
+ mime-types (~> 3.0)
102
+ net-http-digest_auth (~> 1.4, >= 1.4.1)
103
+ net-http-persistent (>= 2.5.2, < 5.0.dev)
104
+ nokogiri (~> 1.11, >= 1.11.2)
105
+ rubyntlm (~> 0.6, >= 0.6.3)
106
+ webrick (~> 1.7)
107
+ webrobots (~> 0.1.2)
108
+ memoist (0.16.2)
50
109
  method_source (1.0.0)
51
110
  mime-types (3.3.1)
52
111
  mime-types-data (~> 3.2015)
53
- mime-types-data (3.2020.1104)
112
+ mime-types-data (3.2021.0225)
113
+ mini_mime (1.1.0)
114
+ mini_portile2 (2.5.3)
115
+ minitest (5.14.4)
116
+ multi_json (1.15.0)
117
+ multipart-post (2.1.1)
54
118
  natto (1.2.0)
55
119
  ffi (>= 1.9.0)
56
120
  net-http-digest_auth (1.4.1)
57
- net-http-persistent (2.9.4)
58
- nokogiri (1.11.1-x86_64-linux)
121
+ net-http-persistent (4.0.1)
122
+ connection_pool (~> 2.2)
123
+ nokogiri (1.11.7)
124
+ mini_portile2 (~> 2.5.0)
59
125
  racc (~> 1.4)
60
- nokogumbo (2.0.4)
126
+ nokogumbo (2.0.5)
61
127
  nokogiri (~> 1.8, >= 1.8.4)
62
- ntlm-http (0.1.1)
128
+ os (1.1.1)
63
129
  pdf-reader (2.4.0)
64
130
  Ascii85 (~> 1.0.0)
65
131
  afm (~> 0.2.1)
@@ -72,46 +138,63 @@ GEM
72
138
  pry-byebug (3.9.0)
73
139
  byebug (~> 11.0)
74
140
  pry (~> 0.13.0)
75
- public_suffix (4.0.5)
141
+ public_suffix (4.0.6)
76
142
  racc (1.5.2)
77
- rake (13.0.1)
143
+ rake (13.0.3)
144
+ representable (3.1.1)
145
+ declarative (< 0.1.0)
146
+ trailblazer-option (>= 0.1.1, < 0.2.0)
147
+ uber (< 0.2.0)
148
+ retriable (3.1.2)
78
149
  rexml (3.2.4)
79
- rspec (3.9.0)
80
- rspec-core (~> 3.9.0)
81
- rspec-expectations (~> 3.9.0)
82
- rspec-mocks (~> 3.9.0)
83
- rspec-core (3.9.2)
84
- rspec-support (~> 3.9.3)
85
- rspec-expectations (3.9.2)
150
+ rspec (3.10.0)
151
+ rspec-core (~> 3.10.0)
152
+ rspec-expectations (~> 3.10.0)
153
+ rspec-mocks (~> 3.10.0)
154
+ rspec-core (3.10.1)
155
+ rspec-support (~> 3.10.0)
156
+ rspec-expectations (3.10.1)
86
157
  diff-lcs (>= 1.2.0, < 2.0)
87
- rspec-support (~> 3.9.0)
88
- rspec-mocks (3.9.1)
158
+ rspec-support (~> 3.10.0)
159
+ rspec-mocks (3.10.2)
89
160
  diff-lcs (>= 1.2.0, < 2.0)
90
- rspec-support (~> 3.9.0)
91
- rspec-support (3.9.3)
161
+ rspec-support (~> 3.10.0)
162
+ rspec-support (3.10.2)
92
163
  ruby-rc4 (0.1.5)
93
164
  ruby-readability (0.7.0)
94
165
  guess_html_encoding (>= 0.0.4)
95
166
  nokogiri (>= 1.6.0)
167
+ ruby2_keywords (0.0.4)
168
+ rubyntlm (0.6.3)
96
169
  rubyzip (2.3.0)
97
- safe_yaml (1.0.5)
98
- sanitize (5.2.2)
170
+ sanitize (5.2.3)
99
171
  crass (~> 1.0.2)
100
172
  nokogiri (>= 1.8.0)
101
173
  nokogumbo (~> 2.0)
102
174
  selenium-webdriver (3.142.7)
103
175
  childprocess (>= 0.5, < 4.0)
104
176
  rubyzip (>= 1.2.2)
177
+ signet (0.15.0)
178
+ addressable (~> 2.3)
179
+ faraday (>= 0.17.3, < 2.0)
180
+ jwt (>= 1.5, < 3.0)
181
+ multi_json (~> 1.10)
182
+ thor (1.1.0)
183
+ trailblazer-option (0.1.1)
105
184
  ttfunk (1.7.0)
185
+ tzinfo (2.0.4)
186
+ concurrent-ruby (~> 1.0)
187
+ uber (0.1.0)
106
188
  unf (0.1.4)
107
189
  unf_ext
108
190
  unf_ext (0.0.7.7)
109
- webmock (3.8.3)
191
+ webmock (3.11.2)
110
192
  addressable (>= 2.3.6)
111
193
  crack (>= 0.3.2)
112
194
  hashdiff (>= 0.4.0, < 2.0.0)
113
195
  webrick (1.7.0)
114
196
  webrobots (0.1.2)
197
+ zeitwerk (2.4.2)
115
198
 
116
199
  PLATFORMS
117
200
  ruby
File without changes
data/lib/web_stat.rb CHANGED
@@ -11,6 +11,7 @@ require 'net/http'
11
11
  require 'pdf/reader'
12
12
  require 'ruby-readability'
13
13
  require 'selenium-webdriver'
14
+ require 'google/apis/youtube_v3'
14
15
 
15
16
  require "helpers/web_drive_helper"
16
17
  require "web_stat/final_redirect_url"
@@ -18,6 +19,7 @@ require "web_stat/categorize"
18
19
  require "web_stat/configure"
19
20
  require "web_stat/errors"
20
21
  require "web_stat/fetch"
22
+
21
23
  require "web_stat/tag"
22
24
  require "web_stat/version"
23
25
  require "web_stat/fetch/fetch_as_html"
@@ -14,10 +14,12 @@ development: &development
14
14
  - '//img/@src'
15
15
  userdic: ""
16
16
  use_chromedirver: false
17
+ id_extraction_regexs:
18
+ youtube: '^https://www.youtube.com/watch\?v=([^&]+)'
17
19
  thumbnail_regex:
18
- youtube:
19
- - '%r{^https://www.youtube.com/watch\?v=([^&]+)}'
20
- - 'http://img.youtube.com/vi/\1/default.jpg'
20
+ youtube: 'http://img.youtube.com/vi/\1/default.jpg'
21
+ api_keys:
22
+ youtube: "dummy-key"
21
23
  test:
22
24
  <<: *development
23
25
  production:
@@ -1,6 +1,6 @@
1
1
  module WebStat
2
2
  class Fetch
3
- attr_accessor :url, :html, :nokogiri, :userdic, :status
3
+ attr_accessor :url, :html, :nokogiri, :userdic, :status, :header
4
4
  # Get title
5
5
  # @return [String] title
6
6
  def title
@@ -34,7 +34,23 @@ module WebStat
34
34
  end
35
35
  # Get main section
36
36
  def content
37
- Sanitize.clean(Readability::Document.new(@nokogiri.at('body').to_s).content)
37
+ if @url.match(WebStat::Configure.get["id_extraction_regexs"]["youtube"])
38
+ youtube_decscription
39
+ else
40
+ Sanitize.clean(Readability::Document.new(@nokogiri.at('body').to_s).content)
41
+ end
42
+ end
43
+
44
+ # Get describe of youtube movie.
45
+ def youtube_decscription
46
+ regex_string = WebStat::Configure.get["id_extraction_regexs"]["youtube"]
47
+ if @url.match(regex_string)
48
+ id = @url.gsub(%r{#{regex_string}}, '\1')
49
+ youtube = Google::Apis::YoutubeV3::YouTubeService.new
50
+ youtube.key = WebStat::Configure.get["api_keys"]["youtube"]
51
+ response = youtube.list_videos(:snippet, id: id)
52
+ response.items.first.snippet.description
53
+ end
38
54
  end
39
55
 
40
56
  # Get temporary path of image
@@ -48,9 +64,9 @@ module WebStat
48
64
  end
49
65
  end
50
66
  # If there is a thumbnail rule, apply it.
51
- WebStat::Configure.get["thumbnail_regex"].each do |provider, v|
52
- if @url.match(v[0])
53
- return @url.gsub(v[0], v[1])
67
+ WebStat::Configure.get["id_extraction_regexs"].each do |provider, regex_string|
68
+ if @url.match(regex_string)
69
+ return @url.gsub(%r{#{regex_string}}, WebStat::Configure.get["thumbnail_regex"][provider])
54
70
  end
55
71
  end
56
72
  readability_content = ::Nokogiri::HTML(Readability::Document.new(@nokogiri.at('body').to_s).content)
@@ -82,6 +98,8 @@ module WebStat
82
98
  end
83
99
  end
84
100
  tmp_file
101
+ rescue
102
+ false
85
103
  end
86
104
 
87
105
  # Get url
@@ -95,20 +113,13 @@ module WebStat
95
113
  if mech.agent.robots_disallowed?(url)
96
114
  raise Mechanize::RobotsDisallowedError.new(url)
97
115
  end
98
- if WebStat::Configure.get["use_chromedirver"]
99
- begin
100
- body = WebStat::WebDriverHelper.get_source(url)
101
- rescue Selenium::WebDriver::Error::UnknownError => e
102
- document = mech.agent.get(url, [], nil, { 'Accept-Language' => 'ja'})
103
- if document.class == Mechanize::File
104
- body = document.body
105
- else
106
- body = document.body.encode('UTF-8', document.encoding)
107
- end
108
- end
116
+ document = mech.get(url, [], nil, { 'Accept-Language' => 'ja'})
117
+ @header = document.header
118
+ begin
119
+ raise 'not_use_chromedirver' unless WebStat::Configure.get["use_chromedirver"]
120
+ body = WebStat::WebDriverHelper.get_source(url)
109
121
  @status = 200
110
- else
111
- document = mech.get(url, [], nil, { 'Accept-Language' => 'ja'})
122
+ rescue
112
123
  if document.class == Mechanize::File
113
124
  body = document.body
114
125
  else
@@ -122,6 +133,24 @@ module WebStat
122
133
  end
123
134
  body
124
135
  end
136
+
137
+ # Return Date or last modified header.
138
+ # @param [String] url
139
+ # @return DataTime
140
+ def get_last_modified
141
+ @header = @header || {}
142
+ if @header.has_key?("date") && @header.has_key?("last-modified")
143
+ if DateTime.parse(@header["date"]) >= DateTime.parse(@header["last-modified"])
144
+ DateTime.parse(@header["date"])
145
+ else
146
+ DateTime.parse(@header["last-modified"])
147
+ end
148
+ elsif @header.has_key?("date")
149
+ DateTime.parse(@header["date"])
150
+ elsif @header.has_key?("last-modified")
151
+ DateTime.parse(@header["last-modified"])
152
+ end
153
+ end
125
154
 
126
155
  # Get the informations of @url
127
156
  # @param [Hash] Specify a dictionary for each language code. example ) {"ja": /***/**.dic, "other": /***/***.dic}
@@ -142,6 +171,7 @@ module WebStat
142
171
  language_code: language_code,
143
172
  status: @status,
144
173
  url: @url,
174
+ last_modified_at: get_last_modified,
145
175
  eyecatch_image_path: save_local_path(eyecatch_image_path),
146
176
  tags: tag.nouns
147
177
  }
@@ -5,7 +5,7 @@ module WebStat
5
5
  # initialize class
6
6
  # @param [String] url
7
7
  def initialize(url)
8
- unless url_valid?(url)
8
+ unless FetchAsWeb.url_valid?(url)
9
9
  raise WebStat::INVALID_URL, url
10
10
  end
11
11
  @url = original_url(url)
@@ -36,11 +36,12 @@ module WebStat
36
36
  end
37
37
  @nokogiri = ::Nokogiri::HTML(@html)
38
38
  end
39
-
40
- # Validation url
41
- def url_valid?(url)
42
- regexp = Regexp.new("^https?://([a-zA-Z0-9][a-zA-Z0-9\\\-\.]{1,61}[a-zA-Z0-9])\\\.([a-zA-Z]{2,})(.*)?$", Regexp::IGNORECASE)
43
- regexp.match?(url)
44
- end
39
+ class << self
40
+ # Validation url
41
+ def url_valid?(url)
42
+ regexp = Regexp.new("^https?://([a-z0-9][a-z0-9\\\-\.]{0,61})\\\.([a-z]{2,})(.*)?$", Regexp::IGNORECASE)
43
+ regexp.match?(url)
44
+ end
45
+ end
45
46
  end
46
47
  end
@@ -1,3 +1,3 @@
1
1
  module WebStat
2
- VERSION = "0.4.2"
2
+ VERSION = "0.5.0"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -102,4 +102,10 @@ WebMock.stub_request(:get, "https://cdn.newsdict.jp/assets/newsdict-5d8601394c3f
102
102
  .to_return(
103
103
  status: 200,
104
104
  body: File.new(File.join(File.dirname(__FILE__), "fixtures", "images", "newsdict-5d8601394c3f4eea2d7161ab92ab327ac7099e22214c853327011b3a71859b8e.png")),
105
- headers: {content_type: 'application/html; charset=utf-8'})
105
+ headers: {content_type: 'application/html; charset=utf-8'})
106
+
107
+ WebMock.stub_request(:get, "https://newsdict.blog/last_modified_at")
108
+ .to_return(
109
+ status: 200,
110
+ body: "ok",
111
+ headers: {content_type: 'application/html; charset=utf-8', date: "Tue, 05 Apr 2016 07:43:08 GMT", "Last-Modified": "Tue, 05 Apr 2020 07:43:08 JST"})
@@ -14,14 +14,15 @@ RSpec.describe WebStat::Configure do
14
14
  it "Get thumbnail_regex.youtube." do
15
15
  config = WebStat::Configure.get
16
16
  expect(config["thumbnail_regex"]["yotube"].nil?).to eq true
17
- expect(config["thumbnail_regex"]["youtube"].count).to eq 2
17
+ expect(config["id_extraction_regexs"]["youtube"]).to be_a String
18
+ expect(config["thumbnail_regex"]["youtube"]).to be_a String
18
19
  end
19
20
 
20
21
  it "Match youtube url." do
21
22
  sample_url = "https://www.youtube.com/watch?v=aChpsuUffUM"
22
- WebStat::Configure.get["thumbnail_regex"].each do |provider, v|
23
- if sample_url.match(v[0])
24
- expect(sample_url.gsub(v[0], v[1])).to eq 'http://img.youtube.com/vi/aChpsuUffUM/default.jpg'
23
+ WebStat::Configure.get["id_extraction_regexs"].each do |provider, regex_string|
24
+ if sample_url.match(regex_string)
25
+ expect(sample_url.gsub(%r{#{regex_string}}, WebStat::Configure.get["thumbnail_regex"][provider])).to eq 'http://img.youtube.com/vi/aChpsuUffUM/default.jpg'
25
26
  end
26
27
  end
27
28
  end
@@ -197,11 +197,16 @@ RSpec.describe WebStat::Fetch do
197
197
  end
198
198
 
199
199
  it "valid url" do
200
- web_stat_fetch_web_class = WebStat::FetchAsWeb.new("https://newsdict.blog/content/images/size/w100/2019/03/facebook-3.jpg")
201
- expect(web_stat_fetch_web_class.url_valid?("http://status.aws.amazon.com/#cloudfront_12345")).to be true
202
- expect(web_stat_fetch_web_class.url_valid?("https://findy-code.io?h=NWsZey5UgJ51u&t=omikuji-22")).to be true
203
- expect(web_stat_fetch_web_class.url_valid?("https://www.meetup.com/pro/docker")).to be true
204
- expect(web_stat_fetch_web_class.url_valid?("https://gxyt4.app.goo.gl/Mn64U")).to be true
205
- expect(web_stat_fetch_web_class.url_valid?("https://status.cloud.google.com/incident/cloud-functions/19010")).to be true
200
+ expect(WebStat::FetchAsWeb.url_valid?("http://status.aws.amazon.com/#cloudfront_12345")).to be true
201
+ expect(WebStat::FetchAsWeb.url_valid?("https://findy-code.io?h=NWsZey5UgJ51u&t=omikuji-22")).to be true
202
+ expect(WebStat::FetchAsWeb.url_valid?("https://www.meetup.com/pro/docker")).to be true
203
+ expect(WebStat::FetchAsWeb.url_valid?("https://gxyt4.app.goo.gl/Mn64U")).to be true
204
+ expect(WebStat::FetchAsWeb.url_valid?("https://status.cloud.google.com/incident/cloud-functions/19010")).to be true
205
+ expect(WebStat::FetchAsWeb.url_valid?("http://g.co/arts/SK1jZHJpT8N1BGaM7")).to be true
206
+ end
207
+
208
+ it "get_last_modified" do
209
+ web_stat = WebStat::FetchAsWeb.new("https://newsdict.blog/last_modified_at")
210
+ web_stat.stat[:last_modified_at] === DateTime.parse("Tue, 05 Apr 2020 07:43:08 JST")
206
211
  end
207
212
  end
data/web_stat.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_runtime_dependency "bundler", ">= 2.0.2"
24
24
  spec.add_runtime_dependency "nokogiri", ">= 1.10.4"
25
- spec.add_runtime_dependency "mechanize", ">= 2.7"
25
+ spec.add_runtime_dependency "mechanize", ">= 2.7.7"
26
26
  spec.add_runtime_dependency "ruby-readability", ">= 0.7"
27
27
  spec.add_runtime_dependency "natto", ">= 1.1.2"
28
28
  spec.add_runtime_dependency "sanitize", ">= 5.0.0"
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_runtime_dependency "pdf-reader", "2.4.0"
32
32
  spec.add_runtime_dependency "webrick", ">= 1.7.0"
33
33
  spec.add_runtime_dependency "rexml", ">= 3.2.4"
34
+ spec.add_runtime_dependency "google-api-client", ">= 0.53.0"
34
35
 
35
36
  spec.add_development_dependency "rake", ">= 10.0"
36
37
  spec.add_development_dependency "rspec", ">= 3.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yusuke abe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-31 00:00:00.000000000 Z
11
+ date: 2021-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.7'
47
+ version: 2.7.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.7'
54
+ version: 2.7.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: ruby-readability
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: 3.2.4
167
+ - !ruby/object:Gem::Dependency
168
+ name: google-api-client
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: 0.53.0
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: 0.53.0
167
181
  - !ruby/object:Gem::Dependency
168
182
  name: rake
169
183
  requirement: !ruby/object:Gem::Requirement
@@ -238,7 +252,7 @@ description: Fetch the web pages and stat.
238
252
  email:
239
253
  - yube@newsdict.jp
240
254
  executables:
241
- - fetch_as_html
255
+ - fetch_as_url
242
256
  extensions: []
243
257
  extra_rdoc_files: []
244
258
  files:
@@ -253,7 +267,7 @@ files:
253
267
  - LICENSE.txt
254
268
  - README.md
255
269
  - Rakefile
256
- - bin/fetch_as_html
270
+ - bin/fetch_as_url
257
271
  - docker-compose.yml
258
272
  - docker/exec
259
273
  - docker/start