Hello community,

here is the log from the commit of package rubygem-omniauth-github for 
openSUSE:Factory checked in at 2020-05-11 13:39:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-omniauth-github (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-omniauth-github.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-omniauth-github"

Mon May 11 13:39:05 2020 rev:2 rq:802358 version:1.4.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/rubygem-omniauth-github/rubygem-omniauth-github.changes
  2018-02-15 13:24:51.433390605 +0100
+++ 
/work/SRC/openSUSE:Factory/.rubygem-omniauth-github.new.2738/rubygem-omniauth-github.changes
        2020-05-11 13:39:11.472845581 +0200
@@ -1,0 +2,6 @@
+Thu May  7 21:10:51 UTC 2020 - Stephan Kulow <[email protected]>
+
+- updated to version 1.4.0
+  no changelog found
+
+-------------------------------------------------------------------

Old:
----
  omniauth-github-1.3.0.gem

New:
----
  omniauth-github-1.4.0.gem

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

Other differences:
------------------
++++++ rubygem-omniauth-github.spec ++++++
--- /var/tmp/diff_new_pack.6hNOYU/_old  2020-05-11 13:39:12.312847342 +0200
+++ /var/tmp/diff_new_pack.6hNOYU/_new  2020-05-11 13:39:12.316847351 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package rubygem-omniauth-github
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-omniauth-github
-Version:        1.3.0
+Version:        1.4.0
 Release:        0
 %define mod_name omniauth-github
 %define mod_full_name %{mod_name}-%{version}
@@ -32,8 +32,8 @@
 BuildRequires:  %{rubygem gem2rpm}
 BuildRequires:  %{ruby}
 BuildRequires:  ruby-macros >= 5
-Url:            https://github.com/intridea/omniauth-github
-Source:         http://rubygems.org/gems/%{mod_full_name}.gem
+URL:            https://github.com/intridea/omniauth-github
+Source:         https://rubygems.org/gems/%{mod_full_name}.gem
 Source1:        gem2rpm.yml
 Summary:        Official OmniAuth strategy for GitHub
 License:        MIT

++++++ omniauth-github-1.3.0.gem -> omniauth-github-1.4.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.github/workflows/ruby.yml 
new/.github/workflows/ruby.yml
--- old/.github/workflows/ruby.yml      1970-01-01 01:00:00.000000000 +0100
+++ new/.github/workflows/ruby.yml      2020-02-11 05:13:21.000000000 +0100
@@ -0,0 +1,22 @@
+name: Ruby
+
+on: [push]
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        ruby-version: ['2.4', '2.5', '2.6']
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Ruby ${{ matrix.ruby-version }}
+      uses: actions/setup-ruby@v1
+      with:
+        ruby-version: ${{ matrix.ruby-version }}
+    - name: Build and test with Rake
+      run: |
+        gem install bundler
+        bundle install --jobs 4 --retry 3
+        bundle exec rake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2017-05-23 17:59:51.000000000 +0200
+++ new/README.md       2020-02-11 05:13:21.000000000 +0100
@@ -1,9 +1,17 @@
+![Ruby](https://github.com/omniauth/omniauth-github/workflows/Ruby/badge.svg?branch=master)
+
 # OmniAuth GitHub
 
 This is the official OmniAuth strategy for authenticating to GitHub. To
 use it, you'll need to sign up for an OAuth2 Application ID and Secret
 on the [GitHub Applications Page](https://github.com/settings/applications).
 
+## Installation
+
+```ruby
+gem 'omniauth-github', github: 'omniauth/omniauth-github', branch: 'master'
+```
+
 ## Basic Usage
 
 ```ruby
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/omniauth/strategies/github.rb 
new/lib/omniauth/strategies/github.rb
--- old/lib/omniauth/strategies/github.rb       2017-05-23 17:59:51.000000000 
+0200
+++ new/lib/omniauth/strategies/github.rb       2020-02-11 05:13:21.000000000 
+0100
@@ -39,11 +39,11 @@
       end
 
       extra do
-        {:raw_info => raw_info, :all_emails => emails}
+        {:raw_info => raw_info, :all_emails => emails, :scope => scope }
       end
 
       def raw_info
-        access_token.options[:mode] = :query
+        access_token.options[:mode] = :header
         @raw_info ||= access_token.get('user').parsed
       end
 
@@ -51,6 +51,10 @@
         (email_access_allowed?) ? primary_email : raw_info['email']
       end
 
+      def scope
+        access_token['scope']
+      end
+
       def primary_email
         primary = emails.find{ |i| i['primary'] && i['verified'] }
         primary && primary['email'] || nil
@@ -59,7 +63,7 @@
       # The new /user/emails API - 
http://developer.github.com/v3/users/emails/#future-response
       def emails
         return [] unless email_access_allowed?
-        access_token.options[:mode] = :query
+        access_token.options[:mode] = :header
         @emails ||= access_token.get('user/emails', :headers => { 'Accept' => 
'application/vnd.github.v3' }).parsed
       end
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/omniauth-github/version.rb 
new/lib/omniauth-github/version.rb
--- old/lib/omniauth-github/version.rb  2017-05-23 17:59:51.000000000 +0200
+++ new/lib/omniauth-github/version.rb  2020-02-11 05:13:21.000000000 +0100
@@ -1,5 +1,5 @@
 module OmniAuth
   module GitHub
-    VERSION = "1.3.0"
+    VERSION = "1.4.0"
   end
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2017-05-23 17:59:51.000000000 +0200
+++ new/metadata        2020-02-11 05:13:21.000000000 +0100
@@ -1,14 +1,14 @@
 --- !ruby/object:Gem::Specification
 name: omniauth-github
 version: !ruby/object:Gem::Version
-  version: 1.3.0
+  version: 1.4.0
 platform: ruby
 authors:
 - Michael Bleigh
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2017-05-23 00:00:00.000000000 Z
+date: 2020-02-11 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: omniauth
@@ -107,6 +107,7 @@
 extensions: []
 extra_rdoc_files: []
 files:
+- ".github/workflows/ruby.yml"
 - ".gitignore"
 - ".rspec"
 - Gemfile
@@ -139,8 +140,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubyforge_project: 
-rubygems_version: 2.6.11
+rubygems_version: 3.0.3
 signing_key: 
 specification_version: 4
 summary: Official OmniAuth strategy for GitHub.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/omniauth/strategies/github_spec.rb 
new/spec/omniauth/strategies/github_spec.rb
--- old/spec/omniauth/strategies/github_spec.rb 2017-05-23 17:59:51.000000000 
+0200
+++ new/spec/omniauth/strategies/github_spec.rb 2020-02-11 05:13:21.000000000 
+0100
@@ -1,7 +1,7 @@
 require 'spec_helper'
 
 describe OmniAuth::Strategies::GitHub do
-  let(:access_token) { instance_double('AccessToken', :options => {}) }
+  let(:access_token) { instance_double('AccessToken', :options => {}, :[] => 
'user') }
   let(:parsed_response) { instance_double('ParsedResponse') }
   let(:response) { instance_double('Response', :parsed => parsed_response) }
 
@@ -122,6 +122,12 @@
       expect(access_token).to receive(:get).with('user').and_return(response)
       expect(subject.raw_info).to eq(parsed_response)
     end
+
+    it 'should use the header auth mode' do
+      expect(access_token).to receive(:get).with('user').and_return(response)
+      subject.raw_info
+      expect(access_token.options[:mode]).to eq(:header)
+    end
   end
 
   context '#emails' do
@@ -133,6 +139,16 @@
       subject.options['scope'] = 'user'
       expect(subject.emails).to eq(parsed_response)
     end
+
+    it 'should use the header auth mode' do
+      expect(access_token).to receive(:get).with('user/emails', :headers => {
+        'Accept' => 'application/vnd.github.v3'
+      }).and_return(response)
+
+      subject.options['scope'] = 'user'
+      subject.emails
+      expect(access_token.options[:mode]).to eq(:header)
+    end
   end
 
   context '#info.email' do
@@ -150,6 +166,12 @@
     end
   end
 
+  context '#extra.scope' do
+    it 'returns the scope on the returned access_token' do
+      expect(subject.scope).to eq('user')
+    end
+  end
+
   describe '#callback_url' do
     it 'is a combination of host, script name, and callback path' do
       allow(subject).to receive(:full_host).and_return('https://example.com')


Reply via email to