Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Build site on PR

on:
pull_request: {}
push:
branches:
- master

permissions:
contents: read

jobs:
rake_checks:
name: Rake Checks
runs-on: ubuntu-24.04
steps:
# needs fetch-depth because the packaging dem reads old git tags
- name: Checkout current PR
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Ruby version 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Display Ruby environment
run: bundle env
- name: Validate code
run: bundle exec rake generate
env:
DEBUG_PUPPET_DOCS_RAKEFILE: 1
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def jekyll(command = 'build', source = SOURCE_DIR, destination = OUTPUT_DIR, *ar
puts about_verbose_mode

if ENV['DEBUG_PUPPET_DOCS_RAKEFILE']
verbose_mode = '--verbose | tee puppet-docs-build.log'
verbose_mode = '--verbose --trace | tee puppet-docs-build.log'
end

amended_config = "#{SOURCE_DIR}/_config_amended.yml"
Expand Down
10 changes: 7 additions & 3 deletions config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ module Rack
return entity_not_found(path_info)
end

def list_path
def list_path(env = @env, path = @path, path_info = @path_info, script_name = @script_name)
@env = env
@path = path
@path_info = path_info
@script_name = script_name
@stat = ::File.stat(@path)

if @stat.readable?
Expand All @@ -41,15 +45,15 @@ module Rack
@env['PATH_INFO'] = @env['PATH_INFO'].sub(/\/?$/, '/index.html')
return @app.call(@env)
else
return list_directory
return list_directory(@path_info, @path, @script_name)
end
end
else
raise Errno::ENOENT, 'No such file or directory'
end

rescue Errno::ENOENT, Errno::ELOOP
return entity_not_found
return entity_not_found(@path_info)
end

end
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet_references.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def self.build_puppet_references(commit)
PuppetReferences::Puppet::Functions
]
config = PuppetReferences::Config.read
repo = PuppetReferences::Repo.new('puppet', PUPPET_DIR, nil, config['puppet']['repo'])
repo = PuppetReferences::Repo.new('openvox', PUPPET_DIR, nil, config['puppet']['repo'])
real_commit = repo.checkout(commit)
repo.update_bundle
build_from_list_of_classes(references, real_commit)
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet_references/puppet/functions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def build_variant(filename, preferred_version = 'ruby4x')
# BTW, I learned this trick from the Facter reference that the agent team made for us back in the day.
template_binding = OpenStruct.new({ functions: functions }).instance_eval {binding}

body = ERB.new(File.read(TEMPLATE_FILE), nil, '-').result(template_binding)
body = ERB.new(File.read(TEMPLATE_FILE), trim_mode: '-').result(template_binding)
# This substitution could potentially make things a bit brittle, but it has to be done because the jump
# From H2s to H4s is causing issues with the DITA-OT, which sees this as a rule violation. If it
# Does become an issue, we should return to this and figure out a better way to generate the functions doc.
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet_references/puppet/type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module Puppet
class Type < PuppetReferences::Reference
TYPEDOCS_SCRIPT = PuppetReferences::BASE_DIR + 'lib/puppet_references/quarantine/get_typedocs.rb'
TEMPLATE_FILE = Pathname.new(File.expand_path(__FILE__)).dirname + 'type_template.erb'
TEMPLATE = ERB.new(TEMPLATE_FILE.read, nil, '-')
TEMPLATE = ERB.new(TEMPLATE_FILE.read, trim_mode: '-')
PREAMBLE_FILE = Pathname.new(File.expand_path(__FILE__)).dirname + 'type_preamble.md'
PREAMBLE = PREAMBLE_FILE.read

Expand Down
4 changes: 2 additions & 2 deletions lib/puppet_references/repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(name, directory, sources = nil, config = nil)
if sources
@sources = [sources].flatten
else
@sources = ["git@github.com:puppetlabs/#{@name}.git"]
@sources = ["git@github.com:openvoxproject/#{@name}.git"]
end
@main_source = @sources[0]
unless Dir.exist?(@directory + '.git') || @config['skip_download']
Expand Down Expand Up @@ -52,4 +52,4 @@ def update_bundle
end

end
end
end
12 changes: 6 additions & 6 deletions source/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defaultnav:
# subdirectory: documentation # A subdirectory within the remote repository that contains the documentation files that we'll build and mount at the specified url.
externalsources:
/mcollective:
repo: git@github.com:choria-legacy/marionette-collective.git
repo: https://github.com/choria-legacy/marionette-collective.git
commit: origin/2.12.x
subdirectory: website

Expand Down Expand Up @@ -92,7 +92,7 @@ documents:
version: "latest"
nav: ./_puppetdb_nav.html
external_source:
repo: git://github.com/puppetlabs/puppetdb.git
repo: https://github.com/puppetlabs/puppetdb.git
commit: doc-latest
subdirectory: documentation
hide: true
Expand All @@ -101,7 +101,7 @@ documents:
version: "7"
nav: ./_puppetdb_nav.html
external_source:
repo: git://github.com/puppetlabs/puppetdb.git
repo: https://github.com/puppetlabs/puppetdb.git
commit: doc-7.y
subdirectory: documentation
hide: true
Expand All @@ -110,7 +110,7 @@ documents:
version: "6"
nav: ./_puppetdb_nav.html
external_source:
repo: git://github.com/puppetlabs/puppetdb.git
repo: https://github.com/puppetlabs/puppetdb.git
commit: doc-6.y
subdirectory: documentation
hide: true
Expand All @@ -119,7 +119,7 @@ documents:
version: "5.2"
nav: ./_puppetdb_nav.html
external_source:
repo: git://github.com/puppetlabs/puppetdb.git
repo: https://github.com/puppetlabs/puppetdb.git
commit: doc-5.2
subdirectory: documentation
hide: true
Expand All @@ -129,7 +129,7 @@ documents:
doc: puppet
version: "latest"
nav: ./_puppet_toc.html

# Puppet 6.y
/puppet/6.y:
doc: puppet
Expand Down
2 changes: 1 addition & 1 deletion source/_plugins/change_baseurl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def render(context)

(@url, @old_baseurl, @new_baseurl) = @args.map{|arg|
if arg =~ @var_regex
Liquid::Variable.new(arg).render(context)
context[arg]
else
arg.sub(/\A['"]/, '').sub(/['"]\Z/, '')
end
Expand Down
11 changes: 0 additions & 11 deletions source/facter/index.md

This file was deleted.