Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-pairing_heap for openSUSE:Factory checked in at 2023-11-05 12:18:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-pairing_heap (Old) and /work/SRC/openSUSE:Factory/.rubygem-pairing_heap.new.17445 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-pairing_heap" Sun Nov 5 12:18:42 2023 rev:3 rq:1123177 version:3.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-pairing_heap/rubygem-pairing_heap.changes 2022-10-12 18:26:31.393931782 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-pairing_heap.new.17445/rubygem-pairing_heap.changes 2023-11-05 12:18:53.821364032 +0100 @@ -1,0 +2,34 @@ +Fri Nov 3 07:49:18 UTC 2023 - Dan Äermák <dan.cer...@posteo.net> + +- 3.0.1: + +# Fixed issues +* `change_priority` could sometimes return `nil` instead of `self` + +3.0.0: + +# Breaking changes +- `#pop` returns `nil` on empty heap instead of raising an Error +- `#get_priority` returns nil on empty heap instead of raising an Error +# New methods +- `PairingHeap::PairingHeap#include?` +- `#each_with_priority` + +2.0.0: + +# Breaking changes +* Second argument of #push now defaults to the first argument +```ruby +# it is now possible to write +array.each { |el| heap.push(el) } +# instead of +array.each { |el| heap.push(el, el) } +``` +* PairingHeap#pop_priority was separated to two methods; PairingHeap#pop_priority and PairingHeap#pop_with_priority, similarly to SimplePairingHeap +# New methods +* `#each` returns an iterator of heap elements. +* `PairingHeap#get_priority_if_exists` returns a pair where first element is success flag, and second element is priority. + + + +------------------------------------------------------------------- Old: ---- pairing_heap-1.0.0.gem New: ---- pairing_heap-3.0.1.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-pairing_heap.spec ++++++ --- /var/tmp/diff_new_pack.s4onQZ/_old 2023-11-05 12:18:55.445423608 +0100 +++ /var/tmp/diff_new_pack.s4onQZ/_new 2023-11-05 12:18:55.453423902 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-pairing_heap # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,11 +24,10 @@ # Name: rubygem-pairing_heap -Version: 1.0.0 +Version: 3.0.1 Release: 0 %define mod_name pairing_heap %define mod_full_name %{mod_name}-%{version} -BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: %{ruby >= 2.3.0} BuildRequires: %{rubygem gem2rpm} BuildRequires: ruby-macros >= 5 @@ -37,7 +36,6 @@ Source1: gem2rpm.yml Summary: Performant priority queue in pure ruby with support for changing License: MIT -Group: Development/Languages/Ruby %description Performant priority queue in pure ruby with support for changing priority ++++++ pairing_heap-1.0.0.gem -> pairing_heap-3.0.1.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.github/workflows/main.yml new/.github/workflows/main.yml --- old/.github/workflows/main.yml 2022-09-04 21:41:24.000000000 +0200 +++ new/.github/workflows/main.yml 2023-04-09 15:46:33.000000000 +0200 @@ -8,14 +8,14 @@ matrix: os: [ubuntu-latest, macos-latest] # Due to https://github.com/actions/runner/issues/849, we have to use quotes for '3.0' - ruby: ['2.3', '2.7', '3.0', '3.1', head, jruby, jruby-head, truffleruby, truffleruby-head] + ruby: ['2.7', '3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - - uses: ruby/setup-ruby@v1 + - name: Set up ruby + uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} - - run: | - gem install bundler -v 2.2.3 - bundle install - bundle exec rake + bundler-cache: true + - name: Run the default task + run: bundle exec rake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.rubocop.yml new/.rubocop.yml --- old/.rubocop.yml 2022-09-04 21:41:24.000000000 +0200 +++ new/.rubocop.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,17 +0,0 @@ -AllCops: - Exclude: - - 'test/fib.rb' - -Style/InfiniteLoop: - Enabled: false - -Style/StringLiterals: - Enabled: false - EnforcedStyle: double_quotes - -Style/StringLiteralsInInterpolation: - Enabled: true - EnforcedStyle: double_quotes - -Layout/LineLength: - Max: 120 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.standard.yml new/.standard.yml --- old/.standard.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.standard.yml 2023-04-09 15:46:33.000000000 +0200 @@ -0,0 +1,3 @@ +ruby_version: 3.2.0 +ignore: + - 'test/benchmark/fib.rb' \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock --- old/Gemfile.lock 2022-09-04 21:41:24.000000000 +0200 +++ new/Gemfile.lock 2023-04-09 15:46:33.000000000 +0200 @@ -1,21 +1,66 @@ PATH remote: . specs: - pairing_heap (0.2.0) + pairing_heap (3.0.1) GEM remote: https://rubygems.org/ specs: + ast (2.4.2) + docile (1.4.0) + json (2.6.3) + json (2.6.3-java) + language_server-protocol (3.17.0.2) minitest (5.15.0) + parallel (1.22.1) + parser (3.1.3.0) + ast (~> 2.4.1) + rainbow (3.1.1) rake (13.0.6) + regexp_parser (2.6.1) + rexml (3.2.5) + rubocop (1.40.0) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.1.2.1) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.23.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 1.4.0, < 3.0) + rubocop-ast (1.24.0) + parser (>= 3.1.1.0) + rubocop-performance (1.15.1) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + ruby-progressbar (1.11.0) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + standard (1.20.0) + language_server-protocol (~> 3.17.0.2) + rubocop (= 1.40.0) + rubocop-performance (= 1.15.1) + unicode-display_width (2.3.0) PLATFORMS + universal-java-17 + x86_64-darwin-19 + x86_64-darwin-20 x86_64-darwin-21 + x86_64-darwin-22 + x86_64-linux DEPENDENCIES minitest (~> 5.0) pairing_heap! rake (~> 13.0) + simplecov (~> 0.22.0) + standard (~> 1.20) BUNDLED WITH 2.3.6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2022-09-04 21:41:24.000000000 +0200 +++ new/README.md 2023-04-09 15:46:33.000000000 +0200 @@ -1,4 +1,5 @@ # PairingHeap +[](https://github.com/testdouble/standard) PairingHeap is a pure Ruby priority queue implementation using a pairing heap as the underlying data structure. While a pairing heap is asymptotically less efficient than the Fibonacci heap, it is usually faster in practice. This makes it a popular choice for Prim's MST or Dijkstra's algorithm implementations. @@ -36,8 +37,8 @@ simple_heap.push(:b, 2) simple_heap.push(:c, 3) simple_heap.peek # => :a -simple_heap.peek_priority # => [:a, 1] -simple_heap.pop_priority # => [:a, 1] +simple_heap.peek_priority # => 1 +simple_heap.pop_with_priority # => [:a, 1] simple_heap.pop # => :b # Min priority queue @@ -931,14 +932,14 @@ <td>1.359x slower</td> </tr> <tr> - <td>lazy_priority_queue</td> - <td>2.115x slower</td> - </tr> - <tr> <td>Fibonacci</td> <td>1.824x slower</td> </tr> <tr> + <td>lazy_priority_queue</td> + <td>2.115x slower</td> + </tr> + <tr> <th colspan="4">truffleruby 22.2.0, like ruby 3.0.3, GraalVM CE JVM [x86_64-darwin]</th> </tr> <tr> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2022-09-04 21:41:24.000000000 +0200 +++ new/Rakefile 2023-04-09 15:46:33.000000000 +0200 @@ -2,6 +2,7 @@ require "bundler/gem_tasks" require "rake/testtask" +require "standard/rake" Rake::TestTask.new(:test) do |t| t.libs << "test" @@ -9,4 +10,4 @@ t.test_files = FileList["test/**/*_test.rb"] end -task default: %i[test] +task default: %i[test standard] Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pairing_heap/version.rb new/lib/pairing_heap/version.rb --- old/lib/pairing_heap/version.rb 2022-09-04 21:41:24.000000000 +0200 +++ new/lib/pairing_heap/version.rb 2023-04-09 15:46:33.000000000 +0200 @@ -1,5 +1,5 @@ # frozen_string_literal: true module PairingHeap - VERSION = "1.0.0" + VERSION = "3.0.1" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/pairing_heap.rb new/lib/pairing_heap.rb --- old/lib/pairing_heap.rb 2022-09-04 21:41:24.000000000 +0200 +++ new/lib/pairing_heap.rb 2023-04-09 15:46:33.000000000 +0200 @@ -57,12 +57,12 @@ end def remove_from_parents_list! - if self.prev_sibling - self.prev_sibling.next_sibling = self.next_sibling - self.next_sibling.prev_sibling = self.prev_sibling if self.next_sibling - elsif self.parent.subheaps.equal?(self) - self.parent.subheaps = self.next_sibling - self.next_sibling.prev_sibling = nil if self.next_sibling + if prev_sibling + prev_sibling.next_sibling = next_sibling + next_sibling.prev_sibling = prev_sibling if next_sibling + else # parent.subheaps must equal self + parent.subheaps = next_sibling + next_sibling.prev_sibling = nil if next_sibling end self.prev_sibling = nil self.next_sibling = nil @@ -70,7 +70,8 @@ end private_constant :Node - # @param &block Optional heap property priority comparator. `<:=.to_proc` by default + # @yield [l_priority, r_priority] Optional heap property priority comparator. `<:=.to_proc` by default + # @yieldreturn [boolean] if `l_priority` is more prioritary than `r_priority`, or the priorities are equal def initialize(&block) @root = nil @nodes = {} @@ -82,32 +83,38 @@ # @param elem Element to be pushed # @param priority Priority of the element # @raise [ArgumentError] if the element is already in the heap - # @return [PairingHeap] - def push(elem, priority) + # @return [self] + def push(elem, priority = elem) raise ArgumentError, "Element already in the heap" if @nodes.key?(elem) node = Node.new(elem, priority) @nodes[elem] = node - if @root - @root = meld(@root, node) + @root = if @root + meld(@root, node) else - @root = node + node end self end - alias enqueue push - alias offer push + alias_method :enqueue, :push + alias_method :offer, :push # Returns the element at the top of the heap # Time Complexity: O(1) + # @return [Object] + # @return [nil] if the heap is empty def peek @root&.elem end + # @return [Object] + # @return [nil] if the heap is empty def peek_priority @root&.priority end + # @return [Array(Object, Object)] + # @return [Array(nil, nil)] if the heap is empty def peek_with_priority [@root&.elem, @root&.priority] end @@ -129,14 +136,15 @@ def size @nodes.size end - alias length size + alias_method :length, :size # Removes element from the top of the heap and returns it # Time Complexity: O(N) # Amortized time Complexity: O(log(N)) - # @raise [ArgumentError] if the heap is empty + # @return [Object] The top element + # @return [nil] If the heap is empty def pop - raise ArgumentError, "Cannot remove from an empty heap" if @root.nil? + return nil if @root.nil? elem = @root.elem @nodes.delete(elem) @@ -148,12 +156,24 @@ end elem end - alias dequeue pop + alias_method :dequeue, :pop + # @see #pop + # @return [Object] + # @return [nil] if the heap is empty def pop_priority node = @root pop - [node.elem, node.priority] + node&.priority + end + + # @see #pop + # @return [Array(Object, Object)] + # @return [Array(nil, nil)] If the heap is empty + def pop_with_priority + node = @root + pop + [node&.elem, node&.priority] end # Changes a priority of element to a more prioritary one @@ -162,7 +182,7 @@ # @param elem Element # @param priority New priority # @raise [ArgumentError] if the element is not in the heap or the new priority is less prioritary - # @return [PairingHeap] + # @return [self] def change_priority(elem, priority) node = @nodes[elem] raise ArgumentError, "Provided element is not in heap" if node.nil? @@ -171,8 +191,8 @@ end node.priority = priority - return if node.parent.nil? - return if @order[node.parent.priority, node.priority] + return self if node.parent.nil? + return self if @order[node.parent.priority, node.priority] node.remove_from_parents_list! @root = meld(node, @root) @@ -184,7 +204,7 @@ # Time Complexity: O(N) # Amortized Time Complexity: O(log(N)) # @raise [ArgumentError] if the element is not in the heap - # @return [PairingHeap] + # @return [self] def delete(elem) node = @nodes[elem] raise ArgumentError, "Provided element is not in heap" if node.nil? @@ -210,16 +230,54 @@ self end + # Check if element is in the heap + # Time Complexity: O(1) + # @return [Boolean] + def include?(key) + @nodes.key?(key) + end + alias_method :exists?, :include? + # Returns priority of the provided element # Time Complexity: O(1) - # @raise [ArgumentError] if the element is not in the heap + # @return [Object] + # @return [nil] If element does not exist def get_priority(elem) node = @nodes[elem] - raise ArgumentError, "Provided element is not in heap" if node.nil? - node.priority + node&.priority + end + + # Returns a pair where first element is success flag, and second element is priority + # Time Complexity: O(1) + # @return [Array(false, nil)] if the element is not in heap + # @return [Array(true, Object)] if the element is in heap; + # second element of returned tuple is the priority + def get_priority_if_exists(elem) + node = @nodes[elem] + return [false, nil] if node.nil? + [true, node.priority] + end + + # Returns enumerator of elements. + # @note There are no order guarantees. + # @yieldparam [Object] element Element in the heap + # @return [Enumerator<Object>] + def each + return to_enum(__method__) { size } unless block_given? + @nodes.each_value { |node| yield node.elem } + end + + # Returns enumerator of elements. + # @note There are no order guarantees. + # @return [Enumerator<Array(Object, Object)>] if no block given + # @yieldparam [Array(Object, Object)] element Element in the heap with its priority + def each_with_priority + return to_enum(__method__) { size } unless block_given? + @nodes.each_value { |node| yield [node.elem, node.priority] } end private + include MergePairs def meld(left, right) @@ -251,7 +309,8 @@ end private_constant :Node - # @param &block Optional heap property priority comparator. `<:=.to_proc` by default + # @yield [l_priority, r_priority] Optional heap property priority comparator. `<:=.to_proc` by default + # @yieldreturn [boolean] if `l_priority` is more prioritary than `r_priority`, or the priorities are equal def initialize(&block) @root = nil @order = block || :<=.to_proc @@ -262,30 +321,36 @@ # Time Complexity: O(1) # @param elem Element to be pushed # @param priority Priority of the element - # @return [PairingHeap] - def push(elem, priority) + # @return [self] + def push(elem, priority = elem) node = Node.new(elem, priority) - if @root - @root = meld(@root, node) + @root = if @root + meld(@root, node) else - @root = node + node end @size += 1 self end - alias enqueue push - alias offer push + alias_method :enqueue, :push + alias_method :offer, :push # Returns the element at the top of the heap # Time Complexity: O(1) + # @return [Object] + # @return [nil] If the heap is empty def peek @root&.elem end + # @return [Object] + # @return [nil] If the heap is empty def peek_priority @root&.priority end + # @return [Array(Object, Object)] + # @return [Array(nil, nil)] If the heap is empty def peek_with_priority [@root&.elem, @root&.priority] end @@ -304,17 +369,16 @@ # Time Complexity: O(1) # @return [Integer] - def size - @size - end - alias length size + attr_reader :size + alias_method :length, :size - # Removes element from the top of the heap and returns it + # Removes an element from the top of the heap and returns it # Time Complexity: O(N) # Amortized time Complexity: O(log(N)) - # @raise [ArgumEntError] if the heap is empty + # @return [Object] The top element + # @return [nil] If the heap is empty def pop - raise ArgumentError, "Cannot remove from an empty heap" if @root.nil? + return nil if @root.nil? @size -= 1 elem = @root.elem @@ -323,21 +387,46 @@ elem end - alias dequeue pop + alias_method :dequeue, :pop + # @see #pop + # @return [Object] + # @return [nil] If the heap is empty def pop_priority node = @root pop - node.priority + node&.priority end + # @see #pop + # @return [Array(Object, Object)] + # @return [Array(nil, nil)] If the heap is empty def pop_with_priority node = @root pop - [node.elem, node.priority] + [node&.elem, node&.priority] + end + + # Returns enumerator of elements. + # @note There are no order guarantees. + # @yieldparam [Object] element element in the heap + # @return [Enumerator<Object>] if no block given + def each + return to_enum(__method__) { size } unless block_given? + NodeVisitor.visit_node(@root) { |x| yield x.elem } + end + + # @return [Enumerator<Array(Object, Object)>] if no block given + # @yieldparam [Array(Object, Object)] element Element in the heap with its priority + # Returns enumerator of elements. + # @note There are no order guarantees. + def each_with_priority + return to_enum(__method__) { size } unless block_given? + NodeVisitor.visit_node(@root) { |x| yield [x.elem, x.priority] } end private + include MergePairs def meld(left, right) @@ -354,16 +443,15 @@ end end - # Priority queue where the smallest priority is the most prioritary class MinPriorityQueue < PairingHeap def initialize super(&:<=) end - alias decrease_key change_priority - alias min peek - alias extract_min dequeue + alias_method :decrease_key, :change_priority + alias_method :min, :peek + alias_method :extract_min, :dequeue end # Priority queue where the highest priority is the most prioritary @@ -372,18 +460,18 @@ super(&:>=) end - alias increase_key change_priority - alias max peek - alias extract_max dequeue + alias_method :increase_key, :change_priority + alias_method :max, :peek + alias_method :extract_max, :dequeue end # Priority queue with change_priority, that accepts changing to a less prioritary priority class SafeChangePriorityQueue < PairingHeap - # Changes a priority of the element to a more prioritary one + # Changes a priority of the element # Time Complexity: O(N) # Amortized Time Complexity: O(log(N)) # @raise [ArgumentError] if the element is not in the heap - # @return [PairingHeap] + # @return [self] def change_priority(elem, priority) raise ArgumentError, "Provided element is not in heap" unless @nodes.key?(elem) if !@order[priority, @nodes[elem].priority] @@ -394,4 +482,22 @@ end end end + + module NodeVisitor + extend self + + def visit_node(node, &block) + return unless node + + block.call(node) + + if node.subheaps + visit_node(node.subheaps, &block) + end + if node.next_sibling + visit_node(node.next_sibling, &block) + end + end + end + private_constant :NodeVisitor end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2022-09-04 21:41:24.000000000 +0200 +++ new/metadata 2023-04-09 15:46:33.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: pairing_heap version: !ruby/object:Gem::Version - version: 1.0.0 + version: 3.0.1 platform: ruby authors: - Marcin Henryk Bartkowiak autorequire: bindir: exe cert_chain: [] -date: 2022-09-04 00:00:00.000000000 Z +date: 2023-04-09 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: minitest @@ -38,6 +38,34 @@ - - "~>" - !ruby/object:Gem::Version version: '13.0' +- !ruby/object:Gem::Dependency + name: simplecov + requirement: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 0.22.0 + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: 0.22.0 +- !ruby/object:Gem::Dependency + name: standard + requirement: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: '1.20' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - "~>" + - !ruby/object:Gem::Version + version: '1.20' description: Performant priority queue in pure ruby with support for changing priority using pairing heap data structure email: @@ -48,7 +76,7 @@ files: - ".github/workflows/main.yml" - ".gitignore" -- ".rubocop.yml" +- ".standard.yml" - Gemfile - Gemfile.lock - LICENSE.txt @@ -81,7 +109,7 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.3.3 +rubygems_version: 3.4.1 signing_key: specification_version: 4 summary: Performant priority queue in pure ruby with support for changing priority diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pairing_heap.gemspec new/pairing_heap.gemspec --- old/pairing_heap.gemspec 2022-09-04 21:41:24.000000000 +0200 +++ new/pairing_heap.gemspec 2023-04-09 15:46:33.000000000 +0200 @@ -3,19 +3,19 @@ require_relative "lib/pairing_heap/version" Gem::Specification.new do |spec| - spec.name = "pairing_heap" - spec.version = PairingHeap::VERSION - spec.authors = ["Marcin Henryk Bartkowiak"] - spec.email = ["mhbartkow...@gmail.com"] - - spec.summary = "Performant priority queue in pure ruby with support for changing priority" - spec.description = "Performant priority queue in pure ruby with support for changing priority using pairing heap data structure" - spec.homepage = "https://github.com/mhib/pairing_heap" - spec.license = "MIT" + spec.name = "pairing_heap" + spec.version = PairingHeap::VERSION + spec.authors = ["Marcin Henryk Bartkowiak"] + spec.email = ["mhbartkow...@gmail.com"] + + spec.summary = "Performant priority queue in pure ruby with support for changing priority" + spec.description = "Performant priority queue in pure ruby with support for changing priority using pairing heap data structure" + spec.homepage = "https://github.com/mhib/pairing_heap" + spec.license = "MIT" spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0") - spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = spec.homepage + spec.metadata["homepage_uri"] = spec.homepage + spec.metadata["source_code_uri"] = spec.homepage spec.metadata["documentation_uri"] = "https://rubydoc.info/gems/pairing_heap" # Specify which files should be added to the gem when it is released. @@ -23,8 +23,8 @@ spec.files = Dir.chdir(File.expand_path(__dir__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) } end - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } + spec.bindir = "exe" + spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] # Uncomment to register a new dependency of your gem @@ -32,6 +32,8 @@ spec.add_development_dependency "minitest", "~> 5.0" spec.add_development_dependency "rake", "~> 13.0" + spec.add_development_dependency "simplecov", "~> 0.22.0" + spec.add_development_dependency "standard", "~> 1.20" # For more information and examples about making a new gem, checkout our # guide at: https://bundler.io/guides/creating_gem.html