active_hash 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG DELETED
@@ -1,242 +0,0 @@
1
- 2022-07-14 (v3.1.1)
2
- - Make scopes chainable [#248](https://github.com/active-hash/active_hash/pull/248) @andreynering
3
- - Set default key attributes [#251](https://github.com/active-hash/active_hash/pull/251/commits/68a0a121d110ac83f4bbf0024f027714fd24debf) @adampal
4
- - Migrate from Travis to GitHub Actions for CI @kbrock
5
- - Add primary_key support for has_one [#218](https://github.com/active-hash/active_hash/pull/218) @yujideveloper
6
- - Return a chainable relation when using .not [#205](https://github.com/active-hash/active_hash/pull/205) @pfeiffer
7
- - Correct fields with YAML aliases in array style [#226](https://github.com/active-hash/active_hash/pull/226) @stomk
8
- - Add ActiveHash::Relation#size method for compatibily [#227](https://github.com/active-hash/active_hash/pull/227) @sluceno
9
- - Implement ActiveRecord::RecordNotFound interface [#207](https://github.com/active-hash/active_hash/pull/207) @ChrisBr
10
- - Fix find_by_id with filter chain [#210](https://github.com/active-hash/active_hash/pull/210) @ChrisBr
11
- - Suppress Ruby 2.7 kwargs warnings [#206](https://github.com/active-hash/active_hash/pull/206) @yhirano55
12
- - Call reload if @records is not defined [#208](https://github.com/active-hash/active_hash/pull/208) @jonmagic
13
- - Switch to rspec3 (and update the Gemfile) [#209](https://github.com/active-hash/active_hash/pull/209) @djberg96
14
- - Implement filter by RegEx [#211](https://github.com/active-hash/active_hash/pull/211) @ChrisBr
15
- - Supports .pick method [#195](https://github.com/active-hash/active_hash/pull/195/files) @yhirano55
16
- - Lots of other small performance improvements, documentation and testing. Thanks to everyone who contributed!
17
-
18
- 2020-01-15 (v3.1.0)
19
- - Add ActiveHash::Base.order method inspired by ActiveRecord [#177](https://github.com/active-hash/active_hash/pull/177)
20
- - Add #to_ary to ActiveHash::Relation [#182](https://github.com/active-hash/active_hash/pull/182)
21
- - Allow #find to behave like Enumerable#find if id is nil and a block is given [#183](https://github.com/active-hash/active_hash/pull/183)
22
- - Delegate :sample to `records` [#189](https://github.com/active-hash/active_hash/pull/189)
23
-
24
- 2019-09-28 (v3.0.0)
25
- - Make #where chainable [#178](https://github.com/active-hash/active_hash/pull/178)
26
-
27
- 2019-09-28 (v2.3.0)
28
- - Add ::scope method (inspired by ActiveRecord) [#173](https://github.com/active-hash/active_hash/pull/173)
29
- - Let `.find(nil)` raise ActiveHash::RecordNotFound (inspired by ActiveRecord) [#174](https://github.com/active-hash/active_hash/pull/174)
30
- - `where` clause now works with range argument [#175](https://github.com/active-hash/active_hash/pull/175)
31
-
32
- 2019-03-06 (v2.2.1)
33
- - Allow empty YAML [#171](https://github.com/active-hash/active_hash/pull/171) Thanks, @ppworks
34
-
35
- 2018-11-22 (v2.2.0)
36
- - Support pluck method [#164](https://github.com/active-hash/active_hash/pull/164) Thanks, @ihatov08
37
- - Support where.not method [#167](https://github.com/active-hash/active_hash/pull/167) Thanks, @DialBird
38
-
39
- 2018-04-05 (v2.1.0)
40
- - Allow to use ERB (embedded ruby) in yml files [#160](https://github.com/active-hash/active_hash/pull/160) Thanks, @UgoMare
41
- - Add `ActiveHash::Base.polymorphic_name` [#162](https://github.com/active-hash/active_hash/pull/162)
42
- - Fix to be able to use enum accessor constant with same name as top-level constant[#161](https://github.com/active-hash/active_hash/pull/161) Thanks, @yujideveloper
43
-
44
- 2018-02-27 (v2.0.0)
45
- - Drop old Ruby and Rails support [#157](https://github.com/active-hash/active_hash/pull/157)
46
- - Don't generate instance accessors for class attributes [#136](https://github.com/active-hash/active_hash/pull/136) Thanks, @rainhead
47
-
48
- 2017-06-14 (v1.5.3)
49
- - Support symbol values in where and find_by [#156](https://github.com/active-hash/active_hash/pull/156) Thanks, @south37
50
-
51
- 2017-06-14 (v1.5.2)
52
- - Fix find_by when passed an invalid id [#152](https://github.com/active-hash/active_hash/pull/152) Thanks, @davidstosik
53
-
54
- 2017-04-20 (v1.5.1)
55
- - Fix a bug on `.where` [#147](https://github.com/active-hash/active_hash/pull/147)
56
-
57
- 2017-03-24 (v1.5.0)
58
- - add support for `.find_by!`(@syguer)
59
-
60
- 2015-09-13 (v1.4.1)
61
- - fix bug where `#attributes` didn't contain default values #107
62
- - add support for `.find_by` and `#_read_attribute`. Thanks, @andrewfader!
63
-
64
- 2014-09-03 (v1.4.0)
65
- - support Rails 4.2 (agraves, al2o3cr)
66
-
67
- 2014-02-18 (v1.3.0)
68
- - fix bug where including ActiveHash associations would make `belongs_to :imageable, polymorphic: true` blow up
69
- - fixed several bugs that prevented active hash from being used without active record / active model
70
- - add support for splitting up data sources into multiple files (rheaton)
71
- - add support for storing data in json files (rheaton)
72
-
73
- 2013-11-29 (v1.2.3)
74
- - fix bug where active hash would call `.all` on models when setting has_many (grosser)
75
-
76
- 2013-11-05 (v1.2.2)
77
- - fix bug in gemspec that made it impossible to use w/ Rails 4
78
-
79
- 2013-10-24 (v1.2.1)
80
- - fixed nasty bug in belongs_to that would prevent users from passing procs (thanks for the issue freebird0221)
81
- - fixed bug where passing in a separate class name to belongs_to_active_hash would raise an exception (mauriciopasquier)
82
-
83
- 2013-10-01 (v1.2.0)
84
- - belongs_to is back!
85
- - added support for primary key options for belongs_to (tomtaylor)
86
-
87
- 2013-09-09 (v1.0.2)
88
- - `where(nil)` returns all results, like ActiveRecord (kugaevsky)
89
-
90
- 2013-07-15 (v1.0.1)
91
- - Travis CI for ActiveHash + Ruby 2, 1.8.7, Rubinius and JRuby support (mattheworiordan)
92
- - no longer need to call .all before executing `find_by_*` or `where` methods (mattheworiordan)
93
-
94
- 2013-06-24 (v1.0.0)
95
- - save is a no-op on existing records, instead of raising an error (issue #63)
96
-
97
- 2013-06-24 (v0.10.0)
98
- - added ActiveYaml::Aliases module so you can DRY up your repetitive yaml (brett-richardson)
99
-
100
- 2013-05-23 (v0.9.14)
101
- - enum_accessor can now take multiple field names when generating the constant
102
- - temporarily disabled rails edge specs since there's an appraisal issue with minitest
103
-
104
- 2013-01-22
105
- - Fix find_by_id and find method returning nil unless .all called in ActiveYaml (mattheworiordan)
106
-
107
- 2012-07-25
108
- - Make find_by_id lookups faster by indexing records by id (desmondmonster)
109
-
110
- 2012-07-16
111
- - Validate IDs are unique by caching them in a set (desmondmonster)
112
-
113
- 2012-04-14
114
- - Support for has_one associations (kbrock)
115
-
116
- 2012-04-05
117
- - Allow gems like simple_form to read metadata about belongs_to associations that point to active hash objects (kbrock)
118
-
119
- 2012-01-19
120
- - Move specs to appraisal (flavorjones)
121
-
122
- 2012-01-18 (v0.9.8)
123
- - Make ActiveHash.find with array raise an exception when record cannot be found (mocoso)
124
-
125
- 2011-09-18 (v0.9.7)
126
- - Fixing the setting of a belongs_to_active_hash association by association (not id).
127
-
128
- 2011-08-31
129
- - added a module which adds a .belongs_to_active_hash method to ActiveRecord, since it was broken for Rails 3.1 (thanks to felixclack for pointing this issue out)
130
-
131
- 2011-06-07
132
- - fixed bug where .find would not work if you defined your ids as strings
133
-
134
- 2011-06-05
135
- - fixed deprecation warnings for class_inheritable_accessor (thanks scudco!)
136
- - added basic compatibility with the `where` method from Arel (thanks rgarver!)
137
-
138
- 2011-04-19
139
- - better dependency management and compatibility with ActiveSupport 2.x (thanks vandrijevik!)
140
-
141
- 2011-01-22
142
- - improved method_missing errors for dynamic finders
143
- - prevent users from trying to overwrite :attributes (https://github.com/active-hash/active_hash/issues/#issue/33)
144
-
145
- 2010-12-08
146
- - ruby 1.9.2 compatibility
147
-
148
- 2010-12-06
149
- - added dependency on ActiveModel
150
- - add persisted? method to ActiveHash::Base
151
- - ActiveHash::Base#save takes *args to be compatible with ActiveModel
152
- - ActiveHash::Base#to_param returns nil if the object hasn't been saved
153
-
154
- 2010-11-09
155
- - Use Ruby's definition of "word character" (numbers, underscores) when forming ActiveHash::Enum constants (tstuart)
156
-
157
- 2010-11-07
158
- - Get ActiveHash::Associations to return a scope for has_many active record relationships (mocoso)
159
-
160
- 2010-10-20
161
- - Allow find_by_* methods to accept an options hash, so rails associations don't blow up
162
-
163
- 2010-10-07
164
- - Add conditions to ActiveHash#all (Ryan Garver)
165
- - Add #cache_key to ActiveHash::Base (Tom Stuart)
166
- - Add banged dynamic finder support to ActiveHash::Base (Tom Stuart)
167
-
168
- 2010-09-16
169
- - Enum format now uses underscores instead of removing all characters
170
- - Removed test dependency on acts_as_fu
171
-
172
- 2010-05-26
173
- - Silence metaclass deprecation warnings in active support 2.3.8
174
-
175
- 2010-05-04
176
- - When calling ActiveFile::Base.reload do not actually perform the reload if nothing has been modified unless you call reload(true) to force (Michael Schubert)
177
-
178
- 2010-04-25
179
- - When ActiveRecord model belongs_to an ActiveHash and the associated id is nil, returns nil instead of raising RecordNotFound (Jeremy Weiskotten)
180
- - Merged Nakajima's "add" alias for "create" - gotta save those ASCII characters :)
181
-
182
- 2010-03-01
183
- - Removed "extend"-related deprecations - they didn't play well with rails class loading
184
-
185
- 2010-01-18
186
- - Added stub for #destroyed? method, since Rails associations now depend on it
187
-
188
- 2009-12-19
189
- - Added ActiveHash::Enum (John Pignata)
190
- - Deprecated include ActiveHash::Associations in favor of extend ActiveHash::Associations
191
- - Fixed bug where you can't set nil to an association
192
- - Calling #belongs_to now creates the underlying field if it's not already there (belongs_to :city will create the :city_id field)
193
-
194
- 2009-12-10
195
- - Fixed a bug where belongs_to associations would raise an error instead of returning nil when the parent object didn't exist.
196
- - Added #[] and #[]= accessors for more ActiveRecord-esque-ness. (Pat Nakajima & Dave Yeu)
197
-
198
- 2009-12-01
199
- - Add marked_for_destruction? to be compatible with nested attributes (Brandon Keene)
200
- - Added second parameter to respond_to? and cleaned up specs (Brian Takita)
201
- - Find with an id that does not exist now raises a RecordNotFound exception to mimic ActiveRecord (Pat Nakajima)
202
-
203
- 2009-10-22
204
- - added setters to ActiveHash::Base for all fields
205
- - instantiating an ActiveHash object with a hash calls the setter methods on the object
206
- - boolean default values now work
207
-
208
- 2009-10-21
209
- - Removed auto-reloading of files based on mtime - maybe it will come back later
210
- - Made ActiveFile::Base.all a bit more sane
211
-
212
- 2009-10-13
213
- - added ActiveHash::Base.has_many, which works with ActiveRecord or ActiveHash classes (thanks to baldwindavid)
214
- - added ActiveHash::Base.belongs_to, which works with ActiveRecord or ActiveHash classes (thanks to baldwindavid)
215
- - added .delete_all method that clears the in-memory array
216
- - added support for Hash-style yaml (think, Rails fixtures)
217
- - added setter for parent object on belongs_to ( city = City.new; city.state = State.first; city.state_id == State.first.id )
218
-
219
- 2009-10-12
220
- - auto-assign fields after calling data= instead of after calling .all
221
- - remove require 'rubygems', so folks with non-gem setups can still use AH
222
- - added more specific activesupport dependency to ensure that metaclass is available
223
- - AH no longer calls to_i on ids. If you pass in a string as an id, you'll get a string back
224
- - Fancy finders, such as find_all_by_id_and_name, will compare the to_s values of the fields, so you can pass in strings
225
- - You can now use ActiveHash models as the parents of polymorphic belongs_to associations
226
- - save, save!, create and create! now add items to the in-memory collection, and naively adds autoincrementing id
227
- - new_record? returns false if the record is part of the collection
228
- - ActiveHash now works with Fixjour!
229
-
230
- 2009-08-19
231
- - Added custom finders for multiple fields, such as .find_all_by_name_and_age
232
-
233
- 2009-07-23
234
- - Added support for auto-defining methods based on hash keys in ActiveHash::Base
235
- - Changed the :field and :fields API so that they don't overwrite existing methods (useful when ActiveHash auto-defines methods)
236
- - Fixed a bug where ActiveFile incorrectly set the root_path to be the path in the gem directory, not the current working directory
237
-
238
- 2009-07-24
239
- - ActiveFile no longer reloads files by default
240
- - Added ActiveFile.reload_active_file= so you can cause ActiveFile to reload
241
- - Setting data to nil correctly causes .all to return an empty array
242
- - Added reload(force) method, so that you can force a reload from files in ActiveFile, useful for tests