news2kindle 0.2.4 → 0.2.6

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: 9bfbdc348bfe44403738ec492e840872846dc3294669726988174f9cd0aa97b2
4
- data.tar.gz: 75391c50d86feb646ff6e255a6f9d2d48b1c2fcba3a033385e94e6dd550c15af
3
+ metadata.gz: '00639cc8f196c01a7dd9595b204000f4af6ec26c30b7ed268223960373cc52ea'
4
+ data.tar.gz: 93992dce4e4b6ca3a87e28c36323018598c19c4433a82ed9ba79c492c65bc562
5
5
  SHA512:
6
- metadata.gz: 66feaf3ef85d7b0ca7a32c6b977c396bea56edc7ef0700a5bf554f6e175ee2282f920c70b8e16d55d320bb9573fcf29f2fc491c523a67072b6e98a855e2a382f
7
- data.tar.gz: d9f8c913bfc14b38c0c45165f2384b449fa7d2b72f4417d7b39b73ebb105097928e2e8f675a4daa8cc091477adbcbacd699e41f3f0dab8d95a89122d32f7db8b
6
+ metadata.gz: a312cbe553b155982a92cd423eea344182e3229ad2bfe51a7131e05979936a336a7f25bfa4bd4c398c2fec34942c1a52eb626cc59c3b6052792ef86c17cbcb7c
7
+ data.tar.gz: fd0bf057310b395dd90590fff11a44b16c1157675312088834aaf89e805754de12372802770457a91d49ce609ef777af1354775173b9e3d344c4bcb9879cf3dc
data/.travis.yml CHANGED
@@ -5,8 +5,9 @@ before_install:
5
5
  - gem update bundler
6
6
 
7
7
  rvm:
8
- - 2.5.7
9
- - 2.6.5
8
+ - 2.6.7
9
+ - 2.7.3
10
+ - 3.0.1
10
11
 
11
12
  script: bundle exec rake
12
13
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- news2kindle (0.2.3)
4
+ news2kindle (0.2.6)
5
5
  dropbox_api
6
6
  kindlegen
7
7
  mail
@@ -14,101 +14,109 @@ PATH
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
- activemodel (6.0.2.1)
18
- activesupport (= 6.0.2.1)
19
- activesupport (6.0.2.1)
17
+ activemodel (6.1.3.1)
18
+ activesupport (= 6.1.3.1)
19
+ activesupport (6.1.3.1)
20
20
  concurrent-ruby (~> 1.0, >= 1.0.2)
21
- i18n (>= 0.7, < 2)
22
- minitest (~> 5.1)
23
- tzinfo (~> 1.1)
24
- zeitwerk (~> 2.2)
25
- bson (4.7.0)
26
- coderay (1.1.2)
27
- concurrent-ruby (1.1.5)
28
- connection_pool (2.2.2)
29
- diff-lcs (1.3)
21
+ i18n (>= 1.6, < 2)
22
+ minitest (>= 5.1)
23
+ tzinfo (~> 2.0)
24
+ zeitwerk (~> 2.3)
25
+ addressable (2.7.0)
26
+ public_suffix (>= 2.0.2, < 5.0)
27
+ bson (4.12.0)
28
+ concurrent-ruby (1.1.8)
29
+ connection_pool (2.2.5)
30
+ diff-lcs (1.4.4)
30
31
  domain_name (0.5.20190701)
31
32
  unf (>= 0.0.5, < 1.0.0)
32
- dropbox_api (0.1.18)
33
- faraday (<= 1.0)
33
+ dropbox_api (0.1.19)
34
+ faraday (~> 1.0)
34
35
  oauth2 (~> 1.1)
35
- faraday (0.17.1)
36
+ faraday (1.4.1)
37
+ faraday-excon (~> 1.1)
38
+ faraday-net_http (~> 1.0)
39
+ faraday-net_http_persistent (~> 1.1)
36
40
  multipart-post (>= 1.2, < 3)
41
+ ruby2_keywords (>= 0.0.4)
42
+ faraday-excon (1.1.0)
43
+ faraday-net_http (1.0.1)
44
+ faraday-net_http_persistent (1.1.0)
37
45
  http-cookie (1.0.3)
38
46
  domain_name (~> 0.5)
39
- i18n (1.7.0)
47
+ i18n (1.8.10)
40
48
  concurrent-ruby (~> 1.0)
41
- jwt (2.2.1)
42
- kindlegen (3.0.5)
49
+ jwt (2.2.3)
50
+ kindlegen (3.1.1)
43
51
  rake
44
52
  rubyzip
45
53
  mail (2.7.1)
46
54
  mini_mime (>= 0.1.1)
47
- mechanize (2.7.6)
48
- domain_name (~> 0.5, >= 0.5.1)
49
- http-cookie (~> 1.0)
50
- mime-types (>= 1.17.2)
51
- net-http-digest_auth (~> 1.1, >= 1.1.1)
52
- net-http-persistent (>= 2.5.2)
53
- nokogiri (~> 1.6)
54
- ntlm-http (~> 0.1, >= 0.1.1)
55
- webrobots (>= 0.0.9, < 0.2)
56
- method_source (0.9.2)
57
- mime-types (3.3)
55
+ mechanize (2.8.0)
56
+ addressable (~> 2.7)
57
+ domain_name (~> 0.5, >= 0.5.20190701)
58
+ http-cookie (~> 1.0, >= 1.0.3)
59
+ mime-types (~> 3.0)
60
+ net-http-digest_auth (~> 1.4, >= 1.4.1)
61
+ net-http-persistent (>= 2.5.2, < 5.0.dev)
62
+ nokogiri (~> 1.11, >= 1.11.2)
63
+ rubyntlm (~> 0.6, >= 0.6.3)
64
+ webrick (~> 1.7)
65
+ webrobots (~> 0.1.2)
66
+ mime-types (3.3.1)
58
67
  mime-types-data (~> 3.2015)
59
- mime-types-data (3.2019.1009)
60
- mini_mime (1.0.2)
61
- mini_portile2 (2.4.0)
62
- minitest (5.13.0)
63
- mongo (2.11.2)
64
- bson (>= 4.6.0, < 5.0.0)
65
- mongoid (7.0.5)
66
- activemodel (>= 5.1, < 6.1)
67
- mongo (>= 2.5.1, < 3.0.0)
68
- multi_json (1.14.1)
68
+ mime-types-data (3.2021.0225)
69
+ mini_mime (1.1.0)
70
+ minitest (5.14.4)
71
+ mongo (2.14.0)
72
+ bson (>= 4.8.2, < 5.0.0)
73
+ mongoid (7.2.2)
74
+ activemodel (>= 5.1, < 6.2)
75
+ mongo (>= 2.10.5, < 3.0.0)
76
+ multi_json (1.15.0)
69
77
  multi_xml (0.6.0)
70
78
  multipart-post (2.1.1)
71
79
  net-http-digest_auth (1.4.1)
72
- net-http-persistent (3.1.0)
80
+ net-http-persistent (4.0.1)
73
81
  connection_pool (~> 2.2)
74
- nokogiri (1.10.7)
75
- mini_portile2 (~> 2.4.0)
76
- ntlm-http (0.1.1)
77
- oauth2 (1.4.2)
82
+ nokogiri (1.11.3-x86_64-linux)
83
+ racc (~> 1.4)
84
+ oauth2 (1.4.7)
78
85
  faraday (>= 0.8, < 2.0)
79
86
  jwt (>= 1.0, < 3.0)
80
87
  multi_json (~> 1.3)
81
88
  multi_xml (~> 0.5)
82
89
  rack (>= 1.2, < 3)
83
90
  pit (0.0.7)
84
- pry (0.12.2)
85
- coderay (~> 1.1.0)
86
- method_source (~> 0.9.0)
87
- rack (2.0.8)
88
- rake (13.0.1)
89
- rspec (3.9.0)
90
- rspec-core (~> 3.9.0)
91
- rspec-expectations (~> 3.9.0)
92
- rspec-mocks (~> 3.9.0)
93
- rspec-core (3.9.0)
94
- rspec-support (~> 3.9.0)
95
- rspec-expectations (3.9.0)
91
+ public_suffix (4.0.6)
92
+ racc (1.5.2)
93
+ rack (2.2.3)
94
+ rake (13.0.3)
95
+ rspec (3.10.0)
96
+ rspec-core (~> 3.10.0)
97
+ rspec-expectations (~> 3.10.0)
98
+ rspec-mocks (~> 3.10.0)
99
+ rspec-core (3.10.1)
100
+ rspec-support (~> 3.10.0)
101
+ rspec-expectations (3.10.1)
96
102
  diff-lcs (>= 1.2.0, < 2.0)
97
- rspec-support (~> 3.9.0)
98
- rspec-mocks (3.9.0)
103
+ rspec-support (~> 3.10.0)
104
+ rspec-mocks (3.10.2)
99
105
  diff-lcs (>= 1.2.0, < 2.0)
100
- rspec-support (~> 3.9.0)
101
- rspec-support (3.9.0)
102
- rubyzip (2.0.0)
106
+ rspec-support (~> 3.10.0)
107
+ rspec-support (3.10.2)
108
+ ruby2_keywords (0.0.4)
109
+ rubyntlm (0.6.3)
110
+ rubyzip (2.3.0)
103
111
  systemu (2.6.5)
104
- thread_safe (0.3.6)
105
- tzinfo (1.2.6)
106
- thread_safe (~> 0.1)
112
+ tzinfo (2.0.4)
113
+ concurrent-ruby (~> 1.0)
107
114
  unf (0.1.4)
108
115
  unf_ext
109
- unf_ext (0.0.7.6)
116
+ unf_ext (0.0.7.7)
117
+ webrick (1.7.0)
110
118
  webrobots (0.1.2)
111
- zeitwerk (2.2.2)
119
+ zeitwerk (2.4.2)
112
120
 
113
121
  PLATFORMS
114
122
  ruby
@@ -116,9 +124,8 @@ PLATFORMS
116
124
  DEPENDENCIES
117
125
  bundler
118
126
  news2kindle!
119
- pry
120
127
  rake
121
128
  rspec
122
129
 
123
130
  BUNDLED WITH
124
- 1.17.2
131
+ 2.2.15
@@ -33,7 +33,7 @@ module News2Kindle
33
33
 
34
34
  rdf_file = "https://internet.watch.impress.co.jp/data/rss/1.0/iw/feed.rdf"
35
35
  rdf = retry_loop( 5 ) do
36
- Nokogiri(open(rdf_file, 'r:utf-8', &:read))
36
+ Nokogiri(URI.open(rdf_file, 'r:utf-8', &:read))
37
37
  end
38
38
  (rdf / 'item' ).each do |item|
39
39
  uri = URI( item.attr( 'rdf:about' ).to_s )
@@ -63,7 +63,7 @@ module News2Kindle
63
63
  next if org =~ /^http/ # skip images on other servers
64
64
  begin
65
65
  img_file = retry_loop( 5 ) do
66
- open( "#{TOP}#{org}", &:read )
66
+ URI.open( "#{TOP}#{org}", &:read )
67
67
  end
68
68
  cache = "#{org.gsub( /\//, '_' ).sub( /^_/, '' )}"
69
69
  open( "#{@dst_dir}/#{cache}", 'w' ){|f| f.write img_file}
@@ -205,7 +205,7 @@ module News2Kindle
205
205
  rescue Errno::ENOENT
206
206
  #puts "getting article: #{uri.path}".encode( Encoding::default_external )
207
207
  html = retry_loop( 5 ) do
208
- open( uri, &:read )
208
+ URI.open( uri, &:read )
209
209
  end
210
210
  open( cache, 'w' ){|f| f.write html }
211
211
  end
@@ -21,7 +21,7 @@ module News2Kindle
21
21
  html = title = author = now_str = nil
22
22
  begin
23
23
  retry_loop( 5 ) do
24
- html = Nokogiri(open("#{@top}?date=#{now.strftime '%m%d'}", 'r:utf-8', &:read))
24
+ html = Nokogiri(URI.open("#{@top}?date=#{now.strftime '%m%d'}", 'r:utf-8', &:read))
25
25
  title = (html / 'head title').text
26
26
  author = (html / 'head meta[name="author"]')[0]['content']
27
27
  now_str = now.strftime( '%m-%d' )
@@ -124,7 +124,7 @@ module News2Kindle
124
124
  file_name = "#{SecureRandom.hex}#{uri.to_s.scan(/\.[^\.]+$/)[0]}"
125
125
  begin
126
126
  open("#{@current_dir}/#{file_name}", 'w') do |f|
127
- f.write open(uri, &:read)
127
+ f.write URI.open(uri, &:read)
128
128
  end
129
129
  rescue OpenURI::HTTPError, RuntimeError, Errno::ENOENT
130
130
  News2Kindle.logger.warn "#$!: #{uri}"
@@ -1,3 +1,3 @@
1
1
  module News2Kindle
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.6"
3
3
  end
data/news2kindle.gemspec CHANGED
@@ -33,5 +33,4 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "bundler"
34
34
  spec.add_development_dependency "rake"
35
35
  spec.add_development_dependency "rspec"
36
- spec.add_development_dependency "pry"
37
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: news2kindle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - TADA Tadashi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-25 00:00:00.000000000 Z
11
+ date: 2021-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kindlegen
@@ -170,20 +170,6 @@ dependencies:
170
170
  - - ">="
171
171
  - !ruby/object:Gem::Version
172
172
  version: '0'
173
- - !ruby/object:Gem::Dependency
174
- name: pry
175
- requirement: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - ">="
178
- - !ruby/object:Gem::Version
179
- version: '0'
180
- type: :development
181
- prerelease: false
182
- version_requirements: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - ">="
185
- - !ruby/object:Gem::Version
186
- version: '0'
187
173
  description: scrape some news site and deliver to kindle
188
174
  email:
189
175
  - t@tdtds.jp
@@ -242,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
228
  - !ruby/object:Gem::Version
243
229
  version: '0'
244
230
  requirements: []
245
- rubygems_version: 3.0.3
231
+ rubygems_version: 3.1.6
246
232
  signing_key:
247
233
  specification_version: 4
248
234
  summary: scrape some news site and deliver to kindle