| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ba19350 commit c9b920e
10 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,8 @@ | |||
| 1 | 1 | require_relative 'lib/resources' | |
| 2 | 2 | require 'tmpdir' | |
| 3 | 3 | ||
| 4 | + Dir.glob('tasks/**/*.rake').each { |r| load r } | ||
| 5 | + | ||
| 4 | 6 | task :default => [:test] | |
| 5 | 7 | ||
| 6 | 8 | desc 'Builds the site' | |
@@ -28,8 +30,8 @@ task :run_proofer do | |||
| 28 | 30 | latest_ent_version = GitHub::Resources::Helpers::CONTENT['LATEST_ENTERPRISE_VERSION'] | |
| 29 | 31 | # swap versionless Enterprise articles with versioned paths | |
| 30 | 32 | href_swap = { | |
| 31 | - %r{help\.github\.com/enterprise/admin/} => "help.github.com/enterprise/#{latest_ent_version}/admin/", | ||
| 32 | - %r{help\.github\.com/enterprise/user/} => "help.github.com/enterprise/#{latest_ent_version}/user/" | ||
| 33 | + %r{help\.github\.com/enterprise/admin/} => "help.github.com/enterprise/#{config[:versions][0]}/admin/", | ||
| 34 | + %r{help\.github\.com/enterprise/user/} => "help.github.com/enterprise/#{config[:versions][0]}/user/" | ||
| 33 | 35 | } | |
| 34 | 36 | HTML::Proofer.new("./output", :href_ignore => ignored_links, :href_swap => href_swap).run | |
| 35 | 37 | end | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,6 @@ author_name: gjtorikian | |||
| 7 | 7 | ||
| 8 | 8 | [GitHub Enterprise](https://enterprise.github.com) offers the same set of APIs as GitHub.com, as well as its own set of Enterprise-specific functionality. | |
| 9 | 9 | ||
| 10 | - The GitHub Enterprise API has been documented on [the Enterprise Help site](https://enterprise.github.com/help) for some time. We've now [moved the resources to this site](https://developer.github.com/v3/enterprise/) to be hosted alongside the rest of the GitHub API documentation. | ||
| 10 | + The GitHub Enterprise API has been documented on the Enterprise Help for some time. We've now [moved the resources to this site](https://developer.github.com/v3/enterprise/) to be hosted alongside the rest of the GitHub API documentation. | ||
| 11 | 11 | ||
| 12 | 12 | Is there an API workflow you're particularly interested in? [Let us know](https://github.com/contact?form%5Bsubject%5D=Suggestion+for+an+Enterprise+Guide) and we'll do our best to [write a guide](https://developer.github.com/guides/)! | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,7 +30,7 @@ We expect the preview period to last 30-60 days. At the end of the preview perio | |||
| 30 | 30 | If you have any questions or feedback, please [get in touch with us][contact]! | |
| 31 | 31 | ||
| 32 | 32 | [contact]: https://github.com/contact?form[subject]=Team+Memberships+API | |
| 33 | - [org-invitations]: https://help.github.com/articles/adding-or-inviting-members-to-a-team-in-an-organization | ||
| 33 | + [org-invitations]: https://help.github.com/articles/adding-organization-members-to-a-team | ||
| 34 | 34 | [add-team-member]: /v3/orgs/teams/#add-team-member | |
| 35 | 35 | [add-team-membership]: /v3/orgs/teams/#add-team-membership | |
| 36 | 36 | [get-team-member]: /v3/orgs/teams/#get-team-member | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -31,7 +31,7 @@ If you have any questions or feedback, please [get in touch with us][contact]! | |||
| 31 | 31 | ||
| 32 | 32 | [contact]: https://github.com/contact?form[subject]=Team+Memberships+API | |
| 33 | 33 | [team-memberships-api]: /changes/2014-08-05-team-memberships-api/ | |
| 34 | - [org-invitations]: https://help.github.com/articles/adding-or-inviting-members-to-a-team-in-an-organization | ||
| 34 | + [org-invitations]: https://help.github.com/articles/adding-organization-members-to-a-team | ||
| 35 | 35 | [list-org-memberships]: /v3/orgs/members/#list-your-organization-memberships | |
| 36 | 36 | [edit-org-membership]: /v3/orgs/members/#edit-your-organization-membership | |
| 37 | 37 | [add-team-membership]: /v3/orgs/teams/#add-team-membership | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ | |||
| 2 | 2 | title: Enterprise | |
| 3 | 3 | --- | |
| 4 | 4 | ||
| 5 | - # Enterprise <%= fetch_content(:latest_enterprise_version) %> | ||
| 5 | + # Enterprise <%= config[:versions][0] %> | ||
| 6 | 6 | ||
| 7 | 7 | {:toc} | |
| 8 | 8 | ||
@@ -37,7 +37,7 @@ Every Enterprise API endpoint is only accessible to GitHub Enterprise site admin | |||
| 37 | 37 | ||
| 38 | 38 | ## Past Releases | |
| 39 | 39 | ||
| 40 | - The latest release for GitHub Enterprise is <%= fetch_content(:latest_enterprise_version) %>. The GitHub APIs available to this release are located at <https://developer.github.com/enterprise/<%= fetch_content(:latest_enterprise_version) %>/>. | ||
| 40 | + The latest release for GitHub Enterprise is <%= config[:versions][0] %>. The GitHub APIs available to this release are located at <https://developer.github.com/enterprise/<%= config[:versions][0] %>/>. | ||
| 41 | 41 | ||
| 42 | 42 | Documentation for the API that's bundled with your GitHub Enterprise appliance is available for past releases: | |
| 43 | 43 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -114,7 +114,7 @@ <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></ | |||
| 114 | 114 | </ul> | |
| 115 | 115 | </li> | |
| 116 | 116 | <li class="js-topic"> | |
| 117 | - <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></a><a href="/v3/enterprise/">Enterprise <%= fetch_content(:latest_enterprise_version) %></a></h3> | ||
| 117 | + <h3><a href="#" class="js-expand-btn collapsed arrow-btn" data-proofer-ignore></a><a href="/v3/enterprise/">Enterprise <%= config[:versions][0] %></a></h3> | ||
| 118 | 118 | <ul class="js-guides"> | |
| 119 | 119 | <li><a href="/v3/enterprise/admin_stats/">Admin Stats</a></li> | |
| 120 | 120 | <li><a href="/v3/enterprise/ldap/">LDAP</a></li> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,17 +2,17 @@ class EnterpriseOnlyFilter < Nanoc::Filter | |||
| 2 | 2 | identifier :enterprise_only_filter | |
| 3 | 3 | type :text | |
| 4 | 4 | ||
| 5 | - ENTERPRISE_START_STRING = '{{#enterprise-only}}' | ||
| 6 | - ENTERPRISE_END_STRING = '{{/enterprise-only}}' | ||
| 5 | + ENTERPRISE_START_STRING = '#enterprise-only' | ||
| 6 | + ENTERPRISE_END_STRING = '/enterprise-only' | ||
| 7 | 7 | ||
| 8 | 8 | # if we're running in Dotcom mode, we'll be lazy and just hide the content. | |
| 9 | 9 | # otherwise, when running script/enterprise-cutter, we'll bring these sections back | |
| 10 | 10 | def run(content, params={}) | |
| 11 | 11 | start_replacement = '<div class="enterprise-only">' | |
| 12 | 12 | end_replacement = '</div>' | |
| 13 | 13 | ||
| 14 | - content = content.gsub(%r{<p>#{ENTERPRISE_START_STRING}</p>}, start_replacement) | ||
| 15 | - content = content.gsub(%r{<p>#{ENTERPRISE_END_STRING}</p>}, end_replacement) | ||
| 14 | + content = content.gsub(%r{<p>\[\[#{ENTERPRISE_START_STRING}\]\]</p>}, start_replacement) | ||
| 15 | + content = content.gsub(%r{<p>\[\[#{ENTERPRISE_END_STRING}\]\]</p>}, end_replacement) | ||
| 16 | 16 | ||
| 17 | 17 | content | |
| 18 | 18 | end | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,17 +2,17 @@ class NotEnterpriseFilter < Nanoc::Filter | |||
| 2 | 2 | identifier :not_enterprise_filter | |
| 3 | 3 | type :text | |
| 4 | 4 | ||
| 5 | - ENTERPRISE_START_STRING = '{{#not-enterprise}}' | ||
| 6 | - ENTERPRISE_END_STRING = '{{/not-enterprise}}' | ||
| 5 | + ENTERPRISE_START_STRING = '#not-enterprise' | ||
| 6 | + ENTERPRISE_END_STRING = '/not-enterprise' | ||
| 7 | 7 | ||
| 8 | 8 | # if we're running in Dotcom mode, we'll be lazy and just hide the content. | |
| 9 | 9 | # otherwise, when running script/enterprise-cutter, we'll bring these sections back | |
| 10 | 10 | def run(content, params={}) | |
| 11 | 11 | start_replacement = '<div class="not-enterprise">' | |
| 12 | 12 | end_replacement = '</div>' | |
| 13 | 13 | ||
| 14 | - content = content.gsub(%r{<p>#{ENTERPRISE_START_STRING}</p>}, start_replacement) | ||
| 15 | - content = content.gsub(%r{<p>#{ENTERPRISE_END_STRING}</p>}, end_replacement) | ||
| 14 | + content = content.gsub(%r{<p>\[\[#{ENTERPRISE_START_STRING}\]\]</p>}, start_replacement) | ||
| 15 | + content = content.gsub(%r{<p>\[\[#{ENTERPRISE_END_STRING}\]\]</p>}, end_replacement) | ||
| 16 | 16 | ||
| 17 | 17 | content | |
| 18 | 18 | end | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,7 +123,6 @@ def webhook_payload(event_name) | |||
| 123 | 123 | end | |
| 124 | 124 | ||
| 125 | 125 | CONTENT ||= { | |
| 126 | - 'LATEST_ENTERPRISE_VERSION' => '2.4', | ||
| 127 | 126 | 'IF_SITE_ADMIN' => "If you are an [authenticated](/v3/#authentication) site administrator for your Enterprise instance,", | |
| 128 | 127 | "PUT_CONTENT_LENGTH" => "Note that you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](/v3/#http-verbs).\"", | |
| 129 | 128 | "OPTIONAL_PUT_CONTENT_LENGTH" => "Note that, if you choose not to pass any parameters, you'll need to set `Content-Length` to zero when calling out to this endpoint. For more information, see \"[HTTP verbs](/v3/#http-verbs).\"", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + def config | ||
| 2 | + @config ||= symbolize_hash(YAML.load_file(File.join(File.dirname(__FILE__), '..', 'nanoc.yaml'))) | ||
| 3 | + end | ||
| 4 | + | ||
| 5 | + def symbolize_hash(hash) | ||
| 6 | + JSON.parse(JSON[hash], symbolize_names: true) | ||
| 7 | + end | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments