Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package rubygem-webfinger for 
openSUSE:Factory checked in at 2022-10-13 15:44:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-webfinger (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-webfinger.new.2275 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-webfinger"

Thu Oct 13 15:44:37 2022 rev:4 rq:1010060 version:2.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-webfinger/rubygem-webfinger.changes      
2022-02-07 23:38:38.746216444 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-webfinger.new.2275/rubygem-webfinger.changes
    2022-10-13 15:45:12.083095889 +0200
@@ -1,0 +2,6 @@
+Mon Oct 10 13:26:38 UTC 2022 - Stephan Kulow <co...@suse.com>
+
+updated to version 2.1.2
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  webfinger-1.2.0.gem

New:
----
  webfinger-2.1.2.gem

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ rubygem-webfinger.spec ++++++
--- /var/tmp/diff_new_pack.TfR2zQ/_old  2022-10-13 15:45:12.607096913 +0200
+++ /var/tmp/diff_new_pack.TfR2zQ/_new  2022-10-13 15:45:12.611096920 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-webfinger
-Version:        1.2.0
+Version:        2.1.2
 Release:        0
 %define mod_name webfinger
 %define mod_full_name %{mod_name}-%{version}
@@ -48,7 +48,7 @@
 
 %install
 %gem_install \
-  --doc-files="LICENSE.txt README.rdoc" \
+  --doc-files="CHANGELOG.md LICENSE.txt README.rdoc" \
   -f
 
 %gem_packages

++++++ webfinger-1.2.0.gem -> webfinger-2.1.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.github/FUNDING.yml new/.github/FUNDING.yml
--- old/.github/FUNDING.yml     1970-01-01 01:00:00.000000000 +0100
+++ new/.github/FUNDING.yml     2022-10-09 09:55:55.000000000 +0200
@@ -0,0 +1,3 @@
+# These are supported funding model platforms
+
+github: nov
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.github/workflows/spec.yml 
new/.github/workflows/spec.yml
--- old/.github/workflows/spec.yml      1970-01-01 01:00:00.000000000 +0100
+++ new/.github/workflows/spec.yml      2022-10-09 09:55:55.000000000 +0200
@@ -0,0 +1,32 @@
+name: Spec
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+
+permissions:
+  contents: read
+
+jobs:
+  spec:
+    strategy:
+      matrix:
+        os: ['ubuntu-20.04']
+        ruby-version: ['2.6', '2.7', '3.0', '3.1']
+        # ubuntu 22.04 only supports ssl 3 and thus only ruby 3.1
+        include:
+        - os: 'ubuntu-22.04'
+          ruby-version: '3.1'
+    runs-on: ${{ matrix.os }}
+
+    steps:
+    - uses: actions/checkout@v3
+    - name: Set up Ruby
+      uses: ruby/setup-ruby@v1
+      with:
+        ruby-version: ${{ matrix.ruby-version }}
+        bundler-cache: true
+    - name: Run Specs
+      run: bundle exec rake spec
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml     2021-10-01 04:39:17.000000000 +0200
+++ new/.travis.yml     1970-01-01 01:00:00.000000000 +0100
@@ -1,8 +0,0 @@
-before_install:
-  - gem install bundler
-
-rvm:
-  - 2.5.8
-  - 2.6.6
-  - 2.7.2
-  - 3.0.0
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    1970-01-01 01:00:00.000000000 +0100
+++ new/CHANGELOG.md    2022-10-09 09:55:55.000000000 +0200
@@ -0,0 +1,23 @@
+## [Unreleased]
+
+## [2.1.1] - 2022-10-08
+
+### Fixed
+
+- make response json indifferent accessable 
https://github.com/nov/webfinger/commit/806bc2e2220024f419f44857e5629ff7f9f78fbf
+
+## [2.1.0] - 2022-10-08
+
+### Changed
+
+- Moved to faraday v2 
https://github.com/nov/webfinger/commit/e72fa7b7c7018c809ba9ce8aae2ee64d6c1d1d02
+
+## [2.0.0] - 2022-10-08
+
+### Added
+
+- start recording CHANGELOG
+
+### Changed
+
+- Switch from httpclient to faraday https://github.com/nov/webfinger/pull/9
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.rdoc new/README.rdoc
--- old/README.rdoc     2021-10-01 04:39:17.000000000 +0200
+++ new/README.rdoc     2022-10-09 09:55:55.000000000 +0200
@@ -2,8 +2,6 @@
 
 An Ruby WebFinger client library.
 
-{<img src="https://secure.travis-ci.org/nov/webfinger.png"; 
/>}[http://travis-ci.org/nov/webfinger]
-
 Following the latest WebFinger spec discussed at IETF WebFinger WG.
 http://tools.ietf.org/html/draft-ietf-appsawg-webfinger
 
@@ -75,4 +73,4 @@
 
 == Copyright
 
-Copyright (c) 2012 nov matake. See LICENSE for details.
\ No newline at end of file
+Copyright (c) 2012 nov matake. See LICENSE for details.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2021-10-01 04:39:17.000000000 +0200
+++ new/VERSION 2022-10-09 09:55:55.000000000 +0200
@@ -1 +1 @@
-1.2.0
\ No newline at end of file
+2.1.2
\ No newline at end of file
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/webfinger/debugger/request_filter.rb 
new/lib/webfinger/debugger/request_filter.rb
--- old/lib/webfinger/debugger/request_filter.rb        2021-10-01 
04:39:17.000000000 +0200
+++ new/lib/webfinger/debugger/request_filter.rb        1970-01-01 
01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-module WebFinger
-  module Debugger
-    class RequestFilter
-      # Callback called in HTTPClient (before sending a request)
-      # request:: HTTP::Message
-      def filter_request(request)
-        started = "======= [WebFinger] HTTP REQUEST STARTED ======="
-        WebFinger.logger.info [started, request.dump].join("\n")
-      end
-
-      # Callback called in HTTPClient (after received a response)
-      # request::  HTTP::Message
-      # response:: HTTP::Message
-      def filter_response(request, response)
-        finished = "======= [WebFinger] HTTP REQUEST FINISHED ======="
-        WebFinger.logger.info ['-' * 50, response.dump, finished].join("\n")
-      end
-    end
-  end
-end
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/webfinger/debugger.rb 
new/lib/webfinger/debugger.rb
--- old/lib/webfinger/debugger.rb       2021-10-01 04:39:17.000000000 +0200
+++ new/lib/webfinger/debugger.rb       1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-Dir[File.dirname(__FILE__) + '/debugger/*.rb'].each do |file|
-  require file
-end
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/webfinger/exception.rb 
new/lib/webfinger/exception.rb
--- old/lib/webfinger/exception.rb      2021-10-01 04:39:17.000000000 +0200
+++ new/lib/webfinger/exception.rb      2022-10-09 09:55:55.000000000 +0200
@@ -33,4 +33,4 @@
       super 404, message, response
     end
   end
-end
\ No newline at end of file
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/webfinger/request.rb new/lib/webfinger/request.rb
--- old/lib/webfinger/request.rb        2021-10-01 04:39:17.000000000 +0200
+++ new/lib/webfinger/request.rb        2022-10-09 09:55:55.000000000 +0200
@@ -10,7 +10,7 @@
 
     def discover!
       handle_response do
-        WebFinger.http_client.get_content endpoint.to_s
+        WebFinger.http_client.get(endpoint.to_s)
       end
     end
 
@@ -50,23 +50,22 @@
     end
 
     def handle_response
-      raw_response = yield
-      jrd = JSON.parse(raw_response).with_indifferent_access
-      Response.new jrd
-    rescue HTTPClient::BadResponseError => e
-      case e.res.try(:status)
+      json = yield.body.with_indifferent_access
+      Response.new json
+    rescue Faraday::Error => e
+      case e.response_status
       when nil
-        raise e
+        raise Exception.new e
       when 400
-        raise BadRequest.new('Bad Request', raw_response)
+        raise BadRequest.new('Bad Request', e.response_body)
       when 401
-        raise Unauthorized.new('Unauthorized', raw_response)
+        raise Unauthorized.new('Unauthorized', e.response_body)
       when 403
-        raise Forbidden.new('Forbidden', raw_response)
+        raise Forbidden.new('Forbidden', e.response_body)
       when 404
-        raise NotFound.new('Not Found', raw_response)
+        raise NotFound.new('Not Found', e.response_body)
       else
-        raise HttpError.new(e.res.status, e.res.reason, raw_response)
+        raise HttpError.new(e.response_status, e.response_body, 
e.response_body)
       end
     end
   end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/webfinger.rb new/lib/webfinger.rb
--- old/lib/webfinger.rb        2021-10-01 04:39:17.000000000 +0200
+++ new/lib/webfinger.rb        2022-10-09 09:55:55.000000000 +0200
@@ -1,5 +1,6 @@
 require 'json'
-require 'httpclient'
+require 'faraday'
+require 'faraday/follow_redirects'
 require 'active_support'
 require 'active_support/core_ext'
 
@@ -42,24 +43,21 @@
   end
 
   def http_client
-    _http_client_ = HTTPClient.new(
-      agent_name: "WebFinger (#{VERSION})"
-    )
-
-    # NOTE: httpclient gem seems stopped maintaining root certtificate set, 
use OS default.
-    _http_client_.ssl_config.clear_cert_store
-    _http_client_.ssl_config.cert_store.set_default_paths
-
-    _http_client_.request_filter << Debugger::RequestFilter.new if debugging?
-    http_config.try(:call, _http_client_)
-    _http_client_
+    Faraday.new(headers: {user_agent: "WebFinger #{VERSION}"}) do |faraday|
+      faraday.response :raise_error
+      faraday.response :json
+      faraday.response :follow_redirects
+      faraday.response :logger, WebFinger.logger if debugging?
+      faraday.adapter Faraday.default_adapter
+      http_config.try(:call, faraday)
+    end
   end
+
   def http_config(&block)
     @http_config ||= block
   end
 end
 
-require 'webfinger/debugger'
 require 'webfinger/exception'
 require 'webfinger/request'
 require 'webfinger/response'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2021-10-01 04:39:17.000000000 +0200
+++ new/metadata        2022-10-09 09:55:55.000000000 +0200
@@ -1,29 +1,43 @@
 --- !ruby/object:Gem::Specification
 name: webfinger
 version: !ruby/object:Gem::Version
-  version: 1.2.0
+  version: 2.1.2
 platform: ruby
 authors:
 - nov matake
-autorequire: 
+autorequire:
 bindir: bin
 cert_chain: []
-date: 2021-10-01 00:00:00.000000000 Z
+date: 2022-10-09 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
-  name: httpclient
+  name: faraday
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: '2.0'
+  type: :runtime
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - "~>"
+      - !ruby/object:Gem::Version
+        version: '2.0'
+- !ruby/object:Gem::Dependency
+  name: faraday-follow_redirects
   requirement: !ruby/object:Gem::Requirement
     requirements:
     - - ">="
       - !ruby/object:Gem::Version
-        version: '2.4'
+        version: '0'
   type: :runtime
   prerelease: false
   version_requirements: !ruby/object:Gem::Requirement
     requirements:
     - - ">="
       - !ruby/object:Gem::Version
-        version: '2.4'
+        version: '0'
 - !ruby/object:Gem::Dependency
   name: activesupport
   requirement: !ruby/object:Gem::Requirement
@@ -115,16 +129,16 @@
 extensions: []
 extra_rdoc_files: []
 files:
+- ".github/FUNDING.yml"
+- ".github/workflows/spec.yml"
 - ".gitignore"
-- ".travis.yml"
+- CHANGELOG.md
 - Gemfile
 - LICENSE.txt
 - README.rdoc
 - Rakefile
 - VERSION
 - lib/webfinger.rb
-- lib/webfinger/debugger.rb
-- lib/webfinger/debugger/request_filter.rb
 - lib/webfinger/exception.rb
 - lib/webfinger/request.rb
 - lib/webfinger/response.rb
@@ -134,7 +148,6 @@
 - spec/mock_json/email_config.json
 - spec/mock_json/open_id.json
 - spec/spec_helper.rb
-- spec/webfinger/debugger/request_filter_spec.rb
 - spec/webfinger/response_spec.rb
 - spec/webfinger_spec.rb
 - webfinger.gemspec
@@ -142,7 +155,7 @@
 licenses:
 - MIT
 metadata: {}
-post_install_message: 
+post_install_message:
 rdoc_options: []
 require_paths:
 - lib
@@ -157,8 +170,8 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubygems_version: 3.1.4
-signing_key: 
+rubygems_version: 3.3.7
+signing_key:
 specification_version: 4
 summary: Ruby WebFinger client library, following IETF WebFinger WG spec 
updates.
 test_files:
@@ -168,6 +181,5 @@
 - spec/mock_json/email_config.json
 - spec/mock_json/open_id.json
 - spec/spec_helper.rb
-- spec/webfinger/debugger/request_filter_spec.rb
 - spec/webfinger/response_spec.rb
 - spec/webfinger_spec.rb
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/helpers/webmock_helper.rb 
new/spec/helpers/webmock_helper.rb
--- old/spec/helpers/webmock_helper.rb  2021-10-01 04:39:17.000000000 +0200
+++ new/spec/helpers/webmock_helper.rb  2022-10-09 09:55:55.000000000 +0200
@@ -26,6 +26,9 @@
 
   def response_for(response_file, options = {})
     response = {}
+    response[:headers] = {
+      'Content-Type': 'application/json'
+    }
     response[:body] = File.new(File.join(File.dirname(__FILE__), 
'../mock_json', "#{response_file}.json"))
     if options[:status]
       response[:status] = options[:status]
@@ -35,4 +38,4 @@
 end
 
 include WebMockHelper
-WebMock.disable_net_connect!
\ No newline at end of file
+WebMock.disable_net_connect!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/webfinger/debugger/request_filter_spec.rb 
new/spec/webfinger/debugger/request_filter_spec.rb
--- old/spec/webfinger/debugger/request_filter_spec.rb  2021-10-01 
04:39:17.000000000 +0200
+++ new/spec/webfinger/debugger/request_filter_spec.rb  1970-01-01 
01:00:00.000000000 +0100
@@ -1,29 +0,0 @@
-require 'spec_helper'
-
-describe WebFinger::Debugger::RequestFilter do
-  let(:resource_endpoint) { 'https://example.com/resources' }
-  let(:request) { HTTP::Message.new_request(:get, 
URI.parse(resource_endpoint)) }
-  let(:response) { HTTP::Message.new_response({:hello => 'world'}.to_json) }
-  let(:request_filter) { WebFinger::Debugger::RequestFilter.new }
-
-  describe '#filter_request' do
-    it 'should log request' do
-      expect(WebFinger.logger).to receive(:info).with(
-        "======= [WebFinger] HTTP REQUEST STARTED =======\n" +
-        request.dump
-      )
-      request_filter.filter_request(request)
-    end
-  end
-
-  describe '#filter_response' do
-    it 'should log response' do
-      expect(WebFinger.logger).to receive(:info).with(
-        "--------------------------------------------------\n" +
-        response.dump +
-        "\n======= [WebFinger] HTTP REQUEST FINISHED ======="
-      )
-      request_filter.filter_response(request, response)
-    end
-  end
-end
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/webfinger_spec.rb new/spec/webfinger_spec.rb
--- old/spec/webfinger_spec.rb  2021-10-01 04:39:17.000000000 +0200
+++ new/spec/webfinger_spec.rb  2022-10-09 09:55:55.000000000 +0200
@@ -157,17 +157,17 @@
   describe '#http_client' do
     subject { WebFinger.http_client }
 
-    describe '#request_filter' do
-      subject { WebFinger.http_client.request_filter.collect(&:class) }
+    describe '#logger' do
+      subject { WebFinger.http_client.builder.handlers.collect(&:klass) }
 
       context 'as default' do
-        it { should_not include WebFinger::Debugger::RequestFilter }
+        it { should_not include Faraday::Response::Logger }
       end
 
       context 'when debugging' do
         before { WebFinger.debug! }
-        it { should include WebFinger::Debugger::RequestFilter }
+        it { should include Faraday::Response::Logger }
       end
     end
   end
-end
\ No newline at end of file
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/webfinger.gemspec new/webfinger.gemspec
--- old/webfinger.gemspec       2021-10-01 04:39:17.000000000 +0200
+++ new/webfinger.gemspec       2022-10-09 09:55:55.000000000 +0200
@@ -12,7 +12,8 @@
   gem.executables   = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
   gem.test_files    = gem.files.grep(%r{^(test|spec|features)/})
   gem.require_paths = ['lib']
-  gem.add_runtime_dependency 'httpclient', '>= 2.4'
+  gem.add_runtime_dependency 'faraday', '~> 2.0'
+  gem.add_runtime_dependency 'faraday-follow_redirects'
   gem.add_runtime_dependency 'activesupport'
   gem.add_development_dependency 'rake'
   gem.add_development_dependency 'rspec'

Reply via email to