- 23 11月, 2015 2 次提交
-
-
由 Sean Griffin 提交于
Fix race condition testing for job execution order
-
由 Will Jessop 提交于
On most filesystems file ctime is limited to 1 second granularity, which means that on faster computers multiple simple jobs (for instance dummy TestJob) can finish within the same second. The execution order test in ActiveJob integration tests relies on multiple TestJobs writing files then comparing the ctime. As a result integration tests would sometimes fail as the ctime of the files written by these TestJobs could have coincidental ctimes making the comparison for job order fail. This commit adds a far more precise execution time (to the extent that the Ruby Time class allows) to the file created by TestJob, and updates the execution order assertion to use it, removing the race condition.
-
- 22 11月, 2015 7 次提交
-
-
由 Kasper Timm Hansen 提交于
Erroneously removed in 58910dc7. The stubbing was a regression test to ensure `time_zone_select` wasn't implemented with `grep`. Rename the test and add a comment to make the intent clearer.
-
由 Kasper Timm Hansen 提交于
We never touch the index, so don't bother.
-
由 Kasper Timm Hansen 提交于
When calling `test_time_zone_select_with_priority_zones_as_regexp` it would define `=~` on the fake zones, but it would never be cleaned up because of the zone cache. Nuke it so `test_time_zone_select_with_priority_zones_as_regexp_using_grep_finds_no_zones` accidentally find any zones because of `=~` being implemented.
-
由 Kasper Timm Hansen 提交于
Removed Mocha from Action View
-
由 Xavier Noria 提交于
This method needs to ensure that if a change happens, it is going to be registered. With this refactor suggested by @matthewd race conditions do not matter because if no file is watched, nothing is done. And as long as some invocation sets the flag to true, it will stay true. The refactor leaves a race condition in which two simultaneous threads that watch some of the files passed do the actual work in `any?`, whereas the mutex guaranteed that was done at most once. But this is considered to be a better tradeoff.
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
listen is calling us from its own thread, we need to synchronize reads and writes to this flag.
-
- 21 11月, 2015 8 次提交
-
-
由 Yves Senn 提交于
[ci skip] Update dirty.rb: documentation fix.
-
由 Claudio B 提交于
Add example for AR::Persistence#toggle
-
由 Ryan Bigg 提交于
-
由 Claudio B 提交于
Add missing example for cookies.encrypted [ci skip]
-
由 Rafael França 提交于
Example of setting data attributes for image_tag
-
由 Nishant Modak 提交于
-
由 Kasper Timm Hansen 提交于
Remove arity check for `RouteSet#draw`
-
由 yui-knk 提交于
This code was added for migration from Rails 3.1 to upper, now we are developing Rails 5.
-
- 20 11月, 2015 9 次提交
-
-
由 Nicolas Cavigneaux 提交于
-
由 Rafael França 提交于
add deprecations for a smooth transition after #22215
-
由 Michael Grosser 提交于
-
由 Sean Griffin 提交于
Fix test failure in `adapters/mysql/active_schema_test.rb`
-
由 Ryuta Kamizono 提交于
Follow up to #21601.
-
由 Sean Griffin 提交于
This reverts commit 8246b593. There was concern about this modifying the behavior of past migrations. We're going to add an way to modify the migration generator instead.
-
由 Sean Griffin 提交于
It's often the case that you want to have an option that you cannot specify at the database level, but want applied to *all* tables that you create. For example, you might want to specify `ROW_FORMAT=DYNAMIC` to not have to limit text columns to length 171 for indexing when using utf8mb4. This allows an easy way to specify this in your database configuration. While this change affects both MySQL and MySQL2, the test only covers MySQL2, as the legacy mysql adapter appears to always return ASCII strings, and is tangential to what we're actually doing.
-
由 Kasper Timm Hansen 提交于
Change Enumerable#sum to use inject(:sym) specification
-
由 T.J. Schuck 提交于
Not only does this make for simpler, more obvious code, it's also more performant: require 'benchmark/ips' module Enumerable def old_sum(identity = 0, &block) if block_given? map(&block).old_sum(identity) else inject { |sum, element| sum + element } || identity end end def new_sum(identity = 0, &block) if block_given? map(&block).new_sum(identity) else inject(:+) || identity end end end summable = (1..100).to_a # sum is 5050 Benchmark.ips do |x| x.report("old_sum") { summable.old_sum } x.report("new_sum") { summable.new_sum } x.compare! end # Calculating ------------------------------------- # old_sum 10.674k i/100ms # new_sum 14.542k i/100ms # ------------------------------------------------- # old_sum 117.350k (± 7.1%) i/s - 587.070k # new_sum 154.712k (± 3.8%) i/s - 785.268k # # Comparison: # new_sum: 154712.1 i/s # old_sum: 117350.0 i/s - 1.32x slower More benchmarks [here](https://gist.github.com/tjschuck/b3fe4e8c812712376648), including summing strings and passing blocks. The performance gains are less for those, but this version still always wins.
-
- 19 11月, 2015 11 次提交
-
-
由 Yves Senn 提交于
Change configuration-guide example [ci skip]
-
由 Abdelkader Boudih 提交于
Fix a typo [ci skip]
-
由 Alex Popov 提交于
-
由 rbr 提交于
Use an example from a default Rails app (4.2.5) rather than an outdated one in the Configuring Rails Components section. I picked config.time_zone as it currently is the only 'setting for Rails' left in a default config/application.rb. I stumbled upon this with investigating autoloading in a legacy app, which still included the example comment "# config.autoload_paths += %W(#{config.root}/extras)". Usually adding app/* directories to autoload_paths isn't necessary, so also finding this example within the current docs was a bit confusing initially. [ci skip]
-
由 Kasper Timm Hansen 提交于
Remove newlines from start of logs
-
由 Yves Senn 提交于
[ci skip] Since the "Getting Started" guide no longer uses the scaffold generator we should rewrite references to that in the testing guide. The functional testing section was quite heavily based on such a scaffold test. I changed it to use `generate scaffold_controller` instead so that we can build up on the model foundation we already have.
-
由 Rafael França 提交于
[ci skip] Indentation in API app guide
-
由 zacharywelch 提交于
-
由 Matthew Draper 提交于
Fixes #22311
-
由 Harry V. Kiselev 提交于
ActiveModel::Dirty module documentation fix.
-
由 Rafael França 提交于
Rename 'key' to 'lock_id' or 'lock_name' for advisory locking
-
- 18 11月, 2015 3 次提交
-
-
由 Rafael Mendonça França 提交于
This reverts commit 16ce41b7. Reason: See https://github.com/rails/rails/commit/16ce41b7f4449d6df15df30d69aef18da6510f36#commitcomment-14475125
-
由 Sam Davies 提交于
- key was a poor choice of name. A key implies something that will unlock a lock. The concept is actually more like a 'lock identifier' - mysql documentation calls this a 'lock name' - postgres documentation calls it a 'lock_id' - Updated variable names to reflect the preferred terminology for the database in question
-
由 Kasper Timm Hansen 提交于
Use latest byebug
-