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
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@
matrix:
os:
- almalinux-8
- amazonlinux-2
- centos-7
- centos-stream-8
- debian-10
- debian-11
- almalinux-9
- amazonlinux-2023
- centos-stream-9
- debian-12
- fedora-latest
- rockylinux-8
- ubuntu-1804
- ubuntu-2004
- rockylinux-9
- ubuntu-2204
- ubuntu-2404
suite:
- default
exclude:
- os: amazonlinux-2

Check failure on line 38 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "amazonlinux-2" in "exclude" does not match in matrix "os" combinations. possible values are "almalinux-8", "almalinux-9", "amazonlinux-2023", "centos-stream-9", "debian-12", "fedora-latest", "rockylinux-8", "rockylinux-9", "ubuntu-2204", "ubuntu-2404"
suite: pkg-name

Check failure on line 39 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "pkg-name" in "exclude" does not match in matrix "suite" combinations. possible values are "default"
- os: debian-10

Check failure on line 40 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "debian-10" in "exclude" does not match in matrix "os" combinations. possible values are "almalinux-8", "almalinux-9", "amazonlinux-2023", "centos-stream-9", "debian-12", "fedora-latest", "rockylinux-8", "rockylinux-9", "ubuntu-2204", "ubuntu-2404"
suite: pkg-name

Check failure on line 41 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "pkg-name" in "exclude" does not match in matrix "suite" combinations. possible values are "default"
- os: debian-11

Check failure on line 42 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "debian-11" in "exclude" does not match in matrix "os" combinations. possible values are "almalinux-8", "almalinux-9", "amazonlinux-2023", "centos-stream-9", "debian-12", "fedora-latest", "rockylinux-8", "rockylinux-9", "ubuntu-2204", "ubuntu-2404"
suite: pkg-name

Check failure on line 43 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "pkg-name" in "exclude" does not match in matrix "suite" combinations. possible values are "default"
- os: almalinux-8
suite: pkg-name

Check failure on line 45 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "pkg-name" in "exclude" does not match in matrix "suite" combinations. possible values are "default"
- os: centos-stream-8

Check failure on line 46 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "centos-stream-8" in "exclude" does not match in matrix "os" combinations. possible values are "almalinux-8", "almalinux-9", "amazonlinux-2023", "centos-stream-9", "debian-12", "fedora-latest", "rockylinux-8", "rockylinux-9", "ubuntu-2204", "ubuntu-2404"
suite: pkg-name

Check failure on line 47 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "pkg-name" in "exclude" does not match in matrix "suite" combinations. possible values are "default"
- os: rockylinux-8
suite: pkg-name

Check failure on line 49 in .github/workflows/ci.yml

View workflow job for this annotation

GitHub Actions / lint-unit / runner / actionlint

value "pkg-name" in "exclude" does not match in matrix "suite" combinations. possible values are "default"
- os: fedora-latest
suite: pkg-name
- os: fedora-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
- name: Install Chef
uses: actionshub/chef-install@main
- name: Install cookbooks
run: berks install
run: chef install Policyfile.rb
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
AllCops:
Exclude:
- 'Dangerfile'
- 'vendor/bundle/**/*'
7 changes: 0 additions & 7 deletions Berksfile

This file was deleted.

14 changes: 14 additions & 0 deletions Policyfile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# frozen_string_literal: true

name 'nano'

run_list 'test::default'

cookbook 'nano', path: '.'
cookbook 'test', path: './test/fixtures/cookbooks/test'

Dir.children('./test/fixtures/cookbooks/test/recipes').grep(/\.rb\z/).sort.each do |recipe|
recipe_name = File.basename(recipe, '.rb')

named_run_list recipe_name.to_sym, "test::#{recipe_name}"
end
7 changes: 2 additions & 5 deletions chefignore
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ test/*
*/.hg/*
*/.svn/*

# Berkshelf #
#############
Berksfile
Berksfile.lock
# Dependency cache #
####################
cookbooks/*
tmp

Expand All @@ -98,7 +96,6 @@ Gemfile.lock

# Policyfile #
##############
Policyfile.rb
Policyfile.lock.json

# Documentation #
Expand Down
20 changes: 10 additions & 10 deletions documentation/nano_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ Introduced: v2.0.0

## Properties

| Name | Type | Default | Description | Allowed Values
| --------------------- | ----------- | ------------------- | --------------------------------------------------------- | --------------- |
| `syntax_name` | String | | Name Property, Name of the config file to create |
| `filename_regex` | String | `/etc/default` | Regex of file names to match | Valid directory
| `colour` | Hash | `{}` | Colour groups for mating regex |
| `options` | Hash | `{}` | Additional options |
| `config_directory` | String | `/etc/nanorc.d` | The directory where the nano configuration files reside | Valid directory
| `config_file` | String | `/etc/nanorc` | The nano configuration file | Valid file path
| `cookbook` | String | `nano` | Which cookbook to look in for the template |
| `source` | String | `nanorc_conf.erb` | Name of the template |
| Name | Type | Default | Description | Allowed Values
| ------------------ | ------ | ----------------- | ------------------------------------------------------- | ----------------
| `syntax_name` | String | - | Name Property, Name of the config file to create | -
| `filename_regex` | String | `/etc/default` | Regex of file names to match | Valid directory
| `colour` | Hash | `{}` | Colour groups for mating regex | -
| `options` | Hash | `{}` | Additional options | -
| `config_directory` | String | `/etc/nanorc.d` | The directory where the nano configuration files reside | Valid directory
| `config_file` | String | `/etc/nanorc` | The nano configuration file | Valid file path
| `cookbook` | String | `nano` | Which cookbook to look in for the template | -
| `source` | String | `nanorc_conf.erb` | Name of the template | -

## Examples

Expand Down
6 changes: 3 additions & 3 deletions documentation/nano_install.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Installs nano from the repositories

## Properties

| Name | Type | Default | Description | Allowed Values
| --------------------- | ----------- | ------------- | ----------------------------------- | --------------- |
| `package_name` | String | | Name property, always set to `nano` |
| Name | Type | Default | Description | Allowed Values
| -------------- | ------ | ------- | ----------------------------------- | --------------
| `package_name` | String | - | Name property, always set to `nano` | -

## Examples

Expand Down
59 changes: 2 additions & 57 deletions kitchen.dokken.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,36 +22,11 @@ platforms:
image: dokken/amazonlinux-2023
pid_one_command: /usr/lib/systemd/systemd

- name: centos-7
driver:
image: dokken/centos-7
pid_one_command: /usr/lib/systemd/systemd

- name: centos-stream-8
driver:
image: dokken/centos-stream-8
pid_one_command: /usr/lib/systemd/systemd

- name: centos-stream-9
driver:
image: dokken/centos-stream-9
pid_one_command: /usr/lib/systemd/systemd

- name: debian-9
driver:
image: dokken/debian-9
pid_one_command: /bin/systemd

- name: debian-10
driver:
image: dokken/debian-10
pid_one_command: /bin/systemd

- name: debian-11
driver:
image: dokken/debian-11
pid_one_command: /bin/systemd

- name: debian-12
driver:
image: dokken/debian-12
Expand All @@ -62,26 +37,6 @@ platforms:
image: dokken/fedora-latest
pid_one_command: /usr/lib/systemd/systemd

- name: opensuse-leap-15
driver:
image: dokken/opensuse-leap-15
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-7
driver:
image: dokken/oraclelinux-7
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-8
driver:
image: dokken/oraclelinux-8
pid_one_command: /usr/lib/systemd/systemd

- name: oraclelinux-9
driver:
image: dokken/oraclelinux-9
pid_one_command: /usr/lib/systemd/systemd

- name: rockylinux-8
driver:
image: dokken/rockylinux-8
Expand All @@ -92,22 +47,12 @@ platforms:
image: dokken/rockylinux-9
pid_one_command: /usr/lib/systemd/systemd

- name: ubuntu-18.04
driver:
image: dokken/ubuntu-18.04
pid_one_command: /bin/systemd

- name: ubuntu-20.04
driver:
image: dokken/ubuntu-20.04
pid_one_command: /bin/systemd

- name: ubuntu-22.04
driver:
image: dokken/ubuntu-22.04
pid_one_command: /bin/systemd

- name: ubuntu-23.04
- name: ubuntu-24.04
driver:
image: dokken/ubuntu-23.04
image: dokken/ubuntu-24.04
pid_one_command: /bin/systemd
14 changes: 8 additions & 6 deletions kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ verifier:

platforms:
- name: almalinux-8
- name: debian-10
- name: debian-11
- name: centos-7
- name: centos-stream-8
- name: almalinux-9
- name: amazonlinux-2023
- name: centos-stream-9
- name: debian-12
- name: fedora-latest
- name: ubuntu-18.04
- name: ubuntu-20.04
- name: rockylinux-8
- name: rockylinux-9
- name: ubuntu-22.04
- name: ubuntu-24.04

suites:
- name: default
named_run_list: default
run_list:
- recipe[test::default]
14 changes: 11 additions & 3 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
issues_url 'https://github.com/sous-chefs/nano/issues'
chef_version '>= 15.3'

%w(debian ubuntu arch redhat centos fedora scientific oracle amazon suse opensuseleap).each do |os|
supports os
end
supports 'amazon'
supports 'arch'
supports 'centos'
supports 'debian'
supports 'fedora'
supports 'opensuseleap'
supports 'oracle'
supports 'redhat'
supports 'scientific'
supports 'suse'
supports 'ubuntu'
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'chefspec'
require 'chefspec/berkshelf'
require 'chefspec/policyfile'

RSpec.configure do |config|
config.platform = 'ubuntu'
Expand Down