{"push_id":792341089,"size":1000,"distinct_size":529,"ref":"refs/heads/master","head":"78c960150210b88a2de7dc7265b66c3adad287ce","before":"d8577b6dd50cacac37264a91f77f7fc85c1f3d66","commits":[{"sha":"46b5b8ef40d81d583978fc7f111f0cd4ead26dfc","author":{"email":"0f1266fdb7aab22577884a834ca464c81c7dda2c@gmail.com","name":"Roque Pinel"},"message":"Fix `TimeWithZone#eql?` to handle `TimeWithZone` created from `DateTime`\n\nBefore:\n\n```ruby\n  twz = DateTime.now.in_time_zone\n  twz.eql?(twz.dup) => false\n```\n\nNow:\n\n```ruby\n  twz = DateTime.now.in_time_zone\n  twz.eql?(twz.dup) => true\n```\n\nPlease notice that this fix the `TimeWithZone` comparison to itself,\nnot to `DateTime`. Based on #3725, `DateTime` should not be equal to\n`TimeWithZone`.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/46b5b8ef40d81d583978fc7f111f0cd4ead26dfc"},{"sha":"0bd247cc7679adb3c2e30b46ecc9afd57ac46c45","author":{"email":"daab9349e7897953586c7278844811677e111b79@gmail.com","name":"Kasper Timm Hansen"},"message":"Merge pull request #20944 from repinel/fix-time-with-zone-eql\n\nFix `TimeWithZone#eql?` to handle `TimeWithZone` created from `DateTime`","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/0bd247cc7679adb3c2e30b46ecc9afd57ac46c45"},{"sha":"0ed096ddf5416fefa3afacb72c64632c02826f95","author":{"email":"44f7305a0dc524d5377d421437a37054aa4242ad@gmail.com","name":"Stefan Kanev"},"message":"Fix counter_cache for polymorphic associations\n\nAlso removes a false positive test that depends on the fixed bug:\n\nAt this time, counter_cache does not work with polymorphic relationships\n(which is a bug). The test was added to make sure that no\nStaleObjectError is raised when the car is destroyed. No such error is\ncurrently raised because the lock version is not incremented by\nappending a wheel to the car.\n\nFurthermore, `assert_difference` succeeds because `car.wheels.count`\ndoes not check the counter cache, but the collection size. The test will\nfail if it is replaced with `car.wheels_count || 0`.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/0ed096ddf5416fefa3afacb72c64632c02826f95"},{"sha":"8cd1d5a41cf54f0dfde2b2d0d406457a6a58dbeb","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@thoughtbot.com","name":"Sean Griffin"},"message":"Fix the test that was broken by #16445 rather than deleting it\n\nSince the counter cache was properly being updated, the model became\nstale. Simply reloading the model before attempting to destroy is\nsufficient for this case. I believe this is enough of an edge case to be\na valid change to the tests, even though it represents a potential\nbreaking change.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/8cd1d5a41cf54f0dfde2b2d0d406457a6a58dbeb"},{"sha":"6765d4874e7afaa8da0c7790710fe43726ef412c","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@thoughtbot.com","name":"Sean Griffin"},"message":"Merge Pull Request #16445","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/6765d4874e7afaa8da0c7790710fe43726ef412c"},{"sha":"e19acbb8831e214eb38d589bf8c424edf80c2970","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@seantheprogrammer.com","name":"Sean Griffin"},"message":"Merge pull request #20936 from repinel/fix-params-fetch-exception-overwritten\n\nFix exception overwritten for parameters fetch method","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/e19acbb8831e214eb38d589bf8c424edf80c2970"},{"sha":"5bb1d4d288d019e276335465d0389fd2f5246bfd","author":{"email":"a1b4a5d79a04170be8c419b6b204d1834682e890@gmail.com","name":"schneems"},"message":"Freeze string literals when not mutated.\n\nI wrote a utility that helps find areas where you could optimize your program using a frozen string instead of a string literal, it's called [let_it_go](https://github.com/schneems/let_it_go). After going through the output and adding `.freeze` I was able to eliminate the creation of 1,114 string objects on EVERY request to [codetriage](codetriage.com). How does this impact execution?\n\nTo look at memory:\n\n```ruby\nrequire 'get_process_mem'\n\nmem = GetProcessMem.new\nGC.start\nGC.disable\n1_114.times { \" \" }\nbefore = mem.mb\n\nafter = mem.mb\nGC.enable\nputs \"Diff: #{after - before} mb\"\n\n```\n\nCreating 1,114 string objects results in `Diff: 0.03125 mb` of RAM allocated on every request. Or 1mb every 32 requests.\n\nTo look at raw speed:\n\n```ruby\nrequire 'benchmark/ips'\n\nnumber_of_objects_reduced = 1_114\n\nBenchmark.ips do |x|\n  x.report(\"freeze\")    { number_of_objects_reduced.times { \" \".freeze } }\n  x.report(\"no-freeze\") { number_of_objects_reduced.times { \" \" } }\nend\n```\n\nWe get the results\n\n```\nCalculating -------------------------------------\n              freeze     1.428k i/100ms\n           no-freeze   609.000  i/100ms\n-------------------------------------------------\n              freeze     14.363k (± 8.5%) i/s -     71.400k\n           no-freeze      6.084k (± 8.1%) i/s -     30.450k\n```\n\nNow we can do some maths:\n\n```ruby\nips = 6_226k # iterations / 1 second\ncall_time_before = 1.0 / ips # seconds per iteration \n\nips = 15_254 # iterations / 1 second\ncall_time_after = 1.0 / ips # seconds per iteration \n\ndiff = call_time_before - call_time_after\n\nnumber_of_objects_reduced * diff * 100\n\n# => 0.4530373333993266 miliseconds saved per request\n```\n\nSo we're shaving off 1 second of execution time for every 220 requests. \n\nIs this going to be an insane speed boost to any Rails app: nope. Should we merge it: yep. \n\np.s. If you know of a method call that doesn't modify a string input such as [String#gsub](https://github.com/schneems/let_it_go/blob/b0e2da69f0cca87ab581022baa43291cdf48638c/lib/let_it_go/core_ext/string.rb#L37) please [give me a pull request to the appropriate file](https://github.com/schneems/let_it_go/blob/b0e2da69f0cca87ab581022baa43291cdf48638c/lib/let_it_go/core_ext/string.rb#L37), or open an issue in LetItGo so we can track and freeze more strings. \n\nKeep those strings Frozen\n\n![](https://www.dropbox.com/s/z4dj9fdsv213r4v/let-it-go.gif?dl=1)","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/5bb1d4d288d019e276335465d0389fd2f5246bfd"},{"sha":"f91439d848b305a9d8f83c10905e5012180ffa28","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@seantheprogrammer.com","name":"Sean Griffin"},"message":"Merge pull request #20946 from schneems/schneems/let-it-go\n\nFreeze string literals when not mutated.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/f91439d848b305a9d8f83c10905e5012180ffa28"},{"sha":"6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@thoughtbot.com","name":"Sean Griffin"},"message":"Fix tests broken by previous commit","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/6ffec3c16c0ee0b0ab4643907af1f2ed80a71a9a"},{"sha":"bd31aec9c33453e0ba96aec614e56958784e6b8d","author":{"email":"f80d0ca101e967b50b730ddf8e8aca0de85e8df6@trebex.net","name":"Matthew Draper"},"message":"We need stricter locking before we can unload\n\nSpecifically, the \"loose upgrades\" behaviour that allows us to obtain an\nexclusive right to load things while other requests are in progress (but\nwaiting on the exclusive lock for themselves) prevents us from treating\nload & unload interchangeably: new things appearing is fine, but they do\n*not* expect previously-present constants to vanish.\n\nWe can still use loose upgrades for unloading -- once someone has\ndecided to unload, they don't really care if someone else gets there\nfirst -- it just needs to be tracked separately.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/bd31aec9c33453e0ba96aec614e56958784e6b8d"},{"sha":"476e3f552f59d208cb284f509760b44ad780c17a","author":{"email":"35a7fb4d7401666dbee78304f73a9e19e1a1a3c3@gmail.com","name":"Alberto F. Capel"},"message":"Add #cache_key to ActiveRecord::Relation.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/476e3f552f59d208cb284f509760b44ad780c17a"},{"sha":"1883f37742b976d3d20e0ba4a3564911f4868172","author":{"email":"e6fe9b428cbd844027679efe8ffd169eb501ceab@gmail.com","name":"Mehmet Emin İNAÇ"},"message":"Add missing method name to exception description","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/1883f37742b976d3d20e0ba4a3564911f4868172"},{"sha":"cc54f6be15d412b4fcb2a99d7bdf9244d756ce3e","author":{"email":"e6fe9b428cbd844027679efe8ffd169eb501ceab@gmail.com","name":"Mehmet Emin İNAÇ"},"message":"fix doc about ActiveRecord::Transactions::ClassMethods#transaction [ci skip]","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/cc54f6be15d412b4fcb2a99d7bdf9244d756ce3e"},{"sha":"068865a7d5624d55de578888a77a41df9e5b847a","author":{"email":"aa743a0aaec8f7d7a1f01442503957f4d7a2d634@loudthinking.com","name":"David Heinemeier Hansson"},"message":"Merge pull request #20384 from kaspth/per-request-cache\n\nUse digest cache in development.","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/068865a7d5624d55de578888a77a41df9e5b847a"},{"sha":"fd9c952f1457cdc287da7fe95546086a5c04d544","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@seantheprogrammer.com","name":"Sean Griffin"},"message":"Merge pull request #20895 from brian-davis/brian-davis\n\ngrammar fix to content_for method documentation in capture_helper.rb [ci skip]","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/fd9c952f1457cdc287da7fe95546086a5c04d544"},{"sha":"c4c55774aafd2b0ff244c11a7e2db53f6b85eb78","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@seantheprogrammer.com","name":"Sean Griffin"},"message":"Merge pull request #20950 from vngrs/fix_wrong_doc_about_transaction\n\nfix doc about ActiveRecord::Transactions::ClassMethods#transaction [ci skip]","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/c4c55774aafd2b0ff244c11a7e2db53f6b85eb78"},{"sha":"9bd6e39b0cc65a3e534b55ab3239374239b19927","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@seantheprogrammer.com","name":"Sean Griffin"},"message":"Merge pull request #20949 from vngrs/missing_method_in_exception\n\nAdd missing method name to exception description","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/9bd6e39b0cc65a3e534b55ab3239374239b19927"},{"sha":"c0ef95a1c6db3095c4b5f80f8044fbbbdfebeff1","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@thoughtbot.com","name":"Sean Griffin"},"message":"Correctly ignore `mark_for_destruction` without `autosave`\n\nAs per the docs, `mark_for_destruction` should do nothing if `autosave`\nis not set to true. We normally persist associations on a record no\nmatter what if the record is a new record, but we were always skipping\nrecords which were `marked_for_destruction?`.\n\nFixes #20882","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/c0ef95a1c6db3095c4b5f80f8044fbbbdfebeff1"},{"sha":"12b0b26df7560ab5199ba830586864085441508f","author":{"email":"0f1266fdb7aab22577884a834ca464c81c7dda2c@gmail.com","name":"Roque Pinel"},"message":"Fix state being carried over from previous transaction\n\nThis clears the transaction record state when the transaction finishes\nwith a `:committed` status.\n\nConsidering the following example where `name` is a required attribute.\nBefore we had `new_record?` returning `true` for a persisted record:\n\n```ruby\n  author = Author.create! name: 'foo'\n  author.name = nil\n  author.save        # => false\n  author.new_record? # => true\n```","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/12b0b26df7560ab5199ba830586864085441508f"},{"sha":"c0f79be895796562e38e3fbd35d2741ee3fb85a5","author":{"email":"d7e19930cc1f42c2d0781f4d9e6f1fe5891bf9cf@thoughtbot.com","name":"Sean Griffin"},"message":"Merge pull request #20947","distinct":false,"url":"https://api.github.com/repos/88rabbit/newRails/commits/c0f79be895796562e38e3fbd35d2741ee3fb85a5"}]}