Commit Graph

126 Commits

Author SHA1 Message Date
yuuji.yaginuma
603475b76f Remove needless silence_warnings
Since ff30db1, warning is not shown.
2017-09-09 09:48:15 +09:00
Koichi ITO
7c260ae201 Fix RuboCop offenses
And enable `context_dependent` of Style/BracesAroundHashParameters cop.
2017-08-16 17:55:25 +09:00
Pat Allan
acea68de02 Adding frozen_string_literal pragma to Railties. 2017-08-14 19:08:09 +02:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Akira Matsuda
e8ba0c0f21 "Use assert_nil if expecting nil. This will fail in minitest 6." 2016-12-25 02:29:52 +09:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
Rafael Mendonça França
79a5ea9ead
Remove deprecated support to :text in render 2016-10-10 00:02:52 -03:00
Xavier Noria
80e66cc4d9 normalizes indentation and whitespace across the project 2016-08-06 20:16:27 +02:00
Xavier Noria
411ccbdab2 remove redundant curlies from hash arguments 2016-08-06 19:44:11 +02:00
Xavier Noria
783763bde9 applies new string literal convention in railties/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:16:09 +02:00
Prathamesh Sonpatki
d93427840e
Remove unused boot_rails method and it's usage
- The `boot_rails` method from abstract_unit.rb is empty after 2abcdfd978fdcd491576a237e8c6b.
- So let's remove it and its usage.
2016-07-04 09:34:21 +05:30
Rafael Mendonça França
14dc9b9cd9
Use sass-rails in our test suite 2016-06-30 19:39:37 -03:00
Jon Moss
9cd790d77d
md5 --> MD5
Sorry, I missed a few places in my last PR. This should be the last of
'em 😬
2016-05-17 15:44:57 -04:00
yuuji.yaginuma
ab18d37fa4 do not create unnecessary directory
This was added in a4c358f, but `config.assets` has been removed in 5172d93.
Also, do not use env path to `Sprockets::Cache::FileStore` even `sprockets-rails`.
ref: https://github.com/rails/sprockets-rails/blob/master/lib/sprockets/railtie.rb#L129
2016-04-10 20:43:07 +09:00
Rafael Mendonça França
e2f08a1c0a Add test to make sure the sprockets cache is not shared per environment 2016-03-02 14:22:02 -03:00
Vipul A M
e3b04447f4 Be consistent in testing outputs from railties test and use /bin/rails everywhere(the default behaviour now) instead of mix of /bin/rake /bin/rails everywhere
[Ryo Hashimoto & Vipul A M]
2016-01-24 20:01:02 +05:30
Rafael Mendonça França
80ba81d2a0 Fix warning 2015-12-17 17:35:20 -02:00
David Heinemeier Hansson
42b9126610 Fix test now that cable is in there by default too 2015-12-16 22:02:43 +01:00
Rafael Mendonça França
877a411d0c Use sprockets 3 in the Rails 5 release 2015-12-16 16:30:58 -02:00
Kasper Timm Hansen
fa2c96b3f7 Replace serve_static_files in tests with public_file_server.enabled.
Forgot to do it in 748b2f9, when deprecating `serve_static_files`.
2015-11-04 22:40:58 +01:00
Jeremy Daer
20ec1e922c Eliminate overlapping app/assets load path
* Move `app/assets/manifest.js` to `app/assets/config/manifest.js`.
  Avoid the suggestion that you can/should deep-link `stylesheets/foo`.
* Pull in all toplevel stylesheets and JavaScripts, not just
  `application.js` and `.css`. Demonstrate how to use `link_directory`
  with a specified `.js`/`.css` type.
* Fix RAILS_ENV handling in assets tests.
* Shush warnings spam from third-party libs that distract from tests.
2015-09-29 11:56:58 -07:00
Andrei Istratii
d0e0fbafb2 Migrate to Sprockets 4. 2015-08-19 21:45:46 +03:00
schneems
4bc2469156 Fix reported regression rails/sprockets-rails#265
We can prevent the UglifierCompressor from being instantiated prematurely by setting precompile to an empty array in this test.
2015-07-29 20:12:56 -05:00
Yves Senn
a8f250a22c tests, railties tests should use bin/ executables when possible.
We recommend using the `bin/` executables in our docs and guides.
Let's make sure that our tests execute the same code path.
2015-06-30 11:19:01 +02:00
Arthur Neves
64114b66d2
Need to add config.assets.compile=true to access .assets
sprockets-rails will only add `Rails.application.assets` if compile is
no false. See change on sprockets-rails
d7c7ee1999
2015-04-26 12:55:05 -04:00
Arthur Neves
d023f98497
assets:cache:clean wont clean cache anymore
See the behaviour change on sprockets-rails
56725e5843
2015-04-26 12:54:16 -04:00
Rafael Mendonça França
a8225eeec2 Test using sprockets 3 2015-03-29 22:58:32 -03:00
Vipul A M
6eced6a1fe Removed magic comments # encoding: utf-8 , since its default from ruby 2.0 onwards. 2015-02-03 20:51:40 +05:30
Godfrey Chan
2d04bdd86f Merge pull request #18100 from chancancode/serve_static_files
Allow static asset serving from env variable (enhanced!)
Conflicts:
	railties/CHANGELOG.md
2014-12-19 14:55:34 -08:00
Dan Kang
f369bcf9a0 Default config.assets.digests to true in development 2014-05-17 23:01:22 -04:00
Matthew Draper
4f31b7767e Precompile the image we're referencing, too.
You can't compile a file that references a non-compiled asset's path.

.. unless you turn off asset runtime errors.

Outside of a test case like this, `config.assets.precompile` would
normally retain its default entry, which precompiles all images (and
other non-JS/CSS files) that are in `app/assets`.
2014-04-24 04:49:02 +09:30
Rafael Mendonça França
b053a47b3e depend_on_asset is not required anymore on sprockets-rails 2.1.2 2014-04-09 14:07:31 -03:00
Rafael Mendonça França
bc6a949020 Declare the assets dependency 2014-04-04 18:03:14 -03:00
Arun Agrawal
c10a78124c More Warnings removed for ruby trunk
Same as 4d4ff531b8807ee88a3fc46875c7e76f613956fb
2013-11-01 13:47:23 +01:00
SUGINO Yasuhiro
4a36eb64a5 Fix typos: the indefinite articles(a -> an) 2013-09-13 20:44:37 +09:00
Paul Nikitochkin
9cac69c602 #11381: Ignore config.eager_load=true for rake
Closes #11381
2013-07-10 21:43:15 +03:00
Paul Nikitochkin
9da48a998c #10428: Added tests for config.assets.precompile
Tests for bug in sprocket-rails:
  do not use value of configuration options
  which changed after environment loaded
2013-06-21 01:08:59 +03:00
Santiago Pastorino
9ec2e2ee91 Merge pull request #10902 from wangjohn/removing_application_singleton_calls
Calls to the application constant have been refactored
2013-06-17 17:37:54 -07:00
Terence Lee
2d5a6de4e2 initialize_on_precompile is not used anymore. 2013-06-13 16:33:39 -07:00
wangjohn
55d708d597 Calls to the application constant have been refactored to use
Rails.application when drawing routes and creating other configurations
on the application.
2013-06-10 20:59:37 -07:00
Jessica Lynn Suttles
c959798571 Fix tests from rails.png removal.
I'm giving @jlsuttles credit on this commit because she gave me the idea
and the actual converted image in 952289aabfb.
2013-04-02 14:27:38 -07:00
David Chapman
231b1096b9 s/and and run/and runs/
Fixing some typos/grammar.
2013-03-26 13:04:52 -05:00
Prathamesh Sonpatki
6a499cd97f Controller name pluralized 2013-03-25 14:40:31 +05:30
Jiri Pospisil
dbacb95a21 Fix usage of lambda as a Rack endpoint
The response body needs to respond_to? :each.
2012-12-31 17:46:19 +01:00
Aaron Patterson
e5946e0396 asset compilation should not require a database connection 2012-11-13 16:35:16 -08:00
Arun Agrawal
d065938663 Small change to remove warning unused variable. 2012-11-01 10:25:20 +05:30
Joshua Peek
b8c7e31a57 Switch to new sprockets-rails plugin 2012-10-15 18:22:12 -05:00
Robin Dupret
5ad7f8ab41 Use Ruby 1.9 Hash syntax in railties 2012-10-14 18:26:58 +02:00
Jeremy Kemper
1dc2ea8f3d Tighten up asset precompile tests 2012-10-12 20:44:32 -07:00