Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2017. It is now read-only.

Commit53a38f9

Browse files
author
Hubot
committed
Sync changes from upstream repository
1 parent86a03bf commit53a38f9

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

‎README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,13 @@ Nanoc has [some nice documentation](http://nanoc.ws/docs/tutorial/) to get you s
4848

4949
###Enterprise
5050

51-
To generate the`/enterprise/` versions,use`script/enterprise-backport`:
51+
To generate the`/enterprise` versions,pass in the Enterprise version to`script/server`. For example:
5252

5353
```sh
54-
$ script/enterprise-backport 2.6
55-
$ mv -f enterprise output
56-
$ script/server
54+
$ script/server 2.6
5755
```
5856

59-
The above will need to be repeated anytime changes are made to`/enterprise` versioned documentation.
57+
Note that live reloading is not available for Enterprise documentation.
6058

6159
##Styleguide
6260

‎content/v3.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ $ curl -i {{ site.data.variables.product.api_url_pre }}/users/octocat/orgs
3232
> Status: 200 OK
3333
> ETag: "a00049ba79152d03380c34652f2cb612"
3434
> X-GitHub-Media-Type: github.v3
35+
{% if page.version == 'dotcom' %}
3536
> X-RateLimit-Limit: 5000
3637
> X-RateLimit-Remaining: 4987
3738
> X-RateLimit-Reset: 1350085394
39+
{% endif %}
3840
> Content-Length: 5
3941
> Cache-Control: max-age=0, private, must-revalidate
4042
> X-Content-Type-Options: nosniff
@@ -504,9 +506,11 @@ $ curl -i {{ site.data.variables.product.api_url_pre }}/user
504506
> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
505507
> Status: 200 OK
506508
> Vary: Accept, Authorization, Cookie
509+
{% if page.version == 'dotcom' %}
507510
> X-RateLimit-Limit: 5000
508511
> X-RateLimit-Remaining: 4996
509512
> X-RateLimit-Reset: 1372700873
513+
{% endif %}
510514
511515
$ curl -i {{ site.data.variables.product.api_url_pre }}/user -H 'If-None-Match: "644b5b0155e6404a9cc4bd9d8b1ae730"'
512516
> HTTP/1.1 304 Not Modified
@@ -515,19 +519,23 @@ $ curl -i {{ site.data.variables.product.api_url_pre }}/user -H 'If-None-Match:
515519
> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
516520
> Status: 304 Not Modified
517521
> Vary: Accept, Authorization, Cookie
522+
{% if page.version == 'dotcom' %}
518523
> X-RateLimit-Limit: 5000
519524
> X-RateLimit-Remaining: 4996
520525
> X-RateLimit-Reset: 1372700873
526+
{% endif %}
521527
522528
$ curl -i {{ site.data.variables.product.api_url_pre }}/user -H "If-Modified-Since: Thu, 05 Jul 2012 15:31:30 GMT"
523529
> HTTP/1.1 304 Not Modified
524530
> Cache-Control: private, max-age=60
525531
> Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT
526532
> Status: 304 Not Modified
527533
> Vary: Accept, Authorization, Cookie
534+
{% if page.version == 'dotcom' %}
528535
> X-RateLimit-Limit: 5000
529536
> X-RateLimit-Remaining: 4996
530537
> X-RateLimit-Reset: 1372700873
538+
{% endif %}
531539
```
532540

533541
##Cross Origin Resource Sharing
@@ -545,7 +553,7 @@ Here's a sample request sent from a browser hitting
545553
$ curl -i {{ site.data.variables.product.api_url_pre }} -H "Origin: http://example.com"
546554
HTTP/1.1 302 Found
547555
Access-Control-Allow-Origin: *
548-
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
556+
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP,{% if page.version == 'dotcom' %}X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,{% endif %} X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
549557
Access-Control-Allow-Credentials: true
550558
```
551559

@@ -557,7 +565,7 @@ HTTP/1.1 204 No Content
557565
Access-Control-Allow-Origin: *
558566
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With
559567
Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE
560-
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
568+
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP,{% if page.version == 'dotcom' %}X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset,{% endif %} X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
561569
Access-Control-Max-Age: 86400
562570
Access-Control-Allow-Credentials: true
563571
```
@@ -576,9 +584,11 @@ $ curl https://api.github.com?callback=foo
576584
> /**/foo({
577585
> "meta": {
578586
> "status": 200,
587+
{% if page.version == 'dotcom' %}
579588
> "X-RateLimit-Limit": "5000",
580589
> "X-RateLimit-Remaining": "4966",
581590
> "X-RateLimit-Reset": "1372700873",
591+
{% endif %}
582592
> "Link": [ // pagination headers and other links
583593
> ["https://api.github.com?page=2", {"rel": "next"}]
584594
> ]

‎content/v3/search.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ repositories where the primary language is Assembly. We're sorting by stars in
9797
descending order, so that the most popular repositories appear first in the
9898
search results.
9999

100-
<%= headers 200, {:pagination => default_pagination_rels, 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19} %>
100+
<%= headers 200, {:pagination => default_pagination_rels{% if page.version == 'dotcom' %}, 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19{% endif %}} %>
101101
<%= json(:repo_search_v3_results) %>
102102

103103
###Highlighting Repository Search Results
@@ -186,7 +186,7 @@ Here, we're searching for the keyword `addClass` within a file's contents. We're
186186
making sure that we're only looking in files where the language is JavaScript.
187187
And we're scoping the search to the`repo:jquery/jquery` repository.
188188

189-
<%= headers 200, {:pagination => default_pagination_rels, 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19} %>
189+
<%= headers 200, {:pagination => default_pagination_rels,{% if page.version == 'dotcom' %} 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19{% endif %}} %>
190190
<%= json(:code_search_v3_results) %>
191191

192192
###Highlighting Code Search Results
@@ -289,7 +289,7 @@ that's labeled as `bug`. The search runs across repositories whose primary
289289
language is Python. We’re sorting by creation date in ascending order, so that
290290
the oldest issues appear first in the search results.
291291

292-
<%= headers 200, {:pagination => default_pagination_rels, 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19} %>
292+
<%= headers 200, {:pagination => default_pagination_rels,{% if page.version == 'dotcom' %} 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19{% endif %}} %>
293293
<%= json(:issue_search_v3_results) %>
294294

295295
###Highlighting Issue Search Results
@@ -361,7 +361,7 @@ Imagine you're looking for a list of popular users. You might try out this query
361361
Here, we're looking at users with the name Tom. We're only interested in those
362362
with more than 42 repositories, and only if they have over 1,000 followers.
363363

364-
<%= headers 200, {:pagination => default_pagination_rels, 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19} %>
364+
<%= headers 200, {:pagination => default_pagination_rels,{% if page.version == 'dotcom' %} 'X-RateLimit-Limit' => 20, 'X-RateLimit-Remaining' => 19{% endif %}} %>
365365
<%= json(:user_search_v3_results) %>
366366

367367
###Highlighting User Search Results

‎lib/resources.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ def headers(status, head = {})
6767
end
6868
end
6969

70-
lines <<"X-RateLimit-Limit: 5000"unlesshead.has_key?('X-RateLimit-Limit')
71-
lines <<"X-RateLimit-Remaining: 4999"unlesshead.has_key?('X-RateLimit-Remaining')
70+
unless@config[:version] !='dotcom'
71+
lines <<"X-RateLimit-Limit: 5000"unlesshead.has_key?('X-RateLimit-Limit')
72+
lines <<"X-RateLimit-Remaining: 4999"unlesshead.has_key?('X-RateLimit-Remaining')
73+
end
7274

7375
%(``` headers\n#{lines.join("\n")}\n```\n)
7476
end

‎script/server

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,12 @@
33
ulimit -n 2048
44

55
script/bootstrap
6-
DEV_MODE=true npm run gulp
6+
7+
if [-z"$1" ]
8+
then
9+
DEV_MODE=true npm run gulp
10+
else
11+
script/enterprise-backport$1
12+
mv -f enterprise output
13+
npm run gulp server
14+
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp