aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | cpu_time and allocations are 0 when JRuby is usedYasuo Honda2018-07-301-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to #33449 and #33468, cpu_time and allocations are 0 when JRuby is used. ```ruby $ ruby -v jruby 9.2.1.0-SNAPSHOT (2.5.0) 2018-07-27 13b2df5 Java HotSpot(TM) 64-Bit Server VM 25.181-b13 on 1.8.0_181-b13 [linux-x86_64] $ bundle exec ruby -w -Itest test/log_subscriber_test.rb -n test_event_attributes Run options: -n test_event_attributes --seed 6231 F Failure: SyncLogSubscriberTest#test_event_attributes [test/log_subscriber_test.rb:84]: Expected 0 to be > 0. rails test test/log_subscriber_test.rb:78 Finished in 0.018983s, 52.6791 runs/s, 105.3582 assertions/s. 1 runs, 2 assertions, 1 failures, 0 errors, 0 skips ```
* | | | | | | MySQL: Raise ActiveRecord::InvalidForeignKey for foreign-key constraint ↵George Claghorn2018-07-303-7/+20
|/ / / / / / | | | | | | | | | | | | | | | | | | violations on delete
* | | | | | Merge pull request #33468 from bdewater/xplatform-cpu-timeRafael França2018-07-301-2/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Only use CLOCK_PROCESS_CPUTIME_ID if it's defined
| * | | | | | Only use CLOCK_PROCESS_CPUTIME_ID if it's definedBart de Water2018-07-291-2/+8
| |/ / / / / | | | | | | | | | | | | | | | | | | It's not defined on JRuby and unlike monotonic time, concurrent-ruby doesn't have an cross-platform abstraction for this.
* | | | | | ActiveModel::Naming delegate match? in the same manner as =~ and != (#33466)Bart2018-07-291-1/+17
| | | | | | | | | | | | | | | | | | The purpose of the module seems to quack like a string.
* | | | | | Extract `Relation#bind_attribute` for internal useRyuta Kamizono2018-07-302-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | To make it easier to construct boundable predicate.
* | | | | | Update ActiveStorage::Previewer docsGeorge Claghorn2018-07-291-2/+2
|/ / / / / | | | | | | | | | | | | | | | PDFPreviewer became MuPDFPreviewer in 0b717c2. Previewers are simple enough that we can just provide a single example.
* | | | | Extract `Relation#update_counters` for internal useRyuta Kamizono2018-07-304-34/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The target object for counter cache is not always determined by the primary key value on the model. I'd like to extract `update_couters` onto the `Relation` for the internal use.
* | | | | Remove unused `require "active_support/core_ext/regexp"`Ryuta Kamizono2018-07-2912-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruby 2.4 has native `Regexp#match?`. https://ruby-doc.org/core-2.4.0/Regexp.html#method-i-match-3F Related #32034.
* | | | | Merge pull request #32695 from bdewater/enable-regex-copsRichard Schneeman2018-07-2826-35/+46
|\ \ \ \ \ | | | | | | | | | | | | Enable regex cops
| * | | | | Fix TypeError: no implicit conversion of Arel::Attributes::Attribute into StringBart de Water2018-07-281-1/+1
| | | | | |
| * | | | | Fix test failures due to Performance/RegexpMatch correctionBart de Water2018-07-281-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | `5 =~ /\d/` returns nil, but Integer doesn't have a `match?` method.
| * | | | | Work around Performance/EndWith false positiveBart de Water2018-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rubocop warns about "Use String#end_with? instead of a regex match anchored to the end of the string", it doesn't seem aware of the $` special variable like Performance/RegexpMatch
| * | | | | Enable Start/EndWith and RegexpMatch copsBart de Water2018-07-2825-33/+42
|/ / / / / | | | | | | | | | | | | | | | | | | | | In cases where the MatchData object is not used, this provides a speed-up: https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
* | | | | Don't expose configuration for a test.Kasper Timm Hansen2018-07-282-23/+12
| | | | | | | | | | | | | | | | | | | | Clean up some concepts in the code while we're here.
* | | | | Avoid logging ActiveRecord::LogSubscriber as the query source when the ↵lsylvester2018-07-282-12/+22
| | | | | | | | | | | | | | | | | | | | source is ignored (#33455)
* | | | | Merge pull request #33434 from utilum/remove_testing_guide_commentEileen M. Uchitelle2018-07-271-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Testing Guide: unnecessary comment
| * | | | | Testing Guide: unnecessary commentutilum2018-07-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been around as far back as I can [see](https://github.com/rails/rails/blob/5137d03cc5b2a5f0820bdcf11b0fffe5bf461470/guides/source/testing.md). No need to specify the obvious. [ci skip]
* | | | | | Clarify conditionGeorge Claghorn2018-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | && binds tighter than || in JavaScript, but we ought not expect readers to remember language trivia.
* | | | | | Fix directly uploading zero-byte filesGeorge Claghorn2018-07-272-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Closes #33450.
* | | | | | PostgreSQL 10 new relkind for partitioned tables (#31336)Yannick Schutz2018-07-272-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PostgreSQL 10 new relkind for partitioned tables Starting with PostgreSQL 10, we can now have partitioned tables natively * Add comment * Remove extra space * Add test for partition table in postgreSQL10 * Select 'p' for "BASE TABLE" and add a test case to support PostgreSQL 10 partition tables * Address RuboCop offense * Addressed incorrect `postgresql_version` Fixes #33008. [Yannick Schutz & Yasuo Honda & Ryuta Kamizono]
* | | | | | Merge pull request #33441 from bogdanvlviv/remove-rubocop-comments-from-codebaseRyuta Kamizono2018-07-274-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove Rubocop's comments from Rails code base
| * | | | | | Fix Rubocop offensebogdanvlviv2018-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` Offenses: activesupport/lib/active_support/subscriber.rb:91:17: C: Layout/SpaceAroundOperators: Operator = should be surrounded by a single space. event = event_stack.pop ```
| * | | | | | Remove Rubocop's comments from Rails code basebogdanvlviv2018-07-263-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR#32381 added Rubocop's comments to some tests files in order to exclude `Performance/RedundantMerge`. Turn off `Performance` cops for tests files via `Exclude` in `.rubocop.yml`. Context https://github.com/rails/rails/pull/32381#discussion_r205212331
* | | | | | | Log streaming downloadsGeorge Claghorn2018-07-261-0/+2
| | | | | | |
* | | | | | | I cannot spellAaron Patterson2018-07-261-1/+1
| | | | | | |
* | | | | | | Merge pull request #33451 from rails/event-object-subscriptionAaron Patterson2018-07-264-4/+120
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Add event object subscriptions to AS::Notifications
| * | | | | | Add changelog entryAaron Patterson2018-07-261-0/+34
| | | | | | |
| * | | | | | fix arity check to use "parameters" for backwards compatAaron Patterson2018-07-261-4/+9
| | | | | | |
| * | | | | | Always subscribe to event objects via `AS::Notifications.subscribe`Aaron Patterson2018-07-263-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to have a special subscribe method for objects. The regular `subscribe` method is more expensive than a specialized method, but `subscribe` should not be called frequently. If that turns out to be a hotspot, we can introduce a specialized method. :)
| * | | | | | Subscribe to event objects via `subscribe`Aaron Patterson2018-07-261-0/+12
| | | | | | |
| * | | | | | Subscribe to event objects via `subscribe_event`Aaron Patterson2018-07-263-1/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fanout notifier can send event objects to subscribers now. Also moved `end` lower in the `finish!` method to guarantee that CPU time is shorter than real time.
| * | | | | | Match the units in `duration` (milliseconds)Aaron Patterson2018-07-261-1/+7
|/ / / / / /
* | | | | | Merge pull request #33449 from rails/use-process-clock-instead-of-timeAaron Patterson2018-07-264-4/+65
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add cpu time, idle time, and allocations features to log subscriber events
| * | | | | | Add cpu_time, idle_time, and allocations to EventEileen Uchitelle2018-07-264-4/+65
| | |_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Use process clock instead of Time.now This fixes any issues with the system clock changing and also eliminates 2 object allocations per event. * Add start! and finish! methods to the event object so we can record more information * Adds cpu time, idle time, and allocation count for a particular event. Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com>
* | | | | | Merge pull request #33278 from koic/bump_rubocop_to_0_57_2George Claghorn2018-07-2610-287/+16
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Bump RuboCop to 0.58.2
| * | | | | Bump RuboCop to 0.58.2Koichi ITO2018-07-2610-287/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ## Summary RuboCop 0.58.2 was released. https://github.com/rubocop-hq/rubocop/releases/tag/v0.58.2 And rubocop-0-58 channel is available in Code Climate. https://github.com/codeclimate/codeclimate/releases/tag/v0.76.0 https://github.com/codeclimate/codeclimate/commit/38f21f0 In addition, the following changes are made in this PR. - Replace Custom cops with Rails cops - Add jaro_winkler gem to Gemfile.lock ### Replace Custom cops with Rails cops These are compatible replacements. - Replace `CustomCops/AssertNot` cop with `Rails/AssertNot` cop. - Replace `CustomCops/RefuteNot` cop with `Rails/RefuteMethods` cop. With this replacement, it was decided to use cop of RuboCop itself. It removes the code related to CustomCops accordingly. ### Add jaro_winkler gem to Gemfile.lock Since RuboCop 0.57.0 depends on jaro_winkler gem, it has been added to Gemfile.lock.
* | | | | | Merge pull request #33436 from albertoalmagro/remove-thirdparty-fixmeEileen M. Uchitelle2018-07-261-2/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove third party FIXME
| * | | | | | Remove thirdparty FIXMEAlberto Almagro2018-07-251-2/+1
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | This FIXME belongs to a code example that was imported from the internet. As we aren't going to do anything about it, I prefer to remove it so it stops from appearing on searches.
* | | | | | Merge pull request #33442 from utilum/ast_guide_setup_clarificationGeorge Claghorn2018-07-261-4/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | AST Guide: install and migrate tasks needed in new app
| * | | | | | AST Guide: install and migrate tasks in new apputilum2018-07-261-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This line refers only to an upgrade situation, but same is need to setup AST in a new application. [ci skip]
* | | | | | | Ignore ActiveRecord::InvalidForeignKey in ActiveStorage::Blob#purgeJasper Martin2018-07-265-3/+95
|/ / / / / / | | | | | | | | | | | | Do nothing instead of raising an error when it’s called on an attached blob.
* | | | | | Merge pull request #33440 from pwim/active-storage-linkRyuta Kamizono2018-07-261-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | | | | | | | | | | | | | Reference Active Storage instead of third-party libraries in guide [ci skip]
| * | | | | Reference Active Storage instead of third-party libraries in guidePaul McMahon2018-07-261-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Paperclip has officially been deprecated, so we shouldn't mention it anymore. CarrierWave could still be referenced, as there are use cases where it currently makes more sense, but for simplicity, I thought removing the mention of third party libraries made sense. If we want to talk about them, listing "alternatives" within the Active Storage guide could make more sense.
* | | | | Merge pull request #32381 from q-centrix/update-codeclimate-configsRichard Schneeman2018-07-2530-111/+69
|\ \ \ \ \ | |/ / / / |/| | | | Turn on performance based cops
| * | | | Turn on performance based copsDillon Welch2018-07-2330-111/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use attr_reader/attr_writer instead of methods method is 12% slower Use flat_map over map.flatten(1) flatten is 66% slower Use hash[]= instead of hash.merge! with single arguments merge! is 166% slower See https://github.com/rails/rails/pull/32337 for more conversation
* | | | | Merge pull request #33432 from damireh/patch-1George Claghorn2018-07-251-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Update with_options.rb [ci skip]
| * | | | | Update with_options.rbDaniel Amireh2018-07-251-1/+1
|/ / / / / | | | | | | | | | | explicit mapping for enum accepts a Hash not an Array, plus the example is using `.keys` which also exists on hash
* | | | | Normalize time value not to be affected by summer timeRyuta Kamizono2018-07-253-10/+41
| | | | | | | | | | | | | | | | | | | | Follow up of #33358 for SQLite3.
* | | | | Merge pull request #33229 from ↵Matthew Draper2018-07-2546-304/+301
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | albertoalmagro/albertoalmagro/prefer-rails-command-over-bin-rails Prefer rails command over bin/rails