Commit Graph

31 Commits

Author SHA1 Message Date
Eugene Kenny
2f87589630 Remove references to WARNINGS environment variable [ci skip]
This has had no effect since 771a802c374ebe7b2931ba6cf8ffa3b7bf0e92e0.
2020-07-05 16:40:52 +01:00
Rafael França
ba20b7a4fd
Merge pull request #31882 from okkez/fix-encoding-error-generating-html
Fix invalid byte sequence error without `en_US.UTF-8` environment while rake guides:generate:html
2020-03-30 15:31:20 -04:00
Matthew Draper
287920ca7d Respect ENV variables when finding DBs etc for the test suite
If they're not set we'll still fall back to localhost, but this makes it
possible to run the tests against a remote Postgres / Redis / whatever.
2019-02-06 01:20:06 +10:30
Bart de Water
eb5fea40a4 Enable Start/EndWith and RegexpMatch cops
In cases where the MatchData object is not used, this provides a speed-up:
https://github.com/JuanitoFatas/fast-ruby/#stringmatch-vs-stringmatch-vs-stringstart_withstringend_with-code-start-code-end
2018-07-28 17:37:17 -04:00
Kenji Okimoto
510db97991 Remove code that is no longer effective
In previous change, we set external encoding and internal encoding
explicitly. So we can remove the code that set environment variables
`LANG, LANGUAGE, LC_ALL`.
2018-02-04 22:49:22 +09:00
Kenji Okimoto
efc82d6fbf Fix error invalid byte sequence without en_US.UTF-8 locale
Because Ruby does not set `Encoding.default_external` with
non-existent locale such as `en_US.UTF-8`. Original code expects that
`en_US.UTF-8` is available locale implicitly. However, it shouldn't be
assumed.

In this case, we can use `-Eutf-8:utf-8` to specify external encoding
and internal encoding.
2018-02-04 22:37:17 +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
Rafael Mendonça França
0871e5e5c1
Fix all style guides violations
Closes #28382
Closes #28651
2017-04-19 20:13:42 -04:00
Xavier Noria
37770bc8d1 force UTF-8 as external encoding in guides generation [ci skip]
See the rationale in the comment found in the patch.
2017-03-09 09:43:38 +01: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
010e246756
Fix Rubocop violations and fix documentation visibility
Some methods were added to public API in
5b14129d8d4ad302b4e11df6bd5c7891b75f393c and they should be not part of
the public API.
2016-12-28 21:53:51 -05:00
Bian Jiaping
88792b1b2e Fix rake guides:generate:kindle error 2016-12-18 23:13:50 +08:00
Gaurav Sharma
f0bacbc2c4 update kindlerb gem
Ruby Kindle periodical-format ebook generator
2016-10-21 09:37:24 +05:30
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
Jade Misenas
7fb8a7e57c Fix WARNINGS flag inside guides/Rakefile 2015-07-29 20:00:58 -04:00
Darío Hereñú
f8dabedf13 Update link (minor fix) 2015-02-28 22:39:52 -03:00
Brooks Reese
3e9c16aadb Fix grammar in Rakefile markup [ci skip] 2014-12-05 09:32:50 -06:00
Zachary Scott
fc20bfd4f1 Clarify where result goes, and supported formats of generate task.
[ci skip]
2014-11-25 16:54:30 -08:00
Łukasz Adamczak
251840f20a Improve error message for guides:generate:kindle
With `kindlegen` missing from the PATH, the task
keeps suggesting to `gem install kindlerb`.
This change provides a more meaningful error
message for guides:generate:kindle.
2014-04-03 21:31:27 +02:00
Daniel Choi
e8fe1d1a20 Add periodical-style TOC and navigation to Kindle version of guides 2012-12-01 18:08:10 -05:00
Prem Sichanugrist
5e2866cc34 No more Textile guide generation support 2012-09-17 15:55:17 -04:00
Prem Sichanugrist
544f6bcb90 Start rewriting 4.0 release note into Markdown 2012-09-17 15:54:21 -04: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
db57e6d123 [guides] Add rake task to show help and make it the default one 2012-05-26 15:05:52 -05:00
Rafael Magana
e6d7eeaab0 [guides] Add :guides namespace and :html and :kindle tasks to Rakefile 2012-05-26 14:29:47 -05:00
Xavier Noria
6d87cd028b moves the guides up to the root directory 2012-03-17 08:32:49 -07:00