Hello community, here is the log from the commit of package rubygem-bcrypt for openSUSE:Factory checked in at 2018-05-17 18:05:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-bcrypt (Old) and /work/SRC/openSUSE:Factory/.rubygem-bcrypt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-bcrypt" Thu May 17 18:05:02 2018 rev:8 rq:610007 version:3.1.12 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-bcrypt/rubygem-bcrypt.changes 2017-07-04 13:29:59.555176197 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-bcrypt.new/rubygem-bcrypt.changes 2018-05-17 18:05:50.786941381 +0200 @@ -1,0 +2,11 @@ +Wed May 16 21:02:54 UTC 2018 - [email protected] + +- updated to version 3.1.12 + see installed CHANGELOG + + + 3.1.12 May 16 2018 + - Add support for Ruby 2.3, 2.4, and 2.5 in compiled Windows binaries + - Fix compatibility with libxcrypt [GH #164 by @besser82] + +------------------------------------------------------------------- Old: ---- bcrypt-3.1.11.gem New: ---- bcrypt-3.1.12.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-bcrypt.spec ++++++ --- /var/tmp/diff_new_pack.31AUTX/_old 2018-05-17 18:05:54.302812798 +0200 +++ /var/tmp/diff_new_pack.31AUTX/_new 2018-05-17 18:05:54.302812798 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-bcrypt # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,15 +24,15 @@ # Name: rubygem-bcrypt -Version: 3.1.11 +Version: 3.1.12 Release: 0 %define mod_name bcrypt %define mod_full_name %{mod_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ruby-macros >= 5 BuildRequires: %{rubydevel} BuildRequires: %{rubygem gem2rpm} BuildRequires: %{rubygem rdoc > 3.10} +BuildRequires: ruby-macros >= 5 Url: https://github.com/codahale/bcrypt-ruby Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: rubygem-bcrypt-rpmlintrc ++++++ bcrypt-3.1.11.gem -> bcrypt-3.1.12.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2016-03-06 06:45:05.000000000 +0100 +++ new/.travis.yml 2018-05-16 22:02:54.000000000 +0200 @@ -1,16 +1,21 @@ language: ruby +before_install: + - gem update --system + - gem install bundler rvm: - - 1.8.7 - - 1.9.2 - - 1.9.3 - - 2.0.0 - - 2.1.0 - - 2.2.0 - - 2.3.0 + - 1.8 + - 1.9 + - 2.0 + - 2.1 + - 2.2 + - 2.3 + - 2.4 + - 2.5 + - 2.6 - ruby-head - jruby-18mode - jruby-19mode - jruby-head - - rbx-2 + - rbx-3 - ree script: bundle exec rake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG --- old/CHANGELOG 2016-03-06 06:45:05.000000000 +0100 +++ new/CHANGELOG 2018-05-16 22:02:54.000000000 +0200 @@ -82,3 +82,7 @@ 3.1.11 Mar 06 2016 - Add support for Ruby 2.2 in compiled Windows binaries + +3.1.12 May 16 2018 + - Add support for Ruby 2.3, 2.4, and 2.5 in compiled Windows binaries + - Fix compatibility with libxcrypt [GH #164 by @besser82] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock --- old/Gemfile.lock 2016-03-06 06:45:05.000000000 +0100 +++ new/Gemfile.lock 2018-05-16 22:02:54.000000000 +0200 @@ -1,14 +1,14 @@ PATH remote: . specs: - bcrypt (3.1.11) + bcrypt (3.1.12) GEM remote: https://rubygems.org/ specs: diff-lcs (1.2.5) - json (1.8.3) - json (1.8.3-java) + json (1.8.6) + json (1.8.6-java) rake (10.4.2) rake-compiler (0.9.5) rake @@ -41,4 +41,4 @@ rspec (>= 3) BUNDLED WITH - 1.11.2 + 1.16.1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2016-03-06 06:45:05.000000000 +0100 +++ new/README.md 2018-05-16 22:02:54.000000000 +0200 @@ -30,8 +30,8 @@ The bcrypt gem is available on the following ruby platforms: * JRuby -* RubyInstaller 1.8, 1.9, 2.0, 2.1, and 2.2 builds on win32 -* Any 1.8, 1.9, 2.0, 2.1, 2.2, or 2.3 Ruby on a BSD/OS X/Linux system with a compiler +* RubyInstaller 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, and 2.5 builds on Windows +* Any 1.8, 1.9, 2.0, 2.1, 2.2, 2.3, 2.4, or 2.5 Ruby on a BSD/OS X/Linux system with a compiler ## How to use `bcrypt()` in your Rails application @@ -40,69 +40,58 @@ implements a similar authentication strategy to the code below. ### The _User_ model +```ruby +require 'bcrypt' - require 'bcrypt' - - class User < ActiveRecord::Base - # users.password_hash in the database is a :string - include BCrypt - - def password - @password ||= Password.new(password_hash) - end - - def password=(new_password) - @password = Password.create(new_password) - self.password_hash = @password - end - end - +class User < ActiveRecord::Base + # users.password_hash in the database is a :string + include BCrypt + + def password + @password ||= Password.new(password_hash) + end + + def password=(new_password) + @password = Password.create(new_password) + self.password_hash = @password + end +end +``` ### Creating an account - - def create - @user = User.new(params[:user]) - @user.password = params[:password] - @user.save! - end - +```ruby +def create + @user = User.new(params[:user]) + @user.password = params[:password] + @user.save! +end +``` ### Authenticating a user - - def login - @user = User.find_by_email(params[:email]) - if @user.password == params[:password] - give_token - else - redirect_to home_url - end - end - -### If a user forgets their password? - - # assign them a random one and mail it to them, asking them to change it - def forgot_password - @user = User.find_by_email(params[:email]) - random_password = Array.new(10).map { (65 + rand(58)).chr }.join - @user.password = random_password - @user.save! - Mailer.create_and_deliver_password_change(@user, random_password) - end - +```ruby +def login + @user = User.find_by_email(params[:email]) + if @user.password == params[:password] + give_token + else + redirect_to home_url + end +end +``` ## How to use bcrypt-ruby in general +```ruby +require 'bcrypt' - require 'bcrypt' - - my_password = BCrypt::Password.create("my password") - #=> "$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa" - - my_password.version #=> "2a" - my_password.cost #=> 10 - my_password == "my password" #=> true - my_password == "not my password" #=> false - - my_password = BCrypt::Password.new("$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa") - my_password == "my password" #=> true - my_password == "not my password" #=> false +my_password = BCrypt::Password.create("my password") +#=> "$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa" +my_password.version #=> "2a" +my_password.cost #=> 10 +my_password == "my password" #=> true +my_password == "not my password" #=> false + +my_password = BCrypt::Password.new("$2a$10$vI8aWBnW3fID.ZQ4/zo1G.q1lRps.9cGLcZEiGDMVr5yUP1KUOYTa") +my_password == "my password" #=> true +my_password == "not my password" #=> false +``` Check the rdocs for more details -- BCrypt, BCrypt::Password. ## How `bcrypt()` works @@ -171,15 +160,15 @@ server load and keep your request times down. This will lower the security provided you, but there are few alternatives. To change the default cost factor used by bcrypt-ruby, use `BCrypt::Engine.cost = new_value`: - - BCrypt::Password.create('secret').cost - #=> 10, the default provided by bcrypt-ruby - - # set a new default cost - BCrypt::Engine.cost = 8 - BCrypt::Password.create('secret').cost - #=> 8 - +```ruby +BCrypt::Password.create('secret').cost + #=> 10, the default provided by bcrypt-ruby + +# set a new default cost +BCrypt::Engine.cost = 8 +BCrypt::Password.create('secret').cost + #=> 8 +``` The default cost can be overridden as needed by passing an options hash with a different cost: BCrypt::Password.create('secret', :cost => 6).cost #=> 6 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2016-03-06 06:45:05.000000000 +0100 +++ new/Rakefile 2018-05-16 22:02:54.000000000 +0200 @@ -12,6 +12,10 @@ "lib/1.9", "lib/2.0", "lib/2.1", + "lib/2.2", + "lib/2.3", + "lib/2.4", + "lib/2.5", "lib/bcrypt_ext.jar", "lib/bcrypt_ext.so" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/appveyor.yml new/appveyor.yml --- old/appveyor.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/appveyor.yml 2018-05-16 22:02:54.000000000 +0200 @@ -0,0 +1,50 @@ +############################################################################### +# +# This AppVeyor config is *NOT* for running the tests on Windows. +# +# This is to ensure that the latest version of the bcrypt gem can be installed +# on Windows across all of the currently supported versions of Ruby. +# +############################################################################### + +version: "{branch}-{build}" +build: off +clone_depth: 1 + +init: + # Install Ruby 1.8.7 + - if %RUBY_VERSION%==187 ( + appveyor DownloadFile https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.8.7-p374.exe -FileName C:\ruby_187.exe & + C:\ruby_187.exe /verysilent /dir=C:\Ruby%RUBY_VERSION% + ) + +environment: + matrix: + - RUBY_VERSION: "187" + - RUBY_VERSION: "193" + - RUBY_VERSION: "200" + - RUBY_VERSION: "200-x64" + - RUBY_VERSION: "21" + - RUBY_VERSION: "21-x64" + - RUBY_VERSION: "22" + - RUBY_VERSION: "22-x64" + - RUBY_VERSION: "23" + - RUBY_VERSION: "23-x64" + - RUBY_VERSION: "24" + - RUBY_VERSION: "24-x64" + - RUBY_VERSION: "25" + - RUBY_VERSION: "25-x64" + +install: + - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% + - if %RUBY_VERSION%==187 ( + gem update --system 2.0.17 + ) + +before_test: + - ruby -v + - gem -v + +test_script: + - gem install bcrypt --prerelease --no-ri --no-rdoc + - ruby -e "require 'rubygems'; require 'bcrypt'" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcrypt.gemspec new/bcrypt.gemspec --- old/bcrypt.gemspec 2016-03-06 06:45:05.000000000 +0100 +++ new/bcrypt.gemspec 2018-05-16 22:02:54.000000000 +0200 @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'bcrypt' - s.version = '3.1.11' + s.version = '3.1.12' s.summary = "OpenBSD's bcrypt() password hashing algorithm." s.description = <<-EOF Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mri/bcrypt_ext.c new/ext/mri/bcrypt_ext.c --- old/ext/mri/bcrypt_ext.c 2016-03-06 06:45:05.000000000 +0100 +++ new/ext/mri/bcrypt_ext.c 2018-05-16 22:02:54.000000000 +0200 @@ -45,7 +45,7 @@ if(!value) return Qnil; - out = rb_str_new(data, size - 1); + out = rb_str_new2(value); xfree(data); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-03-06 06:45:05.000000000 +0100 +++ new/metadata 2018-05-16 22:02:54.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: bcrypt version: !ruby/object:Gem::Version - version: 3.1.11 + version: 3.1.12 platform: ruby authors: - Coda Hale autorequire: bindir: bin cert_chain: [] -date: 2016-03-06 00:00:00.000000000 Z +date: 2018-05-16 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: rake-compiler @@ -63,9 +63,9 @@ - README.md - COPYING - CHANGELOG +- lib/bcrypt/password.rb - lib/bcrypt/engine.rb - lib/bcrypt/error.rb -- lib/bcrypt/password.rb - lib/bcrypt.rb files: - .gitignore @@ -77,6 +77,7 @@ - Gemfile.lock - README.md - Rakefile +- appveyor.yml - bcrypt.gemspec - ext/jruby/bcrypt_jruby/BCrypt.java - ext/mri/bcrypt_ext.c @@ -122,7 +123,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.4.3 +rubygems_version: 2.7.6 signing_key: specification_version: 4 summary: OpenBSD's bcrypt() password hashing algorithm.
