Skip to content
Snippets Groups Projects
Commit d2df6900 authored by Georg Faerber's avatar Georg Faerber
Browse files

New upstream version 3.2.1

parent e60baaad
Branches
Tags upstream/3.2.1
No related merge requests found
name: Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
if: github.repository_owner == 'voxpupuli'
steps:
- uses: actions/checkout@v2
- name: Install Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
env:
BUNDLE_WITHOUT: release
- name: Build gem
run: gem build *.gemspec
- name: Publish gem to rubygems.org
run: gem push *.gem
env:
GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
- name: Setup GitHub packages access
run: |
mkdir -p ~/.gem
echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
chmod 0600 ~/.gem/credentials
- name: Publish gem to GitHub packages
run: gem push --key github --host https://rubygems.pkg.github.com/${{ github.repository_owner }} *.gem
name: Test
on:
pull_request: {}
push:
branches: master
env:
BUNDLE_WITHOUT: development:release
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby:
- "3.1"
- "3.0"
- "2.7"
- "2.6"
- "2.5"
- "2.4"
puppet:
- "~> 7.0"
- "~> 6.5"
- "~> 5.5.10"
- "https://github.com/puppetlabs/puppet.git#main"
exclude:
- ruby: "2.6"
puppet: "~> 7.0"
- ruby: "2.5"
puppet: "~> 7.0"
- ruby: "2.4"
puppet: "~> 7.0"
- ruby: "3.1"
puppet: "~> 6.5"
- ruby: "3.0"
puppet: "~> 6.5"
- ruby: "3.1"
puppet: "~> 5.5.10"
- ruby: "3.0"
puppet: "~> 5.5.10"
- ruby: "2.7"
puppet: "~> 5.5.10"
- ruby: "2.6"
puppet: "~> 5.5.10"
- ruby: "2.6"
puppet: "https://github.com/puppetlabs/puppet.git#main"
- ruby: "2.5"
puppet: "https://github.com/puppetlabs/puppet.git#main"
- ruby: "2.4"
puppet: "https://github.com/puppetlabs/puppet.git#main"
name: "Ruby ${{ matrix.ruby }} - Puppet ${{ matrix.puppet }}"
env:
PUPPET_VERSION: ${{ matrix.puppet }}
steps:
- uses: actions/checkout@v3
- name: Install Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
---
os: linux
dist: bionic
language: ruby
# Workaround https://github.com/bundler/bundler/issues/3558
before_install: gem install bundler
install: bundle install --jobs 4 --retry 2 --without development release
script: bundle exec rake
rvm:
- 2.4.4
- 2.5.1
- 2.6.5
- 2.7
env:
- PUPPET_VERSION="~> 5.5.10"
- PUPPET_VERSION="~> 6.5"
- PUPPET_VERSION=">= 0"
- PUPPET_VERSION="git://github.com/puppetlabs/puppet.git#master"
jobs:
exclude:
- rvm: 2.7
env: PUPPET_VERSION="~> 5.5.10"
allow_failures:
- env: PUPPET_VERSION=">= 0"
- env: PUPPET_VERSION="git://github.com/puppetlabs/puppet.git#master"
deploy:
provider: rubygems
api_key:
secure: "kwxryZZ/t9EkWuYxhz3G1v+U3ZK4WdsiN0UFHDjijnAGPxqe/n+oBcNA8hOiNhjZeTFo8bADEZkL7JtdKQo9RvgStipyaS5gDHB/C1c4LOBWv4Tga21NNCAuBcE2CDtAH3+TzrZV5vv2+SpOrhKZpzZoAoR6PR1MWVWMUie/rE0="
gem: puppet-syntax
on:
rvm: 2.5.1
condition: '"$PUPPET_VERSION" = "~> 5.5.10"'
tags: true
all_branches: true
repo: voxpupuli/puppet-syntax
notifications:
email: false
irc:
on_success: always
on_failure: always
channels:
- "chat.freenode.org#voxpupuli-notifications"
......@@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file.
## [v3.2.0](https://github.com/voxpupuli/puppet-syntax/tree/v3.2.0) (2022-05-16)
[Full Changelog](https://github.com/voxpupuli/puppet-syntax/compare/v3.1.0...v3.2.0)
**Implemented enhancements:**
- Remove AppVeyor testing [\#94](https://github.com/voxpupuli/puppet-syntax/issues/94)
- Convert from Travis CI to GitHub Actions [\#130](https://github.com/voxpupuli/puppet-syntax/pull/130) ([ekohl](https://github.com/ekohl))
**Fixed bugs:**
- Add missing `$` in github action [\#132](https://github.com/voxpupuli/puppet-syntax/pull/132) ([bastelfreak](https://github.com/bastelfreak))
## [v3.1.0](https://github.com/voxpupuli/puppet-syntax/tree/v3.1.0) (2020-06-24)
[Full Changelog](https://github.com/voxpupuli/puppet-syntax/compare/v3.0.1...v3.1.0)
......
......@@ -5,7 +5,7 @@ source 'https://rubygems.org'
# `git://somewhere.git#branch`. You can also use a file source location, which
# is specified as `file://some/location/on/disk`.
def location_for(place_or_version, fake_version = nil)
if place_or_version =~ /^(git[:@][^#]*)#(.*)/
if place_or_version =~ /^(https[:@][^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
elsif place_or_version =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
......@@ -19,12 +19,12 @@ gemspec
# Override gemspec for CI matrix builds.
# But only if the environment variable is set
gem 'puppet', *location_for(ENV['PUPPET_VERSION'] || '>= 5') if ENV['PUPPET_VERSION']
gem 'puppet', *location_for(ENV['PUPPET_VERSION']) if ENV['PUPPET_VERSION']
group :test do
gem 'rspec'
end
group :release do
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
gem 'github_changelog_generator', require: false
end
[![Build Status](https://travis-ci.org/voxpupuli/puppet-syntax.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-syntax)
[![Gem Version](https://img.shields.io/gem/v/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
[![Gem Downloads](https://img.shields.io/gem/dt/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
# puppet-syntax
[![License](https://img.shields.io/github/license/voxpupuli/puppet-syntax.svg)](https://github.com/voxpupuli/puppet-syntax/blob/master/LICENSE.txt)
[![Release](https://github.com/voxpupuli/puppet-syntax/actions/workflows/syntax.yml/badge.svg)](https://github.com/voxpupuli/puppet-syntax/actions/workflows/syntax.yml)
[![RubyGem Version](https://img.shields.io/gem/v/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
[![RubyGem Downloads](https://img.shields.io/gem/dt/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
# Puppet::Syntax
......@@ -14,7 +17,7 @@ Puppet::Syntax is supported with:
- Puppet >= 5.0 that provides the `validate` face.
- Ruby >= 2.4
For the specific versions that we test against, see the [TravisCI config](.travis.yml).
For the specific versions that we test against, see the [GitHub Actions workflow](.github/workflows/test.yml).
## Installation
......@@ -159,3 +162,12 @@ parser enabled.
3. Commit your changes (`git commit -am 'Add some feature'`).
4. Push to the branch (`git push origin my-new-feature`).
5. Create new Pull Request.
## Making a new Release
* Update version in `lib/puppet-syntax/version.rb`
* Run the changelog rake task (bundle exec rake changelog)
* Create a PR
* Get it reviewed and merged
* update the local repo, create a signed git tag, prefixed with a v, matching the new version (git tag -s v1.2.3)
* GitHub action will publish to GitHub Packages and Rubygems
......@@ -7,6 +7,7 @@ module PuppetSyntax
def filelist(paths)
excludes = PuppetSyntax.exclude_paths
excludes.push('pkg/**/*')
excludes.push('vendor/**/*')
files = FileList[paths]
files.reject! { |f| File.directory?(f) }
files.exclude(*excludes)
......
......@@ -69,7 +69,12 @@ module PuppetSyntax
result = { warnings: [], errors: [] }
begin
erb = ERB.new(File.read(filename), nil, '-')
template = File.read(filename)
erb = if RUBY_VERSION >= '2.6'
ERB.new(template, trim_mode: '-')
else
ERB.new(template, nil, '-')
end
erb.filename = filename
erb.result
rescue NameError => error
......
module PuppetSyntax
VERSION = '3.1.0'
VERSION = '3.2.1'
end
......@@ -25,5 +25,4 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry"
spec.add_development_dependency "rb-readline"
spec.add_development_dependency "gem_publisher", "~> 1.3"
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment