Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: arunagw/rails
...
head fork: arunagw/rails
  • 4 commits
  • 3 files changed
  • 0 commit comments
  • 4 contributors
Commits on Mar 21, 2013
Alexander Murmann and Can Berk Güder Allows setting fixture_path to a Pathname 018fc5f
@jeremy jeremy Merge pull request #9861 from pivotalcommon/master
Allow fixture_path to be a Pathname
a7391f5
Commits on Mar 22, 2013
@robertomiranda robertomiranda Change Standard error when is required bcrypt-ruby and fails 7e07b7b
@guilleiguaran guilleiguaran Merge pull request #9863 from robertomiranda/require-bcrypt-ruby
Change Standard error when is required bcrypt-ruby and fails
0d3cb00
View
9 activemodel/lib/active_model/secure_password.rb
@@ -43,8 +43,13 @@ def has_secure_password(options = {})
# Load bcrypt-ruby only when has_secure_password is used.
# This is to avoid ActiveModel (and by extension the entire framework)
# being dependent on a binary library.
- gem 'bcrypt-ruby', '~> 3.0.0'
- require 'bcrypt'
+ begin
+ gem 'bcrypt-ruby', '~> 3.0.0'
+ require 'bcrypt'
+ rescue LoadError => e
+ $stderr.puts "You don't have bcrypt-ruby installed in your application. Please add it to your Gemfile and run bundle install"
+ raise e
+ end
attr_reader :password
View
2  activerecord/lib/active_record/fixtures.rb
@@ -752,7 +752,7 @@ def set_fixture_class(class_names = {})
def fixtures(*fixture_set_names)
if fixture_set_names.first == :all
fixture_set_names = Dir["#{fixture_path}/**/*.{yml}"]
- fixture_set_names.map! { |f| f[(fixture_path.size + 1)..-5] }
+ fixture_set_names.map! { |f| f[(fixture_path.to_s.size + 1)..-5] }
else
fixture_set_names = fixture_set_names.flatten.map { |n| n.to_s }
end
View
9 activerecord/test/cases/fixtures_test.rb
@@ -576,6 +576,15 @@ def test_all_there
end
end
+class LoadAllFixturesWithPathnameTest < ActiveRecord::TestCase
+ self.fixture_path = Pathname.new(FIXTURES_ROOT).join('all')
+ fixtures :all
+
+ def test_all_there
+ assert_equal %w(developers people tasks), fixture_table_names.sort
+ end
+end
+
class FasterFixturesTest < ActiveRecord::TestCase
fixtures :categories, :authors

No commit comments for this range

Something went wrong with that request. Please try again.