Ryuta Kamizono
ea65d92f19
Enable Lint/UselessAssignment
cop to avoid unused variable warnings ( #34904 )
...
* 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.
2019-01-09 18:09:01 +09:00
Yosuke Kabuto
cb343ef672
Use safe nav operator when calling RailsGuides::Generator.new
...
Use String for direction of RailsGuides::Generator
2018-12-05 12:41:07 +09:00
Alberto Almagro
5020c2e302
Use direction instead of rtl flag.
...
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]
2018-11-22 22:39:13 +01:00
Rafael Mendonça França
c4720a25ed
Merge pull request #34486 from tamarr/master
...
allow right to left styling of docs
2018-11-19 13:20:08 -05:00
tamarr
29e0ed13f5
allow right to left styling of docs ( #3 )
...
* adding rtl css main file and logic to use
2018-11-19 18:59:52 +02:00
Yoshiyuki Hirano
f8d346f9fd
Not generate needless files in guides
...
Not generate needless files:
* _license.html.erb, _welcome.html.erb are partial files.
* layout.html.erb is the layout file.
2018-04-02 18:30:23 +09:00
Koichi ITO
1f37d846a9
Use frozen string literal in guides/
2017-08-13 22:04:09 +09: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
Shia
ac00659b1b
Fix to use correct path with language on guide
2017-03-08 10:54:06 +09:00
Xavier Noria
771a802c37
refactors and fixes in guides generation [ci skip]
...
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.
2017-02-12 10:33:50 +01:00
Rafael Mendonça França
fe1f4b2ad5
Add more rubocop rules about whitespaces
2016-10-29 01:17:49 -02:00
Xavier Noria
80e66cc4d9
normalizes indentation and whitespace across the project
2016-08-06 20:16:27 +02:00
Xavier Noria
1607ee299d
modernizes hash syntax in guides
2016-08-06 19:39:28 +02:00
Xavier Noria
6b3719b757
applies new string literal convention in guides
...
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 19:21:59 +02:00
Aditya Kapoor
3f7d85bdd5
Correct guide generation command [ci skip]
2016-07-02 15:18:27 +05:30
Viktar Basharymau
35442422fa
Simplify RailsGuides::Generator#select_only
a bit
...
The main goal is to improve readability, but as a side effect this commit makes the method a bit faster.
2015-11-22 18:37:30 +03:00
Seiei Miyagi
b2e490ef54
Add ability to translate rails guides documents.yaml
...
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.
2015-10-05 23:53:04 +09:00
yui-knk
ec895167c2
Fix place of require 'rails_guides/markdown'
2015-03-07 16:50:27 +09:00
laurocaetano
d48222d22e
remove warnings on ruby trunk
2013-11-01 18:15:53 -02:00
Vijay Dev
86269b4207
Merge pull request #8348 from danchoi/master
...
Kindle ebook generation with working section navigation
2012-12-08 10:33:05 -08:00
Xavier Noria
0adcf6d90e
let @version be always externally set in guides generation [ fixes #8221 ]
...
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.
2012-12-07 15:20:56 +01:00
Daniel Choi
e8fe1d1a20
Add periodical-style TOC and navigation to Kindle version of guides
2012-12-01 18:08:10 -05:00
Xavier Noria
1e7b8d3a22
let .md be the only supported extension for guides
2012-09-18 23:04:12 +02:00
Prem Sichanugrist
5e2866cc34
No more Textile guide generation support
2012-09-17 15:55:17 -04:00
Prem Sichanugrist
232b9ade1a
Skip kindle's readme file on generation
2012-09-17 15:54:22 -04:00
Prem Sichanugrist
544f6bcb90
Start rewriting 4.0 release note into Markdown
2012-09-17 15:54:21 -04:00
Rafael Magana
eb362e59c0
[guides] fix reference to railties directory, guides are no longer there
2012-05-28 16:21:25 -05:00
Rafael Magana
15b229e8aa
[guides] guides:generate:kindle is the new interface to generate .mobi file instead of using KINDLE=1
2012-05-28 16:20:10 -05:00
Rafael Magana
1b5e1c1972
[guides] get rid of any reference to the generator script since rake tasks are now the new interface
2012-05-28 16:17:00 -05:00
Rafael Magana
e625056c82
[guides] update generator.rb to refer to guides:generate instead of generate_guides
2012-05-27 23:33:54 -05:00
Xavier Noria
6d87cd028b
moves the guides up to the root directory
2012-03-17 08:32:49 -07:00