Commit Graph

10066 Commits

Author SHA1 Message Date
Godfrey Chan
4daebedcc4 Prepare for 4.2.0.beta4 release 2014-10-30 14:12:24 -07:00
Edwin Wills
c3857355b8 On larger screens the email preview iframe is being limited to a height of 800 pixels, and the full available screen size is not being used. 2014-10-29 18:24:05 +00:00
Santiago Pastorino
76bec5939c Merge pull request #17423 from lukefx/jruby_windows_tzinfo
Added 'tzinfo-data' if we are using jruby
2014-10-29 09:55:01 -02:00
Luca Simone
bf993fac57 Added 'tzinfo-data' if we are using jruby 2014-10-29 07:56:01 +01:00
Xavier Noria
e595d91ac2 edit pass over all warnings
This patch uniformizes warning messages. I used the most common style
already present in the code base:

* Capitalize the first word.

* End the message with a full stop.

* "Rails 5" instead of "Rails 5.0".

* Backticks for method names and inline code.

Also, converted a few long strings into the new heredoc convention.
2014-10-28 17:47:32 -07:00
Yves Senn
6c3bc96976 Merge pull request #17408 from bf4/fix_rbx_test
Fix rbx generated Gemfile regex
2014-10-28 09:29:28 +01:00
Andrew White
df0ea90cf1 Merge pull request #16229 from byroot/stop-swallowing-url-generation-errors
UrlGenerationError are not catched as 404 anymore
2014-10-27 22:46:19 +00:00
Benjamin Fleischer
a7fd386b63 Fix rbx generated Gemfile regex
https://travis-ci.org/rails/rails/jobs/39190983#L460

 1) Failure:
 AppGeneratorTest#test_psych_gem
 [test/generators/app_generator_test.rb:495]:
 Expected /gem 'psych',\s+'~> 2.0', \s+platforms: :rbx/ to match <snip>
 http://git.io/uuLVag)\ngem 'psych', '~> 2.0', platforms: :rbx\n\n
2014-10-27 16:03:53 -05:00
Jean Boussier
8e1362be3f UrlGenerationError are not catched as 404 anymore 2014-10-27 16:53:10 -04:00
Rafael Mendonça França
bf17c8a531 Add back --skip-turbolinks and remove --skip-gems
For the most part of cases --skip-gems option just remove one line in
the Gemfile. This is not worth for the complexity it adds.

Closes #17196
2014-10-26 20:47:47 -05:00
Godfrey Chan
9bbff50cc2 💅 it's -> its (see comments on 9a586ac) 2014-10-18 23:52:53 -07:00
Zachary Scott
9a586ac48d [ci skip] A Rails engine is not a man 🙆‍♀️ 2014-10-18 15:15:17 -07:00
Rafael Mendonça França
b9fcce3944 Merge pull request #17302 from claudiob/replace-slower-block-call-with-faster-yield
Replace (slower) block.call with (faster) yield
2014-10-18 17:08:24 -03:00
Zachary Scott
7b71d8cfab Revert "Replace (slower) block.call with (faster) yield"
This reverts commit 0ab075e75f58bf403f7ebe20546c7005f35db1f6.
2014-10-18 13:04:02 -07:00
claudiob
0ab075e75f Replace (slower) block.call with (faster) yield
Performance optimization: `yield` with an implicit `block` is faster than `block.call`.
See http://youtu.be/fGFM_UrSp70?t=10m35s and the following benchmark:

```ruby
require 'benchmark/ips'

def fast
 yield
end

def slow(&block)
 block.call
end

Benchmark.ips do |x|
 x.report('fast') { fast{} }
 x.report('slow') { slow{} }
end

# => fast    154095 i/100ms
# => slow     71454 i/100ms
# =>
# => fast  7511067.8 (±5.0%) i/s -   37445085 in   4.999660s
# => slow  1227576.9 (±6.8%) i/s -    6145044 in   5.028356s
```
2014-10-18 12:59:51 -07:00
Rafael Mendonça França
07ae138386 Merge pull request #17292 from tricknotes/generator-test-doc
Fix example code for `Rails::Generators::Testing::Behaviour` [ci skip]
2014-10-16 17:04:01 -03:00
Ryunosuke SATO
101fbdba4c Fix example code for Rails::Generators::Testing::Behaviour [ci skip]
`cleanup_destination_root` method is not found anywhere.
Instead, `prepare_destination` clean up distination root on setup.
2014-10-17 04:57:36 +09:00
Rafael Mendonça França
be5521eb4e Use released rails-dom-testing 2014-10-16 16:53:46 -03:00
Yves Senn
ee787d9f58 test, Generators::GeneratedAttribute with references, required, index.
Closes #17197.
Closes #17207.

`{required}` is a type modifier so it should be:

    user:references{required}:index

and not:

    user:references:index{required}
2014-10-16 15:50:13 +02:00
Yves Senn
1a76ab8d42 Merge pull request #17278 from velobuff/clarify-debugger-invocation
clarify debugger platform invocation
2014-10-16 13:13:26 +02:00
Yves Senn
400b0818fa some changelog formatting. [ci skip] 2014-10-16 09:11:41 +02:00
Yves Senn
aaafbaf546 Merge pull request #17280 from aditya-kapoor/remove-unneeded-file
remove unneeded file from Railties.
2014-10-16 09:00:06 +02:00
Aditya Kapoor
f551a046df remove unneeded file 2014-10-16 12:05:01 +05:30
Aditya Kapoor
ce086b22e7 use require_command! instead of calling its definition 2014-10-16 11:05:58 +05:30
Raman Sinha
db41cc252c clarify debugger platform invocation 2014-10-15 19:04:02 -06:00
Rafael Mendonça França
733996cce1 Don't need to account turbolinks cookies in get request.
It was changed to not set the cookie in get requests at
62cc3db457.

Related with dcb05f26.
2014-10-13 17:24:44 -03:00
Rafael Mendonça França
f919d5f5ea Merge pull request #17240 from masarakki/fix-test_helper-of-mountable-plugin
fix test_helper for mountable plugin
2014-10-13 10:33:13 -03:00
masarakki
a441293cd9 fix test_helper for mountable plugin 2014-10-13 22:17:50 +09:00
Erik Michaels-Ober
8bb33e920a Replace Enumerable#reverse.each with Enumerable#reverse_each 2014-10-13 11:47:16 +01:00
Joshua Peek
fa5a1b9345 Default generated Gemfile to coffee-rails ~> 4.1.0 2014-10-12 18:27:27 -07:00
Rafael Mendonça França
7b740f31cc Merge pull request #17088 from robin850/jruby-dev
Follow up to #16613
2014-10-01 22:56:08 -03:00
Rafael Mendonça França
098158c38f Generate the application pointing to rails-dom-testing master
It is temporary until we do the final release
2014-09-30 13:42:55 -03:00
Abdelkader Boudih
175ca453a3 correct filename for jobs tests 2014-09-28 10:31:17 +00:00
Robin Dupret
1fac7b79f3 Follow up to #16613
Since we want this flag to be enabled anytime we are running the tests
under JRuby, let's enable this at the Rakefile level so people get the
performance boost on their local checkout.

Moreover, we avoid having to update this particular line anytime the
option changes on the JRuby side.

The only drawback is that we have to define it in every Rakefile but
there's no big deal, this is already the case for other options.
2014-09-28 12:04:06 +02:00
Jeremy Kemper
e1e8e532ac Merge pull request #17077 from schneems/schneems/backtrace-string-allocations
Decrease backtrace cleaner object allocations
2014-09-27 20:03:35 -07:00
Richard Schneeman
dfbcfafd9a Move object allocation out of loop
Right now BenchmarkCleaner allocates hundreds of strings on every request with an exception. This patch moves those strings to be generated at boot once and re-used.

## Bench Methods

I took a modified form of CodeTriage https://github.com/schneems/codetriage-ko1-test-app/blob/master/perf.rake and ran given rake tasks with and without the patch to BacktraceCleaner.

I made an endpoint results in exception

```
  def index
    raise “foo"
  end
```

The gem `memory_profiler` was used to capture objects allocated for a single request. Then `benchmark/ips` was used to test the speed of the patch.

You will see that we use less objects and the code becomes measurably faster with this patch.

## With patch:

Memory for one request:

```
Total allocated 7441
Total retained 37
```

Requests per second:


```
Calculating -------------------------------------
                 ips         4 i/100ms
-------------------------------------------------
                 ips       43.0 (±4.7%) i/s -        216 in   5.037733s
```


## Without patch:

Memory used for one request:


```
Total allocated 11599
Total retained 35 
```

Requests per second:

```
Calculating -------------------------------------
                 ips         3 i/100ms
-------------------------------------------------
                 ips       39.4 (±7.6%) i/s -        198 in   5.052783s
```

## Analysis

The patch is faster:

```
(43.0 - 39.4 ) / 39.4 * 100
# => 9 # % ~ speed bump
```

It also allocates less objects:

```
11599 - 7441
# => 4158
```

These strings are allocated on __EVERY SINGLE REQUEST__. This patch saves us 4158 objects __PER REQUEST__ with exception.

Faster errors == Faster applications
2014-09-27 13:42:20 +08:00
Rafael Mendonça França
4581d04477 Preparing for 4.2.0.beta2 release 2014-09-26 17:19:53 -03:00
Byron Bischoff
fe1b02d5ac remove extra # in css 2014-09-25 13:53:45 -07:00
Rafael Mendonça França
80990e2a0b rails-html-sanitizer is now the default
Also add to upgrading guide a notice about the deprecated sanitizers
2014-09-25 16:45:45 -03:00
Rafael Mendonça França
64fc8963b9 Remove unused code 2014-09-25 16:20:31 -03:00
Rafael Mendonça França
2922f63039 💅 the CSS 2014-09-25 16:09:43 -03:00
Rafael Mendonça França
89307fe2ce Merge pull request #17024 from buddhamagnet/amend-welcome-page
Amend welcome page
2014-09-25 16:07:19 -03:00
Godfrey Chan
b008e4bd8a Use released rails-html-sanitizer and rails-deprecated_sanitizer 2014-09-26 01:37:05 +09:00
buddhamagnet
be0206e4e2 Improve welcome page css and table cell aignments. 2014-09-25 11:59:13 -04:00
Rafael Mendonça França
478ad3f930 Use release web-console 2014-09-25 12:35:06 -03:00
Dan Olson
8e9bc11d22 Remove --skip-action-view option from application generator 2014-09-24 10:25:59 -05:00
Grzesiek Kolodziejczyk
95e3e42b87 Fix loading fixtures in engine tests
fixture_path is a class attribute of ActiveSupport::TestCase, so
ActiveSupport::TestCase.method_defined?(:fixture_path=) would always
return false.

This should fix #4971
2014-09-23 11:50:10 +02:00
Yuki Nishijima
f8e26c8014 Fix another false assertions
* The assertions in AS::Duration don't actually assert.
 * The assertion in Railtie will pass even when `eager_load_namespaces`
   doesn't include `AppTemplate::Application` if `Rails.application` is
   truthy.

For more details, see here:

 * https://github.com/rails/rails/pull/16998
 * https://github.com/rails/rails/pull/17000
2014-09-21 17:16:21 -07:00
Godfrey Chan
3e27a03fe4 Merge pull request #16984 from chancancode/fix_16578
Document that the default for `rails server -b` has changed
2014-09-22 01:08:19 +09:00
Godfrey Chan
5919cce0de Document that the default for rails server -b has changed
Fixes #16578
2014-09-22 01:04:42 +09:00