Граф коммитов

141 Коммитов

Автор SHA1 Сообщение Дата
pedrorijo91 5723e32710
Merge branch 'master' into v2 2019-02-17 22:29:40 +00:00
pedrorijo91 25779300f4
Replace Tire gem by newer elasticsearch gem
This required some code changes in the point of contact with the client
but nothing big.

A few TODOs were added as i was navigating the code, for instance:

- There's a 'meta' property of the search results being populated,
but doesn't seem to be used. Need to confirm

- The 'type' property of ES documents is looking at the class name, which
is not very OOP. We could easily change it. But this takes me to the last
point

- We are using ES 2.4.0, while the latest version is 6.X, in which
the 'type' property is deprecated and marked to removal. There are also
some query format changes, but since we are using basic queries, it should
be fairly easy (I started testing this work with a 6.X version).
If we are going to ES update, the 'types' property is going to be
removed anyway: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html
2018-12-06 18:55:57 +00:00
Mark Tareshawty 5e45ecb997
Fix scoping so that we don't break the naming convention 2018-11-20 07:51:23 -05:00
Mark Tareshawty d10fcb3c25
Merge branch 'master' into v2 2018-11-12 18:21:38 -05:00
Jason Long 62128942d0
Only using 2nd edition going forward 2018-11-12 16:19:42 -05:00
Mark Tareshawty 930741d1f5
Use Rails routing helpers to cleanup routes file 2018-11-12 10:35:37 -05:00
Mark Tareshawty b702316577
Update webpacker 2018-10-28 19:42:15 -04:00
Mark Tareshawty 454ebb52cf
Update code using rubocop's autocorrect linter 2018-10-28 19:08:14 -04:00
Mark Tareshawty 160dc76c7f
Merge branch 'master' into v2 2018-03-14 16:10:31 -04:00
Mark Tareshawty 30d826c2f9
precompile modernize.js only 2018-03-11 16:13:00 -04:00
Mark Tareshawty d1d4e4d681
Run ./bin/rake rails:update and apply changes 2018-03-11 16:07:18 -04:00
Mark Tareshawty e92723c363
Remove uneeded Dotenv.load 2018-03-11 16:05:17 -04:00
Mark Tareshawty 152c9168c4
Check in the database.yml and remove example file 2018-03-11 15:54:58 -04:00
Mark Tareshawty 7bec7e236c
Move production gems to their own group 2018-03-11 15:43:53 -04:00
Mark Tareshawty 9ddc682673
Replace Unicorn with Puma 2018-03-11 15:39:55 -04:00
Mark Tareshawty bc3d8d76f4
Remove old js and remove asset.rb config for compilation 2018-03-10 08:49:31 -05:00
Jason Long 678fa76b96
Merge branch 'master' into v2
* master:
  Fix const reference
  Add Heroku generated app.json
  Remove REDIRECT and supporting code
  Update uses of constants
  Remove loading of constants from lib
  Move lib/constants.rb to be under initializers
  license: update years and authors
  add "about this site" page
  architecture: mention /download/win page-rule exception
  add architecture document
  Progit: make first edition translations disappear.
  Remove uses of should
  Use RSpec.describe instead of just describe
  re run rspec `rails generate rspec:install` and update config
  Bump uglify
  Bundle update after rebase
  Fix pg version
  Fix uglify version
  Bump  gemfile
2018-03-09 17:38:10 -05:00
Mark Tareshawty 0892d28ef3
Merge pull request #1173 from git/constants
Move constants out of lib and freeze them
2018-03-07 09:28:48 -05:00
Mark Tareshawty c80113f8f3
Remove REDIRECT and supporting code 2018-03-07 09:06:28 -05:00
Mark Tareshawty 8939e090c6
Remove loading of constants from lib 2018-03-06 20:24:56 -05:00
Mark Tareshawty 27430fb3c6
Move lib/constants.rb to be under initializers
Also freeze the immutable constants
2018-03-06 20:24:40 -05:00
Jeff King 1f3427f7fd add "about this site" page
This patch adds an "about this site" page and links to it
from the footer (where we previously just linked straight to
the git-scm.com repo).  This serves a few purposes:

  - we lay out the relationship between the various bits of
    site content. This clarifies the licensing, and
    hopefully directs bug reporters to the right place.

  - we credit Scott, who has moved on but without whom the
    site would absolutely not exist in its current form

  - it gives us a place to credit the companies that are
    sponsoring us with resources
2018-03-06 23:12:19 +01:00
Mark Tareshawty cccede028a
Add doc(s) -> manual(s) redirection 2018-02-27 21:21:04 -05:00
Mark Tareshawty bd812250e7
Clean up routes so that are easier to read 2018-02-27 21:13:54 -05:00
Mark Tareshawty 580d06f21c
Lint and properly format the routes file 2018-02-27 18:28:04 -05:00
Mark Tareshawty dbce29f853
Configure basic webpacker 2018-02-26 11:02:42 -05:00
Jason Long 36069f836f
Restructure css directory 2018-02-17 09:45:56 -05:00
pedrorijo91 ff635f6a16
Removes unnecessary eager loading.
Bullet was throwing a warning. Also removed some commented code.
2018-02-09 22:17:32 +00:00
Jeff King 7c59eaa186 routes: restore bare /year/month/date/slug blog route
We only switched to /blog in 2013, so there's a real chance
that old links would use the bare format. And it's not that
hard to match them and give them the same redirect.
2018-02-08 05:00:39 -05:00
Jeff King dd8b9d57e6 drop blog content
There hasn't been a blog post in 7 years, and there are no
plans to revive it. The existing posts generally fall into
one of two categories:

  - news about the pro git book

  - technical notes that weren't covered in the 1st edition
    of pro git

The former are no longer interesting at all. And the latter
had their content folded into the second edition.

So let's drop this content, as we sometimes get issues
raised about its accuracy and formatting. We want to
redirect people to the actually-maintained book content.

We'll put a short note in the /blog route to help anybody
who follows old links to these posts.
2018-02-08 04:25:27 -05:00
Jeff King 67d3d9b9f9 drop UPDATE_TOKEN code
Once upon a time, the idea was that you could update the
site with new book versions by posting to a special endpoint
with a secret token.

But these days we fetch the book material directly to the
rails environment by running a periodic rake task, and then
update the database directly. Let's drop this unused code.
2018-02-08 03:23:56 -05:00
Jeff King 0529ef9c94 drop "related items" code
We haven't been populating the database with this for some
time (and any residual records have been gone for almost a
year due to the database transition). And nobody seems to
have noticed.

Let's just give up on the feature in the name of simplicity.
2018-02-08 03:13:31 -05:00
Jeff King 13e0e7bf85 routes: clean up documentation/ routes
These are historical names for things in /doc, etc. Let's
make them actual redirects so that people see the "official"
URLs (and we may eventually deprecate and remove these).
2018-02-07 09:26:16 -05:00
Jeff King 395a6f2acf redirect /book/commands to /docs
This currently generates a poorly formatted list of commands
with no actual links to the manpage. It was originally
referenced as part of a command index in a mock-up that went
away in the previous commit.

Probably nobody links to it, but we can easily just redirect
it to our good-looking link-filled command reference page.

Note that this lets us drop the redundant list of commands
in lib/constants.rb.
2018-02-07 09:18:15 -05:00
Jeff King c635f6b477 drop doc#book endpoint
This is from an old mock-up of the book code. It doesn't
actually work (it returns a 500 probably because the
database schema has changed). The real endpoint is "/books",
so let's redirect there.
2018-02-07 09:12:58 -05:00
Jeff King 0740d7bf3e drop config/initializers/categories.rb
Once upon a time this was supposed to generate the `/docs`
index page, but it hasn't been used since b4fc467 (pulled in
jasons changes, moving to using his haml directly,
2012-03-29).

Let's drop it, since it creates hassle when updating the
command list.
2018-02-07 08:38:06 -05:00
Ævar Arnfjörð Bjarmason e918a3af9b overview page: add link to git-worktree
It has been noted on
https://public-inbox.org/git/CACsJy8Dt_TjfRk05oNW8DXrdn6s_QV8NQZKnnrgGkj3WTN_=3A@mail.gmail.com/T/#t
that even though this is an official porcelain command there's no link
to it from /docs, fix that.

I have not run this version of the site (don't have the env to do
that), but replicated how we're listing mergetool, so this should
work.
2018-02-07 11:30:28 +00:00
Jason Long 8442ef7dfe
Remove RSS feed 2018-01-15 16:14:56 -05:00
chotuaashiq dfed044797 Changes to the stylesheets done 2017-12-29 06:31:01 +05:30
chotuaashiq 7acba45b9d Changes to the stylesheets done 2017-12-29 06:30:06 +05:30
chotuaashiq 59be4cb4c2 Corrected the routes.rb file 2017-12-20 10:48:25 +05:30
chotuaashiq 64a1becd78 Trademark both links working now, Duplicacy removed 2017-12-20 01:00:11 +05:30
chotuaashiq 57d08ab9cd Trademark in About section added 2017-12-15 20:33:03 +05:30
chotuaashiq 29a5cd2571 About expansion added 2017-12-15 20:33:03 +05:30
Jeff King d2778a3183 Revert "Merge pull request #1047 from git/raygun"
I added Raygun support to get a handle on the exceptions we
were seeing due to timeouts in #1045. That's now reverted,
so the primary reason is gone.

Furthermore, the Intro plan only allows 500 exceptions per
month, and we exceeded that pretty quickly. Most of these
are just noise, so we may want to consider a service like
this after cleaning them up. But in the meantime, it's not
accomplishing anything.

The noisy exceptions seem to mostly be related to book
languages with broken links or incomplete translations. They
fall mainly into two buckets:

  - dereferencing nil for various items. E.g., hitting
    https://git-scm.com/book/sr/v1/%D0%9F%D0%BE%D1%87%D0%B5%D1%82%D0%B0%D0%BA-Getting-Help
    returns the 500 error page.

  - ActionController::BadRequest. E.g., hitting https://git-scm.com/book/ko/Git-%EC%EF%BF%BD%EF%BF%BD%EB%B2%EF%BF%BD-GitWeb
    returns no output
2017-10-16 11:59:39 -04:00
Jeff King 5dfb6d881e add raygun gemfile
We don't currently have any kind of logging or alerting on
unhandled exceptions. I'm experimenting with Raygun's free
"intro" plan so that I can at least get basic data like
"what exceptions did we see today?".
2017-10-11 13:52:37 -04:00
Jeff King ce63db9a45 drop /admin route
This just shows a list of the downloads pulled down from the
`download` task. Potentially useful for remote-admin, I
guess, but it falls far short of what's needed for actual
debugging (and I can't think of a single time when it would
have been helpful).

It also seems to cause rendering exceptions on the
production site when spam requests look at it.

Let's just drop it as ancient and not-useful.
2017-10-11 13:27:03 -04:00
Jeff King 775101e178 doc: drop "test" route
This looks like debugging cruft added in 97bc298 (implement
ref version dropdown, 2012-04-17), and hasn't been kept up
to date (it tries to show the rebase page but doesn't
actually work).

This isn't a huge deal, but requesting `/test.zip` (which
some spam scripts do) results in an exception.
2017-10-11 13:20:51 -04:00
Jeff King 536c572e49 point elasticsearch at $BONSAI_URL
I'm not sure why the $SEARCH_INDEX_URL variable is used. It
does provide a layer of indirection, and the existing site
has both Bonsai and Searchify set up. So maybe it was for
switching between them.

These days we're just using Bonsai, so let's point it at the
variable that is automatically set up by the Heroku add-on.
2017-05-03 02:15:48 -04:00
Jeff King 4529f47444 switch rails caching from memcachier to heroku-redis
We don't really care between the two, and this should keep
all of our billing at Heroku (which can then be part of a
single sponsorship).
2017-05-03 01:03:32 -04:00