aboutsummaryrefslogtreecommitdiffstats
path: root/guides/rails_guides
Commit message (Collapse)AuthorAgeFilesLines
* refactors and fixes in guides generation [ci skip]Xavier Noria2017-02-123-133/+89
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Fix rubocop violationsRafael Mendonça França2017-02-091-11/+11
|
* Automatically link to Ruby files referenced in notes [ci skip]Robin Dupret2017-02-071-1/+19
| | | | | | | | | | To ease reading the "Active Support Core Extensions" guide, let's automatically link references to Ruby files. It's also possible to reference other components' files in the even though it's not used in the guides at the moment. [Petr Skocik & Robin Dupret]
* Automatically inject the current Rails version in API links [ci skip]Robin Dupret2017-02-071-0/+23
| | | | | | | To make sure that the user won't look at a feature that doesn't already exist if they are looking at a previous version of the guides, let's automatically inject the Rails version the guides have been generated against.
* Fix Rubocop violations and fix documentation visibilityRafael Mendonça França2016-12-281-1/+1
| | | | | | Some methods were added to public API in 5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of the public API.
* Fix rake guides:generate:kindle errorBian Jiaping2016-12-181-8/+4
|
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-296-8/+8
|
* Fix HTML escaping in the guidesRafael Mendonça França2016-10-251-1/+1
| | | | render :html escapes the argument if not provided as html safe.
* Fix indentationRafael Mendonça França2016-10-251-1/+1
|
* Generate HTML not plain textRafael Mendonça França2016-10-251-1/+1
|
* Fix plain option in the rails_guides generatorRafael Mendonça França2016-10-251-1/+1
|
* [ci skip] Update Levenshtein code with better attribution.Kasper Timm Hansen2016-09-121-1/+3
| | | | Lacks some proper creds to the homies who went the... distance ;)
* RuboCop is 100% green :tada:Xavier Noria2016-09-021-8/+9
|
* Add three new rubocop rulesRafael Mendonça França2016-08-162-10/+10
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* Fix broken alignments caused by auto-correct commit 411ccbdRyuta Kamizono2016-08-101-1/+2
| | | | Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
* applies remaining conventions across the projectXavier Noria2016-08-062-8/+8
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-063-152/+152
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-4/+2
|
* modernizes hash syntax in guidesXavier Noria2016-08-064-9/+9
|
* applies new string literal convention in guidesXavier Noria2016-08-066-95/+95
| | | | | 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
|
* [ci skip] Fix typoAkshay Vishnoi2015-12-221-1/+1
|
* 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.
* Fix a typoAlex Popov2015-11-191-1/+1
|
* concatenate @lang if @lang is presence to avoid useless slashSeiei Miyagi2015-10-051-1/+1
|
* Add ability to translate rails guides documents.yamlSeiei Miyagi2015-10-052-2/+2
| | | | | | | | | | | | | | | | | | 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.
* File encoding is defaulted to utf-8 in Ruby >= 2.1Akira Matsuda2015-09-181-2/+0
|
* Speed up Levenshtein by 50% and reduce 97% of memory usageYuki Nishijima2015-04-111-2/+5
| | | | | | | | | | | | | | | | Calculating ------------------------------------- each_char 924.000 i/100ms each_codepoint 1.381k i/100ms ------------------------------------------------- each_char 9.320k (¡Þ 5.1%) i/s - 47.124k each_codepoint 13.857k (¡Þ 3.6%) i/s - 70.431k Comparison: each_codepoint: 13857.4 i/s each_char: 9319.5 i/s - 1.49x slower The full report can be found here: https://gist.github.com/yuki24/a80988f35aceac76f1d5
* Fix place of require 'rails_guides/markdown'yui-knk2015-03-071-0/+1
|
* fix bug in Levenshtein distance calculationschneems2015-02-251-2/+0
| | | | Bug was discovered and discussed in #18395.
* - Changed `IN` to `ON` in markdown renderer conditionVipul A M2015-01-141-1/+1
| | | | - Changed `IN` to `ON` in all note sentences in guides.
* Consider `html+erb` as a valid language for snippetsRobin Dupret2015-01-031-1/+1
| | | | | | To highlight ERB snippets, both `erb` and `html+erb` are used as a language passed to the code block. However, only the former will be correctly highlighted.
* removes superfluous regexp groupXavier Noria2014-12-231-1/+1
|
* third test to warn against reading guides in GitHubXavier Noria2014-12-231-1/+1
|
* second test to warn against reading guides in GitHubXavier Noria2014-12-231-2/+1
|
* proof of concept, need to check in GitHubXavier Noria2014-12-231-0/+2
|
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Fix guide anchor generation logic.Juanito Fatas2014-08-241-1/+6
| | | | | | | | This could use in any translation because it's not limited to `[^a-z0-9]`. Verify after this change, all guides still have same anchors. [Robin Dupret & Juanito Fatas]
* Revert "Do not gsub non ASCII characters in header anchor.".Juanito Fatas2014-08-201-1/+1
| | | | | | This reverts commit 699babe. Also change the upgrading_ruby_on_rails link back to original in 4_2_release_notes.
* Uppercase HTML in docs.Hendy Tanata2014-08-081-1/+1
| | | | [skip ci]
* Update the levenshtein distance method in guides.Juanito Fatas2014-06-281-21/+29
|
* Do not gsub non ASCII characters in header anchor.Juanito Fatas2014-05-221-2/+1
|
* Update Redcarpet to 3.1.2Robin Dupret2014-05-141-1/+1
| | | | | | | This version fixes an API breakage between 3.0 and 3.1 ; the header method's arity should not have changed. [ci skip]
* Guides: output valid HTML5Nate Berkopec2014-05-053-7/+7
| | | [ci skip]
* `rails_guides/helpers.rb` requires `YAML` to run.Yves Senn2014-02-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve the following error when running `bundle exec rake guides:generate:html`: ``` /Users/senny/.rbenv/versions/2.0.0-p353/bin/ruby rails_guides.rb Generating 2_2_release_notes.md as 2_2_release_notes.html /Users/senny/Projects/rails/guides/rails_guides/helpers.rb:17:in `documents_by_section': uninitialized constant RailsGuides::Helpers::YAML (ActionView::Template::Error) from /Users/senny/Projects/rails/guides/rails_guides/helpers.rb:32:in `docs_for_menu' from /Users/senny/Projects/rails/guides/source/layout.html.erb:56:in `block in ___sers_senny__rojects_rails_guides_source_layout_html_erb___3094858039481335962_70118647133480' from /Users/senny/Projects/rails/guides/source/layout.html.erb:54:in `each' from /Users/senny/Projects/rails/guides/source/layout.html.erb:54:in `___sers_senny__rojects_rails_guides_source_layout_html_erb___3094858039481335962_70118647133480' from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:143:in `block in render' from /Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:161:in `instrument' from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:337:in `instrument' from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:141:in `render' from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout' from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:47:in `render_template' from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:17:in `render' from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/renderer.rb:42:in `render_template' from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/renderer.rb:23:in `render' from /Users/senny/Projects/rails/actionview/lib/action_view/helpers/rendering_helper.rb:24:in `render' from /Users/senny/Projects/rails/guides/rails_guides/markdown.rb:160:in `render_page' from /Users/senny/Projects/rails/guides/rails_guides/markdown.rb:25:in `render' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:205:in `block in generate_guide' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:195:in `open' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:195:in `generate_guide' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:144:in `block in generate_guides' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:142:in `each' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:142:in `generate_guides' from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:97:in `generate' from rails_guides.rb:63:in `<main>' rake aborted! Command failed with status (1): [/Users/senny/.rbenv/versions/2.0.0-p353/bi...] /Users/senny/Projects/rails/guides/Rakefile:11:in `block (3 levels) in <top (required)>' Tasks: TOP => guides:generate:html (See full trace by running task with --trace) ```
* remove warnings on ruby trunklaurocaetano2013-11-011-1/+1
|
* used flat_map instead of map.flatten in /guides/rails_guides/helpers.rbKarunakar (Ruby)2013-08-041-1/+1
|
* remove unused variableVipul A M2013-04-131-1/+1
|
* place article name in the beginning of guides page titleGosha Arinich2013-01-061-1/+3
|
* Merge pull request #8348 from danchoi/masterVijay Dev2012-12-082-4/+121
|\ | | | | Kindle ebook generation with working section navigation