From 771a802c374ebe7b2931ba6cf8ffa3b7bf0e92e0 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Sun, 12 Feb 2017 10:21:20 +0100 Subject: 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. --- guides/source/_welcome.html.erb | 4 ++-- guides/source/kindle/rails_guides.opf.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'guides/source') diff --git a/guides/source/_welcome.html.erb b/guides/source/_welcome.html.erb index f50bcddbe7..5bd1ea4d22 100644 --- a/guides/source/_welcome.html.erb +++ b/guides/source/_welcome.html.erb @@ -1,8 +1,8 @@ -

Ruby on Rails Guides (<%= @edge ? @version[0, 7] : @version %>)

+

Ruby on Rails Guides (<%= @edge ? @edge[0, 7] : @version %>)

<% if @edge %>

- These are Edge Guides, based on the current master branch. + These are Edge Guides, based on master@<%= @edge[0, 7] %>.

If you are looking for the ones for the stable version, please check diff --git a/guides/source/kindle/rails_guides.opf.erb b/guides/source/kindle/rails_guides.opf.erb index 547abcbc19..63eeb007d7 100644 --- a/guides/source/kindle/rails_guides.opf.erb +++ b/guides/source/kindle/rails_guides.opf.erb @@ -5,7 +5,7 @@ - Ruby on Rails Guides (<%= @version %>) + Ruby on Rails Guides (<%= @version || "master@#{@edge[0, 7]}" %>) en-us Ruby on Rails -- cgit v1.2.3