Commit Graph

69957 Commits

Author SHA1 Message Date
Ryuta Kamizono
736edb9828 Formatting CHANGELOGs [ci skip]
Fixing code block rendering, indentation, backticks, etc.
2018-09-07 07:59:19 +09:00
yuuji.yaginuma
0cbbe515d3 Use canonical name for block local
`spec` is the same variable name as gemspec generated by bundler, and its
intention is easier to understand than a one-letter variable.
00fd58eaa6/lib/bundler/templates/newgem/newgem.gemspec.tt (L11)

This is follow up on 1c59b4840c58097186022f68427c46e0046c5d0d. `spec` is already in use there.
2018-09-07 07:40:03 +09:00
Aaron Patterson
b31ae3131a
Merge pull request #33808 from itsbagpack/fix-access-safety-buffer-slice
Maintain html_safe? on sliced HTML safe strings
2018-09-06 15:00:05 -07:00
Richard Schneeman
7fc545365c
Merge pull request #33810 from schneems/schneems/doc-output-buffer
Document ActionView::OutputBuffer
2018-09-06 17:55:16 -04:00
schneems
31cfd5e4fd [ci skip] Doc ActionView::OutputBuffer 2018-09-06 15:28:45 -05:00
Yumin Wong
1d42a661d8 Update CHANGELOG for SafetyBuffer slice access
Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
2018-09-06 15:17:18 -05:00
Richard Schneeman
3e46cf7533
Merge pull request #33809 from fidalgo/improve-remove-column-documentation
[ci skip] Improve remove_column documentation
2018-09-06 16:06:20 -04:00
Rafael França
29f5f702f9
Merge pull request #33807 from olimart/patch-4
Fix typo in i18n_railtie.rb [ci skip]
2018-09-06 15:50:21 -04:00
Olivier
70e3d1ea9d
Fix typo in i18n_railtie.rb 2018-09-06 15:09:24 -04:00
Paulo Fidalgo
b54e5706e7
[ci skip] Improve remove_column documentation
Since when we remove one column it will also remove the associated
indexes, we must ensure this behaviour is properly documented.

In this commit we add a line to the documentation mentioning this
behaviour.
2018-09-06 20:07:20 +01:00
Ryuta Kamizono
abfc1db01f Fix test case to ensure default connection id is filled
Follow up of #33798.
2018-09-07 04:00:00 +09:00
Richard Schneeman
4b010b0815
Merge pull request #33805 from schneems/schneems/faster-file-store
Faster File Store
2018-09-06 14:49:26 -04:00
Rafael Mendonça França
1c59b4840c
Generate a gem that can't be pushed to Rubygems.org by default
This will avoid gems that are made to be private to be pushed to public
repositories.
2018-09-06 14:45:47 -04:00
Rafael França
62a0c30754
Merge pull request #33574 from lsylvester/change-i18n-defaults-behaviour-to-match-i18n-1.1.0
update I18n fallbacks configuration to be compatible with i18n 1.1.0
2018-09-06 14:38:26 -04:00
Rafael França
2de047dbeb
Merge pull request #33798 from got2be/actioncable-redis-client-name
ActionCable: add id option to redis adapter config
2018-09-06 14:23:44 -04:00
Yumin Wong
0a1567793b Use assert_predicate instead
Co-authored-by: no-itsbackpack <no-itsbackpack@github.com>
2018-09-06 12:48:50 -05:00
schneems
a01f4d53b3 [ci skip] Clarify CaptureHelper#capture function 2018-09-06 11:12:55 -05:00
schneems
8eb3cd8e56 Faster File Store
Memory before 1826584.8	 memory after: 1797795.6 difference: 1.58% memory (speed) savings.

When the key is not longer than the limit we can avoid allocating two strings and an array.
2018-09-06 10:13:42 -05:00
Rafael França
53be0132c3
Merge pull request #32405 from yhirano55/use_turbolinks_in_guide
Use Turbolinks in Rails guides
2018-09-06 11:13:00 -04:00
Ryuta Kamizono
54a9dbf5f1
Merge pull request #33799 from kamipo/deprecate_unused_methods_in_database_limits
Deprecate most methods which were never used in `DatabaseLimits`
2018-09-06 08:04:06 +09:00
Rafael Mendonça França
f80722c0eb
Unlock ffi version
ffi has a security issue on versions before 1.9.24 so it is better to
upgrade even if that occasionally cause failures in some contributors
machines.
2018-09-05 17:56:57 -04:00
Rafael Mendonça França
9ee5b28479
Upgrade all the gems 2018-09-05 17:41:31 -04:00
Eileen M. Uchitelle
49c7c154ff
Merge pull request #33604 from rails/ensure-we-always-cleanup-dbs
Ensure we always cleanup the databases
2018-09-05 16:02:53 -04:00
Eileen Uchitelle
38f074f0a8 Ensure we always cleanup the databases
This commit moves the `run_cleanup` hook into an `ensure` block so we
make sure to cleanup the databases even if an exception is raised while
running the parallel tests.
2018-09-05 14:43:14 -04:00
Ryuta Kamizono
e0a1235f7d Deprecate most methods which were never used in DatabaseLimits
`DatabaseLimits` and those methods were introduced at 3809c80, but most
methods were never used and never tested from the beginning (except
`table_alias_length`, `index_name_length`, and `in_clause_length` (since
66c09372)).

There is no reason to maintain unused those methods for about 8 years.
2018-09-05 23:45:52 +09:00
Ilia Kasianenko
bcd11e07b5 ActionCable: add id option to redis adapter config 2018-09-05 16:54:44 +03:00
Eileen M. Uchitelle
bd932f5d22
Merge pull request #33782 from mikhailov/patch-1
Update documentation to ActionController::ConditionalGet
2018-09-05 08:04:27 -04:00
Eileen M. Uchitelle
5bd4a4c78b
Merge pull request #33781 from bogdanvlviv/fix-test-after-33637
Fix tests in `activerecord/test/cases/tasks/database_tasks_test.rb`
2018-09-04 16:30:11 -04:00
bogdanvlviv
5f244f6b06
Fix tests in activerecord/test/cases/tasks/database_tasks_test.rb
After #33637 some tests in `activerecord/test/cases/tasks/database_tasks_test.rb`
don't assert anything.
We used to stub `ActiveRecord::Base::configurations` method in those
tests like `ActiveRecord::Base.stub(:configurations, @configurations) {}`.
Since #33637 `ActiveRecord::Base::configurations` is a `ActiveRecord::DatabaseConfigurations`
object(not a Hash object) we can't do so anymore.
`ActiveRecord::DatabaseConfigurations` object builds during `ActiveRecord::Base::configurations=`.
We can replace `ActiveRecord::Base.stub(:configurations, @configurations) {}` to
```
begin
  old_configurations = ActiveRecord::Base.configurations
  ActiveRecord::Base.configurations = @configurations
  # ...
ensure
 ActiveRecord::Base.configurations = old_configurations
end
```

Also I fixed tests in `activerecord/test/cases/tasks/legacy_database_tasks_test.rb`
But currently It looks like duplication of
`activerecord/test/cases/tasks/database_tasks_test.rb`.
We should improve those tests or remove them.

I've tried (in `activerecord/test/cases/tasks/legacy_database_tasks_test.rb` file):
```
def with_stubbed_configurations
  old_configurations = ActiveRecord::Base.configurations.to_h
  ActiveRecord::Base.configurations = @configurations

  ActiveRecord::Base.stub(:configurations, ActiveRecord::Base.configurations.to_h) do
    yield
  end
ensure
  ActiveRecord::Base.configurations = old_configurations
end
```
but it causes erros in tests cases.

After discussion we decided to remove
`activerecord/test/cases/tasks/legacy_database_tasks_test.rb`

Related to #33637
2018-09-04 23:08:54 +03:00
Eileen Uchitelle
35870148b6 Remove unused block
This method used to take a block, but that's no longer the case so we
can delete the block from the method signature.
2018-09-04 15:51:10 -04:00
yuuji.yaginuma
fb3642b0ca Respect config setting when output deprecation notice in rake tasks
The rake tasks which became deprecate now does not load the environment.
Therefore, even if the application specifies the behavior of deprecating,
the message is output to stderr ignoring the specification.

It seems that this is not the expected behavior.
We should respect the setting even in the rake tasks.
2018-09-04 20:06:54 +09:00
Yuji Yaginuma
63c6943131
Merge pull request #33789 from nisusam/update_hijacking_link
Update link for `Rack socket hijacking API`
2018-09-04 20:06:09 +09:00
nisusam
c9fd722851 Update link for Rack socket hijacking API
- Use valid `fragment identifier` in the URL
- Use `https`
2018-09-04 14:49:49 +05:30
Anatoly Mikhaylov
8634b46889 Update documentation to ActionController::ConditionalGet
Two implemented but undocumented features are to help indicate that cache is fresh for 3 hours, and it may continue to be served stale for up to an additional 60 seconds to parallel requests for the same resource or up to 5 minutes while errors are being returned back while the initial synchronous revalidation is attempted.
2018-09-03 20:04:54 +01:00
Kasper Timm Hansen
e6ba30efbf
Merge pull request #33779 from mcnelson/update_changelog_for_null_store
Update changelog with new default cache store in test env
2018-09-03 09:00:45 +02:00
Ryuta Kamizono
c8108465ca
Merge pull request #33673 from tgxworld/regression_setting_children_record_in_parent_before_save
Fix regression setting children record in parent before_save callback.
2018-09-03 15:44:00 +09:00
Guo Xiang Tan
90240f664c Fix regression setting children record in parent before_save callback. 2018-09-03 13:34:24 +08:00
Michael Nelson
732111b05f Update changelog with null_store default
[ci skip]
2018-09-02 15:20:19 -07:00
George Claghorn
53eea40d35
Merge pull request #33773 from mcnelson/null_cache_store_for_test_env
Make null_store the default cache store in test environment config
2018-09-02 14:38:34 -04:00
Ryuta Kamizono
9b56cbd98d Remove unused splat args in _create_record
`_create_record` is passed `attribute_names` only.

```
% git grep -n '_create_record(attribute_names'
lib/active_record/attribute_methods/dirty.rb:173:        def _create_record(attribute_names = attribute_names_for_partial_writes)
lib/active_record/counter_cache.rb:162:      def _create_record(attribute_names = self.attribute_names)
lib/active_record/locking/optimistic.rb:64:        def _create_record(attribute_names = self.attribute_names)
lib/active_record/persistence.rb:738:    def _create_record(attribute_names = self.attribute_names)
```
2018-09-02 19:24:57 +09:00
Ryuta Kamizono
2403199330
Merge pull request #33774 from sharang-d/comment-changes
Change some comments to conform to the style used in other comments

[ci skip]
2018-09-02 19:12:38 +09:00
Ryuta Kamizono
736559d955
Merge pull request #33776 from gmcgibbon/extend-database-default-value-test
add mysql and sqlite3 default test
2018-09-02 18:52:01 +09:00
kenjiszk
15e04b4ef8 add mysql and sqlite3 default test
[Gannon McGibbon + Kenji Suzuki]
2018-09-01 22:09:01 -04:00
Sharang Dashputre
310afd6b43 [ci skip] Change some comments to conform to the style used in other comments 2018-09-01 19:32:46 -04:00
Eileen M. Uchitelle
d8ac08f6bf
Merge pull request #33770 from eileencodes/multi-db-improvements-part-3
Part 3: Multi-db Improvements, identifying replica configurations
2018-09-01 09:49:01 -04:00
yuuji.yaginuma
02b4ba6461 Remove needless test order config
These were added for avoiding warnings and for testing in
e4c529ea1d94ef548975e45b91a7fec045aeefbc and 6ea7065a18671872f1486cff3fdaeb4f78fa6332.

Now the default is `:random`, and since the tests added with it are
removed. That config is unnecessary.
2018-09-01 18:46:40 +09:00
Rafael França
f3fe56c732
Merge pull request #33743 from steakknife/steakknife/improve-template-generator-actions
add github to template actions, template actions minor refactor
2018-08-31 16:56:00 -05:00
Richard Schneeman
0ef2d458d5
Merge pull request #33758 from schneems/schneems/faster_strong_params
Faster permitted_scalar_filter
2018-08-31 14:19:24 -07:00
Eileen Uchitelle
a572d2283b Convert configs_for to kwargs, add include_replicas
Changes the `configs_for` method from using traditional arguments to
using kwargs. This is so I can add the `include_replicas` kwarg without
having to always include `env_name` and `spec_name` in the method call.

`include_replicas` defaults to false because everywhere internally in
Rails we don't want replicas. `configs_for` is for iterating over
configurations to create / run rake tasks, so we really don't ever need
replicas in that case.
2018-08-31 16:07:09 -04:00
Rafael França
e28725cfa6
Merge pull request #33766 from yskkin/warn_plural
Emit warning for unknown inflection rule when generating model.
2018-08-31 14:22:01 -05:00