Hello community, here is the log from the commit of package rubygem-bcrypt for openSUSE:Factory checked in at 2015-02-11 16:45:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-bcrypt (Old) and /work/SRC/openSUSE:Factory/.rubygem-bcrypt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-bcrypt" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-bcrypt/rubygem-bcrypt.changes 2014-10-14 07:12:28.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-bcrypt.new/rubygem-bcrypt.changes 2015-02-11 16:45:09.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Feb 10 17:23:47 UTC 2015 - [email protected] + +- updated to version 3.1.10 + +------------------------------------------------------------------- Old: ---- bcrypt-3.1.7.gem New: ---- bcrypt-3.1.10.gem gem2rpm.yml ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-bcrypt.spec ++++++ --- /var/tmp/diff_new_pack.6I6fjb/_old 2015-02-11 16:45:10.000000000 +0100 +++ /var/tmp/diff_new_pack.6I6fjb/_new 2015-02-11 16:45:10.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-bcrypt # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 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 @@ -16,8 +16,15 @@ # +# +# This file was generated with a gem2rpm.yml and not just plain gem2rpm. +# All sections marked as MANUAL, license headers, summaries and descriptions +# can be maintained in that file. Please consult this file before editing any +# of those fields +# + Name: rubygem-bcrypt -Version: 3.1.7 +Version: 3.1.10 Release: 0 %define mod_name bcrypt %define mod_full_name %{mod_name}-%{version} @@ -28,6 +35,7 @@ BuildRequires: ruby-macros >= 5 Url: https://github.com/codahale/bcrypt-ruby Source: http://rubygems.org/gems/%{mod_full_name}.gem +Source1: gem2rpm.yml Summary: OpenBSD's bcrypt() password hashing algorithm License: MIT Group: Development/Languages/Ruby ++++++ bcrypt-3.1.7.gem -> bcrypt-3.1.10.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2015-01-29 06:17:05.000000000 +0100 @@ -1,10 +1,9 @@ +doc +pkg +tmp *.o *.bundle *.so *.jar -ext/mri/Makefile -doc -pkg -*.class -tmp/ .DS_Store +.rbenv-gemsets diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.travis.yml 2015-01-29 06:17:05.000000000 +0100 @@ -5,11 +5,11 @@ - 1.9.3 - 2.0.0 - 2.1.0 + - 2.2.0 - ruby-head - jruby-18mode - jruby-19mode - jruby-head - rbx-2 - - rbx - ree script: bundle exec rake diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG --- old/CHANGELOG 1970-01-01 01:00:00.000000000 +0100 +++ new/CHANGELOG 2015-01-29 06:17:05.000000000 +0100 @@ -70,3 +70,12 @@ 3.1.7 Feb 24 2014 - Rebuild corrupt Java binary version of gem [GH #90] - The 2.1 support for Windows binaries alleged in 3.1.3 was a lie -- documentation removed + +3.1.8 Oct 23 2014 + - Add support for Ruby 2.1 in compiled Windows binaries [GH #102] + +3.1.9 Oct 23 2014 + - Rebuild corrupt binaries + +3.1.10 Jan 28 2015 + - Fix issue with dumping a BCrypt::Password instance to YAML in Ruby 2.2 [GH #107 by @mattwildig] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile.lock new/Gemfile.lock --- old/Gemfile.lock 1970-01-01 01:00:00.000000000 +0100 +++ new/Gemfile.lock 2015-01-29 06:17:05.000000000 +0100 @@ -1,7 +1,7 @@ PATH remote: . specs: - bcrypt (3.1.7) + bcrypt (3.1.10) GEM remote: https://rubygems.org/ @@ -14,14 +14,18 @@ rake rdoc (3.12.2) json (~> 1.4) - rspec (2.14.1) - rspec-core (~> 2.14.0) - rspec-expectations (~> 2.14.0) - rspec-mocks (~> 2.14.0) - rspec-core (2.14.7) - rspec-expectations (2.14.4) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.14.4) + rspec (3.0.0) + rspec-core (~> 3.0.0) + rspec-expectations (~> 3.0.0) + rspec-mocks (~> 3.0.0) + rspec-core (3.0.2) + rspec-support (~> 3.0.0) + rspec-expectations (3.0.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.0.0) + rspec-mocks (3.0.2) + rspec-support (~> 3.0.0) + rspec-support (3.0.2) PLATFORMS java @@ -33,4 +37,4 @@ bcrypt! rake-compiler (~> 0.9.2) rdoc (~> 3.12) - rspec + rspec (>= 3) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/README.md 2015-01-29 06:17:05.000000000 +0100 @@ -30,8 +30,8 @@ The bcrypt gem is available on the following ruby platforms: * JRuby -* RubyInstaller 1.8, 1.9, and 2.0 builds on win32 -* Any 1.8, 1.9, 2.0, or 2.1 ruby on a BSD/OSX/Linux system with a compiler +* RubyInstaller 1.8, 1.9, 2.0, and 2.1 builds on win32 +* Any 1.8, 1.9, 2.0, 2.1, or 2.2 Ruby on a BSD/OS X/Linux system with a compiler ## How to use `bcrypt()` in your Rails application diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 1970-01-01 01:00:00.000000000 +0100 +++ new/Rakefile 2015-01-29 06:17:05.000000000 +0100 @@ -7,16 +7,19 @@ require 'benchmark' CLEAN.include( - "ext/mri/*.o", - "ext/mri/*.bundle", - "ext/mri/*.so", - "ext/jruby/bcrypt_jruby/*.class" + "tmp", + "lib/1.8", + "lib/1.9", + "lib/2.0", + "lib/2.1", + "lib/bcrypt_ext.jar", + "lib/bcrypt_ext.so" ) CLOBBER.include( - "ext/mri/Makefile", - "doc/coverage", + "doc", "pkg" ) + GEMSPEC = Gem::Specification.load("bcrypt.gemspec") task :default => [:compile, :spec] @@ -58,6 +61,23 @@ ext.cross_compile = true ext.cross_platform = ['x86-mingw32', 'x64-mingw32'] end + + ENV['RUBY_CC_VERSION'].to_s.split(':').each do |ruby_version| + platforms = { + "x86-mingw32" => "i686-w64-mingw32", + "x64-mingw32" => "x86_64-w64-mingw32" + } + platforms.each do |platform, prefix| + task "copy:bcrypt_ext:#{platform}:#{ruby_version}" do |t| + %w[lib tmp/#{platform}/stage/lib].each do |dir| + so_file = "#{dir}/#{ruby_version[/^\d+\.\d+/]}/bcrypt_ext.so" + if File.exists?(so_file) + sh "#{prefix}-strip -S #{so_file}" + end + end + end + end + end end desc "Run a set of benchmarks on the compiled extension." diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcrypt.gemspec new/bcrypt.gemspec --- old/bcrypt.gemspec 1970-01-01 01:00:00.000000000 +0100 +++ new/bcrypt.gemspec 2015-01-29 06:17:05.000000000 +0100 @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'bcrypt' - s.version = '3.1.7' + s.version = '3.1.10' s.summary = "OpenBSD's bcrypt() password hashing algorithm." s.description = <<-EOF @@ -13,7 +13,7 @@ s.require_path = 'lib' s.add_development_dependency 'rake-compiler', '~> 0.9.2' - s.add_development_dependency 'rspec' + s.add_development_dependency 'rspec', '>= 3' s.add_development_dependency 'rdoc', '~> 3.12' s.has_rdoc = true Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ext/mri/extconf.rb new/ext/mri/extconf.rb --- old/ext/mri/extconf.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/ext/mri/extconf.rb 2015-01-29 06:17:05.000000000 +0100 @@ -11,7 +11,6 @@ exit 0 else require "mkmf" - have_header('ruby/util.h') dir_config("bcrypt_ext") create_makefile("bcrypt_ext") end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/bcrypt/password.rb new/lib/bcrypt/password.rb --- old/lib/bcrypt/password.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/bcrypt/password.rb 2015-01-29 06:17:05.000000000 +0100 @@ -80,7 +80,7 @@ # Splits +h+ into version, cost, salt, and hash and returns them in that order. def split_hash(h) _, v, c, mash = h.split('$') - return v, c.to_i, h[0, 29].to_str, mash[-31, 31].to_str + return v.to_str, c.to_i, h[0, 29].to_str, mash[-31, 31].to_str end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 1970-01-01 01:00:00.000000000 +0100 +++ new/metadata 2015-01-29 06:17:05.000000000 +0100 @@ -1,54 +1,65 @@ ---- !ruby/object:Gem::Specification +--- !ruby/object:Gem::Specification name: bcrypt -version: !ruby/object:Gem::Version - version: 3.1.7 +version: !ruby/object:Gem::Version + version: 3.1.10 platform: ruby -authors: +authors: - Coda Hale autorequire: bindir: bin cert_chain: [] - -date: 2014-02-25 00:00:00 Z -dependencies: -- !ruby/object:Gem::Dependency +date: 2015-01-29 00:00:00.000000000 Z +dependencies: +- !ruby/object:Gem::Dependency name: rake-compiler - prerelease: false - requirement: &id001 !ruby/object:Gem::Requirement - requirements: + requirement: !ruby/object:Gem::Requirement + requirements: - - ~> - - !ruby/object:Gem::Version + - !ruby/object:Gem::Version version: 0.9.2 type: :development - version_requirements: *id001 -- !ruby/object:Gem::Dependency - name: rspec prerelease: false - requirement: &id002 !ruby/object:Gem::Requirement - requirements: - - &id004 - - ">=" - - !ruby/object:Gem::Version - version: "0" + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ~> + - !ruby/object:Gem::Version + version: 0.9.2 +- !ruby/object:Gem::Dependency + name: rspec + requirement: !ruby/object:Gem::Requirement + requirements: + - - ! '>=' + - !ruby/object:Gem::Version + version: '3' type: :development - version_requirements: *id002 -- !ruby/object:Gem::Dependency - name: rdoc prerelease: false - requirement: &id003 !ruby/object:Gem::Requirement - requirements: + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ! '>=' + - !ruby/object:Gem::Version + version: '3' +- !ruby/object:Gem::Dependency + name: rdoc + requirement: !ruby/object:Gem::Requirement + requirements: - - ~> - - !ruby/object:Gem::Version - version: "3.12" + - !ruby/object:Gem::Version + version: '3.12' type: :development - version_requirements: *id003 -description: " bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project\n for hashing passwords. The bcrypt Ruby gem provides a simple wrapper for safely handling\n passwords.\n" + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ~> + - !ruby/object:Gem::Version + version: '3.12' +description: ! " bcrypt() is a sophisticated and secure hash algorithm designed + by The OpenBSD project\n for hashing passwords. The bcrypt Ruby gem provides + a simple wrapper for safely handling\n passwords.\n" email: [email protected] executables: [] - -extensions: +extensions: - ext/mri/extconf.rb -extra_rdoc_files: +extra_rdoc_files: - README.md - COPYING - CHANGELOG @@ -56,7 +67,7 @@ - lib/bcrypt/error.rb - lib/bcrypt/password.rb - lib/bcrypt.rb -files: +files: - .gitignore - .rspec - .travis.yml @@ -86,32 +97,33 @@ - spec/bcrypt/password_spec.rb - spec/spec_helper.rb homepage: https://github.com/codahale/bcrypt-ruby -licenses: +licenses: - MIT metadata: {} - post_install_message: -rdoc_options: +rdoc_options: - --title - bcrypt-ruby - --line-numbers - --inline-source - --main - README.md -require_paths: +require_paths: - lib -required_ruby_version: !ruby/object:Gem::Requirement - requirements: - - *id004 -required_rubygems_version: !ruby/object:Gem::Requirement - requirements: - - *id004 +required_ruby_version: !ruby/object:Gem::Requirement + requirements: + - - ! '>=' + - !ruby/object:Gem::Version + version: '0' +required_rubygems_version: !ruby/object:Gem::Requirement + requirements: + - - ! '>=' + - !ruby/object:Gem::Version + version: '0' requirements: [] - rubyforge_project: -rubygems_version: 2.0.14 +rubygems_version: 2.4.5 signing_key: specification_version: 4 summary: OpenBSD's bcrypt() password hashing algorithm. test_files: [] - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/bcrypt/engine_spec.rb new/spec/bcrypt/engine_spec.rb --- old/spec/bcrypt/engine_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/bcrypt/engine_spec.rb 2015-01-29 06:17:05.000000000 +0100 @@ -4,35 +4,35 @@ specify "should calculate the optimal cost factor to fit in a specific time" do first = BCrypt::Engine.calibrate(100) second = BCrypt::Engine.calibrate(400) - second.should > first + expect(second).to be > first end end describe "Generating BCrypt salts" do specify "should produce strings" do - BCrypt::Engine.generate_salt.should be_an_instance_of(String) + expect(BCrypt::Engine.generate_salt).to be_an_instance_of(String) end specify "should produce random data" do - BCrypt::Engine.generate_salt.should_not equal(BCrypt::Engine.generate_salt) + expect(BCrypt::Engine.generate_salt).to_not equal(BCrypt::Engine.generate_salt) end specify "should raise a InvalidCostError if the cost parameter isn't numeric" do - lambda { BCrypt::Engine.generate_salt('woo') }.should raise_error(BCrypt::Errors::InvalidCost) + expect { BCrypt::Engine.generate_salt('woo') }.to raise_error(BCrypt::Errors::InvalidCost) end specify "should raise a InvalidCostError if the cost parameter isn't greater than 0" do - lambda { BCrypt::Engine.generate_salt(-1) }.should raise_error(BCrypt::Errors::InvalidCost) + expect { BCrypt::Engine.generate_salt(-1) }.to raise_error(BCrypt::Errors::InvalidCost) end end describe "Autodetecting of salt cost" do specify "should work" do - BCrypt::Engine.autodetect_cost("$2a$08$hRx2IVeHNsTSYYtUWn61Ou").should eq 8 - BCrypt::Engine.autodetect_cost("$2a$05$XKd1bMnLgUnc87qvbAaCUu").should eq 5 - BCrypt::Engine.autodetect_cost("$2a$13$Lni.CZ6z5A7344POTFBBV.").should eq 13 + expect(BCrypt::Engine.autodetect_cost("$2a$08$hRx2IVeHNsTSYYtUWn61Ou")).to eq 8 + expect(BCrypt::Engine.autodetect_cost("$2a$05$XKd1bMnLgUnc87qvbAaCUu")).to eq 5 + expect(BCrypt::Engine.autodetect_cost("$2a$13$Lni.CZ6z5A7344POTFBBV.")).to eq 13 end end @@ -49,21 +49,21 @@ end specify "should produce a string" do - BCrypt::Engine.hash_secret(@password, @salt).should be_an_instance_of(String) + expect(BCrypt::Engine.hash_secret(@password, @salt)).to be_an_instance_of(String) end specify "should raise an InvalidSalt error if the salt is invalid" do - lambda { BCrypt::Engine.hash_secret(@password, 'nino') }.should raise_error(BCrypt::Errors::InvalidSalt) + expect { BCrypt::Engine.hash_secret(@password, 'nino') }.to raise_error(BCrypt::Errors::InvalidSalt) end specify "should raise an InvalidSecret error if the secret is invalid" do - lambda { BCrypt::Engine.hash_secret(MyInvalidSecret.new, @salt) }.should raise_error(BCrypt::Errors::InvalidSecret) - lambda { BCrypt::Engine.hash_secret(nil, @salt) }.should_not raise_error(BCrypt::Errors::InvalidSecret) - lambda { BCrypt::Engine.hash_secret(false, @salt) }.should_not raise_error(BCrypt::Errors::InvalidSecret) + expect { BCrypt::Engine.hash_secret(MyInvalidSecret.new, @salt) }.to raise_error(BCrypt::Errors::InvalidSecret) + expect { BCrypt::Engine.hash_secret(nil, @salt) }.not_to raise_error + expect { BCrypt::Engine.hash_secret(false, @salt) }.not_to raise_error end specify "should call #to_s on the secret and use the return value as the actual secret data" do - BCrypt::Engine.hash_secret(false, @salt).should == BCrypt::Engine.hash_secret("false", @salt) + expect(BCrypt::Engine.hash_secret(false, @salt)).to eq BCrypt::Engine.hash_secret("false", @salt) end specify "should be interoperable with other implementations" do @@ -76,7 +76,7 @@ ["0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", "$2a$05$abcdefghijklmnopqrstuu", "$2a$05$abcdefghijklmnopqrstuu5s2v8.iXieOjg/.AySBTTZIIVFJeBui"] ] for secret, salt, test_vector in test_vectors - BCrypt::Engine.hash_secret(secret, salt).should eql(test_vector) + expect(BCrypt::Engine.hash_secret(secret, salt)).to eql(test_vector) end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/bcrypt/error_spec.rb new/spec/bcrypt/error_spec.rb --- old/spec/bcrypt/error_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/bcrypt/error_spec.rb 2015-01-29 06:17:05.000000000 +0100 @@ -4,13 +4,13 @@ shared_examples "descends from StandardError" do it "can be rescued as a StandardError" do - described_class.should < StandardError + expect(described_class).to be < StandardError end end shared_examples "descends from BCrypt::Error" do it "can be rescued as a BCrypt::Error" do - described_class.should < BCrypt::Error + expect(described_class).to be < BCrypt::Error end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/spec/bcrypt/password_spec.rb new/spec/bcrypt/password_spec.rb --- old/spec/bcrypt/password_spec.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/spec/bcrypt/password_spec.rb 2015-01-29 06:17:05.000000000 +0100 @@ -8,23 +8,23 @@ end specify "should return a BCrypt::Password" do - @password.should be_an_instance_of(BCrypt::Password) + expect(@password).to be_an_instance_of(BCrypt::Password) end specify "should return a valid bcrypt password" do - lambda { BCrypt::Password.new(@password) }.should_not raise_error + expect { BCrypt::Password.new(@password) }.not_to raise_error end specify "should behave normally if the secret is not a string" do - lambda { BCrypt::Password.create(nil) }.should_not raise_error(BCrypt::Errors::InvalidSecret) - lambda { BCrypt::Password.create({:woo => "yeah"}) }.should_not raise_error(BCrypt::Errors::InvalidSecret) - lambda { BCrypt::Password.create(false) }.should_not raise_error(BCrypt::Errors::InvalidSecret) + expect { BCrypt::Password.create(nil) }.not_to raise_error + expect { BCrypt::Password.create({:woo => "yeah"}) }.not_to raise_error + expect { BCrypt::Password.create(false) }.not_to raise_error end specify "should tolerate empty string secrets" do - lambda { BCrypt::Password.create( "\n".chop ) }.should_not raise_error - lambda { BCrypt::Password.create( "" ) }.should_not raise_error - lambda { BCrypt::Password.create( String.new ) }.should_not raise_error + expect { BCrypt::Password.create( "\n".chop ) }.not_to raise_error + expect { BCrypt::Password.create( "" ) }.not_to raise_error + expect { BCrypt::Password.create( String.new ) }.not_to raise_error end end @@ -35,26 +35,26 @@ end specify "the cost is too damn high" do - lambda { + expect { BCrypt::Password.create("hello", :cost => 32) - }.should raise_error(ArgumentError) + }.to raise_error(ArgumentError) end specify "the cost should be set to the default if nil" do - BCrypt::Password.create("hello", :cost => nil).cost.should equal(BCrypt::Engine::DEFAULT_COST) + expect(BCrypt::Password.create("hello", :cost => nil).cost).to equal(BCrypt::Engine::DEFAULT_COST) end specify "the cost should be set to the default if empty hash" do - BCrypt::Password.create("hello", {}).cost.should equal(BCrypt::Engine::DEFAULT_COST) + expect(BCrypt::Password.create("hello", {}).cost).to equal(BCrypt::Engine::DEFAULT_COST) end specify "the cost should be set to the passed value if provided" do - BCrypt::Password.create("hello", :cost => 5).cost.should equal(5) + expect(BCrypt::Password.create("hello", :cost => 5).cost).to equal(5) end specify "the cost should be set to the global value if set" do BCrypt::Engine.cost = 5 - BCrypt::Password.create("hello").cost.should equal(5) + expect(BCrypt::Password.create("hello").cost).to equal(5) # unset the global value to not affect other tests BCrypt::Engine.cost = nil end @@ -65,7 +65,7 @@ old_default_cost = BCrypt::Engine::DEFAULT_COST BCrypt::Engine::DEFAULT_COST = 5 - BCrypt::Password.create("hello").cost.should equal(5) + expect(BCrypt::Password.create("hello").cost).to equal(5) # reset default to not affect other tests BCrypt::Engine::DEFAULT_COST = old_default_cost @@ -74,17 +74,18 @@ specify "should read the version, cost, salt, and hash" do password = BCrypt::Password.new(@hash) - password.version.should eql("2a") - password.cost.should equal(5) - password.salt.should eql("$2a$05$CCCCCCCCCCCCCCCCCCCCC.") - password.salt.class.should eq String - password.checksum.should eq("E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW") - password.checksum.class.should eq String - password.to_s.should eql(@hash) + expect(password.version).to eql("2a") + expect(password.version.class).to eq String + expect(password.cost).to equal(5) + expect(password.salt).to eql("$2a$05$CCCCCCCCCCCCCCCCCCCCC.") + expect(password.salt.class).to eq String + expect(password.checksum).to eq("E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW") + expect(password.checksum.class).to eq String + expect(password.to_s).to eql(@hash) end specify "should raise an InvalidHashError when given an invalid hash" do - lambda { BCrypt::Password.new('weedle') }.should raise_error(BCrypt::Errors::InvalidHash) + expect { BCrypt::Password.new('weedle') }.to raise_error(BCrypt::Errors::InvalidHash) end end @@ -96,28 +97,28 @@ end specify "should compare successfully to the original secret" do - (@password == @secret).should be(true) + expect((@password == @secret)).to be(true) end specify "should compare unsuccessfully to anything besides original secret" do - (@password == "@secret").should be(false) + expect((@password == "@secret")).to be(false) end end describe "Validating a generated salt" do specify "should not accept an invalid salt" do - BCrypt::Engine.valid_salt?("invalid").should eq(false) + expect(BCrypt::Engine.valid_salt?("invalid")).to eq(false) end specify "should accept a valid salt" do - BCrypt::Engine.valid_salt?(BCrypt::Engine.generate_salt).should eq(true) + expect(BCrypt::Engine.valid_salt?(BCrypt::Engine.generate_salt)).to eq(true) end end describe "Validating a password hash" do specify "should not accept an invalid password" do - BCrypt::Password.valid_hash?("i_am_so_not_valid").should be_false + expect(BCrypt::Password.valid_hash?("i_am_so_not_valid")).to be_falsey end specify "should accept a valid password" do - BCrypt::Password.valid_hash?(BCrypt::Password.create "i_am_so_valid").should be_true + expect(BCrypt::Password.valid_hash?(BCrypt::Password.create "i_am_so_valid")).to be_truthy end end ++++++ gem2rpm.yml ++++++ # --- # ## used by gem2rpm # :summary: this is a custom summary # ## used by gem2rpm # :description: |- # this is a custom description # # it can be multiline # ## used by gem2rpm # :license: MIT or Ruby # ## used by gem2rpm and gem_packages # :version_suffix: -x_y # ## used by gem2rpm and gem_packages # :disable_docs: true # ## used by gem2rpm # :disable_automatic_rdoc_dep: true # ## used by gem2rpm # :preamble: |- # BuildRequires: foobar # Requires: foobar # ## used by gem2rpm # :patches: # foo.patch: -p1 # bar.patch: # ## used by gem2rpm :sources: # - foo.desktop # - bar.desktop # :gem_install_args: '....' # ## used by gem2rpm # :pre_install: |- # %if 0%{?use_system_libev} # export USE_VENDORED_LIBEV="no" # %endif # ## used by gem2rpm # :post_install: |- # # delete custom files here or do other fancy stuff # install -D -m 0644 %{S:1} %{buildroot}%{_bindir}/gem2rpm-opensuse # ## used by gem2rpm # :testsuite_command: |- # (pushd %{buildroot}%{gem_base}/gems/%{mod_full_name} && rake test) # ## used by gem2rpm # :filelist: |- # /usr/bin/gem2rpm-opensuse # ## used by gem2rpm # :scripts: # :post: |- # /bin/echo foo # ## used by gem_packages # :main: # :preamble: |- # Requires: util-linux # Recommends: pwgen # :filelist: |- # /usr/bin/gem2rpm-opensuse # ## used by gem_packages # :custom: # apache: # :preamble: |- # Requires: ..... # :filelist: |- # /etc/apache2/conf.d/passenger.conf # :summary: Custom summary is optional # :description: |- # Custom description is optional # # bar # :post: |- # /bin/echo foo # -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
