tdiary-contrib 5.6.1 → 5.7.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: 947fdef94c86aaa2494241b7f6d874dcd49dd9d0302d2a582c0afc183573dec0
4
- data.tar.gz: 27162faca3152d2a496dff50aa8c507ca3cc66666983544deb04a1f843a2c017
3
+ metadata.gz: 29f3866866d1d47d3b1f65a0acb469fe14c6431da8715bb274fbff996523d235
4
+ data.tar.gz: 27936de12e7b65c800b7bbc98d3ed7032ed1b8b4ff4538e6c9dfad3efcf89273
5
5
  SHA512:
6
- metadata.gz: b8370f2699f00fd4907b9386f45fe647d46698bd618814c0a680e0fe4c4c5e2fa280625b5802515980503f56be0f2af01f2f48d1053eb85d7b2ad2627cdd397a
7
- data.tar.gz: a5ac4cccedccd02007b7c729e425361401705e6bdced0f2497778ea76fa84e648c2d97eb48eb7af329796414cf05b711903a94f461c26e1706e2f5a3db52951e
6
+ metadata.gz: 7322400963c11cf51cdbfbf5c2a4171b56a98aee1af4f5cb1c2654ed7d3a519e51d9ce9c294f00eb3e9f38ae86f2710f42355d792ce479f04374c28614d4cdf0
7
+ data.tar.gz: c54cb29c5aaeac5a329d8e4890258be8f487affbafa79f4be659d4410dfba7e5f6224aa1ab963d0ab71c43673a946cbf458c4616195f8c1ff6d8e898f397743d
@@ -1,5 +1,5 @@
1
1
  module TDiary
2
2
  class Contrib
3
- VERSION = "5.6.1"
3
+ VERSION = "5.7.0"
4
4
  end
5
5
  end
@@ -18,6 +18,11 @@ add_header_proc do
18
18
  uri: 'h3 a',
19
19
  title: 'h3',
20
20
  container: 'h3'
21
+ },
22
+ 'div.day:not(:has(div.section h3 a))': {
23
+ uri: 'h2 span.date a',
24
+ title: 'h2',
25
+ container: 'h2'
21
26
  }
22
27
  }
23
28
  };
@@ -26,8 +31,8 @@ add_header_proc do
26
31
  return;
27
32
  }
28
33
 
29
- var NodeInsert = function(evt) {
30
- Hatena.Star.EntryLoader.loadNewEntries(evt.target);
34
+ var NodeInsert = function() {
35
+ document.dispatchEvent(new Event('hatena:star:requestrendering'));
31
36
  };
32
37
  window.addEventListener('AutoPagerize_DOMNodeInserted', NodeInsert, false);
33
38
  window.addEventListener('AutoPatchWork.DOMNodeInserted', NodeInsert, false);
data/plugin/image_ex.rb CHANGED
@@ -249,7 +249,7 @@ add_form_proc do |date|
249
249
  return image_path
250
250
  end
251
251
 
252
- if @cgi.params['plugin_image_add'][0] && @cgi.params['plugin_image_file'][0].original_filename != ''
252
+ if @cgi.params['plugin_image_add'][0] && @cgi.params['plugin_image_file'][0] && @cgi.params['plugin_image_file'][0].original_filename != ''
253
253
  image_dir = @cgi.params['plugin_image_dir'][0].read
254
254
  image_filename = ''
255
255
  image_extension = ''
@@ -296,7 +296,7 @@ add_form_proc do |date|
296
296
  end
297
297
  end
298
298
 
299
- elsif @cgi.params['plugin_image_thumbnail'][0] && @cgi.params['plugin_image_file'][0].original_filename != ''
299
+ elsif @cgi.params['plugin_image_thumbnail'][0] && @cgi.params['plugin_image_file'][0] && @cgi.params['plugin_image_file'][0].original_filename != ''
300
300
  image_dir = @cgi.params['plugin_image_dir'][0].read
301
301
  image_filename = ''
302
302
  image_extension = ''
@@ -311,17 +311,25 @@ If error, return a cons cell (ERRCODE . DESCRIPTION)."
311
311
  "\r\n"
312
312
  str))
313
313
  "\r\n"))
314
- (goto-char (point-min))
315
- (while (not (search-forward "</body>" nil t))
316
- (unless (accept-process-output connection tdiary-http-timeout)
317
- (error "HTTP fetch: Connection timeout!"))
318
- (goto-char (point-min)))
314
+ (catch 'done
315
+ (while t
316
+ (goto-char (point-min))
317
+ (when (or (search-forward "</body>" nil t)
318
+ (save-excursion
319
+ (goto-char (point-min))
320
+ (and (re-search-forward "^HTTP/1\\.[01] 30[0-9]" nil t)
321
+ (search-forward "\r\n\r\n" nil t)))
322
+ (not (memq (process-status connection) '(open run))))
323
+ (throw 'done t))
324
+ (unless (accept-process-output connection tdiary-http-timeout)
325
+ (when (memq (process-status connection) '(open run))
326
+ (error "HTTP fetch: Connection timeout!")))))
319
327
  (goto-char (point-min))
320
328
  (save-excursion
321
329
  (if (re-search-forward "HTTP/1.[01] \\([0-9][0-9][0-9]\\) \\(.*\\)" nil t)
322
330
  (let ((code (match-string 1))
323
331
  (desc (match-string 2)))
324
- (cond ((equal code "200")
332
+ (cond ((member code '("200" "301" "302" "303"))
325
333
  buf)
326
334
  (t
327
335
  (cons code desc)))))))))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tdiary-contrib
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tDiary contributors
@@ -23,20 +23,6 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '5.0'
26
- - !ruby/object:Gem::Dependency
27
- name: pushbullet_ruby
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: '0'
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - ">="
38
- - !ruby/object:Gem::Version
39
- version: '0'
40
26
  - !ruby/object:Gem::Dependency
41
27
  name: holiday_japan
42
28
  requirement: !ruby/object:Gem::Requirement