tdiary 5.5.1 → 5.6.1

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.
Files changed (194) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +2 -0
  3. data/Gemfile +2 -1
  4. data/Gemfile.lock +39 -40
  5. data/doc/HOWTO-make-theme.md +3 -3
  6. data/doc/UPGRADE.md +1 -1
  7. data/js/draft.js +152 -52
  8. data/js/image.js +127 -28
  9. data/lib/tdiary/admin.rb +11 -13
  10. data/lib/tdiary/application.rb +2 -7
  11. data/lib/tdiary/author_only_base.rb +78 -9
  12. data/lib/tdiary/base.rb +2 -2
  13. data/lib/tdiary/cgi_adapter.rb +7 -5
  14. data/lib/tdiary/cgi_compat.rb +27 -97
  15. data/lib/tdiary/configuration.rb +4 -0
  16. data/lib/tdiary/core_ext.rb +146 -1
  17. data/lib/tdiary/dispatcher/index_main.rb +5 -23
  18. data/lib/tdiary/dispatcher/update_main.rb +2 -17
  19. data/lib/tdiary/dispatcher.rb +29 -15
  20. data/lib/tdiary/filter/default.rb +2 -2
  21. data/lib/tdiary/filter/spam.rb +2 -2
  22. data/lib/tdiary/filter.rb +1 -1
  23. data/lib/tdiary/plugin/00default.rb +18 -3
  24. data/lib/tdiary/plugin/en/00default.rb +15 -0
  25. data/lib/tdiary/plugin/ja/00default.rb +15 -0
  26. data/lib/tdiary/plugin.rb +1 -1
  27. data/lib/tdiary/rack/error_handler.rb +36 -0
  28. data/lib/tdiary/rack.rb +1 -0
  29. data/lib/tdiary/request.rb +3 -2
  30. data/lib/tdiary/server.rb +25 -3
  31. data/lib/tdiary/version.rb +1 -1
  32. data/lib/tdiary/view.rb +33 -28
  33. data/lib/tdiary/view_helper.rb +10 -2
  34. data/lib/tdiary.rb +6 -1
  35. data/misc/plugin/amazon.rb +37 -11
  36. data/misc/plugin/amazon_rakuten.rb +75 -0
  37. data/misc/plugin/draft.rb +75 -0
  38. data/misc/plugin/en/image.rb +5 -0
  39. data/misc/plugin/en/makerss.rb +4 -0
  40. data/misc/plugin/image.rb +15 -4
  41. data/misc/plugin/ja/makerss.rb +3 -0
  42. data/misc/plugin/makerss.rb +6 -5
  43. data/tdiary.conf.sample +8 -0
  44. data/tdiary.conf.sample-en +8 -0
  45. data/theme/default/default.css +33 -8
  46. data/vendor/bundle/ruby/3.4.0/cache/net-imap-0.6.6.gem +0 -0
  47. data/vendor/bundle/ruby/3.4.0/cache/net-protocol-0.3.0.gem +0 -0
  48. data/vendor/bundle/ruby/3.4.0/cache/rack-3.2.7.gem +0 -0
  49. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/cgi-0.5.2/cgi/escape.so +0 -0
  50. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/cgi-0.5.2/gem_make.out +6 -6
  51. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.5.1/date_core.so +0 -0
  52. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.5.1/gem_make.out +6 -6
  53. data/vendor/bundle/ruby/3.4.0/extensions/x86_64-linux/3.4.0/date-3.5.1/mkmf.log +4 -4
  54. data/vendor/bundle/ruby/3.4.0/gems/cgi-0.5.2/ext/cgi/escape/Makefile +3 -3
  55. data/vendor/bundle/ruby/3.4.0/gems/cgi-0.5.2/lib/cgi/escape.so +0 -0
  56. data/vendor/bundle/ruby/3.4.0/gems/date-3.5.1/ext/date/Makefile +3 -3
  57. data/vendor/bundle/ruby/3.4.0/gems/date-3.5.1/lib/date_core.so +0 -0
  58. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/Gemfile +3 -4
  59. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/README.md +1 -1
  60. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.6/Rakefile +24 -0
  61. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/command_data.rb +62 -92
  62. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/config/attr_accessors.rb +8 -9
  63. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/config/attr_inheritance.rb +64 -1
  64. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/config/attr_version_defaults.rb +1 -4
  65. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/config.rb +209 -35
  66. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/connection_state.rb +1 -1
  67. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/data_encoding.rb +127 -27
  68. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.6.6/lib/net/imap/errors.rb +372 -0
  69. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/esearch_result.rb +6 -0
  70. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/response_data.rb +90 -11
  71. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/response_parser/parser_utils.rb +14 -23
  72. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/response_parser.rb +41 -26
  73. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/response_reader.rb +16 -21
  74. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/scram_authenticator.rb +3 -3
  75. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/search_result.rb +11 -1
  76. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sequence_set.rb +620 -312
  77. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/uidplus_data.rb +2 -63
  78. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap.rb +279 -162
  79. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/net-imap.gemspec +1 -1
  80. data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/rakelib/rdoc.rake +1 -18
  81. data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.2.2/LICENSE.txt → net-protocol-0.3.0/BSDL} +3 -3
  82. data/vendor/bundle/ruby/3.4.0/gems/net-protocol-0.3.0/COPYING +56 -0
  83. data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.2.2 → net-protocol-0.3.0}/lib/net/protocol.rb +58 -4
  84. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/CHANGELOG.md +54 -1
  85. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/utils.rb +3 -3
  86. data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/version.rb +1 -1
  87. data/vendor/bundle/ruby/3.4.0/specifications/{net-imap-0.5.15.gemspec → net-imap-0.6.6.gemspec} +4 -4
  88. data/vendor/bundle/ruby/3.4.0/specifications/{net-protocol-0.2.2.gemspec → net-protocol-0.3.0.gemspec} +5 -5
  89. data/vendor/bundle/ruby/3.4.0/specifications/{rack-3.2.6.gemspec → rack-3.2.7.gemspec} +3 -3
  90. data/views/tdiary.rconf +2 -0
  91. metadata +128 -133
  92. data/misc/plugin/amp.rb +0 -118
  93. data/vendor/bundle/ruby/3.4.0/cache/net-imap-0.5.15.gem +0 -0
  94. data/vendor/bundle/ruby/3.4.0/cache/net-protocol-0.2.2.gem +0 -0
  95. data/vendor/bundle/ruby/3.4.0/cache/rack-3.2.6.gem +0 -0
  96. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.5.15/Rakefile +0 -13
  97. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.5.15/lib/net/imap/data_lite.rb +0 -226
  98. data/vendor/bundle/ruby/3.4.0/gems/net-imap-0.5.15/lib/net/imap/errors.rb +0 -118
  99. data/vendor/bundle/ruby/3.4.0/gems/net-protocol-0.2.2/Gemfile +0 -7
  100. data/vendor/bundle/ruby/3.4.0/gems/net-protocol-0.2.2/Rakefile +0 -10
  101. data/vendor/bundle/ruby/3.4.0/gems/net-protocol-0.2.2/bin/console +0 -14
  102. data/vendor/bundle/ruby/3.4.0/gems/net-protocol-0.2.2/bin/setup +0 -8
  103. data/vendor/bundle/ruby/3.4.0/gems/net-protocol-0.2.2/net-protocol.gemspec +0 -33
  104. data/views/amp.rhtml +0 -34
  105. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/BSDL +0 -0
  106. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/COPYING +0 -0
  107. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/LICENSE.txt +0 -0
  108. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/docs/styles.css +0 -0
  109. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/authenticators.rb +0 -0
  110. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/config/attr_type_coercion.rb +0 -0
  111. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/deprecated_client_options.rb +0 -0
  112. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/fetch_data.rb +0 -0
  113. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/flags.rb +0 -0
  114. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/anonymous_authenticator.rb +0 -0
  115. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/authentication_exchange.rb +0 -0
  116. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/authenticators.rb +0 -0
  117. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/client_adapter.rb +0 -0
  118. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/cram_md5_authenticator.rb +0 -0
  119. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/digest_md5_authenticator.rb +0 -0
  120. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/external_authenticator.rb +0 -0
  121. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/gs2_header.rb +0 -0
  122. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/login_authenticator.rb +0 -0
  123. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/oauthbearer_authenticator.rb +0 -0
  124. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/plain_authenticator.rb +0 -0
  125. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/protocol_adapters.rb +0 -0
  126. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/scram_algorithm.rb +0 -0
  127. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/stringprep.rb +0 -0
  128. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl/xoauth2_authenticator.rb +0 -0
  129. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl.rb +0 -0
  130. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/sasl_adapter.rb +0 -0
  131. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/stringprep/nameprep.rb +0 -0
  132. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/stringprep/saslprep.rb +0 -0
  133. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/stringprep/saslprep_tables.rb +0 -0
  134. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/stringprep/tables.rb +0 -0
  135. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/stringprep/trace.rb +0 -0
  136. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/stringprep.rb +0 -0
  137. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/lib/net/imap/vanished_data.rb +0 -0
  138. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/rakelib/benchmarks.rake +0 -0
  139. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/rakelib/rfcs.rake +0 -0
  140. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/rakelib/saslprep.rake +0 -0
  141. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/rakelib/string_prep_tables_generator.rb +0 -0
  142. /data/vendor/bundle/ruby/3.4.0/gems/{net-imap-0.5.15 → net-imap-0.6.6}/sample/net-imap.rb +0 -0
  143. /data/vendor/bundle/ruby/3.4.0/gems/{net-protocol-0.2.2 → net-protocol-0.3.0}/README.md +0 -0
  144. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/CONTRIBUTING.md +0 -0
  145. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/MIT-LICENSE +0 -0
  146. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/README.md +0 -0
  147. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/SPEC.rdoc +0 -0
  148. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/auth/abstract/handler.rb +0 -0
  149. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/auth/abstract/request.rb +0 -0
  150. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/auth/basic.rb +0 -0
  151. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/bad_request.rb +0 -0
  152. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/body_proxy.rb +0 -0
  153. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/builder.rb +0 -0
  154. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/cascade.rb +0 -0
  155. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/common_logger.rb +0 -0
  156. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/conditional_get.rb +0 -0
  157. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/config.rb +0 -0
  158. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/constants.rb +0 -0
  159. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/content_length.rb +0 -0
  160. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/content_type.rb +0 -0
  161. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/deflater.rb +0 -0
  162. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/directory.rb +0 -0
  163. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/etag.rb +0 -0
  164. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/events.rb +0 -0
  165. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/files.rb +0 -0
  166. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/head.rb +0 -0
  167. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/headers.rb +0 -0
  168. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/lint.rb +0 -0
  169. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/lock.rb +0 -0
  170. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/media_type.rb +0 -0
  171. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/method_override.rb +0 -0
  172. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/mime.rb +0 -0
  173. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/mock.rb +0 -0
  174. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/mock_request.rb +0 -0
  175. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/mock_response.rb +0 -0
  176. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/multipart/generator.rb +0 -0
  177. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/multipart/parser.rb +0 -0
  178. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/multipart/uploaded_file.rb +0 -0
  179. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/multipart.rb +0 -0
  180. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/null_logger.rb +0 -0
  181. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/query_parser.rb +0 -0
  182. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/recursive.rb +0 -0
  183. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/reloader.rb +0 -0
  184. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/request.rb +0 -0
  185. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/response.rb +0 -0
  186. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/rewindable_input.rb +0 -0
  187. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/runtime.rb +0 -0
  188. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/sendfile.rb +0 -0
  189. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/show_exceptions.rb +0 -0
  190. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/show_status.rb +0 -0
  191. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/static.rb +0 -0
  192. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/tempfile_reaper.rb +0 -0
  193. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack/urlmap.rb +0 -0
  194. /data/vendor/bundle/ruby/3.4.0/gems/{rack-3.2.6 → rack-3.2.7}/lib/rack.rb +0 -0
@@ -1,226 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # Some of the code in this file was copied from the polyfill-data gem.
4
- #
5
- # MIT License
6
- #
7
- # Copyright (c) 2023 Jim Gay, Joel Drapper, Nicholas Evans
8
- #
9
- # Permission is hereby granted, free of charge, to any person obtaining a copy
10
- # of this software and associated documentation files (the "Software"), to deal
11
- # in the Software without restriction, including without limitation the rights
12
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- # copies of the Software, and to permit persons to whom the Software is
14
- # furnished to do so, subject to the following conditions:
15
- #
16
- # The above copyright notice and this permission notice shall be included in all
17
- # copies or substantial portions of the Software.
18
- #
19
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- # SOFTWARE.
26
-
27
-
28
- module Net
29
- class IMAP
30
- data_or_object = RUBY_VERSION >= "3.2.0" ? ::Data : Object
31
- class DataLite < data_or_object
32
- def encode_with(coder) coder.map = to_h.transform_keys(&:to_s) end
33
- def init_with(coder) initialize(**coder.map.transform_keys(&:to_sym)) end
34
- end
35
-
36
- Data = DataLite
37
- end
38
- end
39
-
40
- # :nocov:
41
- # Need to skip test coverage for the rest, because it isn't loaded by ruby 3.2+.
42
- return if RUBY_VERSION >= "3.2.0"
43
-
44
- module Net
45
- class IMAP
46
- # DataLite is a temporary substitute for ruby 3.2's +Data+ class. DataLite
47
- # is aliased as Net::IMAP::Data, so that code using it won't need to be
48
- # updated when it is removed.
49
- #
50
- # See {ruby 3.2's documentation for Data}[https://docs.ruby-lang.org/en/3.2/Data.html].
51
- #
52
- # [When running ruby 3.1]
53
- # This class reimplements the API for ruby 3.2's +Data+, and should be
54
- # compatible for nearly all use-cases. This reimplementation <em>will be
55
- # removed</em> in +net-imap+ 0.6, when support for ruby 3.1 is dropped.
56
- #
57
- # _NOTE:_ +net-imap+ no longer supports ruby versions prior to 3.1.
58
- # [When running ruby >= 3.2]
59
- # This class inherits from +Data+ and _only_ defines the methods needed
60
- # for YAML serialization. This will be dropped when +psych+ adds support
61
- # for +Data+.
62
- #
63
- # Some of the code in this class was copied or adapted from the
64
- # {polyfill-data gem}[https://rubygems.org/gems/polyfill-data], by Jim Gay
65
- # and Joel Drapper, under the MIT license terms.
66
- class DataLite
67
- singleton_class.undef_method :new
68
-
69
- TYPE_ERROR = "%p is not a symbol nor a string"
70
- ATTRSET_ERROR = "invalid data member: %p"
71
- DUP_ERROR = "duplicate member: %p"
72
- ARITY_ERROR = "wrong number of arguments (given %d, expected %s)"
73
- private_constant :TYPE_ERROR, :ATTRSET_ERROR, :DUP_ERROR, :ARITY_ERROR
74
-
75
- # Defines a new Data class.
76
- #
77
- # _NOTE:_ Unlike ruby 3.2's +Data.define+, DataLite.define only supports
78
- # member names which are valid local variable names. Member names can't
79
- # be keywords (e.g: +next+ or +class+) or start with capital letters, "@",
80
- # etc.
81
- def self.define(*args, &block)
82
- members = args.each_with_object({}) do |arg, members|
83
- arg = arg.to_str unless arg in Symbol | String if arg.respond_to?(:to_str)
84
- arg = arg.to_sym if arg in String
85
- arg in Symbol or raise TypeError, TYPE_ERROR % [arg]
86
- arg in %r{=} and raise ArgumentError, ATTRSET_ERROR % [arg]
87
- members.key?(arg) and raise ArgumentError, DUP_ERROR % [arg]
88
- members[arg] = true
89
- end
90
- members = members.keys.freeze
91
-
92
- klass = ::Class.new(self)
93
-
94
- klass.singleton_class.undef_method :define
95
- klass.define_singleton_method(:members) { members }
96
-
97
- def klass.new(*args, **kwargs, &block)
98
- if kwargs.size.positive?
99
- if args.size.positive?
100
- raise ArgumentError, ARITY_ERROR % [args.size, 0]
101
- end
102
- elsif members.size < args.size
103
- expected = members.size.zero? ? 0 : 0..members.size
104
- raise ArgumentError, ARITY_ERROR % [args.size, expected]
105
- else
106
- kwargs = Hash[members.take(args.size).zip(args)]
107
- end
108
- allocate.tap do |instance|
109
- instance.__send__(:initialize, **kwargs, &block)
110
- end.freeze
111
- end
112
-
113
- klass.singleton_class.alias_method :[], :new
114
- klass.attr_reader(*members)
115
-
116
- # Dynamically defined initializer methods are in an included module,
117
- # rather than directly on DataLite (like in ruby 3.2+):
118
- # * simpler to handle required kwarg ArgumentErrors
119
- # * easier to ensure consistent ivar assignment order (object shape)
120
- # * faster than instance_variable_set
121
- klass.include(Module.new do
122
- if members.any?
123
- kwargs = members.map{"#{_1.name}:"}.join(", ")
124
- params = members.map(&:name).join(", ")
125
- ivars = members.map{"@#{_1.name}"}.join(", ")
126
- attrs = members.map{"attrs[:#{_1.name}]"}.join(", ")
127
- module_eval <<~RUBY, __FILE__, __LINE__ + 1
128
- protected
129
- def initialize(#{kwargs}) #{ivars} = #{params}; freeze end
130
- def marshal_load(attrs) #{ivars} = #{attrs}; freeze end
131
- RUBY
132
- end
133
- end)
134
-
135
- klass.module_eval do _1.module_eval(&block) end if block_given?
136
-
137
- klass
138
- end
139
-
140
- ##
141
- # singleton-method: new
142
- # call-seq:
143
- # new(*args) -> instance
144
- # new(**kwargs) -> instance
145
- #
146
- # Constuctor for classes defined with ::define.
147
- #
148
- # Aliased as ::[].
149
-
150
- ##
151
- # singleton-method: []
152
- # call-seq:
153
- # ::[](*args) -> instance
154
- # ::[](**kwargs) -> instance
155
- #
156
- # Constuctor for classes defined with ::define.
157
- #
158
- # Alias for ::new
159
-
160
- ##
161
- def members; self.class.members end
162
- def to_h(&block) block ? __to_h__.to_h(&block) : __to_h__ end
163
- def hash; [self.class, __to_h__].hash end
164
- def ==(other) self.class == other.class && to_h == other.to_h end
165
- def eql?(other) self.class == other.class && hash == other.hash end
166
- def deconstruct; __to_h__.values end
167
-
168
- def deconstruct_keys(keys)
169
- raise TypeError unless keys.is_a?(Array) || keys.nil?
170
- return __to_h__ if keys&.first.nil?
171
- __to_h__.slice(*keys)
172
- end
173
-
174
- def with(**kwargs)
175
- return self if kwargs.empty?
176
- self.class.new(**__to_h__.merge(kwargs))
177
- end
178
-
179
- def inspect
180
- __inspect_guard__(self) do |seen|
181
- return "#<data #{self.class}:...>" if seen
182
- attrs = __to_h__.map {|kv| "%s=%p" % kv }.join(", ")
183
- display = ["data", self.class.name, attrs].compact.join(" ")
184
- "#<#{display}>"
185
- end
186
- end
187
- alias_method :to_s, :inspect
188
-
189
- private
190
-
191
- def initialize_copy(source) super.freeze end
192
- def marshal_dump; __to_h__ end
193
-
194
- def __to_h__; Hash[members.map {|m| [m, send(m)] }] end
195
-
196
- # Yields +true+ if +obj+ has been seen already, +false+ if it hasn't.
197
- # Marks +obj+ as seen inside the block, so circuler references don't
198
- # recursively trigger a SystemStackError (stack level too deep).
199
- #
200
- # Making circular references inside a Data object _should_ be very
201
- # uncommon, but we'll support them for the sake of completeness.
202
- def __inspect_guard__(obj)
203
- preexisting = Thread.current[:__net_imap_data__inspect__]
204
- Thread.current[:__net_imap_data__inspect__] ||= {}.compare_by_identity
205
- inspect_guard = Thread.current[:__net_imap_data__inspect__]
206
- if inspect_guard.include?(obj)
207
- yield true
208
- else
209
- begin
210
- inspect_guard[obj] = true
211
- yield false
212
- ensure
213
- inspect_guard.delete(obj)
214
- end
215
- end
216
- ensure
217
- unless preexisting.equal?(inspect_guard)
218
- Thread.current[:__net_imap_data__inspect__] = preexisting
219
- end
220
- end
221
-
222
- end
223
-
224
- end
225
- end
226
- # :nocov:
@@ -1,118 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Net
4
- class IMAP < Protocol
5
-
6
- # Superclass of IMAP errors.
7
- class Error < StandardError
8
- end
9
-
10
- class LoginDisabledError < Error
11
- def initialize(msg = "Remote server has disabled the LOGIN command", ...)
12
- super
13
- end
14
- end
15
-
16
- # Error raised when data is in the incorrect format.
17
- class DataFormatError < Error
18
- end
19
-
20
- # Error raised when the socket cannot be read, due to a Config limit.
21
- class ResponseReadError < Error
22
- end
23
-
24
- # Error raised when a response is larger than IMAP#max_response_size.
25
- class ResponseTooLargeError < ResponseReadError
26
- attr_reader :bytes_read, :literal_size
27
- attr_reader :max_response_size
28
-
29
- def initialize(msg = nil, *args,
30
- bytes_read: nil,
31
- literal_size: nil,
32
- max_response_size: nil,
33
- **kwargs)
34
- @bytes_read = bytes_read
35
- @literal_size = literal_size
36
- @max_response_size = max_response_size
37
- msg ||= [
38
- "Response size", response_size_msg, "exceeds max_response_size",
39
- max_response_size && "(#{max_response_size}B)",
40
- ].compact.join(" ")
41
- super(msg, *args, **kwargs)
42
- end
43
-
44
- private
45
-
46
- def response_size_msg
47
- if bytes_read && literal_size
48
- "(#{bytes_read}B read + #{literal_size}B literal)"
49
- end
50
- end
51
- end
52
-
53
- # Error raised when a response from the server is non-parsable.
54
- class ResponseParseError < Error
55
- end
56
-
57
- # Superclass of all errors used to encapsulate "fail" responses
58
- # from the server.
59
- class ResponseError < Error
60
-
61
- # The response that caused this error
62
- attr_accessor :response
63
-
64
- def initialize(response)
65
- @response = response
66
-
67
- super @response.data.text
68
- end
69
-
70
- end
71
-
72
- # Error raised upon a "NO" response from the server, indicating
73
- # that the client command could not be completed successfully.
74
- class NoResponseError < ResponseError
75
- end
76
-
77
- # Error raised upon a "BAD" response from the server, indicating
78
- # that the client command violated the IMAP protocol, or an internal
79
- # server failure has occurred.
80
- class BadResponseError < ResponseError
81
- end
82
-
83
- # Error raised upon a "BYE" response from the server, indicating
84
- # that the client is not being allowed to login, or has been timed
85
- # out due to inactivity.
86
- class ByeResponseError < ResponseError
87
- end
88
-
89
- # Error raised when the server sends an invalid response.
90
- #
91
- # This is different from UnknownResponseError: the response has been
92
- # rejected. Although it may be parsable, the server is forbidden from
93
- # sending it in the current context. The client should automatically
94
- # disconnect, abruptly (without logout).
95
- #
96
- # Note that InvalidResponseError does not inherit from ResponseError: it
97
- # can be raised before the response is fully parsed. A related
98
- # ResponseParseError or ResponseError may be the #cause.
99
- class InvalidResponseError < Error
100
- end
101
-
102
- # Error raised upon an unknown response from the server.
103
- #
104
- # This is different from InvalidResponseError: the response may be a
105
- # valid extension response and the server may be allowed to send it in
106
- # this context, but Net::IMAP either does not know how to parse it or
107
- # how to handle it. This could result from enabling unknown or
108
- # unhandled extensions. The connection may still be usable,
109
- # but—depending on context—it may be prudent to disconnect.
110
- class UnknownResponseError < ResponseError
111
- end
112
-
113
- RESPONSE_ERRORS = Hash.new(ResponseError) # :nodoc:
114
- RESPONSE_ERRORS["NO"] = NoResponseError
115
- RESPONSE_ERRORS["BAD"] = BadResponseError
116
-
117
- end
118
- end
@@ -1,7 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- gem "rake"
6
- gem "test-unit"
7
- gem "test-unit-ruby-core"
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test/lib"
6
- t.ruby_opts << "-rhelper"
7
- t.test_files = FileList["test/**/test_*.rb"]
8
- end
9
-
10
- task :default => :test
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "net/protocol"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start(__FILE__)
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- name = File.basename(__FILE__, ".gemspec")
4
- version = ["lib", Array.new(name.count("-"), "..").join("/")].find do |dir|
5
- break File.foreach(File.join(__dir__, dir, "#{name.tr('-', '/')}.rb")) do |line|
6
- /^\s*VERSION\s*=\s*"(.*)"/ =~ line and break $1
7
- end rescue nil
8
- end
9
-
10
- Gem::Specification.new do |spec|
11
- spec.name = name
12
- spec.version = version
13
- spec.authors = ["Yukihiro Matsumoto"]
14
- spec.email = ["matz@ruby-lang.org"]
15
-
16
- spec.summary = %q{The abstract interface for net-* client.}
17
- spec.description = %q{The abstract interface for net-* client.}
18
- spec.homepage = "https://github.com/ruby/net-protocol"
19
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
20
- spec.licenses = ["Ruby", "BSD-2-Clause"]
21
-
22
- spec.metadata["homepage_uri"] = spec.homepage
23
- spec.metadata["source_code_uri"] = spec.homepage
24
-
25
- # Specify which files should be added to the gem when it is released.
26
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
27
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
28
- `git ls-files -z 2>#{IO::NULL}`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
29
- end
30
- spec.require_paths = ["lib"]
31
-
32
- spec.add_dependency "timeout"
33
- end
data/views/amp.rhtml DELETED
@@ -1,34 +0,0 @@
1
- <!doctype html>
2
- <html ⚡ lang="ja">
3
- <head>
4
- <meta charset="utf-8">
5
- <%= amp_header_proc %>
6
- <script async src="https://cdn.ampproject.org/v0.js"></script>
7
- <title><%= amp_title %></title>
8
- <link rel="canonical" href="<%= amp_canonical_url(diary) %>" />
9
- <meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
10
- <style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
11
- <style amp-custom>
12
- <%= amp_style %>
13
- </style>
14
- </head>
15
- <body>
16
- <%= amp_body_enter_proc %>
17
- <div class="whole-content">
18
- <div class="adminmenu">
19
- <%= navi_user %>
20
- </div>
21
- <div class="content">
22
- <h1><a href="<%= amp_canonical_url(diary) %>"><%= amp_title %></a></h1>
23
- <div class="day">
24
- <h2><%= amp_day_title(diary) %></h2>
25
- <div class="body">
26
- <%= amp_body(diary) %>
27
- </div>
28
- </div>
29
- </div>
30
- <div class="footer">
31
- </div>
32
- </div>
33
- </body>
34
- </html>