Skip to content
This repository was archived by the owner on May 5, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a010486
ActiveRecord 3.1 and ActiveModel 3.1
Apr 11, 2014
ab72872
bump activemodel builder dependency to 3.2
Apr 11, 2014
c796ff3
bump arel to 2.2.3
Apr 11, 2014
b6723d9
import activesupport/core_ext/object/inclusion from 3-2-github
Apr 11, 2014
af6b19d
add bcrypt-ruby to Gemfile
Apr 11, 2014
d545a11
remove 1.8 monkey patches that aren't valid anymore
Apr 11, 2014
9f7240d
fix activemodel tests
Apr 11, 2014
098de9d
don't warn or be verbose
Apr 11, 2014
abafb2c
only test sqlite3
Apr 11, 2014
aa55907
this doesn't exist in the old version of rack we're testing with
Apr 11, 2014
900b1d0
our old ActiveSupport doesn't support passing procs to assert_difference
Apr 11, 2014
95d5f3f
Raise NameError instead of ArgumentError in ActiveSupport::Dependencies
Apr 11, 2014
62b7eee
work around ruby 2.0 respond_to? changes
Apr 11, 2014
406173e
fix xml tests
Apr 11, 2014
1e4d1c3
more respond_to fixes
Apr 11, 2014
7d530b1
restore AR 3.0 session store
Apr 11, 2014
e8898d2
restore old notifier when we're done here
Apr 11, 2014
d0c0866
skip the remaining broken tests we don't care about
Apr 11, 2014
755b025
ActionDispatch::Callbacks.to_prepare in 3.0
Apr 11, 2014
5a23d78
it's after, not to_cleanup
Apr 11, 2014
7addec5
backport pluck to 3-0-github
Apr 10, 2014
a1ceb40
delegate pluck to scoped
Apr 12, 2014
3f0c10f
Fix issue with private kernel methods and collection associations. Cl…
Apr 12, 2014
505fa63
Require ActionController::Railtie in the default middleware stack.
rafaelfranca Oct 18, 2012
4747940
Be a bit less conservative with mysql in adapter
carlosantoniodasilva Nov 19, 2012
b43374f
CVE-2012-5664 options hashes should only be extracted if there are ex…
tenderlove Dec 23, 2012
f4991a2
Fix issue with attr_protected where malformed input could circumvent
joernchen Feb 9, 2013
ccf7615
adding test for CVE
tenderlove Feb 10, 2013
9b9c097
stop calling to_sym when building arel nodes [CVE-2013-1854]
tenderlove Mar 5, 2013
02a5abd
fix the tests so they're not asserting wrong behaviour
Apr 20, 2014
75e8494
fix activerecord's completely broken where clause merge semantics
Apr 20, 2014
f557a19
fix tests that were relying on AR's ridiculous behaviour
Apr 20, 2014
3f8ef01
Merge pull request #61 from github/3-0-github+ar-3-1+fix-broken-where…
Apr 20, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ platforms :ruby do
# AR
gem "sqlite3", "~> 1.3.3"

gem 'bcrypt-ruby', '~> 3.0.0'

group :db do
gem "pg", ">= 0.9.0"
gem "mysql", ">= 2.8.1"
Expand Down
10 changes: 6 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ PATH
activemodel (3.0.20)
activesupport (= 3.0.20)
builder (~> 3.2.0)
i18n (~> 0.6.0)
i18n (~> 0.6)
activerecord (3.0.20)
activemodel (= 3.0.20)
activesupport (= 3.0.20)
arel (~> 2.0.10)
tzinfo (~> 0.3.23)
arel (~> 2.2.3)
tzinfo (~> 0.3.29)
activeresource (3.0.20)
activemodel (= 3.0.20)
activesupport (= 3.0.20)
Expand All @@ -53,7 +53,8 @@ GEM
remote: http://rubygems.org/
specs:
addressable (2.3.6)
arel (2.0.10)
arel (2.2.3)
bcrypt-ruby (3.0.1)
builder (3.2.2)
coderay (1.1.0)
erubis (2.7.0)
Expand Down Expand Up @@ -106,6 +107,7 @@ PLATFORMS
DEPENDENCIES
addressable
arel
bcrypt-ruby (~> 3.0.0)
faker
horo (= 1.0.3)
json
Expand Down
121 changes: 0 additions & 121 deletions activemodel/CHANGELOG

This file was deleted.

48 changes: 48 additions & 0 deletions activemodel/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Rails 3.1.8 (Aug 9, 2012)

* No changes.

## Rails 3.1.7 (Jul 26, 2012)

* No changes.

## Rails 3.1.6 (Jun 12, 2012)

* No changes.

## Rails 3.1.5 (May 31, 2012) ##

* No changes.

## Rails 3.1.1 (October 7, 2011) ##

* Remove hard dependency on bcrypt-ruby to avoid make ActiveModel dependent on a binary library.
You must add the gem explicitly to your Gemfile if you want use ActiveModel::SecurePassword:

gem 'bcrypt-ruby', '~> 3.0.0'

See GH #2687. *Guillermo Iguaran*

## Rails 3.1.0 (August 30, 2011) ##

* Alternate I18n namespace lookup is no longer supported.
Instead of "activerecord.models.admins.post", do "activerecord.models.admins/post" instead *José Valim*

* attr_accessible and friends now accepts :as as option to specify a role *Josh Kalderimis*

* Add support for proc or lambda as an option for InclusionValidator,
ExclusionValidator, and FormatValidator *Prem Sichanugrist*

You can now supply Proc, lambda, or anything that respond to #call in those
validations, and it will be called with current record as an argument.
That given proc or lambda must returns an object which respond to #include? for
InclusionValidator and ExclusionValidator, and returns a regular expression
object for FormatValidator.

* Added ActiveModel::SecurePassword to encapsulate dead-simple password usage with BCrypt encryption and salting *DHH*

* ActiveModel::AttributeMethods allows attributes to be defined on demand *Alexander Uvarov*

* Add support for selectively enabling/disabling observers *Myron Marston*

Please check [3-0-stable](https://github.com/rails/rails/blob/3-0-stable/activemodel/CHANGELOG) for previous changes.
2 changes: 1 addition & 1 deletion activemodel/MIT-LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2004-2010 David Heinemeier Hansson
Copyright (c) 2004-2011 David Heinemeier Hansson

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
37 changes: 32 additions & 5 deletions activemodel/README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ the Rails framework.
Prior to Rails 3.0, if a plugin or gem developer wanted to have an object
interact with Action Pack helpers, it was required to either copy chunks of
code from Rails, or monkey patch entire helpers to make them handle objects
that did not exacly conform to the Active Record interface. This would result
that did not exactly conform to the Active Record interface. This would result
in code duplication and fragile applications that broke on upgrades.

Active Model solves this. You can include functionality from the following
Expand Down Expand Up @@ -41,7 +41,7 @@ modules:
define_model_callbacks :create

def create
_run_create_callbacks do
run_callbacks :create do
# Your create action methods here
end
end
Expand Down Expand Up @@ -84,7 +84,7 @@ modules:
attr_reader :errors

def validate!
errors.add(:name, "can not be nil") if name == nil
errors.add(:name, "can not be nil") if name.nil?
end

def ErrorsPerson.human_attribute_name(attr, options = {})
Expand All @@ -94,10 +94,10 @@ modules:
end

person.errors.full_messages
# => ["Name Can not be nil"]
# => ["Name can not be nil"]

person.errors.full_messages
# => ["Name Can not be nil"]
# => ["Name can not be nil"]

{Learn more}[link:classes/ActiveModel/Errors.html]

Expand Down Expand Up @@ -182,3 +182,30 @@ modules:
p.valid? # => true

{Learn more}[link:classes/ActiveModel/Validator.html]


== Download and installation

The latest version of Active Model can be installed with Rubygems:

% [sudo] gem install activemodel

Source code can be downloaded as part of the Rails project on GitHub

* https://github.com/rails/rails/tree/master/activemodel


== License

Active Model is released under the MIT license.


== Support

API documentation is at

* http://api.rubyonrails.org

Bug reports and feature requests can be filed with the rest for the Ruby on Rails project here:

* https://github.com/rails/rails/issues
Empty file modified activemodel/Rakefile
100644 → 100755
Empty file.
5 changes: 2 additions & 3 deletions activemodel/activemodel.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ Gem::Specification.new do |s|
s.author = 'David Heinemeier Hansson'
s.email = '[email protected]'
s.homepage = 'http://www.rubyonrails.org'
s.rubyforge_project = 'activemodel'

s.files = Dir['CHANGELOG', 'MIT-LICENSE', 'README.rdoc', 'lib/**/*']
s.files = Dir['CHANGELOG.md', 'MIT-LICENSE', 'README.rdoc', 'lib/**/*']
s.require_path = 'lib'

s.add_dependency('activesupport', version)
s.add_dependency('builder', '~> 3.2.0')
s.add_dependency('i18n', '~> 0.6.0')
s.add_dependency('i18n', '~> 0.6')
end
4 changes: 2 additions & 2 deletions activemodel/lib/active_model.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#--
# Copyright (c) 2004-2010 David Heinemeier Hansson
# Copyright (c) 2004-2011 David Heinemeier Hansson
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
Expand Down Expand Up @@ -33,7 +33,6 @@ module ActiveModel
autoload :BlockValidator, 'active_model/validator'
autoload :Callbacks
autoload :Conversion
autoload :DeprecatedErrorMethods
autoload :Dirty
autoload :EachValidator, 'active_model/validator'
autoload :Errors
Expand All @@ -43,6 +42,7 @@ module ActiveModel
autoload :Naming
autoload :Observer, 'active_model/observing'
autoload :Observing
autoload :SecurePassword
autoload :Serialization
autoload :TestCase
autoload :Translation
Expand Down
Loading