Hello community,

here is the log from the commit of package rubygem-pundit for openSUSE:Factory 
checked in at 2019-08-16 15:45:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-pundit (Old)
 and      /work/SRC/openSUSE:Factory/.rubygem-pundit.new.22127 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "rubygem-pundit"

Fri Aug 16 15:45:04 2019 rev:3 rq:723543 version:2.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-pundit/rubygem-pundit.changes    
2019-06-19 21:00:50.950110713 +0200
+++ /work/SRC/openSUSE:Factory/.rubygem-pundit.new.22127/rubygem-pundit.changes 
2019-08-16 15:45:13.781706650 +0200
@@ -1,0 +2,13 @@
+Thu Aug 15 13:31:57 UTC 2019 - Manuel Schnitzer <mschnit...@suse.com>
+
+- updated to version 2.1.0
+
+  ### Fixed
+
+  - Avoid name clashes with the Error class. (#590)
+
+  ### Changed
+
+  - Return a safer default NotAuthorizedError message. (#583)
+
+-------------------------------------------------------------------

Old:
----
  pundit-2.0.1.gem

New:
----
  pundit-2.1.0.gem

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

Other differences:
------------------
++++++ rubygem-pundit.spec ++++++
--- /var/tmp/diff_new_pack.qjvaXx/_old  2019-08-16 15:45:14.929706316 +0200
+++ /var/tmp/diff_new_pack.qjvaXx/_new  2019-08-16 15:45:14.941706313 +0200
@@ -24,7 +24,7 @@
 #
 
 Name:           rubygem-pundit
-Version:        2.0.1
+Version:        2.1.0
 Release:        0
 %define mod_name pundit
 %define mod_full_name %{mod_name}-%{version}

++++++ pundit-2.0.1.gem -> pundit-2.1.0.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.rubocop.yml new/.rubocop.yml
--- old/.rubocop.yml    2019-01-18 14:05:13.000000000 +0100
+++ new/.rubocop.yml    2019-08-14 13:31:38.000000000 +0200
@@ -30,33 +30,9 @@
 Metrics/PerceivedComplexity:
   Enabled: false
 
-Style/StructInheritance:
-  Enabled: false
-
 Layout/AlignParameters:
   EnforcedStyle: with_fixed_indentation
 
-Style/StringLiterals:
-  EnforcedStyle: double_quotes
-
-Style/StringLiteralsInInterpolation:
-  EnforcedStyle: double_quotes
-
-Layout/ClosingParenthesisIndentation:
-  Enabled: false
-
-Style/OneLineConditional:
-  Enabled: false
-
-Style/AndOr:
-  Enabled: false
-
-Style/Not:
-  Enabled: false
-
-Documentation:
-  Enabled: false # TODO: Enable again once we have more docs
-
 Layout/CaseIndentation:
   EnforcedStyle: case
   SupportedStyles:
@@ -64,40 +40,37 @@
     - end
   IndentOneStep: true
 
-Style/PercentLiteralDelimiters:
-  PreferredDelimiters:
-    '%w': "[]"
-    '%W': "[]"
-
 Layout/AccessModifierIndentation:
   EnforcedStyle: outdent
 
-Style/SignalException:
-  Enabled: false
-
-Layout/IndentationWidth:
-  Enabled: false
-
-Style/TrivialAccessors:
-  ExactNameMatch: true
-
 Layout/EndAlignment:
   EnforcedStyleAlignWith: variable
 
-Layout/DefEndAlignment:
-  Enabled: false
+Style/FrozenStringLiteralComment:
+  Enabled: true
 
-Lint/HandleExceptions:
-  Enabled: false
+Style/PercentLiteralDelimiters:
+  PreferredDelimiters:
+    '%w': "[]"
+    '%W': "[]"
 
-Style/SpecialGlobalVars:
+Style/StringLiterals:
+  EnforcedStyle: double_quotes
+
+Style/StringLiteralsInInterpolation:
+  EnforcedStyle: double_quotes
+
+Style/StructInheritance:
   Enabled: false
 
-Style/TrivialAccessors:
+Style/AndOr:
   Enabled: false
 
-Layout/IndentHash:
+Style/Not:
   Enabled: false
 
 Style/DoubleNegation:
   Enabled: false
+
+Documentation:
+  Enabled: false # TODO: Enable again once we have more docs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml     2019-01-18 14:05:13.000000000 +0100
+++ new/.travis.yml     2019-08-14 13:31:38.000000000 +0200
@@ -4,17 +4,18 @@
 
 matrix:
   include:
-    - rvm: 2.5.1
+    - rvm: 2.5.1 # Pre-installed Ruby version
       script: bundle exec rake rubocop # ONLY lint once, first
     - rvm: 2.1
     - rvm: 2.2
     - rvm: 2.3.5
-    - rvm: 2.4.2
-    - rvm: 2.5.1
-    - rvm: 2.6.0
+    - rvm: 2.4.6
+    - rvm: 2.5.5
+    - rvm: 2.6.3
     - rvm: jruby-9.1.8.0
       env:
         - JRUBY_OPTS="--debug"
-    - rvm: jruby-9.2.5.0
+      jdk: openjdk8
+    - rvm: jruby-9.2.8.0
       env:
         - JRUBY_OPTS="--debug"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md
--- old/CHANGELOG.md    2019-01-18 14:05:13.000000000 +0100
+++ new/CHANGELOG.md    2019-08-14 13:31:38.000000000 +0200
@@ -1,5 +1,13 @@
 # Pundit
 
+### Fixed
+
+- Avoid name clashes with the Error class. (#590)
+
+### Changed
+
+- Return a safer default NotAuthorizedError message. (#583)
+
 ## 2.0.1 (2019-01-18)
 
 ### Breaking changes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2019-01-18 14:05:13.000000000 +0100
+++ new/Gemfile 2019-08-14 13:31:38.000000000 +0200
@@ -1,16 +1,7 @@
+# frozen_string_literal: true
+
 source "https://rubygems.org";
 
 ruby RUBY_VERSION
 
 gemspec
-
-group :development, :test do
-  gem "actionpack"
-  gem "activemodel"
-  gem "bundler"
-  gem "pry"
-  gem "rake"
-  gem "rspec"
-  gem "rubocop"
-  gem "yard"
-end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/LICENSE.txt new/LICENSE.txt
--- old/LICENSE.txt     2019-01-18 14:05:13.000000000 +0100
+++ new/LICENSE.txt     2019-08-14 13:31:38.000000000 +0200
@@ -1,4 +1,4 @@
-Copyright (c) 2018 Jonas Nicklas, Varvet AB
+Copyright (c) 2019 Jonas Nicklas, Varvet AB
 
 MIT License
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md       2019-01-18 14:05:13.000000000 +0100
+++ new/README.md       2019-08-14 13:31:38.000000000 +0200
@@ -785,6 +785,10 @@
 - [Using Pundit outside of a Rails 
controller](https://github.com/varvet/pundit/pull/136)
 - [Straightforward Rails Authorization with 
Pundit](http://www.sitepoint.com/straightforward-rails-authorization-with-pundit/)
 
+## Other implementations
+
+- [Flask-Pundit](https://github.com/anurag90x/flask-pundit) (Python) is a 
[Flask](http://flask.pocoo.org/) extension "heavily inspired by" Pundit
+
 # License
 
 Licensed under the MIT license, see the separate LICENSE.txt file.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Rakefile new/Rakefile
--- old/Rakefile        2019-01-18 14:05:13.000000000 +0100
+++ new/Rakefile        2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "rubygems"
 require "bundler/gem_tasks"
 require "rspec/core/rake_task"
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pundit/policy_finder.rb 
new/lib/pundit/policy_finder.rb
--- old/lib/pundit/policy_finder.rb     2019-01-18 14:05:13.000000000 +0100
+++ new/lib/pundit/policy_finder.rb     2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 module Pundit
   # Finds policy and scope classes for given object.
   # @api public
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pundit/rspec.rb new/lib/pundit/rspec.rb
--- old/lib/pundit/rspec.rb     2019-01-18 14:05:13.000000000 +0100
+++ new/lib/pundit/rspec.rb     2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "active_support/core_ext/array/conversions"
 
 module Pundit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pundit/version.rb new/lib/pundit/version.rb
--- old/lib/pundit/version.rb   2019-01-18 14:05:13.000000000 +0100
+++ new/lib/pundit/version.rb   2019-08-14 13:31:38.000000000 +0200
@@ -1,5 +1,5 @@
 # frozen_string_literal: true
 
 module Pundit
-  VERSION = "2.0.1".freeze
+  VERSION = "2.1.0".freeze
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/lib/pundit.rb new/lib/pundit.rb
--- old/lib/pundit.rb   2019-01-18 14:05:13.000000000 +0100
+++ new/lib/pundit.rb   2019-08-14 13:31:38.000000000 +0200
@@ -8,6 +8,11 @@
 require "active_support/core_ext/module/introspection"
 require "active_support/dependencies/autoload"
 
+# @api private
+# To avoid name clashes with common Error naming when mixing in Pundit,
+# keep it here with compact class style definition.
+class Pundit::Error < StandardError; end # rubocop:disable 
Style/ClassAndModuleChildren
+
 # @api public
 module Pundit
   SUFFIX = "Policy".freeze
@@ -15,9 +20,6 @@
   # @api private
   module Generators; end
 
-  # @api private
-  class Error < StandardError; end
-
   # Error that will be raised when authorization has failed
   class NotAuthorizedError < Error
     attr_reader :query, :record, :policy
@@ -30,7 +32,7 @@
         @record = options[:record]
         @policy = options[:policy]
 
-        message = options.fetch(:message) { "not allowed to #{query} this 
#{record.inspect}" }
+        message = options.fetch(:message) { "not allowed to #{query} this 
#{record.class}" }
       end
 
       super(message)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata        2019-01-18 14:05:13.000000000 +0100
+++ new/metadata        2019-08-14 13:31:38.000000000 +0200
@@ -1,7 +1,7 @@
 --- !ruby/object:Gem::Specification
 name: pundit
 version: !ruby/object:Gem::Version
-  version: 2.0.1
+  version: 2.1.0
 platform: ruby
 authors:
 - Jonas Nicklas
@@ -9,7 +9,7 @@
 autorequire: 
 bindir: bin
 cert_chain: []
-date: 2019-01-18 00:00:00.000000000 Z
+date: 2019-08-14 00:00:00.000000000 Z
 dependencies:
 - !ruby/object:Gem::Dependency
   name: activesupport
@@ -25,6 +25,118 @@
     - - ">="
       - !ruby/object:Gem::Version
         version: 3.0.0
+- !ruby/object:Gem::Dependency
+  name: actionpack
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: 3.0.0
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: 3.0.0
+- !ruby/object:Gem::Dependency
+  name: activemodel
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: 3.0.0
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: 3.0.0
+- !ruby/object:Gem::Dependency
+  name: bundler
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: pry
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: rake
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+- !ruby/object:Gem::Dependency
+  name: rspec
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: 2.0.0
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: 2.0.0
+- !ruby/object:Gem::Dependency
+  name: rubocop
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - '='
+      - !ruby/object:Gem::Version
+        version: 0.57.2
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - '='
+      - !ruby/object:Gem::Version
+        version: 0.57.2
+- !ruby/object:Gem::Dependency
+  name: yard
+  requirement: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
+  type: :development
+  prerelease: false
+  version_requirements: !ruby/object:Gem::Requirement
+    requirements:
+    - - ">="
+      - !ruby/object:Gem::Version
+        version: '0'
 description: Object oriented authorization for Rails applications
 email:
 - jonas.nick...@gmail.com
@@ -82,8 +194,7 @@
     - !ruby/object:Gem::Version
       version: '0'
 requirements: []
-rubyforge_project: 
-rubygems_version: 2.5.2
+rubygems_version: 3.0.3
 signing_key: 
 specification_version: 4
 summary: OO authorization for Rails
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pundit.gemspec new/pundit.gemspec
--- old/pundit.gemspec  2019-01-18 14:05:13.000000000 +0100
+++ new/pundit.gemspec  2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 lib = File.expand_path("lib", __dir__)
 $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
 require "pundit/version"
@@ -12,10 +14,18 @@
   gem.homepage      = "https://github.com/varvet/pundit";
   gem.license       = "MIT"
 
-  gem.files         = `git ls-files`.split($/)
+  gem.files         = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
   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_dependency "activesupport", ">= 3.0.0"
+  gem.add_development_dependency "actionpack", ">= 3.0.0"
+  gem.add_development_dependency "activemodel", ">= 3.0.0"
+  gem.add_development_dependency "bundler"
+  gem.add_development_dependency "pry"
+  gem.add_development_dependency "rake"
+  gem.add_development_dependency "rspec", ">= 2.0.0"
+  gem.add_development_dependency "rubocop", "0.57.2"
+  gem.add_development_dependency "yard"
 end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/policies/post_policy_spec.rb 
new/spec/policies/post_policy_spec.rb
--- old/spec/policies/post_policy_spec.rb       2019-01-18 14:05:13.000000000 
+0100
+++ new/spec/policies/post_policy_spec.rb       2019-08-14 13:31:38.000000000 
+0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "spec_helper"
 
 describe PostPolicy do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/policy_finder_spec.rb 
new/spec/policy_finder_spec.rb
--- old/spec/policy_finder_spec.rb      2019-01-18 14:05:13.000000000 +0100
+++ new/spec/policy_finder_spec.rb      2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "spec_helper"
 
 describe Pundit::PolicyFinder do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/pundit_spec.rb new/spec/pundit_spec.rb
--- old/spec/pundit_spec.rb     2019-01-18 14:05:13.000000000 +0100
+++ new/spec/pundit_spec.rb     2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "spec_helper"
 
 describe Pundit do
@@ -36,7 +38,7 @@
       # rubocop:disable Style/MultilineBlockChain
       expect do
         Pundit.authorize(user, post, :destroy?)
-      end.to raise_error(Pundit::NotAuthorizedError, "not allowed to destroy? 
this #<Post>") do |error|
+      end.to raise_error(Pundit::NotAuthorizedError, "not allowed to destroy? 
this Post") do |error|
         expect(error.query).to eq :destroy?
         expect(error.record).to eq post
         expect(error.policy).to eq Pundit.policy(user, post)
@@ -518,11 +520,13 @@
 
   describe "#permitted_attributes" do
     it "checks policy for permitted attributes" do
-      params = ActionController::Parameters.new(post: {
-        title: "Hello",
-        votes: 5,
-        admin: true
-      })
+      params = ActionController::Parameters.new(
+        post: {
+          title: "Hello",
+          votes: 5,
+          admin: true
+        }
+      )
 
       action = "update"
 
@@ -534,11 +538,13 @@
     end
 
     it "checks policy for permitted attributes for record of a ActiveModel 
type" do
-      params = ActionController::Parameters.new(customer_post: {
-        title: "Hello",
-        votes: 5,
-        admin: true
-      })
+      params = ActionController::Parameters.new(
+        customer_post: {
+          title: "Hello",
+          votes: 5,
+          admin: true
+        }
+      )
 
       action = "update"
 
@@ -554,24 +560,28 @@
 
   describe "#permitted_attributes_for_action" do
     it "is checked if it is defined in the policy" do
-      params = ActionController::Parameters.new(post: {
-        title: "Hello",
-        body: "blah",
-        votes: 5,
-        admin: true
-      })
+      params = ActionController::Parameters.new(
+        post: {
+          title: "Hello",
+          body: "blah",
+          votes: 5,
+          admin: true
+        }
+      )
 
       action = "revise"
       expect(Controller.new(user, action, 
params).permitted_attributes(post).to_h).to eq("body" => "blah")
     end
 
     it "can be explicitly set" do
-      params = ActionController::Parameters.new(post: {
-        title: "Hello",
-        body: "blah",
-        votes: 5,
-        admin: true
-      })
+      params = ActionController::Parameters.new(
+        post: {
+          title: "Hello",
+          body: "blah",
+          votes: 5,
+          admin: true
+        }
+      )
 
       action = "update"
       expect(Controller.new(user, action, params).permitted_attributes(post, 
:revise).to_h).to eq("body" => "blah")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/spec/spec_helper.rb new/spec/spec_helper.rb
--- old/spec/spec_helper.rb     2019-01-18 14:05:13.000000000 +0100
+++ new/spec/spec_helper.rb     2019-08-14 13:31:38.000000000 +0200
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 require "pundit"
 require "pundit/rspec"
 


Reply via email to