semantic_puppet 1.0.4 → 1.1.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: e37126b8cf6e3af3f6fb7f7e98ab38223bfd3466edd4eb1bbd99b20f5f4e22f6
4
- data.tar.gz: 3f200910bfea3ee0d551670d3e35f943e3a64e82e3bcf5e280aec8ce29e292a3
3
+ metadata.gz: eea2dc5798bc6407fce6be5c6b5eccac1c6ed181c95e8ee3bcf28f35b42d99a9
4
+ data.tar.gz: 7c28901b6e803c210a14164945fb81a2525f66d536dcffc472c7392b00217bd6
5
5
  SHA512:
6
- metadata.gz: 16b7f38f0211f02448d3f5bbcd2a880265a8980471cb40d389beb79f85baac2cff960e3a014ab3cf01b74b2b2047e19f7b7a74f6ecb97dc1d9c5230ffd0b2265
7
- data.tar.gz: b58ccbd2a4cd948cc53201f9f9bc263e2d3d8b4a91f242849292a16867b156e610822c8adf5485b6b97f265a631963c802dec7e68f2483bd0566781b77848f30
6
+ metadata.gz: 93345ca72b239f08ce44b76fa2019831681f5e23c83bb5287191d2e754fc8dd451a76559803200970b778be8b03a91e5ca73c6114d651392036372e3c7c65a1a
7
+ data.tar.gz: 1b0c0670a773a76bc13c1cae7ab782f8b71ac984d480e8e22c45588d1eb40f507e8d91d898d80ddd7e78d4422f5a671b4c2555a7b4f93543eed6e2f8340a271c
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: Mend Monitor
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ jobs:
8
+ mend_monitor:
9
+ if: ${{ github.repository_owner == 'puppetlabs' }}
10
+ runs-on: ubuntu-latest
11
+ name: Mend Monitor
12
+ steps:
13
+ - name: Checkout current PR
14
+ uses: actions/checkout@v3
15
+ - name: Setup Ruby
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: 2.7
19
+ - name: Create lock
20
+ run: bundle lock
21
+ - uses: actions/setup-java@v3
22
+ with:
23
+ distribution: 'temurin'
24
+ java-version: '17'
25
+ - name: Download Mend
26
+ run: curl -o wss-unified-agent.jar https://unified-agent.s3.amazonaws.com/wss-unified-agent.jar
27
+ - name: Run Mend
28
+ run: java -jar wss-unified-agent.jar
29
+ env:
30
+ WS_APIKEY: ${{ secrets.MEND_API_KEY }}
31
+ WS_WSS_URL: https://saas-eu.whitesourcesoftware.com/agent
32
+ WS_USERKEY: ${{ secrets.MEND_TOKEN }}
33
+ WS_PRODUCTNAME: Puppet Agent
34
+ WS_PROJECTNAME: ${{ github.event.repository.name }}
35
+
@@ -0,0 +1,40 @@
1
+ ---
2
+ name: RSpec test
3
+
4
+ on:
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ rspec_tests:
12
+ name: ${{ matrix.cfg.os }}(ruby ${{ matrix.cfg.ruby }})
13
+ strategy:
14
+ matrix:
15
+ cfg:
16
+ - {os: ubuntu-20.04, ruby: '2.7'}
17
+ - {os: ubuntu-20.04, ruby: '3.0'}
18
+ - {os: ubuntu-20.04, ruby: '3.2'}
19
+ - {os: ubuntu-20.04, ruby: 'jruby-9.4.2'}
20
+ - {os: windows-2019, ruby: '2.7'}
21
+ - {os: windows-2019, ruby: '3.0'}
22
+ - {os: windows-2019, ruby: '3.2'}
23
+
24
+ runs-on: ${{ matrix.cfg.os }}
25
+ steps:
26
+ - name: Checkout current PR
27
+ uses: actions/checkout@v3
28
+
29
+ - name: Install ruby version ${{ matrix.cfg.ruby }}
30
+ uses: ruby/setup-ruby@v1
31
+ with:
32
+ ruby-version: ${{ matrix.cfg.ruby }}
33
+
34
+ - name: Update rubygems and install gems
35
+ run: |
36
+ gem update --system --silent --no-document
37
+ bundle config set without packaging
38
+ bundle install --jobs 4 --retry 3
39
+
40
+ - run: bundle exec rake spec
data/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  This project adheres to [Semantic Versioning](http://semver.org/).
4
4
 
5
+ ## 1.1.0 - 2023-04-10
6
+ - Fix unsatisfiable if resolve() fails ([ekohl](https://github.com/ekohl))
7
+ - Move from travis/appveyor to GitHub actions ([AriaXLi](https://github.com/AriaXLi))
8
+ - Add Ruby 3.2 testing ([mhashizume](https://github.com/mhashizume))
9
+
5
10
  ## 1.0.4 - 2021-06-08
6
11
  - Remove dependency on SortedSet
7
12
  - Add Ruby 3.0 to Travis and AppVeyor
data/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @puppetlabs/forge-team @puppetlabs/platform-core
1
+ * @puppetlabs/phoenix
data/README.md CHANGED
@@ -19,8 +19,7 @@ This library is used by a number of Puppet Labs projects, including
19
19
  Requirements
20
20
  ------------
21
21
 
22
- Semantic_puppet will work on several ruby versions, including 1.9.3,
23
- 2.0.0, 2.1.9 and 2.4.1. Please see the exact matrix in `.travis.yml`.
22
+ semantic_puppet will work on Ruby version 2.7 and greater.
24
23
 
25
24
  No gem/library requirements.
26
25
 
@@ -73,7 +73,7 @@ module SemanticPuppet
73
73
  # @param graph [Graph] the root of a dependency graph
74
74
  # @return [Array<ModuleRelease>] the list of releases to act on
75
75
  def resolve(graph)
76
- @module_dependencies, @satisfieds = nil
76
+ @module_dependencies = @satisfieds = nil
77
77
 
78
78
  catch :next do
79
79
  return walk(graph, graph.dependencies.dup)
@@ -120,6 +120,8 @@ module SemanticPuppet
120
120
  name = dependencies.keys.sort.first
121
121
  deps = dependencies.delete(name)
122
122
 
123
+ @module_dependencies |= [name]
124
+
123
125
  # ... (and stepping over it if we've seen it before) ...
124
126
  unless (deps & considering).empty?
125
127
  return walk(graph, dependencies, *considering)
@@ -127,8 +129,6 @@ module SemanticPuppet
127
129
 
128
130
  # ... we'll iterate through the list of possible versions in order.
129
131
  preferred_releases(deps).reverse_each do |dep|
130
- @module_dependencies |= [name]
131
-
132
132
  # We should skip any releases that violate any module's constraints.
133
133
  unless [graph, *considering].all? { |x| x.satisfies_constraints?(dep) }
134
134
  next
@@ -1,3 +1,3 @@
1
1
  module SemanticPuppet
2
- VERSION = '1.0.4'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -20,7 +20,7 @@ spec = Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  # Dependencies
23
- s.required_ruby_version = '>= 1.9.3'
23
+ s.required_ruby_version = '>= 2.7.0'
24
24
 
25
25
  s.add_development_dependency "json", "~> 1.8.3" if RUBY_VERSION < '2.0'
26
26
  s.add_development_dependency "rake"
@@ -247,6 +247,16 @@ describe SemanticPuppet::Dependency do
247
247
  expect { foo('1.1.0') }.to raise_exception with_message
248
248
  expect { foo('1.1.0') }.to raise_exception /\bfoo\b/
249
249
  end
250
+
251
+ it 'sets unsatisfiable' do
252
+ add_source_modules('foo', %w[ 1.1.0 ], 'bar' => '1.x')
253
+ add_source_modules('bar', %w[ 0.0.1 0.1.0-a 0.1.0 ])
254
+
255
+ with_message = /Could not find satisfying releases/
256
+ expect { foo('1.1.0') }.to raise_exception with_message
257
+
258
+ expect(SemanticPuppet::Dependency.unsatisfiable).to eq('foo')
259
+ end
250
260
  end
251
261
  end
252
262
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic_puppet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-08 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -102,9 +102,10 @@ executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
+ - ".github/workflows/mend.yaml"
106
+ - ".github/workflows/rspec_tests.yaml"
105
107
  - ".gitignore"
106
108
  - ".rubocop.yml"
107
- - ".travis.yml"
108
109
  - ".yardopts"
109
110
  - CHANGELOG.md
110
111
  - CODEOWNERS
@@ -112,7 +113,6 @@ files:
112
113
  - LICENSE
113
114
  - README.md
114
115
  - Rakefile
115
- - appveyor.yml
116
116
  - lib/semantic_puppet.rb
117
117
  - lib/semantic_puppet/dependency.rb
118
118
  - lib/semantic_puppet/dependency/graph.rb
@@ -145,14 +145,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - ">="
147
147
  - !ruby/object:Gem::Version
148
- version: 1.9.3
148
+ version: 2.7.0
149
149
  required_rubygems_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
154
  requirements: []
155
- rubygems_version: 3.0.8
155
+ rubygems_version: 3.0.9
156
156
  signing_key:
157
157
  specification_version: 4
158
158
  summary: Useful tools for working with Semantic Versions.
data/.travis.yml DELETED
@@ -1,29 +0,0 @@
1
- ---
2
- language: ruby
3
-
4
- cache: bundler
5
-
6
- before_install:
7
- - bundle -v
8
- - rm Gemfile.lock || true
9
- - gem update --system
10
- - gem update bundler
11
- - gem --version
12
- - bundle -v
13
-
14
- script: "bundle exec rspec --color --format documentation spec/unit"
15
-
16
- notifications:
17
- email: false
18
-
19
- sudo: false
20
-
21
- rvm:
22
- - "2.5.8"
23
- - "2.6.6"
24
- - "2.7.2"
25
- - "3.0.0"
26
- - "jruby-19mode"
27
-
28
- jdk:
29
- - openjdk8
data/appveyor.yml DELETED
@@ -1,20 +0,0 @@
1
- version: 1.0.1.{build}
2
- clone_depth: 10
3
- image: Visual Studio 2019
4
- environment:
5
- matrix:
6
- - RUBY_VERSION: 25-x64
7
- - RUBY_VERSION: 26-x64
8
- - RUBY_VERSION: 27-x64
9
- - RUBY_VERSION: 30-x64
10
- matrix:
11
- fast_finish: true
12
- install:
13
- - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH%
14
- - bundle install --jobs 4 --retry 2
15
- build: off
16
- test_script:
17
- - ruby -v
18
- - gem -v
19
- - bundle -v
20
- - bundle exec rspec --format documentation --color spec/unit