yard 0.9.34 → 0.9.35

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of yard might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7531850cba319c703685684605433173f6b55d2d39df481c65492772fe31bc86
4
- data.tar.gz: 61cbee634cd9292024ca7f126f867abbe9b8f9e6087c90f75ea18e87991cd4f2
3
+ metadata.gz: c5ff0ce7fb0e2d8ecc443968bc650be669b354e264b468ed73110367f8e18a8f
4
+ data.tar.gz: 57f2052210346c9492bb9d80bd15200cc3410e358f4d169e09a148cd258fc65c
5
5
  SHA512:
6
- metadata.gz: 98abb79648eec38f9b035138e664f251b10530d7b1f38e70f6307749a224fc8237a8a4217be9a8792b4593a8938e199d760ff3b5d73a340cb91c8b3ffb63ba70
7
- data.tar.gz: 7b691f28627be2337780cadd32d4212f9dfe13b5d4c2493ee8720ce7e9d80c28135e96257f46527c10c3924fd8474bd23f0da84558f76060e5a15ab924507c08
6
+ metadata.gz: 01c9c77f83fc7c2e8ccfe5cd21c16c51506ececa875a9e24793eb2d0d29376c69d8686f2ab8d0a11caefd77f5bf70424b40ea9e4c83d4afebd070b2c7c4d6132
7
+ data.tar.gz: d3e49a80ac5be583a158011351cbca068d4f78179ce02f88e43a3d02cac1a10ce7a02bd4b20fa9a44ce6dd519e02e2ede8acca8b5ed62a21341149de71c0a825
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # main
2
2
 
3
+ # [0.9.35] - February 28th, 2024
4
+
5
+ [0.9.35]: https://github.com/lsegal/yard/compare/v0.9.34...v0.9.35
6
+
7
+ - Fix possible XSS on generated YARD frameset pages (thanks to @RedYetiDev for finding and patching) (2069e2b).
8
+ - Fix errors when using `@option` on non-method objects (#1508)
9
+ - Support Ruby 3.3 changes in Ripper parser (#1510)
10
+
3
11
  # [0.9.34] - April 12nd, 2023
4
12
 
5
13
  [0.9.34]: https://github.com/lsegal/yard/compare/v0.9.33...v0.9.34
@@ -303,6 +303,7 @@ module YARD
303
303
  # definitions with docstrings first.
304
304
  #
305
305
  # @return [String] a filename
306
+ # @return [nil] if there is no file associated with the object
306
307
  def file
307
308
  @files.first ? @files.first[0] : nil
308
309
  end
@@ -476,9 +476,8 @@ module YARD
476
476
  content.force_encoding('binary')
477
477
  ENCODING_BYTE_ORDER_MARKS.each do |encoding, bom|
478
478
  bom.force_encoding('binary')
479
- if content[0, bom.size] == bom
480
- content.force_encoding(encoding)
481
- return content
479
+ if content.start_with?(bom)
480
+ return content.sub(bom, '').force_encoding(encoding)
482
481
  end
483
482
  end
484
483
  content.force_encoding('utf-8') # UTF-8 is default encoding
data/lib/yard/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module YARD
5
- VERSION = '0.9.34'
5
+ VERSION = '0.9.35'
6
6
  end
@@ -5,10 +5,10 @@
5
5
  <title><%= options.title %></title>
6
6
  </head>
7
7
  <script type="text/javascript">
8
- var match = unescape(window.location.hash).match(/^#!(.+)/);
8
+ var match = decodeURIComponent(window.location.hash).match(/^#!(.+)/);
9
9
  var name = match ? match[1] : '<%= url_for_main %>';
10
- name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
11
- window.top.location = name;
10
+ name = name.replace(/^((\w*):)?[\/\\]*/gm, '').trim();
11
+ window.top.location.replace(name)
12
12
  </script>
13
13
  <noscript>
14
14
  <h1>Oops!</h1>
@@ -1,4 +1,4 @@
1
- <% if object.has_tag?(:option) %>
1
+ <% if object.has_tag?(:option) && object.respond_to?(:parameters) %>
2
2
  <% object.parameters.each do |param, default| %>
3
3
  <% tags = object.tags(:option).select {|x| x.name.to_s == param.to_s.sub(/^\*+|:$/, '') } %>
4
4
  <% next if tags.empty? %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.34
4
+ version: 0.9.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Loren Segal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-04-12 00:00:00.000000000 Z
11
+ date: 2024-02-28 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |2
14
14
  YARD is a documentation generation tool for the Ruby programming language.