Age | Commit message (Collapse) | Author |
|
Update SmartGit screenshots
|
|
The previous screenshots show SmartGit version 3 (released on 2012-03-02) and do not represent SmartGit's current user interface anymore. The new screenshots have been updated for version 22.1 (released on 2022-11-11).
|
|
rubocop: turn off Rails/ContentTag
|
|
This cop suggests (and even autocorrects!) an instance of:
tag("img", options)
to change into:
tag.img(options)
But as discussed in https://github.com/git/git-scm.com/pull/1742,
this actually breaks the call!
I'm still puzzled about why this is. But I find that I don't care enough
to investigate deeply, and it would be useful to have CI on "main"
actually pass, so unrelated pull requests aren't confused into thinking
they broke something. So let's just disable the cop for now.
|
|
Fix building of Scalar docs & include a temporary workaround for overlapping names
|
|
The documentation built from Git includes both 'Documentation/scalar.txt'
and 'Documentation/technical/scalar.txt'. Because 'index_doc()' builds the
documentation by basename, these two files conflict, ultimately resulting in
only the latter being saved to the DB.
Long-term, the cleanest permanent solution to this problem is to rename
'technical/scalar.txt' to something else in Git. In the meantime, to ensure
that the (more important) command documentation is rendered at the
git-scm.com/docs/scalar URL, skip the 'technical/scalar.txt' build entirely.
This commit should be reverted when 'technical/scalar.txt' has been renamed
in Git.
Signed-off-by: Victoria Dye <vdye@github.com>
|
|
Add 'scalar' to the document-matching regexes in 'index_doc()' and
'index_l10n_doc' so that the 'scalar' command documentation is built and
included on the site.
Note that, because the Scalar technical design document has the same base
name as the command doc (both 'scalar.txt'), only last one processed will be
saved to the DB and rendered on the site. Since we want both documents
available on the website, this should be fixed by renaming the technical
document in Git. Temporarily, this will be handled on the site via a later
commit.
Signed-off-by: Victoria Dye <vdye@github.com>
|
|
app/helpers/application_helper.rb: fix broken `#image_tag`
|
|
We use the `#image_tag` helper to bypass the asset pipeline machinery in
Rails's own `#image_tag`. But Rails no longer spells `tag.img(...)` as
such, instead, it writes `tag("img", ...)`.
Update our own helper to reflect the change upstream.
Signed-off-by: Taylor Blau <me@ttaylorr.com>
|
|
lib/tasks/index.rake: handle nested AsciiDoc includes
|
|
When indexing contents in the Documentation tree, our Rakefile
preprocesses each blob by resolving its includes before handing it off
to AsciiDoc.
This preprocessing is implemented by the `~expand_content` method,
which performs a string substitution on the pattern
/include::(\S+)\.txt\[\]/
, where the block given to `#gsub` yields the content of the file in the
first match group. When the file isn't pre-generated, we ask for its
content, recursively call `#expand_content`, and then return the result.
This should handle nested includes, but doesn't. That's because when we
make the recursive call to `#expand_content` we discard the result,
instead returning `new_content` (which is the non-expanded version of
the file we looked up in the first place).
Resolve this by storing off the result of calling `#expand_content`
before returning it.
This broke in eb8f3ca4 (index: make return of new_content clear in
expand_content(), 2022-10-05), the result of calling `#expand_content`
used to be the terminal expression in that method (and thus returned to
the caller).
Signed-off-by: Taylor Blau <me@ttaylorr.com>
|
|
update to ruby 3.1.2
|
|
Looks like I managed to introduce 2 new problems in 2 commits.
|
|
Looks like there are a bunch of old rails vulnerabilities. Nothing
urgent, since we don't actually accept data from users. But since we're
doing a bunch of updates anyway, let's bump rails, too.
|
|
This needed some light merge resolution, since the rubocop fixes touched
some nearby lines. Viewing the diff with "-w" helps, since the rubocop
changed reduced the indentation by one level.
|
|
index_doc(): loosen match of "git-cmd(1)" on manpages
|
|
In v2.38.0, we now have a manpage for scalar, which doesn't start with
"git". As a result, our regex to find the section number fails, and the
whole manpage is aborted.
Let's loosen this regex to match any alphanumeric command name, plus
dashes. That's enough for the current code base. It's conceivable we
might introduce more characters, but you get a nice big exception
if we do.
|
|
There is a weird interaction with Rails 6 and Ruby 3.1. I imagine what
happened is that net-smtp, etc, are no longer in the default gem setup.
Looks like Rails 7 has fixed this, but even the most recent version of
Rails 6 has not.
Details:
https://stackoverflow.com/questions/70500220/rails-7-ruby-3-1-loaderror-cannot-load-such-file-net-smtp
|
|
When we added an AllCops.Exclude key in c6736094 (rubocop: ignore
db/migrate/, 2022-10-05), that meant we stopped respecting the built-in
config. And that config contains vendor/**, among other things.
This wasn't a problem for me locally, because my bundled gems are found
elsewhere. But in our CI environment, they are in vendor/, which is what
caused all of the problems with out-dated rubocop config in gems.
Hopefully this fixes it.
|
|
We have fabricators and factories that are empty. I'm sure these could
be rearranged, but I don't think it's worth spending time to figure out
how they work (maybe somebody more familiar with them could do so
easily).
|
|
There's no need to use a regex; we'll always see the full string. This
is more accurate, and appeases rubocop (which suggested .includes() for
equivalent behavior, but it isn't aware of the possible simplification).
|
|
This picks up a few non-controversial bits, mostly
Style/RedundantArgument (which I think are only marked as unsafe because
we could have overridden methods like join/split, but that's not a
problem in this case).
|
|
Suggested by rubocop, but this lets us avoid the double-block chaining,
which lets us avoid the extra intermediate variable added by 360faca8
(index: break up huge cmd_list construction, 2022-10-05).
|
|
This picks up corrections from some new cops. Looking at the diff, they
all seem pretty reasonable.
|
|
This will stop rubocop from spamming the list of new ones. I do wonder
if it will then start spamming us with new warnings. We'll see.
|
|
This is new since upgrading rubocop-rails in the previous commit.
|
|
This avoids an annoying warning when running rubocop:
`RuboCop::Cop::EnforceSuperclass` is deprecated and will be removed in RuboCop 2.0. Please upgrade to RuboCop Rails 2.9 or newer to continue.
|
|
This avoids an annoying (but harmless) warning about
DidYouMean::SPELL_CHECKERS on every run, after the upgrade to ruby
3.1.2.
|
|
Again, our CI seems to require it. I'm not clear on why. Guess and check
for the win.
|
|
I had earlier tried to avoid this, but it looks like our CI environment
insists on having it (perhaps because in the test environment, we load
the rspec gem; I didn't investigate further).
|
|
Instead we can pass through URL.parse.open, which isn't susceptible to
being fed "|echo oops, you were owned". In our case it's already OK; we
are feeding only a URL defined earlier in the file. However, the
files_from_sourceforge() method itself is unsafe, and a new caller could
trigger a vulnerability. So let's fix it now, which also appeases
rubocop.
|
|
Rubocop complains about the chained blocks, which requires an extra
variable. We can also break it up across multiple lines to make it a bit
easier to read.
|
|
These methods don't need to be declared inside the other functions. As
rubocop is warning us about, they end up as top-level functions anyway.
We can't easily make them lambdas (which is what rubocop suggests)
because they're recursive. But since they don't actually use any
context from the surrounding function, we can just pull them out
entirely.
Note that we'll give the l10n one a more descriptive name, since it's
now (and well, always was) globally available.
|
|
Note that we keep the parentheses around the call though.
|
|
These were marked as not-to-be-frozen in 1d55bdbb (Don't freeze rake
tasks, 2018-11-20). But I don't see why, and now rubocop complains about
it. They seem to work fine after this change.
|
|
The actual return of expand_content() is hidden behind a bunch of
conditionals. Let's make it clear at the end that we are expanding
new_content.
Note that this is technically a little different, because one error code
path would have returned the result of puts. But returning a nil
new_content makes more sense.
|
|
In a block expected to return "bar", we might say:
foo = bar
as the last line. But since nobody looks at "foo", this is pointless.
Let's make clear that we don't care about the assignment here, but the
return value.
|
|
These are cases where we don't care about the assigned value itself, but
leaving the name in place shows what value we're expecting to split or
pop.
|
|
This was copied from the regular index function, but the limit
conditional is commented out. Since nobody seems to have complained,
let's just drop the useless assignment and the commented-out code.
|
|
This _could_ be useful, in that we're overriding the top-level filename
whose contents we already grabbed. But nobody actually looks at it after
we assign, so let's avoid the extra confusion (and rubocop warning).
|
|
This was copied over from the genbook2 task at some opint. And that task
did use the ids field, but I don't think any of that matches the current
procedure for importing the book. It all went away in a0a189b6
(book2.rake: drop "genbook2" task, 2018-09-20).
|
|
This became unused in 3238f9db (stop using image_alt() function,
2020-12-11).
|
|
These are all test scripts that store the results of setup in variables.
Even though they're not used, having them helps make clear what data the
test has available to it, and follows existing patterns.
|
|
These were made possible by pulling the xlink assignments to their own
line in the previous commit.
|
|
These cases were all fine. In a few I just added parentheses, but in
general it makes things more readable to just split the assignment and
conditional to two lines.
|
|
|
|
|
|
|
|
Noticed by rubocop Lint/UnusedMethodArgument (but I removed it entirely
rather than marking it unused, as the autocorrect would).
|
|
It's not marked executable anyway, and most editors should realize what
type of file it is from the filename. And it confuses rubocop (which
complains that it has no executable bit).
|