Skip to content

Commit

Permalink
Merge pull request #328 from bastelfreak/rel323
Browse files Browse the repository at this point in the history
Release 3.3.0
  • Loading branch information
bastelfreak authored May 20, 2022
2 parents 4ddf6b2 + 9cfc6b1 commit 5ece2fe
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 17 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Release

on:
create:
ref_type: tag
push:
tags:
- '*'

jobs:
release:
runs-on: ubuntu-latest
if: github.repository == 'voxpupuli/hiera-eyaml'
env:
BUNDLE_WITHOUT: release
if: github.repository_owner == 'voxpupuli'
steps:
- uses: actions/checkout@v2
- name: Install Ruby 2.7
- name: Install Ruby 3.1
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
ruby-version: '3.1'
- name: Build gem
run: gem build *.gemspec
- name: Publish gem
- 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/voxpupuli *.gem
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
- pull_request
- push

env:
BUNDLE_WITHOUT: release

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -36,10 +39,13 @@ jobs:
- ruby: "2.5"
puppet: "https://github.com/puppetlabs/puppet.git#main"
env:
BUNDLE_WITHOUT: release
PUPPET_VERSION: ${{ matrix.puppet }}
COVERAGE: ${{ matrix.coverage }}
name: "Ruby ${{ matrix.ruby }} - Puppet ${{ matrix.puppet }}"
steps:
- name: Enable coverage reporting on Ruby 3.1
if: matrix.puppet == '~> 7.0' && matrix.ruby == '3.1'
run: echo 'COVERAGE=yes' >> $GITHUB_ENV
- uses: actions/checkout@v2
- name: Install expect
run: sudo apt-get install expect
Expand All @@ -48,7 +54,9 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Build gem
- name: spec tests
run: bundle exec rake features
- name: Verify gem builds
run: gem build *.gemspec
- name: Run tests
run: bundle exec cucumber -f progress
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

All notable changes to this project will be documented in this file.

## [v3.3.0](https://github.com/voxpupuli/hiera-eyaml/tree/v3.3.0) (2022-05-20)

[Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v3.2.2...v3.3.0)

**Implemented enhancements:**

- Build gem during CI [\#330](https://github.com/voxpupuli/hiera-eyaml/pull/330) ([bastelfreak](https://github.com/bastelfreak))
- Add more Ruby/Puppet versions to CI matrix [\#326](https://github.com/voxpupuli/hiera-eyaml/pull/326) ([bastelfreak](https://github.com/bastelfreak))

**Fixed bugs:**

- Repair ruby 3.1.x compability with backwards compability. Bumped vers… [\#329](https://github.com/voxpupuli/hiera-eyaml/pull/329) ([mmachner](https://github.com/mmachner))
- Fix an "undefined method" error with rubygems \>= 3.3.0 [\#327](https://github.com/voxpupuli/hiera-eyaml/pull/327) ([davidsansome](https://github.com/davidsansome))

## [v3.2.2](https://github.com/voxpupuli/hiera-eyaml/tree/v3.2.2) (2021-05-03)

[Full Changelog](https://github.com/voxpupuli/hiera-eyaml/compare/v3.2.1...v3.2.2)
Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ end
group :test do
gem "rake"
end

group :coverage, optional: ENV['COVERAGE'] != 'yes' do
gem 'simplecov-console', :require => false
gem 'codecov', :require => false
end
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Hiera eyaml
===========
# Hiera eyaml

[![Build Status](https://travis-ci.org/voxpupuli/hiera-eyaml.png?branch=master)](https://travis-ci.org/voxpupuli/hiera-eyaml)
[![Gem Version](https://img.shields.io/gem/v/hiera-eyaml.svg)](https://rubygems.org/gems/hiera-eyaml)
[![Gem Downloads](https://img.shields.io/gem/dt/hiera-eyaml.svg)](https://rubygems.org/gems/hiera-eyaml)

[![License](https://img.shields.io/github/license/voxpupuli/hiera-eyaml.svg)](https://github.com/voxpupuli/hiera-eyaml/blob/master/LICENSE)
[![Test](https://github.com/voxpupuli/hiera-eyaml/actions/workflows/test.yml/badge.svg)](https://github.com/voxpupuli/hiera-eyaml/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/voxpupuli/hiera-eyaml/branch/master/graph/badge.svg)](https://codecov.io/gh/voxpupuli/hiera-eyaml)
[![Release](https://github.com/voxpupuli/hiera-eyaml/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/hiera-eyaml/actions/workflows/release.yml)
[![RubyGem Version](https://img.shields.io/gem/v/hiera-eyaml.svg)](https://rubygems.org/gems/hiera-eyaml)
[![RubyGem Downloads](https://img.shields.io/gem/dt/hiera-eyaml.svg)](https://rubygems.org/gems/hiera-eyaml)

hiera-eyaml is a backend for Hiera that provides per-value encryption of sensitive data within yaml files
to be used by Puppet.
Expand Down
30 changes: 30 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
begin
require 'simplecov'
require 'simplecov-console'
require 'codecov'
rescue LoadError
else
SimpleCov.start do
track_files 'lib/**/*.rb'

add_filter '/spec'

enable_coverage :branch

# do not track vendored files
add_filter '/vendor'
add_filter '/.vendor'
end

SimpleCov.formatters = [
SimpleCov::Formatter::Console,
SimpleCov::Formatter::Codecov,
]
end
require "bundler/gem_tasks"

# https://cucumber.io/docs/tools/ruby/
# https://stackoverflow.com/questions/6473419/using-simplecov-to-display-cucumber-code-coverage
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format progress" # Any valid command line option can go here.
end

begin
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog do |config|
Expand Down
5 changes: 4 additions & 1 deletion hiera-eyaml.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Gem::Specification.new do |gem|
gem.version = Hiera::Backend::Eyaml::VERSION
gem.description = "Hiera backend for decrypting encrypted yaml properties"
gem.summary = "OpenSSL Encryption backend for Hiera"
gem.author = "Tom Poulton"
gem.author = "Vox Pupuli"
gem.email = "[email protected]"
gem.license = "MIT"

gem.homepage = "https://github.com/voxpupuli/hiera-eyaml/"
Expand All @@ -19,4 +20,6 @@ Gem::Specification.new do |gem|

gem.add_dependency('optimist')
gem.add_dependency('highline')

gem.required_ruby_version = '>= 2.5.0', ' < 4'
end
2 changes: 1 addition & 1 deletion lib/hiera/backend/eyaml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ class Hiera
module Backend
module Eyaml

VERSION = "3.2.2"
VERSION = "3.3.0"
DESCRIPTION = "Hiera-eyaml is a backend for Hiera which provides OpenSSL encryption/decryption for Hiera properties"

class RecoverableError < StandardError
Expand Down

0 comments on commit 5ece2fe

Please sign in to comment.