Matthew Draper
87b3e226d6
Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
...
This reverts commit 3420a14590
, reversing
changes made to afb66a5a59
.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e
Enforce frozen string in Rubocop
2017-07-01 02:11:03 +03:00
bogdanvlviv
40bdbce191
Define path with __dir__
...
".. with __dir__ we can restore order in the Universe." - by @fxn
Related to 5b8738c2df
2017-05-23 00:53:51 +03:00
Akira Matsuda
5473e390d3
self.
is not needed when calling its own instance method
...
Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
2017-01-05 19:58:52 +09:00
Akira Matsuda
91fa2b71c3
Privatize unneededly protected methods in Action Cable
2016-12-24 22:16:43 +09:00
Xavier Noria
b678eb57e9
applies new string literal convention in actioncable/lib
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:13:46 +02:00
Prathamesh Sonpatki
63ac6255ba
Cable: Generate .js or .coffee files while generating channel as per the javascript engine of the application
...
- Now we will detect what javascript engine user is using and based on
that we will generate either `.js` or `.coffee` version of the channel
file.
- This also needs a change in coffee-rails to override the `js_template`
method. Related PR https://github.com/rails/coffee-rails/pull/72 .
- Currently coffee-rails gem sets
`config.app_generators.javascript_engine` to `:coffee` and using this
information we override the `js_template` to set the extension as
`.coffee` in coffee-rails gem.
- Using this approach, we can keep the `channel.js` and `channel.coffee`
files in the Rails repository itself.
- Additionally the `js_template` method can act as public interface for
coffee-rails gem to hook into and change the extension to `.coffee`
without maintaining the actual asset files.
[Prathamesh Sonpatki, Matthew Draper]
2016-05-17 18:12:19 +05:30
yuuji.yaginuma
aa757d0c11
don't remove cable.js
...
`cable.js` is required for other Channels.
2016-04-16 15:19:41 +09:00
Prathamesh Sonpatki
d0023deb74
Generate cable.js
file if does not exist when generating channel
...
- Before this, while generating a channel, we were not creating
`cable.js` if it does not already exist.
- We have similar code for application mailer here -
0b3ae023d2
.
- Based on the comment -
https://github.com/rails/rails/issues/24418#issuecomment-205421995 .
2016-04-12 22:49:38 +05:30
Gadzhi Gadzhiev
37606d016d
Remove redundant regexp escapes in generators
2016-03-08 15:30:12 +03:00
Jon Moss
cf423f8f76
Add notes for future selves
...
Once RubyGems 2.5.0 is required, then the duplicated files can be
removed, and symlinks can be used instead.
[ci skip]
2016-02-22 20:46:11 -05:00
Jon Moss
83921b8f87
Generate ApplicationCable files if they do not already exist
2016-02-22 20:46:06 -05:00
Rafael Mendonça França
f51a30c666
Use the generators options to not generate channel assets
2015-12-21 18:58:08 -02:00
Ryo Hashimoto
61366f5a3d
Action Cable channel generator should not create JS assets in --api mode
2015-12-19 13:43:11 +09:00
David Heinemeier Hansson
28035db109
Generate all the ApplicationCable stubs by default, like all other Application* stubs
2015-12-16 21:05:13 +01:00
David Heinemeier Hansson
70be2486f3
Simpler directory structure
2015-12-16 18:58:43 +01:00
David Heinemeier Hansson
40cc72548f
Basic channel generator
2015-12-15 21:39:22 +01:00