diff options
author | taca <taca> | 2012-03-18 06:49:06 +0000 |
---|---|---|
committer | taca <taca> | 2012-03-18 06:49:06 +0000 |
commit | cf8b57d9ec67137cd9af2cf70ec8e7e214ed30ce (patch) | |
tree | 5a42ec0192be260249e078595774b7f288b12830 /databases | |
parent | 8225058efd70fc70db0d06809d8ebb06d2b6b4b8 (diff) | |
download | pkgsrc-cf8b57d9ec67137cd9af2cf70ec8e7e214ed30ce.tar.gz |
Importing ruby-activerecord32 3.2.2.
## Rails 3.2.1 (January 26, 2012) ##
* The threshold for auto EXPLAIN is ignored if there's no logger. *fxn*
* Call `to_s` on the value passed to `table_name=`, in particular symbols
are supported (regression). *Sergey Nartimov*
* Fix possible race condition when two threads try to define attribute
methods for the same class. *Jon Leighton*
## Rails 3.2.0 (January 20, 2012) ##
* Added a `with_lock` method to ActiveRecord objects, which starts
a transaction, locks the object (pessimistically) and yields to the block.
The method takes one (optional) parameter and passes it to `lock!`.
Before:
class Order < ActiveRecord::Base
def cancel!
transaction do
lock!
# ... cancelling logic
end
end
end
After:
class Order < ActiveRecord::Base
def cancel!
with_lock do
# ... cancelling logic
end
end
end
*Olek Janiszewski*
* 'on' and 'ON' boolean columns values are type casted to true
*Santiago Pastorino*
* Added ability to run migrations only for given scope, which allows
to run migrations only from one engine (for example to revert changes
from engine that you want to remove).
Example:
rake db:migrate SCOPE=blog
*Piotr Sarnacki*
* Migrations copied from engines are now scoped with engine's name,
for example 01_create_posts.blog.rb. *Piotr Sarnacki*
* Implements `AR::Base.silence_auto_explain`. This method allows the user to
selectively disable automatic EXPLAINs within a block. *fxn*
* Implements automatic EXPLAIN logging for slow queries.
A new configuration parameter `config.active_record.auto_explain_threshold_in_seconds`
determines what's to be considered a slow query. Setting that to `nil` disables
this feature. Defaults are 0.5 in development mode, and `nil` in test and production
modes.
As of this writing there's support for SQLite, MySQL (mysql2 adapter), and
PostgreSQL.
*fxn*
* Implemented ActiveRecord::Relation#pluck method
Method returns Array of column value from table under ActiveRecord model
Client.pluck(:id)
*Bogdan Gusiev*
* Automatic closure of connections in threads is deprecated. For example
the following code is deprecated:
Thread.new { Post.find(1) }.join
It should be changed to close the database connection at the end of
the thread:
Thread.new {
Post.find(1)
Post.connection.close
}.join
Only people who spawn threads in their application code need to worry
about this change.
* Deprecated:
* `set_table_name`
* `set_inheritance_column`
* `set_sequence_name`
* `set_primary_key`
* `set_locking_column`
Use an assignment method instead. For example, instead of `set_table_name`, use `self.table_name=`:
class Project < ActiveRecord::Base
self.table_name = "project"
end
Or define your own `self.table_name` method:
class Post < ActiveRecord::Base
def self.table_name
"special_" + super
end
end
Post.table_name # => "special_posts"
*Jon Leighton*
* Generated association methods are created within a separate module to allow overriding and
composition using `super`. For a class named `MyModel`, the module is named
`MyModel::GeneratedFeatureMethods`. It is included into the model class immediately after
the `generated_attributes_methods` module defined in ActiveModel, so association methods
override attribute methods of the same name. *Josh Susser*
* Implemented ActiveRecord::Relation#explain. *fxn*
* Add ActiveRecord::Relation#uniq for generating unique queries.
Before:
Client.select('DISTINCT name')
After:
Client.select(:name).uniq
This also allows you to revert the unqueness in a relation:
Client.select(:name).uniq.uniq(false)
*Jon Leighton*
* Support index sort order in sqlite, mysql and postgres adapters. *Vlad Jebelev*
* Allow the :class_name option for associations to take a symbol (:Client) in addition to
a string ('Client').
This is to avoid confusing newbies, and to be consistent with the fact that other options
like :foreign_key already allow a symbol or a string.
*Jon Leighton*
* In development mode the db:drop task also drops the test database. For symmetry with
the db:create task. *Dmitriy Kiriyenko*
* Added ActiveRecord::Base.store for declaring simple single-column key/value stores *DHH*
class User < ActiveRecord::Base
store :settings, accessors: [ :color, :homepage ]
end
u = User.new(color: 'black', homepage: '37signals.com')
u.color # Accessor stored attribute
u.settings[:country] = 'Denmark' # Any attribute, even if not specified with an accessor
* MySQL: case-insensitive uniqueness validation avoids calling LOWER when
the column already uses a case-insensitive collation. Fixes #561.
*Joseph Palermo*
* Transactional fixtures enlist all active database connections. You can test
models on different connections without disabling transactional fixtures.
*Jeremy Kemper*
* Add first_or_create, first_or_create!, first_or_initialize methods to Active Record. This is a
better approach over the old find_or_create_by dynamic methods because it's clearer which
arguments are used to find the record and which are used to create it:
User.where(:first_name => "Scarlett").first_or_create!(:last_name => "Johansson")
*Andrés Mejía*
* Fix nested attributes bug where _destroy parameter is taken into account
during :reject_if => :all_blank (fixes #2937)
*Aaron Christy*
* Add ActiveSupport::Cache::NullStore for use in development and testing.
*Brian Durand*
Diffstat (limited to 'databases')
-rw-r--r-- | databases/ruby-activerecord32/DESCR | 8 | ||||
-rw-r--r-- | databases/ruby-activerecord32/Makefile | 20 | ||||
-rw-r--r-- | databases/ruby-activerecord32/PLIST | 152 | ||||
-rw-r--r-- | databases/ruby-activerecord32/distinfo | 5 |
4 files changed, 185 insertions, 0 deletions
diff --git a/databases/ruby-activerecord32/DESCR b/databases/ruby-activerecord32/DESCR new file mode 100644 index 00000000000..2c2957bd21a --- /dev/null +++ b/databases/ruby-activerecord32/DESCR @@ -0,0 +1,8 @@ += Active Record -- Object-relational mapping put on rails + +Active Record connects classes to relational database tables to establish an +almost zero-configuration persistence layer for applications. The library +provides a base class that, when subclassed, sets up a mapping between the new +class and an existing table in the database. In context of an application, +these classes are commonly referred to as *models*. Models can also be +connected to other models; this is done by defining *associations*. diff --git a/databases/ruby-activerecord32/Makefile b/databases/ruby-activerecord32/Makefile new file mode 100644 index 00000000000..a67b347b7bf --- /dev/null +++ b/databases/ruby-activerecord32/Makefile @@ -0,0 +1,20 @@ +# $NetBSD: Makefile,v 1.1.1.1 2012/03/18 06:49:06 taca Exp $ + +DISTNAME= activerecord-${RUBY_RAILS_VERSION} +CATEGORIES= databases + +MAINTAINER= pkgsrc-users@NetBSD.org +HOMEPAGE= http://www.rubyonrails.org/ +COMMENT= Object-relational mapper framework (part of Rails 3.2) +LICENSE= mit + +# Comment out dependency in gemspec but already depends indirectly one. +#DEPENDS+= ${RUBY_ACTIVESUPPORT_DEPENDS} +DEPENDS+= ${RUBY_ACTIVEMODEL_DEPENDS} +DEPENDS+= ${RUBY_PKGPREFIX}-arel>=3.0.2<3.3:../../databases/ruby-arel +DEPENDS+= ${RUBY_PKGPREFIX}-tzinfo>=0.3.29<0.4:../../time/ruby-tzinfo + +RUBY_RAILS_SUPPORTED= 32 + +.include "../../lang/ruby/gem.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/databases/ruby-activerecord32/PLIST b/databases/ruby-activerecord32/PLIST new file mode 100644 index 00000000000..03580197cd7 --- /dev/null +++ b/databases/ruby-activerecord32/PLIST @@ -0,0 +1,152 @@ +@comment $NetBSD: PLIST,v 1.1.1.1 2012/03/18 06:49:06 taca Exp $ +${GEM_HOME}/cache/${GEM_NAME}.gem +${GEM_LIBDIR}/CHANGELOG.md +${GEM_LIBDIR}/MIT-LICENSE +${GEM_LIBDIR}/README.rdoc +${GEM_LIBDIR}/examples/associations.png +${GEM_LIBDIR}/examples/performance.rb +${GEM_LIBDIR}/examples/simple.rb +${GEM_LIBDIR}/lib/active_record.rb +${GEM_LIBDIR}/lib/active_record/aggregations.rb +${GEM_LIBDIR}/lib/active_record/associations.rb +${GEM_LIBDIR}/lib/active_record/associations/alias_tracker.rb +${GEM_LIBDIR}/lib/active_record/associations/association.rb +${GEM_LIBDIR}/lib/active_record/associations/association_scope.rb +${GEM_LIBDIR}/lib/active_record/associations/belongs_to_association.rb +${GEM_LIBDIR}/lib/active_record/associations/belongs_to_polymorphic_association.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/association.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/belongs_to.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/collection_association.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/has_and_belongs_to_many.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/has_many.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/has_one.rb +${GEM_LIBDIR}/lib/active_record/associations/builder/singular_association.rb +${GEM_LIBDIR}/lib/active_record/associations/collection_association.rb +${GEM_LIBDIR}/lib/active_record/associations/collection_proxy.rb +${GEM_LIBDIR}/lib/active_record/associations/has_and_belongs_to_many_association.rb +${GEM_LIBDIR}/lib/active_record/associations/has_many_association.rb +${GEM_LIBDIR}/lib/active_record/associations/has_many_through_association.rb +${GEM_LIBDIR}/lib/active_record/associations/has_one_association.rb +${GEM_LIBDIR}/lib/active_record/associations/has_one_through_association.rb +${GEM_LIBDIR}/lib/active_record/associations/join_dependency.rb +${GEM_LIBDIR}/lib/active_record/associations/join_dependency/join_association.rb +${GEM_LIBDIR}/lib/active_record/associations/join_dependency/join_base.rb +${GEM_LIBDIR}/lib/active_record/associations/join_dependency/join_part.rb +${GEM_LIBDIR}/lib/active_record/associations/join_helper.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/association.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/belongs_to.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/collection_association.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/has_and_belongs_to_many.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/has_many.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/has_many_through.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/has_one.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/has_one_through.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/singular_association.rb +${GEM_LIBDIR}/lib/active_record/associations/preloader/through_association.rb +${GEM_LIBDIR}/lib/active_record/associations/singular_association.rb +${GEM_LIBDIR}/lib/active_record/associations/through_association.rb +${GEM_LIBDIR}/lib/active_record/attribute_assignment.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/before_type_cast.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/deprecated_underscore_read.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/dirty.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/primary_key.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/query.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/read.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/serialization.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/time_zone_conversion.rb +${GEM_LIBDIR}/lib/active_record/attribute_methods/write.rb +${GEM_LIBDIR}/lib/active_record/autosave_association.rb +${GEM_LIBDIR}/lib/active_record/base.rb +${GEM_LIBDIR}/lib/active_record/callbacks.rb +${GEM_LIBDIR}/lib/active_record/coders/yaml_column.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/connection_pool.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/connection_specification.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/database_limits.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/database_statements.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/query_cache.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/quoting.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/schema_definitions.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract/schema_statements.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/abstract_mysql_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/column.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/mysql2_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/mysql_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/postgresql_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/schema_cache.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/sqlite3_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/sqlite_adapter.rb +${GEM_LIBDIR}/lib/active_record/connection_adapters/statement_pool.rb +${GEM_LIBDIR}/lib/active_record/counter_cache.rb +${GEM_LIBDIR}/lib/active_record/dynamic_finder_match.rb +${GEM_LIBDIR}/lib/active_record/dynamic_matchers.rb +${GEM_LIBDIR}/lib/active_record/dynamic_scope_match.rb +${GEM_LIBDIR}/lib/active_record/errors.rb +${GEM_LIBDIR}/lib/active_record/explain.rb +${GEM_LIBDIR}/lib/active_record/explain_subscriber.rb +${GEM_LIBDIR}/lib/active_record/fixtures.rb +${GEM_LIBDIR}/lib/active_record/fixtures/file.rb +${GEM_LIBDIR}/lib/active_record/identity_map.rb +${GEM_LIBDIR}/lib/active_record/inheritance.rb +${GEM_LIBDIR}/lib/active_record/integration.rb +${GEM_LIBDIR}/lib/active_record/locale/en.yml +${GEM_LIBDIR}/lib/active_record/locking/optimistic.rb +${GEM_LIBDIR}/lib/active_record/locking/pessimistic.rb +${GEM_LIBDIR}/lib/active_record/log_subscriber.rb +${GEM_LIBDIR}/lib/active_record/migration.rb +${GEM_LIBDIR}/lib/active_record/migration/command_recorder.rb +${GEM_LIBDIR}/lib/active_record/model_schema.rb +${GEM_LIBDIR}/lib/active_record/nested_attributes.rb +${GEM_LIBDIR}/lib/active_record/observer.rb +${GEM_LIBDIR}/lib/active_record/persistence.rb +${GEM_LIBDIR}/lib/active_record/query_cache.rb +${GEM_LIBDIR}/lib/active_record/querying.rb +${GEM_LIBDIR}/lib/active_record/railtie.rb +${GEM_LIBDIR}/lib/active_record/railties/console_sandbox.rb +${GEM_LIBDIR}/lib/active_record/railties/controller_runtime.rb +${GEM_LIBDIR}/lib/active_record/railties/databases.rake +${GEM_LIBDIR}/lib/active_record/railties/jdbcmysql_error.rb +${GEM_LIBDIR}/lib/active_record/readonly_attributes.rb +${GEM_LIBDIR}/lib/active_record/reflection.rb +${GEM_LIBDIR}/lib/active_record/relation.rb +${GEM_LIBDIR}/lib/active_record/relation/batches.rb +${GEM_LIBDIR}/lib/active_record/relation/calculations.rb +${GEM_LIBDIR}/lib/active_record/relation/delegation.rb +${GEM_LIBDIR}/lib/active_record/relation/finder_methods.rb +${GEM_LIBDIR}/lib/active_record/relation/predicate_builder.rb +${GEM_LIBDIR}/lib/active_record/relation/query_methods.rb +${GEM_LIBDIR}/lib/active_record/relation/spawn_methods.rb +${GEM_LIBDIR}/lib/active_record/result.rb +${GEM_LIBDIR}/lib/active_record/sanitization.rb +${GEM_LIBDIR}/lib/active_record/schema.rb +${GEM_LIBDIR}/lib/active_record/schema_dumper.rb +${GEM_LIBDIR}/lib/active_record/scoping.rb +${GEM_LIBDIR}/lib/active_record/scoping/default.rb +${GEM_LIBDIR}/lib/active_record/scoping/named.rb +${GEM_LIBDIR}/lib/active_record/serialization.rb +${GEM_LIBDIR}/lib/active_record/serializers/xml_serializer.rb +${GEM_LIBDIR}/lib/active_record/session_store.rb +${GEM_LIBDIR}/lib/active_record/store.rb +${GEM_LIBDIR}/lib/active_record/test_case.rb +${GEM_LIBDIR}/lib/active_record/timestamp.rb +${GEM_LIBDIR}/lib/active_record/transactions.rb +${GEM_LIBDIR}/lib/active_record/translation.rb +${GEM_LIBDIR}/lib/active_record/validations.rb +${GEM_LIBDIR}/lib/active_record/validations/associated.rb +${GEM_LIBDIR}/lib/active_record/validations/uniqueness.rb +${GEM_LIBDIR}/lib/active_record/version.rb +${GEM_LIBDIR}/lib/rails/generators/active_record.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/migration.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/migration/migration_generator.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/migration/templates/migration.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/model/model_generator.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/model/templates/migration.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/model/templates/model.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/model/templates/module.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/observer/observer_generator.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/observer/templates/observer.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/session_migration/session_migration_generator.rb +${GEM_LIBDIR}/lib/rails/generators/active_record/session_migration/templates/migration.rb +${GEM_HOME}/specifications/${GEM_NAME}.gemspec diff --git a/databases/ruby-activerecord32/distinfo b/databases/ruby-activerecord32/distinfo new file mode 100644 index 00000000000..6a5a7d730ca --- /dev/null +++ b/databases/ruby-activerecord32/distinfo @@ -0,0 +1,5 @@ +$NetBSD: distinfo,v 1.1.1.1 2012/03/18 06:49:06 taca Exp $ + +SHA1 (activerecord-3.2.2.gem) = 2452c32407a2ce745297dc885e24b80059619235 +RMD160 (activerecord-3.2.2.gem) = 76b6ca9a993e43a6e8241c5e823ca2a23a6c005d +Size (activerecord-3.2.2.gem) = 386048 bytes |