aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides/generator.rb
Commit message (Collapse)AuthorAgeFilesLines
* After https://github.com/rails/rails/pull/35281 and ↵Vipul A M2019-03-121-1/+1
| | | | | | https://github.com/rails/rails/pull/35036 AV warns about not having the compiled container. Use the suggested with_empty_template_cache to overcome warning
* Tighten up the AV::Base constructorAaron Patterson2019-01-291-2/+2
| | | | | | | | | | | | | | | The AV::Base constructor was too complicated, and this commit tightens up the parameters it will take. At runtime, AV::Base is most commonly constructed here: https://github.com/rails/rails/blob/94d54fa4ab641a0ddeb173409cb41cc5becc02a9/actionview/lib/action_view/rendering.rb#L72-L74 This provides an AV::Renderer instance, a hash of assignments, and a controller instance. Since this is the common case for construction, we should remove logic from the constructor that handles other cases. This commit introduces special constructors for those other cases. Interestingly, most code paths that construct AV::Base "strangely" are tests.
* Enable `Lint/UselessAssignment` cop to avoid unused variable warnings (#34904)Ryuta Kamizono2019-01-091-3/+3
| | | | | | | | | | | | | | * Enable `Lint/UselessAssignment` cop to avoid unused variable warnings Since we've addressed the warning "assigned but unused variable" frequently. 370537de05092aeea552146b42042833212a1acc 3040446cece8e7a6d9e29219e636e13f180a1e03 5ed618e192e9788094bd92c51255dda1c4fd0eae 76ebafe594fc23abc3764acc7a3758ca473799e5 And also, I've found the unused args in c1b14ad which raises no warnings by the cop, it shows the value of the cop.
* Use safe nav operator when calling RailsGuides::Generator.newYosuke Kabuto2018-12-051-2/+2
| | | | Use String for direction of RailsGuides::Generator
* Use direction instead of rtl flag.Alberto Almagro2018-11-221-11/+14
| | | | | | | | | Improve readability by using `direction` as CSS does. More info: https://developer.mozilla.org/en-US/docs/Web/CSS/direction Continues: #34486 [Alberto Almagro + Ufuk Kayserilioglu]
* Merge pull request #34486 from tamarr/masterRafael Mendonça França2018-11-191-2/+8
|\ | | | | | | allow right to left styling of docs
| * allow right to left styling of docs (#3)tamarr2018-11-191-2/+7
|/ | | | * adding rtl css main file and logic to use
* Not generate needless files in guidesYoshiyuki Hirano2018-04-021-25/+27
| | | | | | | Not generate needless files: * _license.html.erb, _welcome.html.erb are partial files. * layout.html.erb is the layout file.
* Use frozen string literal in guides/Koichi ITO2017-08-131-0/+2
|
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Fix to use correct path with language on guideShia2017-03-081-1/+1
|
* refactors and fixes in guides generation [ci skip]Xavier Noria2017-02-121-105/+62
| | | | | | | | | | | | | | | | | | | | | | | | This commit is not precisely atomic, but the changes have evolved, summary: * The ENV-based interface has been moved upwards, the generator has now a conventional initializer. * RAILS_VERSION is now assumed to be a Git tag. A blank RAILS_VERSION means edge guides. * In consequence, the EDGE env variable is gone. * The "local" version is also gone, the current SHA1 is computed for edge guides. * Assumes guides are generated from a repo checkout (time ago users could generate them from gems.) * The WARNINGS flag is gone in consequence, you cannot disable warnings. * The `api_link` Markdown helper is fixed. * Docs about usage have one single place: rake guides:help. * Links in guides have been revised.
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-110/+110
|
* modernizes hash syntax in guidesXavier Noria2016-08-061-2/+2
|
* applies new string literal convention in guidesXavier Noria2016-08-061-30/+30
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Correct guide generation command [ci skip]Aditya Kapoor2016-07-021-3/+3
|
* Simplify `RailsGuides::Generator#select_only` a bitViktar Basharymau2015-11-221-1/+1
| | | The main goal is to improve readability, but as a side effect this commit makes the method a bit faster.
* Add ability to translate rails guides documents.yamlSeiei Miyagi2015-10-051-1/+1
| | | | | | | | | | | | | | | | | | Some translations of rails guides has their own documents.yaml, for example Japanese: https://github.com/yasslab/railsguides.jp/blob/japanese/guides/source/documents.yaml Traditional Chinese: https://github.com/docrails-tw/guides/blob/master/rails_guides/helpers.rb#L21,L27 https://github.com/docrails-tw/guides/blob/master/source/documents_zh-TW.yaml The [Translating Rails Guides](https://github.com/rails/docrails/wiki/translating-rails-guides) says > Copy the contents of guides/source into your own language directory and translate them. So that sounds ok to copy guides/source/documents.yaml into language specific directly and translating them like other markdown files.
* Fix place of require 'rails_guides/markdown'yui-knk2015-03-071-0/+1
|
* remove warnings on ruby trunklaurocaetano2013-11-011-1/+1
|
* Merge pull request #8348 from danchoi/masterVijay Dev2012-12-081-4/+2
|\ | | | | Kindle ebook generation with working section navigation
| * Add periodical-style TOC and navigation to Kindle version of guidesDaniel Choi2012-12-011-4/+2
| |
* | let @version be always externally set in guides generation [fixes #8221]Xavier Noria2012-12-071-1/+1
|/ | | | | | | | | | Shelling out was there for authors convenience, but we are rather going to have the tag or SHA1 always in RAILS_VERSION and if the environment variable is blank, then just use "local" as a reminder that you are just working locally. The docs server has been updated to set the long SHA1 in RAILS_VERSION when generating edge guides.
* let .md be the only supported extension for guidesXavier Noria2012-09-181-4/+4
|
* No more Textile guide generation supportPrem Sichanugrist2012-09-171-68/+7
|
* Skip kindle's readme file on generationPrem Sichanugrist2012-09-171-0/+1
|
* Start rewriting 4.0 release note into MarkdownPrem Sichanugrist2012-09-171-3/+8
|
* [guides] fix reference to railties directory, guides are no longer thereRafael Magana2012-05-281-1/+1
|
* [guides] guides:generate:kindle is the new interface to generate .mobi file ↵Rafael Magana2012-05-281-5/+0
| | | | instead of using KINDLE=1
* [guides] get rid of any reference to the generator script since rake tasks ↵Rafael Magana2012-05-281-1/+1
| | | | are now the new interface
* [guides] update generator.rb to refer to guides:generate instead of ↵Rafael Magana2012-05-271-1/+1
| | | | generate_guides
* moves the guides up to the root directoryXavier Noria2012-03-171-0/+310