aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | | the evented monitor filters out descendantsXavier Noria2015-11-101-0/+30
| | |
* | | better tmp file management in the monitors suiteXavier Noria2015-11-101-36/+88
| | |
* | | adds another test case in the monitors suiteXavier Noria2015-11-101-1/+17
| | |
* | | editorial pass over test method namesXavier Noria2015-11-091-5/+5
| | |
* | | improves waiting in the file monitors suiteXavier Noria2015-11-093-23/+21
| | |
* | | adds more tests for the file monitorsXavier Noria2015-11-091-0/+60
| | |
* | | s/watcher/checker/gXavier Noria2015-11-081-3/+3
| | | | | | | | | | | | "checker" is the name being used everywhere.
* | | more ad-hoc sleepsXavier Noria2015-11-081-2/+4
| | | | | | | | | | | | This sucks, but otherwise I get occasional Fs on Mac OS X.
* | | create the tmpdir under testXavier Noria2015-11-081-1/+1
| | | | | | | | | | | | | | | Mac OS X tries by all means to hide that /var is /private/var, and that is what FSEvents reports back.
* | | encapsulate sleep margin when touching filesXavier Noria2015-11-081-5/+6
| | |
* | | renames the monitor creation helperXavier Noria2015-11-083-11/+11
| | |
* | | refactors the file monitors test suiteXavier Noria2015-11-083-57/+47
| | | | | | | | | | | | | | | In particular files are no longer created in the current working directory, but in a temporary folder.
* | | let listen stop all listeners on teardownXavier Noria2015-11-081-0/+5
| | |
* | | stop ascending at the longest common subpathXavier Noria2015-11-081-0/+60
| | | | | | | | | | | | This commit also bases everything on Pathname internally.
* | | remove unused constants in the file monitor suitesXavier Noria2015-11-082-4/+0
| | |
* | | initial edit pass over the evented file checker patchXavier Noria2015-11-083-41/+67
| | |
* | | implements an evented file update checker [Puneet Agarwal]Xavier Noria2015-11-083-103/+135
|/ / | | | | | | | | | | | | | | | | | | | | | | This is the implementation of the file update checker written by Puneet Agarwal for GSoC 2015 (except for the tiny version of the listen gem, which was 3.0.2 in the original patch). Puneet's branch became too out of sync with upstream. This is the final work in one single clean commit. Credit goes in the first line using a convention understood by the contrib app.
* | Merge pull request #21897 from swaathi/masterKasper Timm Hansen2015-11-073-4/+90
|\ \ | | | | | | Parameterize with options to preserve the case of string
| * | Parameterize with options to preserve case of stringSwaathi K2015-11-073-4/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added test cases Using kwargs instead of three seperate functions Updated parameterize in transliterate.rb Updated parameterize in transliterate.rb Added deprecation warnings and updating RDoc+Guide Misspelled separtor. Fixed. Deprecated test cases and added support to parameterize with keyword parameters Squashing commits. Fixed test cases and added deprecated test cases Small changes to Gemfile.lock and CHANGELOG Update Gemfile.lock
* | | Merge pull request #22197 from grosser/grosser/fetchKasper Timm Hansen2015-11-071-2/+9
|\ \ \ | | | | | | | | do not override fetch on local cache
| * | | do not override fetch on local cacheMichael Grosser2015-11-071-2/+9
| |/ / | | | | | | | | | | | | | | | fetch is supposed to behave differently, this was a mistake merged in https://github.com/rails/rails/pull/22194
* | | Merge pull request #21806 from kachick/fix-transformer-sizeEileen M. Uchitelle2015-11-072-4/+8
|\ \ \ | |/ / |/| | Return a sized Enumerator from Hash#transform_values{!}
| * | Return a sized Enumerator from Hash#{transform_values{!}|transform_keys{!}}Kenichi Kamiya2015-09-292-4/+8
| | |
* | | Merge pull request #22194 from grosser/grosser/read-nilSean Griffin2015-11-051-0/+8
|\ \ \ | | | | | | | | cache nil replies from backend cache so misses are fast too
| * | | cache nil replies from backend cache so misses are fast tooMichael Grosser2015-11-051-0/+8
| | | |
* | | | Require only necessary concurrent-ruby classes.Jerry D'Antonio2015-11-041-1/+1
| | | |
* | | | :scissors:Rafael Mendonça França2015-10-301-1/+0
| | | |
* | | | Merge pull request #11872 from AvnerCohen/log_namespaceSean Griffin2015-10-301-0/+13
|\ \ \ \ | | | | | | | | | | When testing cache issues, it is useful to log the actual key, including namespace
| * | | | When logging Cache key, in debug mode, also log namespace, to create the ↵Avner Cohen2015-06-231-0/+13
| | | | | | | | | | | | | | | | | | | | full key that actually used by the underline cache implementation
* | | | | Deprecate `HWIDA.new_from_hash_copying_default`Sean Griffin2015-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | This method was already niche, and is now redundant with `.new`
* | | | | Merge pull request #16357 from gchan/hwia-respects-to-hash-defaultSean Griffin2015-10-291-0/+18
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | `HashWithIndifferentAccess.new` respects the default value or proc on objects that respond to `#to_hash`
| * | | | | `HashWithIndifferentAccess.new` respects the default value or proc on ↵Gordon Chan2014-07-311-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | objects that respond to `#to_hash`. Builds on the work of #12550 where `.new` will convert the object (that respond to `#to_hash`) to a hash and add that hash's keys and values to itself. This change will also make `.new` respect the default value or proc of objects that respond to `#to_hash`. In other words, this `.new` behaves exactly like `.new_from_hash_copying_default`. `.new_from_hash_copying_default` now simply invokes `.new` and any references to `.new_from_hash_copying_default` are replaced with `.new`. Added tests confirm behavior.
* | | | | | Make `Module#redefine_method` to keep method visibilityyui-knk2015-10-261-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit `Module#redefine_method` always changes visibility of redefined method to `public`. This commit changes behavior of Module#redefine_method` to keep method visibility.
* | | | | | Tweaked wording used in some tests.Sebastian McKenzie2015-10-251-6/+6
| | | | | |
* | | | | | Add Module#remove_possible_singleton_methodAndrew White2015-10-211-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is primarily to fix method redefinition warnings in class_attribute but may be of use in other places where we define singleton methods.
* | | | | | Merge pull request #19889 from cedrics/long-uri-encoded-keysSean Griffin2015-10-201-0/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | FileStore: Long cache keys may result in too long paths due to encoding
| * | | | | | when checking for too long cache keys used the uri encoded fname Cedric Sohrauer2015-04-241-0/+5
| | | | | | |
* | | | | | | Merge pull request #19992 from greysteil/handle-invalid-utf8-in-html-escapeSean Griffin2015-10-201-2/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Handle invalid UTF-8 strings when HTML escaping
| * | | | | | | Handle invalid UTF-8 strings when HTML escapingGrey Baker2015-06-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `ActiveSupport::Multibyte::Unicode.tidy_bytes` to handle invalid UTF-8 strings in `ERB::Util.unwrapped_html_escape` and `ERB::Util.html_escape_once`. Prevents user-entered input passed from a querystring into a form field from causing invalid byte sequence errors.
* | | | | | | | Update #20737 to address feedbackSean Griffin2015-10-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given that this pull request affects a mutable value, we need to test for and document the affects on the receiver in this case. Additionally, this pull request was missing a CHANGELOG entry.
* | | | | | | | Fixed slice! behavior: return nil for out-of-bound parametersGourav Tiwari2015-10-201-0/+4
| | | | | | | |
* | | | | | | | Merge pull request #20872 from maxjacobson/more-humane-roundingSean Griffin2015-10-201-0/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Round some numbers more humanely
| * | | | | | | | Round some numbers more humanelyMax Jacobson2015-07-261-0/+2
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | Fix #20869
* | | | | | | | Merge pull request #21302 from theunraveler/delegate_reserved_argument_namesSean Griffin2015-10-201-0/+15
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | ActiveSupport: Fixing issue when delegating to methods named "block", "args", or "arg"
| * | | | | | | | Fixing issue when delegating to methods named "block", "args", or "arg"Jake Bell2015-08-191-0/+15
| | | | | | | | |
* | | | | | | | | Merge pull request #21883 from tarzan/cache-key-too-preciseSean Griffin2015-10-201-0/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Fix precision on cache_key
| * | | | | | | | | fixes #21815Maarten Jacobs2015-10-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default timestamp used for AR is `updated_at` in nanoseconds! (:nsec) This causes issues on any machine that runs an OS that supports nanoseconds timestamps, i.e. not-OS X, where the cache_key of the record persisted in the database (milliseconds precision) is out-of-sync with the cache_key in the ruby VM. This commit adds: A test that shows the issue, it can be found in the separate file `cache_key_test.rb`, because - model couldn't be defined inline - transactional testing needed to be turned off to get it to pass the MySQL tests This seemed cleaner than putting it in an existing testcase file. It adds :usec as a dateformat that calculates datetime in microseconds It sets precision of cache_key to :usec instead of :nsec, as no db supports nsec precision on timestamps
* | | | | | | | | | Merge pull request #21953 from bdunne/fix_dep_warnMatthew Draper2015-10-172-0/+42
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | Fix deprecation warning messages on deprecate_methods
| * | | | | | | | | Fix bug where custom deprecators are not used.Brandon Dunne2015-10-142-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add tests for ActiveSupport::Deprecation.deprecate_methods Modify ActiveSupport::Testing::Deprecation to allow a custom deprecator Leverage ActiveSupport::Testing::Deprecation assert_deprecated Update documentation for ActiveSupport::Deprecation.deprecate_methods Use cases: Using the default deprecator => "removed from Rails X.Y" Passing a custom deprecator in the options hash => "removed from MyGem next-release" Deprecating methods directly from custom deprecator => "removed from MyGem next-release"
* | | | | | | | | | Expand support for ActiveSupport::TimeWithZone#utc?David Celis2015-10-151-0/+15
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, ActiveSupport::TimeWithZone#utc? simply runs a check to see if the linked ActiveSupport::TimeZone's name is "UTC". This will only return true for ActiveSupport::TimeZone["UTC"], but not for time zones such as "Etc/UTC", "Etc/Universal", or other time zones that are aliases for UTC. Interestingly enough, ActiveSupport::TimeWithZone#utc? is also aliased as #gmt? but will return false for the "GMT" timezone (along with other TZInfo aliases for GMT). Instead of running a simple check on the TimeZone name, we can rely on the underlying TZInfo::TimezonePeriod and TZInfo::TimezoneOffset which keep a record of of the offset's abbreviated name. The possibilities here for UTC time zones are `:UTC`, `:UCT`, and `:GMT`. Signed-off-by: David <me@davidcel.is>