puppet-syntax 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d56b393f1a0a60742b7c0600dd39568eb232cee2bae2400b169fee499cb12a6
4
- data.tar.gz: 3b641f2e4ad9f5ab9fa8f91853bfc557b6573e871caeae2228b17f2446d96270
3
+ metadata.gz: a2d390b306423921b0dd89e24373f6e59ae0235777324e478194d4edf2fa3026
4
+ data.tar.gz: 205c580df12c234a6ecb48f29fdee3a0ba2f933f0ddb5384489fcbe8d53ae923
5
5
  SHA512:
6
- metadata.gz: e4cf5aff0b7abe2e3dc4f07f6a3fec2704c637c063f076e08d9c4812f8fdb8b68fc4d65277982d12008914dca799cf45e8bf6ec5120827b3485abc569755b6c3
7
- data.tar.gz: 63e40dd6206c72b2dfddbc85dd0efff6c4fffcd748277e15cacf1aaa54c79a1d62b67da751842ee190856b01e333c391197e22393372d54851306b67639b12bf
6
+ metadata.gz: bbd443ce59ee2fc0e943f75378c05972521c29bf95bdc53378478a423b63f036ab0fff7ab34c7385555eb65fa79e289d66a64bc0ba735ec3049f91b063663b99
7
+ data.tar.gz: 1448871b536af6ecbec32f25fc16867a6c637c4cab80138773d188857db0b7f456116e6a7db981b95c8504dfe53a30f4f39253cfcb8213e2db9657c14f6ead45
@@ -0,0 +1,32 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - '*'
7
+
8
+ jobs:
9
+ release:
10
+ runs-on: ubuntu-latest
11
+ if: github.repository_owner == 'voxpupuli'
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - name: Install Ruby 3.1
15
+ uses: ruby/setup-ruby@v1
16
+ with:
17
+ ruby-version: '3.1'
18
+ env:
19
+ BUNDLE_WITHOUT: release
20
+ - name: Build gem
21
+ run: gem build *.gemspec
22
+ - name: Publish gem to rubygems.org
23
+ run: gem push *.gem
24
+ env:
25
+ GEM_HOST_API_KEY: '${{ secrets.RUBYGEMS_AUTH_TOKEN }}'
26
+ - name: Setup GitHub packages access
27
+ run: |
28
+ mkdir -p ~/.gem
29
+ echo ":github: Bearer ${{ secrets.GITHUB_TOKEN }}" >> ~/.gem/credentials
30
+ chmod 0600 ~/.gem/credentials
31
+ - name: Publish gem to GitHub packages
32
+ run: gem push --key github --host https://rubygems.pkg.github.com/{{ github.repository_owner }} *.gem
@@ -0,0 +1,68 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request: {}
5
+ push:
6
+ branches: master
7
+
8
+ env:
9
+ BUNDLE_WITHOUT: development:release
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ ruby:
18
+ - "3.1"
19
+ - "3.0"
20
+ - "2.7"
21
+ - "2.6"
22
+ - "2.5"
23
+ - "2.4"
24
+ puppet:
25
+ - "~> 7.0"
26
+ - "~> 6.5"
27
+ - "~> 5.5.10"
28
+ - "https://github.com/puppetlabs/puppet.git#main"
29
+ exclude:
30
+ - ruby: "2.6"
31
+ puppet: "~> 7.0"
32
+ - ruby: "2.5"
33
+ puppet: "~> 7.0"
34
+ - ruby: "2.4"
35
+ puppet: "~> 7.0"
36
+
37
+ - ruby: "3.1"
38
+ puppet: "~> 6.5"
39
+ - ruby: "3.0"
40
+ puppet: "~> 6.5"
41
+
42
+ - ruby: "3.1"
43
+ puppet: "~> 5.5.10"
44
+ - ruby: "3.0"
45
+ puppet: "~> 5.5.10"
46
+ - ruby: "2.7"
47
+ puppet: "~> 5.5.10"
48
+ - ruby: "2.6"
49
+ puppet: "~> 5.5.10"
50
+
51
+ - ruby: "2.6"
52
+ puppet: "https://github.com/puppetlabs/puppet.git#main"
53
+ - ruby: "2.5"
54
+ puppet: "https://github.com/puppetlabs/puppet.git#main"
55
+ - ruby: "2.4"
56
+ puppet: "https://github.com/puppetlabs/puppet.git#main"
57
+ name: "Ruby ${{ matrix.ruby }} - Puppet ${{ matrix.puppet }}"
58
+ env:
59
+ PUPPET_VERSION: ${{ matrix.puppet }}
60
+ steps:
61
+ - uses: actions/checkout@v3
62
+ - name: Install Ruby ${{ matrix.ruby }}
63
+ uses: ruby/setup-ruby@v1
64
+ with:
65
+ ruby-version: ${{ matrix.ruby }}
66
+ bundler-cache: true
67
+ - name: Run tests
68
+ run: bundle exec rake
data/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [v3.2.0](https://github.com/voxpupuli/puppet-syntax/tree/v3.2.0) (2022-05-16)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/puppet-syntax/compare/v3.1.0...v3.2.0)
8
+
9
+ **Implemented enhancements:**
10
+
11
+ - Remove AppVeyor testing [\#94](https://github.com/voxpupuli/puppet-syntax/issues/94)
12
+ - Convert from Travis CI to GitHub Actions [\#130](https://github.com/voxpupuli/puppet-syntax/pull/130) ([ekohl](https://github.com/ekohl))
13
+
5
14
  ## [v3.1.0](https://github.com/voxpupuli/puppet-syntax/tree/v3.1.0) (2020-06-24)
6
15
 
7
16
  [Full Changelog](https://github.com/voxpupuli/puppet-syntax/compare/v3.0.1...v3.1.0)
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
5
5
  # `git://somewhere.git#branch`. You can also use a file source location, which
6
6
  # is specified as `file://some/location/on/disk`.
7
7
  def location_for(place_or_version, fake_version = nil)
8
- if place_or_version =~ /^(git[:@][^#]*)#(.*)/
8
+ if place_or_version =~ /^(https[:@][^#]*)#(.*)/
9
9
  [fake_version, { :git => $1, :branch => $2, :require => false }].compact
10
10
  elsif place_or_version =~ /^file:\/\/(.*)/
11
11
  ['>= 0', { :path => File.expand_path($1), :require => false }]
@@ -19,12 +19,12 @@ gemspec
19
19
 
20
20
  # Override gemspec for CI matrix builds.
21
21
  # But only if the environment variable is set
22
- gem 'puppet', *location_for(ENV['PUPPET_VERSION'] || '>= 5') if ENV['PUPPET_VERSION']
22
+ gem 'puppet', *location_for(ENV['PUPPET_VERSION']) if ENV['PUPPET_VERSION']
23
23
 
24
24
  group :test do
25
25
  gem 'rspec'
26
26
  end
27
27
 
28
28
  group :release do
29
- gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator'
29
+ gem 'github_changelog_generator', require: false
30
30
  end
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
- [![Build Status](https://travis-ci.org/voxpupuli/puppet-syntax.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-syntax)
2
- [![Gem Version](https://img.shields.io/gem/v/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
3
- [![Gem Downloads](https://img.shields.io/gem/dt/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
1
+ # puppet-syntax
2
+
3
+ [![License](https://img.shields.io/github/license/voxpupuli/puppet-syntax.svg)](https://github.com/voxpupuli/puppet-syntax/blob/master/LICENSE.txt)
4
+ [![Release](https://github.com/voxpupuli/puppet-syntax/actions/workflows/syntax.yml/badge.svg)](https://github.com/voxpupuli/puppet-syntax/actions/workflows/syntax.yml)
5
+ [![RubyGem Version](https://img.shields.io/gem/v/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
6
+ [![RubyGem Downloads](https://img.shields.io/gem/dt/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax)
4
7
 
5
8
  # Puppet::Syntax
6
9
 
@@ -14,7 +17,7 @@ Puppet::Syntax is supported with:
14
17
  - Puppet >= 5.0 that provides the `validate` face.
15
18
  - Ruby >= 2.4
16
19
 
17
- For the specific versions that we test against, see the [TravisCI config](.travis.yml).
20
+ For the specific versions that we test against, see the [GitHub Actions workflow](.github/workflows/test.yml).
18
21
 
19
22
  ## Installation
20
23
 
@@ -159,3 +162,12 @@ parser enabled.
159
162
  3. Commit your changes (`git commit -am 'Add some feature'`).
160
163
  4. Push to the branch (`git push origin my-new-feature`).
161
164
  5. Create new Pull Request.
165
+
166
+ ## Making a new Release
167
+
168
+ * Update version in `lib/puppet-syntax/version.rb`
169
+ * Run the changelog rake task (bundle exec rake changelog)
170
+ * Create a PR
171
+ * Get it reviewed and merged
172
+ * update the local repo, create a signed git tag, prefixed with a v, matching the new version (git tag -s v1.2.3)
173
+ * GitHub action will publish to GitHub Packages and Rubygems
@@ -7,6 +7,7 @@ module PuppetSyntax
7
7
  def filelist(paths)
8
8
  excludes = PuppetSyntax.exclude_paths
9
9
  excludes.push('pkg/**/*')
10
+ excludes.push('vendor/**/*')
10
11
  files = FileList[paths]
11
12
  files.reject! { |f| File.directory?(f) }
12
13
  files.exclude(*excludes)
@@ -69,7 +69,12 @@ module PuppetSyntax
69
69
  result = { warnings: [], errors: [] }
70
70
 
71
71
  begin
72
- erb = ERB.new(File.read(filename), nil, '-')
72
+ template = File.read(filename)
73
+ erb = if RUBY_VERSION >= '2.6'
74
+ ERB.new(template, trim_mode: '-')
75
+ else
76
+ ERB.new(template, nil, '-')
77
+ end
73
78
  erb.filename = filename
74
79
  erb.result
75
80
  rescue NameError => error
@@ -1,3 +1,3 @@
1
1
  module PuppetSyntax
2
- VERSION = '3.1.0'
2
+ VERSION = '3.2.0'
3
3
  end
@@ -25,5 +25,4 @@ Gem::Specification.new do |spec|
25
25
 
26
26
  spec.add_development_dependency "pry"
27
27
  spec.add_development_dependency "rb-readline"
28
- spec.add_development_dependency "gem_publisher", "~> 1.3"
29
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-syntax
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vox Pupuli
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-24 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: gem_publisher
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.3'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.3'
83
69
  description: Syntax checks for Puppet manifests and templates
84
70
  email:
85
71
  - voxpupuli@groups.io
@@ -87,8 +73,9 @@ executables: []
87
73
  extensions: []
88
74
  extra_rdoc_files: []
89
75
  files:
76
+ - ".github/workflows/release.yml"
77
+ - ".github/workflows/test.yml"
90
78
  - ".gitignore"
91
- - ".travis.yml"
92
79
  - CHANGELOG.md
93
80
  - Gemfile
94
81
  - HISTORY.md
@@ -156,7 +143,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
156
143
  - !ruby/object:Gem::Version
157
144
  version: '0'
158
145
  requirements: []
159
- rubygems_version: 3.0.6
146
+ rubygems_version: 3.3.7
160
147
  signing_key:
161
148
  specification_version: 4
162
149
  summary: Syntax checks for Puppet manifests, templates, and Hiera YAML
data/.travis.yml DELETED
@@ -1,43 +0,0 @@
1
- ---
2
- os: linux
3
- dist: bionic
4
- language: ruby
5
- # Workaround https://github.com/bundler/bundler/issues/3558
6
- before_install: gem install bundler
7
- install: bundle install --jobs 4 --retry 2 --without development release
8
- script: bundle exec rake
9
- rvm:
10
- - 2.4.4
11
- - 2.5.1
12
- - 2.6.5
13
- - 2.7
14
- env:
15
- - PUPPET_VERSION="~> 5.5.10"
16
- - PUPPET_VERSION="~> 6.5"
17
- - PUPPET_VERSION=">= 0"
18
- - PUPPET_VERSION="git://github.com/puppetlabs/puppet.git#master"
19
- jobs:
20
- exclude:
21
- - rvm: 2.7
22
- env: PUPPET_VERSION="~> 5.5.10"
23
- allow_failures:
24
- - env: PUPPET_VERSION=">= 0"
25
- - env: PUPPET_VERSION="git://github.com/puppetlabs/puppet.git#master"
26
- deploy:
27
- provider: rubygems
28
- api_key:
29
- secure: "kwxryZZ/t9EkWuYxhz3G1v+U3ZK4WdsiN0UFHDjijnAGPxqe/n+oBcNA8hOiNhjZeTFo8bADEZkL7JtdKQo9RvgStipyaS5gDHB/C1c4LOBWv4Tga21NNCAuBcE2CDtAH3+TzrZV5vv2+SpOrhKZpzZoAoR6PR1MWVWMUie/rE0="
30
- gem: puppet-syntax
31
- on:
32
- rvm: 2.5.1
33
- condition: '"$PUPPET_VERSION" = "~> 5.5.10"'
34
- tags: true
35
- all_branches: true
36
- repo: voxpupuli/puppet-syntax
37
- notifications:
38
- email: false
39
- irc:
40
- on_success: always
41
- on_failure: always
42
- channels:
43
- - "chat.freenode.org#voxpupuli-notifications"