Permalink
Browse files

Combine sequel and sequel_core into one gem

For merging the READMEs, I put the model README at the bottom of the
core README and used that.

For merging the CHANGELOGs, I merged them manually back to 1.4.0, and
copied the rest of the model CHANGELOG to the bottom of the file.

Most of the Rakefile code was duplicative, but I think I got
all tasks except spec_adapters.  I figure few people have all 5
adapters necessary to run the adapter specs.  I only have 3 of them,
so I never used spec_adapters.

The specs are still split up so they can be run independently.
Additionally, the adapter specs are split off from the core specs,
which helps if you want to put Sequel.connect lines in
spec_config.rb. The only other spec changes were for path changes.

There weren't conflicts merging anything else, IIRC.

I hope there is no fallout from this.  I haven't noticed any yet,
running the specs and the test suites for all of my apps that use
Sequel.
  • Loading branch information...
1 parent 0a5e41e commit 778a032ea68193cf4c981a3177f06159fa5a1921 @jeremyevans committed Jul 7, 2008
Showing with 704 additions and 1,015 deletions.
  1. +1 −1 .gitignore
  2. +293 −0 {sequel_core → }/CHANGELOG
  3. 0 {sequel → }/COPYING
  4. +306 −19 {sequel → }/README
  5. +88 −60 Rakefile
  6. 0 {sequel_core → }/bin/sequel
  7. 0 {sequel → }/doc/advanced_associations.rdoc
  8. 0 {sequel_core → }/doc/cheat_sheet.rdoc
  9. 0 {sequel_core → }/doc/dataset_filtering.rdoc
  10. 0 {sequel → }/lib/sequel.rb
  11. 0 {sequel_core → }/lib/sequel_core.rb
  12. 0 {sequel_core → }/lib/sequel_core/adapters/adapter_skeleton.rb
  13. 0 {sequel_core → }/lib/sequel_core/adapters/ado.rb
  14. 0 {sequel_core → }/lib/sequel_core/adapters/db2.rb
  15. 0 {sequel_core → }/lib/sequel_core/adapters/dbi.rb
  16. 0 {sequel_core → }/lib/sequel_core/adapters/informix.rb
  17. 0 {sequel_core → }/lib/sequel_core/adapters/jdbc.rb
  18. 0 {sequel_core → }/lib/sequel_core/adapters/mysql.rb
  19. 0 {sequel_core → }/lib/sequel_core/adapters/odbc.rb
  20. 0 {sequel_core → }/lib/sequel_core/adapters/odbc_mssql.rb
  21. 0 {sequel_core → }/lib/sequel_core/adapters/openbase.rb
  22. 0 {sequel_core → }/lib/sequel_core/adapters/oracle.rb
  23. 0 {sequel_core → }/lib/sequel_core/adapters/postgres.rb
  24. 0 {sequel_core → }/lib/sequel_core/adapters/sqlite.rb
  25. 0 {sequel_core → }/lib/sequel_core/connection_pool.rb
  26. 0 {sequel_core → }/lib/sequel_core/core_ext.rb
  27. 0 {sequel_core → }/lib/sequel_core/core_sql.rb
  28. 0 {sequel_core → }/lib/sequel_core/database.rb
  29. 0 {sequel_core → }/lib/sequel_core/database/schema.rb
  30. 0 {sequel_core → }/lib/sequel_core/dataset.rb
  31. 0 {sequel_core → }/lib/sequel_core/dataset/callback.rb
  32. 0 {sequel_core → }/lib/sequel_core/dataset/convenience.rb
  33. 0 {sequel_core → }/lib/sequel_core/dataset/pagination.rb
  34. 0 {sequel_core → }/lib/sequel_core/dataset/query.rb
  35. 0 {sequel_core → }/lib/sequel_core/dataset/schema.rb
  36. 0 {sequel_core → }/lib/sequel_core/dataset/sql.rb
  37. 0 {sequel_core → }/lib/sequel_core/deprecated.rb
  38. 0 {sequel_core → }/lib/sequel_core/exceptions.rb
  39. 0 {sequel_core → }/lib/sequel_core/migration.rb
  40. 0 {sequel_core → }/lib/sequel_core/object_graph.rb
  41. 0 {sequel_core → }/lib/sequel_core/pretty_table.rb
  42. 0 {sequel_core → }/lib/sequel_core/schema.rb
  43. 0 {sequel_core → }/lib/sequel_core/schema/generator.rb
  44. 0 {sequel_core → }/lib/sequel_core/schema/sql.rb
  45. 0 {sequel_core → }/lib/sequel_core/sql.rb
  46. 0 {sequel_core → }/lib/sequel_core/worker.rb
  47. 0 {sequel → }/lib/sequel_model.rb
  48. 0 {sequel → }/lib/sequel_model/association_reflection.rb
  49. 0 {sequel → }/lib/sequel_model/associations.rb
  50. 0 {sequel → }/lib/sequel_model/base.rb
  51. 0 {sequel → }/lib/sequel_model/caching.rb
  52. 0 {sequel → }/lib/sequel_model/dataset_methods.rb
  53. 0 {sequel → }/lib/sequel_model/eager_loading.rb
  54. 0 {sequel → }/lib/sequel_model/hooks.rb
  55. 0 {sequel → }/lib/sequel_model/inflector.rb
  56. 0 {sequel → }/lib/sequel_model/plugins.rb
  57. 0 {sequel → }/lib/sequel_model/record.rb
  58. 0 {sequel → }/lib/sequel_model/schema.rb
  59. 0 {sequel → }/lib/sequel_model/validations.rb
  60. +0 −297 sequel/CHANGELOG
  61. +0 −131 sequel/Rakefile
  62. +0 −4 sequel/spec/rcov.opts
  63. +0 −19 sequel_core/COPYING
  64. +0 −313 sequel_core/README
  65. +0 −158 sequel_core/Rakefile
  66. 0 sequel_core/spec/spec.opts
  67. +1 −1 {sequel_core → }/spec/adapters/informix_spec.rb
  68. +1 −1 {sequel_core → }/spec/adapters/mysql_spec.rb
  69. +1 −1 {sequel_core → }/spec/adapters/oracle_spec.rb
  70. +1 −1 {sequel_core → }/spec/adapters/postgres_spec.rb
  71. +7 −0 spec/adapters/spec_helper.rb
  72. +1 −1 {sequel_core → }/spec/adapters/sqlite_spec.rb
  73. 0 {sequel_core → }/spec/rcov.opts
  74. 0 {sequel_core/spec → spec/sequel_core}/connection_pool_spec.rb
  75. 0 {sequel_core/spec → spec/sequel_core}/core_ext_spec.rb
  76. 0 {sequel_core/spec → spec/sequel_core}/core_sql_spec.rb
  77. +1 −1 {sequel_core/spec → spec/sequel_core}/database_spec.rb
  78. 0 {sequel_core/spec → spec/sequel_core}/dataset_spec.rb
  79. 0 {sequel_core/spec → spec/sequel_core}/expression_filters_spec.rb
  80. 0 {sequel_core/spec → spec/sequel_core}/migration_spec.rb
  81. 0 {sequel_core/spec → spec/sequel_core}/object_graph_spec.rb
  82. 0 {sequel_core/spec → spec/sequel_core}/pretty_table_spec.rb
  83. 0 {sequel_core/spec → spec/sequel_core}/schema_generator_spec.rb
  84. 0 {sequel_core/spec → spec/sequel_core}/schema_spec.rb
  85. +1 −5 {sequel_core/spec → spec/sequel_core}/spec_helper.rb
  86. 0 {sequel_core/spec → spec/sequel_core}/worker_spec.rb
  87. 0 {sequel/spec → spec/sequel_model}/association_reflection_spec.rb
  88. 0 {sequel/spec → spec/sequel_model}/associations_spec.rb
  89. 0 {sequel/spec → spec/sequel_model}/base_spec.rb
  90. 0 {sequel/spec → spec/sequel_model}/caching_spec.rb
  91. 0 {sequel/spec → spec/sequel_model}/dataset_methods_spec.rb
  92. 0 {sequel/spec → spec/sequel_model}/eager_loading_spec.rb
  93. 0 {sequel/spec → spec/sequel_model}/hooks_spec.rb
  94. 0 {sequel/spec → spec/sequel_model}/inflector_spec.rb
  95. 0 {sequel/spec → spec/sequel_model}/model_spec.rb
  96. 0 {sequel/spec → spec/sequel_model}/plugins_spec.rb
  97. 0 {sequel/spec → spec/sequel_model}/record_spec.rb
  98. 0 {sequel/spec → spec/sequel_model}/schema_spec.rb
  99. +2 −2 {sequel/spec → spec/sequel_model}/spec_helper.rb
  100. 0 {sequel/spec → spec/sequel_model}/validations_spec.rb
  101. 0 {sequel → }/spec/spec.opts
  102. 0 {sequel_core → }/spec/spec_config.rb.example
View
@@ -1,3 +1,3 @@
-sequel_core/spec/spec_config.rb
+spec/spec_config.rb
rdoc
pkg
@@ -1,5 +1,43 @@
+=== HEAD
+
+* Combined the directory structure for sequel_model and sequel_core, now there is going to be only one gem named sequel (jeremyevans)
+
=== 2.2.0 (2008-07-05)
+* Add :extend association option, extending the dataset with module(s) (jeremyevans)
+
+* Add :after_load association callback option, called after associated objects have been loaded from the database (jeremyevans)
+
+* Make validation methods support a :tag option, to work correctly with source reloading (jeremyevans)
+
+* Add :before_add, :after_add, :before_remove, :after_remove association callback options (jeremyevans)
+
+* Break many_to_one association setter method in two parts, for easier overriding (jeremyevans)
+
+* Model.validates_presence_of now considers false as present instead of absent (jeremyevans)
+
+* Add Model.raise_on_save_failure, raising errors on save failure instead of return false (now nil), default to true (jeremyevans)
+
+* Add :eager_loader association option, to specify code to be run when eager loading (jeremyevans)
+
+* Make :many_to_one associations support :dataset, :order, :limit association options, as well as block arguments (jeremyevans)
+
+* Add :dataset association option, which overrides the default base dataset to use (jeremyevans)
+
+* Add :eager_graph association option, works just like :eager except it uses #eager_graph (jeremyevans)
+
+* Add :graph_join_table_join_type association option (jeremyevans)
+
+* Add :graph_only_conditions and :graph_join_table_only_conditions association options (jeremyevans)
+
+* Add :graph_block and :graph_join_table_block association options (jeremyevans)
+
+* Set the model's dataset's columns in addition to the model's columns when loading the schema for a model (jeremyevans)
+
+* Make caching work correctly with subclasses (jeremyevans)
+
+* Add the Model.to_hash dataset method (jeremyevans)
+
* Filter blocks now yield a SQL::VirtualRow argument, which is useful if another library defines operator methods on Symbol (jeremyevans)
* Add Symbol#identifier method, to make x__a be treated as "x__a" instead of "x"."a" (jeremyevans)
@@ -38,6 +76,42 @@
=== 2.1.0 (2008-06-17)
+* Break association add_/remove_/remove_all_ methods into two parts, for easier overriding (jeremyevans)
+
+* Add Model.strict_param_setting, on by default, which raises errors if a missing/restricted method is called via new/set/update/etc. (jeremyevans)
+
+* Raise errors when using association methods on objects without valid primary keys (jeremyevans)
+
+* The model's primary key is a restricted column by default, Add model.unrestrict_primary_key to get the old behavior (jeremyevans)
+
+* Add Model.set_(allowed|restricted)_columns, which affect which columns create/new/set/update/etc. modify (jeremyevans)
+
+* Calls to Model.def_dataset_method with a block are cached and reapplied to the new dataset if set_dataset is called, even in a subclass (jeremyevans)
+
+* The :reciprocal option to associations should now be the symbol name of the reciprocal association, not an instance variable symbol (jeremyevans)
+
+* Add Model#associations, which is a hash holding a cache of associated objects, with each association being a separate key (jeremyevans)
+
+* Make all associations support a :graph_select option, specifying a column or array of columns to select when using eager_graph (jeremyevans)
+
+* Bring back Model#set and Model#update, now the same as Model#set_with_params and Model#update_with_params (jeremyevans)
+
+* Allow model datasets to call to_hash without any arguments, which allows easy creation of identity maps (jeremyevans)
+
+* Add Model.set_sti_key, for easily setting up single table inheritance (jeremyevans)
+
+* Make all associations support a :read_only option, which doesn't add methods that modify the database (jeremyevans)
+
+* Make *_to_many associations support a :limit option, for specifying a limit to the resulting records (and possibly an offset) (jeremyevans)
+
+* Make association block argument and :eager option affect the _dataset method (jeremyevans)
+
+* Add a :one_to_one option to one_to_many associations, which creates a getter and setter similar to many_to_one (a.k.a. has_one) (jeremyevans)
+
+* add_ and remove_ one_to_many association methods now raise an error if the passed object cannot be saved, instead of saving without validation (jeremyevans)
+
+* Add support for :if option on validations, using a symbol (specifying an instance method) or a proc (dtsato)
+
* Support bitwise operators for NumericExpressions: &, |, ^, ~, <<, >> (jeremyevans)
* No longer raise an error for Dataset#filter(true) or Dataset#filter(false) (jeremyevans)
@@ -84,6 +158,10 @@
=== 2.0.1 (2008-06-04)
+* Make the choice of Time or DateTime optional for typecasting :datetime types, default to Time (jeremyevans)
+
+* Reload database schema for table when calling Model.create_table (jeremyevans)
+
* Have PostgreSQL money type use BigDecimal instead of Float (jeremyevans)
* Have the PostgreSQL and MySQL adapters use the Sequel.time_class setting for datetime/timestamp types (jeremyevans)
@@ -102,6 +180,34 @@
=== 2.0.0 (2008-06-01)
+* Comprehensive update of all documentation (jeremyevans)
+
+* Remove methods deprecated in 1.5.0 (jeremyevans)
+
+* Add typecasting on attribute assignment to Sequel::Model objects, optional but enabled by default (jeremyevans)
+
+* Returning false in one of the before_ hooks now causes the appropriate method(s) to immediately return false (jeremyevans)
+
+* Add remove_all_* association method for *_to_many associations, which removes the association with all currently associated objects (jeremyevans)
+
+* Add Model.lazy_load_schema=, when set to true, it loads the schema on first instantiation (jeremyevans)
+
+* Add before_validation and after_validation hooks, called whenever the model is validated (jeremyevans)
+
+* Add Model.default_foreign_key, a private class method that allows changing the default foreign key that Sequel will use in associations (jeremyevans)
+
+* Cache negative lookup when eagerly loading many_to_one associations (jeremyevans)
+
+* Make all associations support the :select option, not just many_to_many (jeremyevans)
+
+* Allow the use of blocks when eager loading, and add the :eager_block and :allow_eager association options for configuration (jeremyevans)
+
+* Add the :graph_join_type, :graph_conditions, and :graph_join_table_conditions association options, used when eager graphing (jeremyevans)
+
+* Add AssociationReflection class (subclass of Hash), to make calling a couple of private Model methods unnecessary (jeremyevans)
+
+* Change hook methods so that if a tag/method is specified it overwrites an existing hook block with the same tag/method (jeremyevans)
+
* Refactor String inflection support, you must use String.inflections instead of Inflector.inflections now (jeremyevans)
* Allow connection to ODBC-MSSQL via a URL (petersumskas) (#230)
@@ -218,10 +324,66 @@
=== 1.5.1 (2008-04-30)
+* Fix Dataset#eager_graph when not all objects have associated objects (jeremyevans)
+
* Have Dataset#graph give a nil value instead of a hash with all nil values if no matching rows exist in the graphed table (jeremyevans)
=== 1.5.0 (2008-04-29)
+* Make the validation errors API compatible with Merb (Inviz)
+
+* Add validates_uniqueness_of, for protecting against duplicate entries in the database (neaf, jeremyevans)
+
+* Alias Model#dataset= to Model#set_dataset (tmm1)
+
+* Make some Model class methods private: def_hook_method, hooks, add_hook, plugin_module, plugin_gem (jeremyevans)
+
+* Add the eager! and eager_graph! mutation methods to model datasets (jeremyevans)
+
+* Remove Model.database_opened (jeremyevans)
+
+* Remove Model.super_dataset (jeremyevans)
+
+* Deprecate .create_with_params, .create_with, #set, #update, #update_with, and #new_record from Sequel::Model (jeremyevans)
+
+* Add Model.def_dataset_method, for defining methods on the model that reference methods on the dataset (jeremyevans)
+
+* Deprecate Model.method_missing, add dataset methods to Model via metaprogramming (jeremyevans)
+
+* Remove Model.join, so it is the same as Dataset#join (jeremyevans)
+
+* Use reciprocal associations for all types of associations in the getter/setter/add_/remove_ methods (jeremyevans)
+
+* Fix many_to_one associations to cache negative lookups (jeremyevans)
+
+* Change Model#=== to always be false if the primary key is nil (jeremyevans)
+
+* Add Model#hash, which should be unique for a given class and primary key (or values if primary key is nil) (jeremyevans)
+
+* Add Model#eql? as a alias to Model#== (jeremyevans)
+
+* Make Model#reload clear any cached associations (jeremyevans)
+
+* No longer depend on the assistance gem, merge the Inflector and Validations code (jeremyevans)
+
+* Add Model#set_with_params, which is Model#update_with_params without the save (jeremyevans)
+
+* Fix Model#destroy so that it returns self, not the result of after_destroy (jeremyevans)
+
+* Define Model column accessors in set_dataset, so they should always be avaiable, deprecate Model#method_missing (jeremyevans)
+
+* Add eager loading of associations via new sequel_core object graphing feature (jeremyevans)
+
+* Fix many_to_many associations with classes inside modules without an explicit join table (jeremyevans)
+
+* Allow creation of new records that don't have primary keys when the cache is on (jeremyevans) (#213)
+
+* Make Model#initialize, Model#set, and Model#update_with_params invulnerable to memory exhaustion (jeremyevans) (#210)
+
+* Add Model.str_columns, which gives a list of columns as frozen strings (jeremyevans)
+
+* Remove pretty_table.rb from sequel, since it is in sequel_core (jeremyevans)
+
* Set a timeout in the Sqlite adapter, default to 5 seconds (hrvoje.marjanovic) (#218)
* Document that calling Sequel::ODBC::Database#execute manually requires you to manually drop the returned object (jeremyevans) (#217)
@@ -296,6 +458,20 @@
=== 1.4.0 (2008-04-08)
+* Don't mark a column as changed unless the new value is different from the current value (tamas.denes, jeremyevans) (#203).
+
+* Switch gem name from "sequel_model" to just "sequel", which required large version bump (jeremyevans).
+
+* Add :select option to many_to_many associations, default to selecting only the associated model table and not the join table (jeremyevans) (#208).
+
+* Add :reciprocal one_to_many association option, for setting corresponding many_to_one instance variable (jeremyevans).
+
+* Add eager loading implementation (jeremyevans).
+
+* Change *_to_many associations so that the all associations are considered :cache=>true (jeremyevans).
+
+* Fix associations with block arguments and :cache=>true (jeremyevans).
+
* Merge 3 mysql patches from the bugtracker (mvyver) (#200, #201, #202).
* Merge 2 postgresql patches from the bugtracker (a...@mellowtone.co.jp) (#211, 212).
@@ -320,6 +496,8 @@
* Fixed Dataset#from to work correctly with SQL functions (#193).
+===Previous to 1.4.0, Sequel model and Sequel core versioning differed, see the bottom of this file for the changelog to Sequel model prior to 1.4.0.
+
=== 1.3 (2008-03-08)
* Added configuration file for running specs (#186).
@@ -1517,3 +1695,118 @@ method for saving them.
* Added Database#<< method for executing arbitrary SQL.
* Imported Sequel code.
+
+
+== Sequel::Model CHANGELOG 0.1 - 0.5.0.2
+
+=== 0.5.0.2 (2008-03-12)
+
+* More fixes for Model.associate to accept strings and symbols as class references.
+
+=== 0.5.0.1 (2008-03-09)
+
+* Fixed Model.associate to accept class and class name in :class option.
+
+=== 0.5 (2008-03-08)
+
+* Merged new associations branch into trunk.
+
+* Rewrote RDoc for associations.
+
+* Added has_and_belongs_to_many alias for many_to_many.
+
+* Added support for optional dataset block.
+
+* Added :order option to order association datasets.
+
+* Added :cache option to return and cache array of objects for association.
+
+* Changed one_to_many, many_to_many associations to return dataset by default.
+
+* Added has_many, belongs_to aliases.
+
+* Refactored associations code.
+
+* Added deprecations for old-style relations.
+
+* Completed specs for new associations code.
+
+* New associations code by Jeremy Evans (replaces relations code.)
+
+=== 0.4.2 (2008-02-29)
+
+* Fixed one_to_many implicit key to work correctly for namespaced classes (#167).
+
+* Fixed Model.db= to affect the underlying dataset (#183).
+
+* Fixed Model.implicit_table_name to disregard namespaces.
+
+=== 0.4.1 (2008-02-10)
+
+* Implemented Model#inspect (#151).
+
+* Changed Model#method_missing to short-circuit and bypass checking #columns if the values hash already contains the relevant column (#150).
+
+* Updated to reflect changes in sequel_core (Dataset#clone_merge renamed to Dataset#clone).
+
+=== 0.4 (2008-02-05)
+
+* Fixed Model#set to work with string keys (#143).
+
+* Fixed Model.create to correctly initialize instances marked as new (#135).
+
+* Fixed Model#initialize to convert string keys into symbol keys. This also fixes problem with validating objects initialized with string keys (#136).
+
+=== 0.3.3 (2008-01-25)
+
+* Finalized support for virtual attributes.
+
+=== 0.3.2.1 (2008-01-24)
+
+* Fixed Model.dataset to correctly set the dataset if using implicit naming or inheriting the superclass dataset (thanks celldee).
+
+=== 0.3.2 (2008-01-24)
+
+* Added Model#update_with_params method with support for virtual attributes and auto-filtering of unrelated parameters, and changed Model.create_with_params to support virtual attributes (#128).
+
+* Cleaned up gem spec (#132).
+
+* Removed validations code. Now relying on validations in assistance gem.
+
+=== 0.3.1 (2008-01-21)
+
+* Changed Model.dataset to use inflector to pluralize the class name into the table name. Works in similar fashion to table names in AR or DM.
+
+=== 0.3 (2008-01-18)
+
+* Implemented Validatable::Errors class.
+
+* Added Model#reload as alias to Model#refresh.
+
+* Changed Model.create to accept a block (#126).
+
+* Rewrote validations.
+
+* Fixed Model#initialize to accept nil values (#115).
+
+=== 0.2 (2008-01-02)
+
+* Removed deprecated Model.recreate_table method.
+
+* Removed deprecated :class and :on options from one_to_many macro.
+
+* Removed deprecated :class option from one_to_one macro.
+
+* Removed deprecated Model#pkey method.
+
+* Changed dependency to sequel_core.
+
+* Removed examples from sequel core.
+
+* Additional specs. We're now at 100% coverage.
+
+* Refactored hooks code. Hooks are now inheritable, and can be defined by supplying a block or a method name, or by overriding the hook instance method. Hook chains can now be broken by returning false (#111, #112).
+
+=== 0.1 (2007-12-30)
+
+* Moved model code from sequel into separate model sub-project.
File renamed without changes.
Oops, something went wrong.

0 comments on commit 778a032

Please sign in to comment.