modulesync 3.2.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +13 -15
- data/.github/workflows/release.yml +3 -3
- data/.rubocop_todo.yml +23 -67
- data/CHANGELOG.md +35 -0
- data/Gemfile +2 -5
- data/Rakefile +3 -1
- data/bin/msync +1 -16
- data/features/execute.feature +3 -3
- data/features/step_definitions/git_steps.rb +2 -0
- data/features/support/env.rb +1 -6
- data/lib/modulesync/cli/thor.rb +2 -0
- data/lib/modulesync/cli.rb +8 -1
- data/lib/modulesync/constants.rb +7 -5
- data/lib/modulesync/git_service/base.rb +2 -0
- data/lib/modulesync/git_service/factory.rb +2 -0
- data/lib/modulesync/git_service/github.rb +2 -0
- data/lib/modulesync/git_service/gitlab.rb +2 -0
- data/lib/modulesync/git_service.rb +2 -0
- data/lib/modulesync/hook.rb +2 -0
- data/lib/modulesync/puppet_module.rb +2 -0
- data/lib/modulesync/renderer.rb +2 -0
- data/lib/modulesync/repository.rb +2 -0
- data/lib/modulesync/settings.rb +2 -0
- data/lib/modulesync/source_code.rb +2 -0
- data/lib/modulesync/util.rb +2 -0
- data/lib/modulesync.rb +7 -1
- data/lib/monkey_patches.rb +2 -0
- data/modulesync.gemspec +13 -11
- data/spec/helpers/faker/puppet_module_remote_repo.rb +2 -0
- data/spec/helpers/faker.rb +2 -0
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/{modulesync → module_sync}/git_service/factory_spec.rb +4 -4
- data/spec/unit/{modulesync → module_sync}/git_service/github_spec.rb +3 -1
- data/spec/unit/{modulesync → module_sync}/git_service/gitlab_spec.rb +3 -1
- data/spec/unit/{modulesync → module_sync}/git_service_spec.rb +38 -36
- data/spec/unit/{modulesync → module_sync}/settings_spec.rb +8 -6
- data/spec/unit/{modulesync → module_sync}/source_code_spec.rb +3 -1
- data/spec/unit/{modulesync_spec.rb → module_sync_spec.rb} +5 -3
- metadata +52 -52
- data/.simplecov +0 -46
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6087b3499f62ca2819821c812e50c73ef47e2253b2b606c29d1aa580bd7890a
|
4
|
+
data.tar.gz: 50f9293846f557f50be50b63712e80e820644476f6dd2dbb1ae6fd578979835f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cadc4376ffb2ec3ec8970314e1af5a9d2ba69a400a34e50d6af50e43aeaa3711b5ed8467e5a1b51c1ee58361af382037f2ca4f29fec21dc6d077a3786119cc6
|
7
|
+
data.tar.gz: e7bb6e5550786dc7f3f5d09fbc3f547a23a95fe91aa6ca6a3d50c6223846d9f3d710d9d626b450c0d9fdbad71048dfb3895bde0c812309cfd30384502b68a139
|
data/.github/workflows/ci.yml
CHANGED
@@ -11,31 +11,29 @@ env:
|
|
11
11
|
BUNDLE_WITHOUT: release
|
12
12
|
|
13
13
|
jobs:
|
14
|
-
|
15
|
-
runs-on: ubuntu-
|
14
|
+
rubocop_and_matrix:
|
15
|
+
runs-on: ubuntu-24.04
|
16
|
+
outputs:
|
17
|
+
ruby: ${{ steps.ruby.outputs.versions }}
|
16
18
|
steps:
|
17
19
|
- uses: actions/checkout@v4
|
18
20
|
- name: Setup ruby
|
19
21
|
uses: ruby/setup-ruby@v1
|
20
22
|
with:
|
21
|
-
ruby-version:
|
23
|
+
ruby-version: "3.4"
|
22
24
|
bundler-cache: true
|
23
25
|
- name: Run linter
|
24
26
|
run: bundle exec rake rubocop
|
27
|
+
- id: ruby
|
28
|
+
uses: voxpupuli/ruby-version@v1
|
25
29
|
test:
|
26
|
-
|
27
|
-
|
30
|
+
name: "Ruby ${{ matrix.ruby }}"
|
31
|
+
needs: rubocop_and_matrix
|
32
|
+
runs-on: ubuntu-24.04
|
28
33
|
strategy:
|
29
34
|
fail-fast: false
|
30
35
|
matrix:
|
31
|
-
|
32
|
-
- ruby: "2.7"
|
33
|
-
- ruby: "3.0"
|
34
|
-
- ruby: "3.1"
|
35
|
-
codecov: "yes"
|
36
|
-
- ruby: "3.2"
|
37
|
-
env:
|
38
|
-
CODECOV: ${{ matrix.codecov }}
|
36
|
+
ruby: ${{ fromJSON(needs.rubocop_and_matrix.outputs.ruby) }}
|
39
37
|
steps:
|
40
38
|
- uses: actions/checkout@v4
|
41
39
|
- name: Install Ruby ${{ matrix.ruby }}
|
@@ -48,10 +46,10 @@ jobs:
|
|
48
46
|
- name: Run behavior tests
|
49
47
|
run: bundle exec cucumber
|
50
48
|
- name: Build gem
|
51
|
-
run: gem build --verbose *.gemspec
|
49
|
+
run: gem build --strict --verbose *.gemspec
|
52
50
|
tests:
|
53
51
|
needs:
|
54
|
-
-
|
52
|
+
- rubocop_and_matrix
|
55
53
|
- test
|
56
54
|
runs-on: ubuntu-latest
|
57
55
|
name: Test suite
|
@@ -11,14 +11,14 @@ jobs:
|
|
11
11
|
if: github.repository_owner == 'voxpupuli'
|
12
12
|
steps:
|
13
13
|
- uses: actions/checkout@v4
|
14
|
-
- name: Install Ruby 3.
|
14
|
+
- name: Install Ruby 3.4
|
15
15
|
uses: ruby/setup-ruby@v1
|
16
16
|
with:
|
17
|
-
ruby-version:
|
17
|
+
ruby-version: "3.4"
|
18
18
|
env:
|
19
19
|
BUNDLE_WITHOUT: release
|
20
20
|
- name: Build gem
|
21
|
-
run: gem build --verbose *.gemspec
|
21
|
+
run: gem build --strict --verbose *.gemspec
|
22
22
|
- name: Publish gem to rubygems.org
|
23
23
|
run: gem push *.gem
|
24
24
|
env:
|
data/.rubocop_todo.yml
CHANGED
@@ -1,17 +1,11 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2025-05-21 12:14:38 UTC using RuboCop version 1.75.6.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count: 1
|
10
|
-
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
|
11
|
-
Lint/DuplicateBranch:
|
12
|
-
Exclude:
|
13
|
-
- 'lib/modulesync/renderer.rb'
|
14
|
-
|
15
9
|
# Offense count: 1
|
16
10
|
# Configuration parameters: AllowComments, AllowNil.
|
17
11
|
Lint/SuppressedException:
|
@@ -19,64 +13,30 @@ Lint/SuppressedException:
|
|
19
13
|
- 'Rakefile'
|
20
14
|
|
21
15
|
# Offense count: 1
|
22
|
-
|
23
|
-
Performance/StringInclude:
|
24
|
-
Exclude:
|
25
|
-
- 'Rakefile'
|
26
|
-
|
27
|
-
# Offense count: 5
|
28
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
29
|
-
RSpec/BeEq:
|
16
|
+
Lint/UselessConstantScoping:
|
30
17
|
Exclude:
|
31
|
-
- 'spec/
|
18
|
+
- 'spec/helpers/faker/puppet_module_remote_repo.rb'
|
32
19
|
|
33
20
|
# Offense count: 3
|
34
21
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
35
22
|
# Prefixes: when, with, without
|
36
23
|
RSpec/ContextWording:
|
37
24
|
Exclude:
|
38
|
-
- 'spec/unit/
|
39
|
-
- 'spec/unit/
|
40
|
-
- 'spec/unit/
|
41
|
-
|
42
|
-
# Offense count: 17
|
43
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
44
|
-
# Configuration parameters: SkipBlocks, EnforcedStyle.
|
45
|
-
# SupportedStyles: described_class, explicit
|
46
|
-
RSpec/DescribedClass:
|
47
|
-
Exclude:
|
48
|
-
- 'spec/unit/modulesync/git_service/factory_spec.rb'
|
49
|
-
- 'spec/unit/modulesync/git_service/github_spec.rb'
|
50
|
-
- 'spec/unit/modulesync/git_service/gitlab_spec.rb'
|
51
|
-
- 'spec/unit/modulesync/git_service_spec.rb'
|
52
|
-
- 'spec/unit/modulesync/settings_spec.rb'
|
53
|
-
- 'spec/unit/modulesync/source_code_spec.rb'
|
54
|
-
- 'spec/unit/modulesync_spec.rb'
|
25
|
+
- 'spec/unit/module_sync/git_service/github_spec.rb'
|
26
|
+
- 'spec/unit/module_sync/git_service/gitlab_spec.rb'
|
27
|
+
- 'spec/unit/module_sync_spec.rb'
|
55
28
|
|
56
29
|
# Offense count: 11
|
57
30
|
# Configuration parameters: CountAsOne.
|
58
31
|
RSpec/ExampleLength:
|
59
32
|
Max: 16
|
60
33
|
|
61
|
-
# Offense count: 7
|
62
|
-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
|
63
|
-
# Include: **/*_spec*rb*, **/spec/**/*
|
64
|
-
RSpec/FilePath:
|
65
|
-
Exclude:
|
66
|
-
- 'spec/unit/modulesync/git_service/factory_spec.rb'
|
67
|
-
- 'spec/unit/modulesync/git_service/github_spec.rb'
|
68
|
-
- 'spec/unit/modulesync/git_service/gitlab_spec.rb'
|
69
|
-
- 'spec/unit/modulesync/git_service_spec.rb'
|
70
|
-
- 'spec/unit/modulesync/settings_spec.rb'
|
71
|
-
- 'spec/unit/modulesync/source_code_spec.rb'
|
72
|
-
- 'spec/unit/modulesync_spec.rb'
|
73
|
-
|
74
34
|
# Offense count: 19
|
75
35
|
# Configuration parameters: AssignmentOnly.
|
76
36
|
RSpec/InstanceVariable:
|
77
37
|
Exclude:
|
78
|
-
- 'spec/unit/
|
79
|
-
- 'spec/unit/
|
38
|
+
- 'spec/unit/module_sync/git_service/github_spec.rb'
|
39
|
+
- 'spec/unit/module_sync/git_service/gitlab_spec.rb'
|
80
40
|
|
81
41
|
# Offense count: 7
|
82
42
|
# Configuration parameters: .
|
@@ -93,20 +53,29 @@ RSpec/MultipleExpectations:
|
|
93
53
|
# SupportedStyles: always, named_only
|
94
54
|
RSpec/NamedSubject:
|
95
55
|
Exclude:
|
96
|
-
- 'spec/unit/
|
97
|
-
- 'spec/unit/
|
56
|
+
- 'spec/unit/module_sync/settings_spec.rb'
|
57
|
+
- 'spec/unit/module_sync/source_code_spec.rb'
|
98
58
|
|
99
59
|
# Offense count: 9
|
100
60
|
# Configuration parameters: AllowedGroups.
|
101
61
|
RSpec/NestedGroups:
|
102
62
|
Max: 5
|
103
63
|
|
64
|
+
# Offense count: 2
|
65
|
+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
|
66
|
+
# Include: **/*_spec.rb
|
67
|
+
RSpec/SpecFilePathFormat:
|
68
|
+
Exclude:
|
69
|
+
- '**/spec/routing/**/*'
|
70
|
+
- 'spec/unit/module_sync/git_service/github_spec.rb'
|
71
|
+
- 'spec/unit/module_sync/git_service/gitlab_spec.rb'
|
72
|
+
|
104
73
|
# Offense count: 6
|
105
74
|
RSpec/StubbedMock:
|
106
75
|
Exclude:
|
107
|
-
- 'spec/unit/
|
108
|
-
- 'spec/unit/
|
109
|
-
- 'spec/unit/
|
76
|
+
- 'spec/unit/module_sync/git_service/github_spec.rb'
|
77
|
+
- 'spec/unit/module_sync/git_service/gitlab_spec.rb'
|
78
|
+
- 'spec/unit/module_sync_spec.rb'
|
110
79
|
|
111
80
|
# Offense count: 9
|
112
81
|
# Configuration parameters: AllowedConstants.
|
@@ -128,19 +97,6 @@ Style/FetchEnvVar:
|
|
128
97
|
Exclude:
|
129
98
|
- 'lib/modulesync/git_service.rb'
|
130
99
|
|
131
|
-
# Offense count: 34
|
132
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
133
|
-
# Configuration parameters: EnforcedStyle.
|
134
|
-
# SupportedStyles: always, always_true, never
|
135
|
-
Style/FrozenStringLiteralComment:
|
136
|
-
Enabled: false
|
137
|
-
|
138
|
-
# Offense count: 2
|
139
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
140
|
-
Style/IdenticalConditionalBranches:
|
141
|
-
Exclude:
|
142
|
-
- 'lib/modulesync/renderer.rb'
|
143
|
-
|
144
100
|
# Offense count: 1
|
145
101
|
# Configuration parameters: AllowedMethods.
|
146
102
|
# AllowedMethods: respond_to_missing?
|
@@ -150,7 +106,7 @@ Style/OptionalBooleanParameter:
|
|
150
106
|
|
151
107
|
# Offense count: 6
|
152
108
|
# This cop supports safe autocorrection (--autocorrect).
|
153
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
|
109
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
|
154
110
|
# URISchemes: http, https
|
155
111
|
Layout/LineLength:
|
156
112
|
Max: 169
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,41 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [3.4.0](https://github.com/voxpupuli/modulesync/tree/3.4.0) (2025-05-21)
|
6
|
+
|
7
|
+
[Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.3.0...3.4.0)
|
8
|
+
|
9
|
+
**Merged pull requests:**
|
10
|
+
|
11
|
+
- Disable coverage reports [\#300](https://github.com/voxpupuli/modulesync/pull/300) ([bastelfreak](https://github.com/bastelfreak))
|
12
|
+
- voxpupuli-rubocop: Update 3.0.0-\>3.1.0 [\#299](https://github.com/voxpupuli/modulesync/pull/299) ([bastelfreak](https://github.com/bastelfreak))
|
13
|
+
- voxpupuli-rubocop: Update 2.8.0-\>3.0.0 [\#297](https://github.com/voxpupuli/modulesync/pull/297) ([bastelfreak](https://github.com/bastelfreak))
|
14
|
+
- Allow thor 1.3.2 and newer [\#293](https://github.com/voxpupuli/modulesync/pull/293) ([dependabot[bot]](https://github.com/apps/dependabot))
|
15
|
+
|
16
|
+
## [3.3.0](https://github.com/voxpupuli/modulesync/tree/3.3.0) (2025-02-26)
|
17
|
+
|
18
|
+
[Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.2.0...3.3.0)
|
19
|
+
|
20
|
+
**Implemented enhancements:**
|
21
|
+
|
22
|
+
- Add Ruby 3.4 to CI [\#295](https://github.com/voxpupuli/modulesync/pull/295) ([kenyon](https://github.com/kenyon))
|
23
|
+
- gemspec: allow puppet-blacksmith 8.x [\#294](https://github.com/voxpupuli/modulesync/pull/294) ([kenyon](https://github.com/kenyon))
|
24
|
+
- CI: Build gems with strict and verbose mode [\#292](https://github.com/voxpupuli/modulesync/pull/292) ([bastelfreak](https://github.com/bastelfreak))
|
25
|
+
- Add Ruby 3.3 to CI [\#291](https://github.com/voxpupuli/modulesync/pull/291) ([bastelfreak](https://github.com/bastelfreak))
|
26
|
+
- Add a flag to `msync execute` on the default branch [\#288](https://github.com/voxpupuli/modulesync/pull/288) ([smortex](https://github.com/smortex))
|
27
|
+
- Update octokit requirement from \>= 4, \< 9 to \>= 4, \< 10 [\#287](https://github.com/voxpupuli/modulesync/pull/287) ([dependabot[bot]](https://github.com/apps/dependabot))
|
28
|
+
- update to voxpupuli-rubocop 2.7.0; adjust path to unit files & rubocop: autofix & regen todo file [\#281](https://github.com/voxpupuli/modulesync/pull/281) ([bastelfreak](https://github.com/bastelfreak))
|
29
|
+
|
30
|
+
**Fixed bugs:**
|
31
|
+
|
32
|
+
- pin thor to 1.3.0 [\#282](https://github.com/voxpupuli/modulesync/pull/282) ([bastelfreak](https://github.com/bastelfreak))
|
33
|
+
|
34
|
+
**Merged pull requests:**
|
35
|
+
|
36
|
+
- Update voxpupuli-rubocop requirement from ~\> 2.7.0 to ~\> 2.8.0 [\#290](https://github.com/voxpupuli/modulesync/pull/290) ([dependabot[bot]](https://github.com/apps/dependabot))
|
37
|
+
- Update gitlab requirement from ~\> 4.0 to \>= 4, \< 6 [\#289](https://github.com/voxpupuli/modulesync/pull/289) ([dependabot[bot]](https://github.com/apps/dependabot))
|
38
|
+
- rubocop: Fix Style/FrozenStringLiteralComment [\#285](https://github.com/voxpupuli/modulesync/pull/285) ([bastelfreak](https://github.com/bastelfreak))
|
39
|
+
|
5
40
|
## [3.2.0](https://github.com/voxpupuli/modulesync/tree/3.2.0) (2023-10-31)
|
6
41
|
|
7
42
|
[Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.1.0...3.2.0)
|
data/Gemfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
2
4
|
|
3
5
|
gemspec
|
@@ -6,8 +8,3 @@ group :release, optional: true do
|
|
6
8
|
gem 'faraday-retry', '~> 2.1', require: false
|
7
9
|
gem 'github_changelog_generator', '~> 1.16', require: false
|
8
10
|
end
|
9
|
-
|
10
|
-
group :coverage, optional: ENV['CODECOV'] != 'yes' do
|
11
|
-
gem 'codecov', require: false
|
12
|
-
gem 'simplecov-console', require: false
|
13
|
-
end
|
data/Rakefile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rake/clean'
|
2
4
|
require 'cucumber/rake/task'
|
3
5
|
require 'rubocop/rake_task'
|
@@ -37,7 +39,7 @@ begin
|
|
37
39
|
|
38
40
|
# Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
|
39
41
|
require 'rbconfig'
|
40
|
-
if
|
42
|
+
if RbConfig::CONFIG['host_os'].include?('linux')
|
41
43
|
task :changelog do
|
42
44
|
puts 'Fixing line endings...'
|
43
45
|
changelog_file = File.join(__dir__, 'CHANGELOG.md')
|
data/bin/msync
CHANGED
@@ -1,20 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
if ENV['COVERAGE']
|
4
|
-
# This block allow us to grab code coverage when running this script.
|
5
|
-
#
|
6
|
-
# Note: This environment variable (ie. COVERAGE) is set in Cucumber/Aruba configuration to collect reports
|
7
|
-
simplecov_root = File.expand_path File.join(File.dirname(__FILE__), '..')
|
8
|
-
|
9
|
-
# When running with aruba simplecov was using /tmp/aruba as the root folder.
|
10
|
-
# This is to force using the project folder
|
11
|
-
ENV['SIMPLECOV_ROOT'] = simplecov_root
|
12
|
-
require 'simplecov'
|
13
|
-
|
14
|
-
# https://github.com/simplecov-ruby/simplecov/issues/234
|
15
|
-
# As described in the issue, every process must have an unique name:
|
16
|
-
SimpleCov.command_name "#{File.basename $PROGRAM_NAME} (pid: #{Process.pid})"
|
17
|
-
end
|
2
|
+
# frozen_string_literal: true
|
18
3
|
|
19
4
|
lib = File.expand_path('../lib', __dir__)
|
20
5
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
data/features/execute.feature
CHANGED
@@ -37,8 +37,8 @@ Feature: execute
|
|
37
37
|
When I successfully run `msync help exec`
|
38
38
|
Then the stdout should contain:
|
39
39
|
"""
|
40
|
-
[--fail-fast], [--no-fail-fast]
|
41
|
-
|
40
|
+
[--fail-fast], [--no-fail-fast], [--skip-fail-fast] # Abort the run after a command execution failure
|
41
|
+
# Default: true
|
42
42
|
"""
|
43
43
|
|
44
44
|
Scenario: Override fail-fast default value using config file
|
@@ -46,6 +46,6 @@ Feature: execute
|
|
46
46
|
When I successfully run `msync help exec`
|
47
47
|
Then the stdout should contain:
|
48
48
|
"""
|
49
|
-
|
49
|
+
[--fail-fast], [--no-fail-fast], [--skip-fail-fast] # Abort the run after a command execution failure
|
50
50
|
"""
|
51
51
|
# NOTE: It seems there is a Thor bug here: default value is missing in help when sets to 'false'
|
data/features/support/env.rb
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
SimpleCov.command_name 'Cucumber'
|
1
|
+
# frozen_string_literal: true
|
4
2
|
|
5
3
|
require 'aruba/cucumber'
|
6
4
|
|
@@ -11,8 +9,5 @@ ModuleSync::Faker.working_directory = File.expand_path('faker', Aruba.config.wor
|
|
11
9
|
Before do
|
12
10
|
@aruba_timeout_seconds = 5
|
13
11
|
|
14
|
-
# This enables coverage when aruba runs `msync` executable (cf. `bin/msync`)
|
15
|
-
set_environment_variable('COVERAGE', '1')
|
16
|
-
|
17
12
|
aruba.config.activate_announcer_on_command_failure = %i[stdout stderr]
|
18
13
|
end
|
data/lib/modulesync/cli/thor.rb
CHANGED
data/lib/modulesync/cli.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'thor'
|
2
4
|
|
3
5
|
require 'modulesync'
|
@@ -173,10 +175,15 @@ module ModuleSync
|
|
173
175
|
aliases: '-b',
|
174
176
|
desc: 'Branch name to make the changes in.',
|
175
177
|
default: CLI.defaults[:branch]
|
178
|
+
option :default_branch,
|
179
|
+
aliases: '-B',
|
180
|
+
type: :boolean,
|
181
|
+
desc: 'Work on the default branch (take precedence over --branch).',
|
182
|
+
default: false
|
176
183
|
option :fail_fast,
|
177
184
|
type: :boolean,
|
178
185
|
desc: 'Abort the run after a command execution failure',
|
179
|
-
default: CLI.defaults[:fail_fast].nil?
|
186
|
+
default: CLI.defaults[:fail_fast].nil? || CLI.defaults[:fail_fast]
|
180
187
|
def execute(*command_args)
|
181
188
|
raise Thor::Error, 'COMMAND is a required argument' if command_args.empty?
|
182
189
|
|
data/lib/modulesync/constants.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module ModuleSync
|
2
4
|
module Constants
|
3
|
-
MODULE_FILES_DIR = 'moduleroot/'
|
4
|
-
CONF_FILE = 'config_defaults.yml'
|
5
|
-
MODULE_CONF_FILE = '.sync.yml'
|
6
|
-
MODULESYNC_CONF_FILE = 'modulesync.yml'
|
7
|
-
HOOK_FILE = '.git/hooks/pre-push'
|
5
|
+
MODULE_FILES_DIR = 'moduleroot/'
|
6
|
+
CONF_FILE = 'config_defaults.yml'
|
7
|
+
MODULE_CONF_FILE = '.sync.yml'
|
8
|
+
MODULESYNC_CONF_FILE = 'modulesync.yml'
|
9
|
+
HOOK_FILE = '.git/hooks/pre-push'
|
8
10
|
GLOBAL_DEFAULTS_KEY = :global
|
9
11
|
end
|
10
12
|
end
|
data/lib/modulesync/hook.rb
CHANGED
data/lib/modulesync/renderer.rb
CHANGED
data/lib/modulesync/settings.rb
CHANGED
data/lib/modulesync/util.rb
CHANGED
data/lib/modulesync.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'English'
|
2
4
|
require 'fileutils'
|
3
5
|
require 'pathname'
|
@@ -207,7 +209,11 @@ module ModuleSync
|
|
207
209
|
$stdout.puts "#{puppet_module.given_name}:"
|
208
210
|
|
209
211
|
puppet_module.repository.clone unless puppet_module.repository.cloned?
|
210
|
-
|
212
|
+
if @options[:default_branch]
|
213
|
+
puppet_module.repository.switch branch: false
|
214
|
+
else
|
215
|
+
puppet_module.repository.switch branch: @options[:branch]
|
216
|
+
end
|
211
217
|
|
212
218
|
command_args = cli_options[:command_args]
|
213
219
|
local_script = File.expand_path command_args[0]
|
data/lib/monkey_patches.rb
CHANGED
data/modulesync.gemspec
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('lib', __dir__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
|
4
6
|
Gem::Specification.new do |spec|
|
5
7
|
spec.name = 'modulesync'
|
6
|
-
spec.version = '3.
|
8
|
+
spec.version = '3.4.0'
|
7
9
|
spec.authors = ['Vox Pupuli']
|
8
10
|
spec.email = ['voxpupuli@groups.io']
|
9
11
|
spec.summary = 'Puppet Module Synchronizer'
|
@@ -17,15 +19,15 @@ Gem::Specification.new do |spec|
|
|
17
19
|
spec.require_paths = ['lib']
|
18
20
|
|
19
21
|
spec.add_development_dependency 'aruba', '~>2.0'
|
20
|
-
spec.add_development_dependency 'cucumber'
|
21
|
-
spec.add_development_dependency 'rake'
|
22
|
-
spec.add_development_dependency 'rspec'
|
23
|
-
spec.add_development_dependency '
|
24
|
-
spec.add_development_dependency 'voxpupuli-rubocop', '~> 2.0'
|
22
|
+
spec.add_development_dependency 'cucumber', '~> 9.2'
|
23
|
+
spec.add_development_dependency 'rake', '~> 13.2', '>= 13.2.1'
|
24
|
+
spec.add_development_dependency 'rspec', '~> 3.13'
|
25
|
+
spec.add_development_dependency 'voxpupuli-rubocop', '~> 3.1.0'
|
25
26
|
|
26
|
-
spec.
|
27
|
-
spec.
|
28
|
-
spec.
|
29
|
-
spec.
|
30
|
-
|
27
|
+
spec.add_dependency 'git', '~>1.7'
|
28
|
+
spec.add_dependency 'gitlab', '>=4', '<6'
|
29
|
+
spec.add_dependency 'octokit', '>=4', '<10'
|
30
|
+
spec.add_dependency 'puppet-blacksmith', '>= 3.0', '< 9'
|
31
|
+
# 1.3.1 has a bug that was fixed in 1.3.2 https://github.com/rails/thor/pull/878
|
32
|
+
spec.add_dependency 'thor', '~> 1.3', '!= 1.3.1'
|
31
33
|
end
|
data/spec/helpers/faker.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'modulesync'
|
2
4
|
require 'modulesync/git_service/factory'
|
3
5
|
|
@@ -5,8 +7,7 @@ describe ModuleSync::GitService::Factory do
|
|
5
7
|
context 'when instantiate a GitHub service without credentials' do
|
6
8
|
it 'raises an error' do
|
7
9
|
expect do
|
8
|
-
|
9
|
-
token: nil)
|
10
|
+
described_class.instantiate(type: :github, endpoint: nil, token: nil)
|
10
11
|
end.to raise_error(ModuleSync::GitService::MissingCredentialsError)
|
11
12
|
end
|
12
13
|
end
|
@@ -14,8 +15,7 @@ describe ModuleSync::GitService::Factory do
|
|
14
15
|
context 'when instantiate a GitLab service without credentials' do
|
15
16
|
it 'raises an error' do
|
16
17
|
expect do
|
17
|
-
|
18
|
-
token: nil)
|
18
|
+
described_class.instantiate(type: :gitlab, endpoint: nil, token: nil)
|
19
19
|
end.to raise_error(ModuleSync::GitService::MissingCredentialsError)
|
20
20
|
end
|
21
21
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
require 'modulesync/git_service/github'
|
@@ -7,7 +9,7 @@ describe ModuleSync::GitService::GitHub do
|
|
7
9
|
before do
|
8
10
|
@client = double
|
9
11
|
allow(Octokit::Client).to receive(:new).and_return(@client)
|
10
|
-
@it =
|
12
|
+
@it = described_class.new('test', 'https://api.github.com')
|
11
13
|
end
|
12
14
|
|
13
15
|
let(:args) do
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
require 'modulesync/git_service/gitlab'
|
@@ -7,7 +9,7 @@ describe ModuleSync::GitService::GitLab do
|
|
7
9
|
before do
|
8
10
|
@client = double
|
9
11
|
allow(Gitlab::Client).to receive(:new).and_return(@client)
|
10
|
-
@it =
|
12
|
+
@it = described_class.new('test', 'https://gitlab.com/api/v4')
|
11
13
|
end
|
12
14
|
|
13
15
|
let(:args) do
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'modulesync'
|
2
4
|
require 'modulesync/git_service'
|
3
5
|
|
@@ -30,11 +32,11 @@ describe ModuleSync::GitService do
|
|
30
32
|
end
|
31
33
|
|
32
34
|
it 'build git service arguments from configuration entry' do
|
33
|
-
expect(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
36
|
+
type: :gitlab,
|
37
|
+
endpoint: 'https://vcs.example.com/api/v4',
|
38
|
+
token: 'secret',
|
39
|
+
})
|
38
40
|
end
|
39
41
|
end
|
40
42
|
|
@@ -55,11 +57,11 @@ describe ModuleSync::GitService do
|
|
55
57
|
.with('GITLAB_TOKEN')
|
56
58
|
.and_return('secret')
|
57
59
|
|
58
|
-
expect(
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
61
|
+
type: :gitlab,
|
62
|
+
endpoint: 'https://vcs.example.com/api/v4',
|
63
|
+
token: 'secret',
|
64
|
+
})
|
63
65
|
end
|
64
66
|
end
|
65
67
|
|
@@ -69,21 +71,21 @@ describe ModuleSync::GitService do
|
|
69
71
|
.with('GITLAB_TOKEN')
|
70
72
|
.and_return('secret')
|
71
73
|
|
72
|
-
expect(
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
74
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
75
|
+
type: :gitlab,
|
76
|
+
endpoint: 'https://git.example.com/api/v4',
|
77
|
+
token: 'secret',
|
78
|
+
})
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
80
82
|
context 'without any environment variable sets' do
|
81
83
|
it 'returns a nil token' do
|
82
|
-
expect(
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
84
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
85
|
+
type: :gitlab,
|
86
|
+
endpoint: 'https://git.example.com/api/v4',
|
87
|
+
token: nil,
|
88
|
+
})
|
87
89
|
end
|
88
90
|
end
|
89
91
|
end
|
@@ -102,21 +104,21 @@ describe ModuleSync::GitService do
|
|
102
104
|
.with('GITLAB_TOKEN')
|
103
105
|
.and_return('secret')
|
104
106
|
|
105
|
-
expect(
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
107
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
108
|
+
type: :gitlab,
|
109
|
+
endpoint: 'https://gitlab.example.com/api/v4',
|
110
|
+
token: 'secret',
|
111
|
+
})
|
110
112
|
end
|
111
113
|
end
|
112
114
|
|
113
115
|
context 'without a GITLAB_TOKEN environment variable sets' do
|
114
116
|
it 'returns a nil token' do
|
115
|
-
expect(
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
117
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
118
|
+
type: :gitlab,
|
119
|
+
endpoint: 'https://gitlab.example.com/api/v4',
|
120
|
+
token: nil,
|
121
|
+
})
|
120
122
|
end
|
121
123
|
end
|
122
124
|
end
|
@@ -134,11 +136,11 @@ describe ModuleSync::GitService do
|
|
134
136
|
.with('GITHUB_TOKEN')
|
135
137
|
.and_return('secret')
|
136
138
|
|
137
|
-
expect(
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
139
|
+
expect(described_class.configuration_for(sourcecode: sourcecode)).to eq({
|
140
|
+
type: :github,
|
141
|
+
endpoint: 'https://vcs.example.com',
|
142
|
+
token: 'secret',
|
143
|
+
})
|
142
144
|
end
|
143
145
|
end
|
144
146
|
|
@@ -152,7 +154,7 @@ describe ModuleSync::GitService do
|
|
152
154
|
.with('GITLAB_TOKEN')
|
153
155
|
.and_return('secret')
|
154
156
|
|
155
|
-
expect {
|
157
|
+
expect { described_class.configuration_for(sourcecode: sourcecode) }
|
156
158
|
.to raise_error ModuleSync::Error
|
157
159
|
end
|
158
160
|
end
|
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe ModuleSync::Settings do
|
4
6
|
subject do
|
5
|
-
|
7
|
+
described_class.new(
|
6
8
|
{},
|
7
9
|
{},
|
8
10
|
{},
|
@@ -13,11 +15,11 @@ describe ModuleSync::Settings do
|
|
13
15
|
)
|
14
16
|
end
|
15
17
|
|
16
|
-
it { is_expected.not_to
|
17
|
-
it { expect(subject.managed?('Rakefile')).to
|
18
|
-
it { expect(subject.managed?('Rakefile/foo')).to
|
19
|
-
it { expect(subject.managed?('Gemfile')).to
|
20
|
-
it { expect(subject.managed?('Gemfile/foo')).to
|
18
|
+
it { is_expected.not_to be_nil }
|
19
|
+
it { expect(subject.managed?('Rakefile')).to be false }
|
20
|
+
it { expect(subject.managed?('Rakefile/foo')).to be false }
|
21
|
+
it { expect(subject.managed?('Gemfile')).to be true }
|
22
|
+
it { expect(subject.managed?('Gemfile/foo')).to be true }
|
21
23
|
it { expect(subject.managed_files([])).to eq ['Gemfile'] }
|
22
24
|
it { expect(subject.managed_files(%w[Rakefile Gemfile other_file])).to eq %w[Gemfile other_file] }
|
23
25
|
it { expect(subject.unmanaged_files([])).to eq ['Rakefile'] }
|
@@ -1,14 +1,16 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'spec_helper'
|
2
4
|
|
3
5
|
describe ModuleSync do
|
4
6
|
context '::update' do
|
5
7
|
it 'loads the managed modules from the specified :managed_modules_conf' do
|
6
|
-
allow(
|
8
|
+
allow(described_class).to receive(:find_template_files).and_return([])
|
7
9
|
allow(ModuleSync::Util).to receive(:parse_config).with('./config_defaults.yml').and_return({})
|
8
|
-
expect(
|
10
|
+
expect(described_class).to receive(:managed_modules).with(no_args).and_return([])
|
9
11
|
|
10
12
|
options = { managed_modules_conf: 'test_file.yml' }
|
11
|
-
|
13
|
+
described_class.update(options)
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulesync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vox Pupuli
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: aruba
|
@@ -28,72 +27,64 @@ dependencies:
|
|
28
27
|
name: cucumber
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
|
-
- - "
|
30
|
+
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
32
|
+
version: '9.2'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
|
-
- - "
|
37
|
+
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
39
|
+
version: '9.2'
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: rake
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
|
-
- - "
|
44
|
+
- - "~>"
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
46
|
+
version: '13.2'
|
52
47
|
- - ">="
|
53
48
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: rspec
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
49
|
+
version: 13.2.1
|
62
50
|
type: :development
|
63
51
|
prerelease: false
|
64
52
|
version_requirements: !ruby/object:Gem::Requirement
|
65
53
|
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '13.2'
|
66
57
|
- - ">="
|
67
58
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
59
|
+
version: 13.2.1
|
69
60
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
61
|
+
name: rspec
|
71
62
|
requirement: !ruby/object:Gem::Requirement
|
72
63
|
requirements:
|
73
|
-
- - "
|
64
|
+
- - "~>"
|
74
65
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
66
|
+
version: '3.13'
|
76
67
|
type: :development
|
77
68
|
prerelease: false
|
78
69
|
version_requirements: !ruby/object:Gem::Requirement
|
79
70
|
requirements:
|
80
|
-
- - "
|
71
|
+
- - "~>"
|
81
72
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
73
|
+
version: '3.13'
|
83
74
|
- !ruby/object:Gem::Dependency
|
84
75
|
name: voxpupuli-rubocop
|
85
76
|
requirement: !ruby/object:Gem::Requirement
|
86
77
|
requirements:
|
87
78
|
- - "~>"
|
88
79
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
80
|
+
version: 3.1.0
|
90
81
|
type: :development
|
91
82
|
prerelease: false
|
92
83
|
version_requirements: !ruby/object:Gem::Requirement
|
93
84
|
requirements:
|
94
85
|
- - "~>"
|
95
86
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
87
|
+
version: 3.1.0
|
97
88
|
- !ruby/object:Gem::Dependency
|
98
89
|
name: git
|
99
90
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,16 +103,22 @@ dependencies:
|
|
112
103
|
name: gitlab
|
113
104
|
requirement: !ruby/object:Gem::Requirement
|
114
105
|
requirements:
|
115
|
-
- - "
|
106
|
+
- - ">="
|
116
107
|
- !ruby/object:Gem::Version
|
117
|
-
version: '4
|
108
|
+
version: '4'
|
109
|
+
- - "<"
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '6'
|
118
112
|
type: :runtime
|
119
113
|
prerelease: false
|
120
114
|
version_requirements: !ruby/object:Gem::Requirement
|
121
115
|
requirements:
|
122
|
-
- - "
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '4'
|
119
|
+
- - "<"
|
123
120
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
121
|
+
version: '6'
|
125
122
|
- !ruby/object:Gem::Dependency
|
126
123
|
name: octokit
|
127
124
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,7 +128,7 @@ dependencies:
|
|
131
128
|
version: '4'
|
132
129
|
- - "<"
|
133
130
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
131
|
+
version: '10'
|
135
132
|
type: :runtime
|
136
133
|
prerelease: false
|
137
134
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -141,7 +138,7 @@ dependencies:
|
|
141
138
|
version: '4'
|
142
139
|
- - "<"
|
143
140
|
- !ruby/object:Gem::Version
|
144
|
-
version: '
|
141
|
+
version: '10'
|
145
142
|
- !ruby/object:Gem::Dependency
|
146
143
|
name: puppet-blacksmith
|
147
144
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +148,7 @@ dependencies:
|
|
151
148
|
version: '3.0'
|
152
149
|
- - "<"
|
153
150
|
- !ruby/object:Gem::Version
|
154
|
-
version: '
|
151
|
+
version: '9'
|
155
152
|
type: :runtime
|
156
153
|
prerelease: false
|
157
154
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -161,21 +158,27 @@ dependencies:
|
|
161
158
|
version: '3.0'
|
162
159
|
- - "<"
|
163
160
|
- !ruby/object:Gem::Version
|
164
|
-
version: '
|
161
|
+
version: '9'
|
165
162
|
- !ruby/object:Gem::Dependency
|
166
163
|
name: thor
|
167
164
|
requirement: !ruby/object:Gem::Requirement
|
168
165
|
requirements:
|
169
|
-
- - "
|
166
|
+
- - "~>"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '1.3'
|
169
|
+
- - "!="
|
170
170
|
- !ruby/object:Gem::Version
|
171
|
-
version:
|
171
|
+
version: 1.3.1
|
172
172
|
type: :runtime
|
173
173
|
prerelease: false
|
174
174
|
version_requirements: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- - "
|
176
|
+
- - "~>"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '1.3'
|
179
|
+
- - "!="
|
177
180
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
181
|
+
version: 1.3.1
|
179
182
|
description: Utility to synchronize common files across puppet modules in Github.
|
180
183
|
email:
|
181
184
|
- voxpupuli@groups.io
|
@@ -192,7 +195,6 @@ files:
|
|
192
195
|
- ".rspec"
|
193
196
|
- ".rubocop.yml"
|
194
197
|
- ".rubocop_todo.yml"
|
195
|
-
- ".simplecov"
|
196
198
|
- CHANGELOG.md
|
197
199
|
- Gemfile
|
198
200
|
- HISTORY.md
|
@@ -234,18 +236,17 @@ files:
|
|
234
236
|
- spec/helpers/faker.rb
|
235
237
|
- spec/helpers/faker/puppet_module_remote_repo.rb
|
236
238
|
- spec/spec_helper.rb
|
237
|
-
- spec/unit/
|
238
|
-
- spec/unit/
|
239
|
-
- spec/unit/
|
240
|
-
- spec/unit/
|
241
|
-
- spec/unit/
|
242
|
-
- spec/unit/
|
243
|
-
- spec/unit/
|
239
|
+
- spec/unit/module_sync/git_service/factory_spec.rb
|
240
|
+
- spec/unit/module_sync/git_service/github_spec.rb
|
241
|
+
- spec/unit/module_sync/git_service/gitlab_spec.rb
|
242
|
+
- spec/unit/module_sync/git_service_spec.rb
|
243
|
+
- spec/unit/module_sync/settings_spec.rb
|
244
|
+
- spec/unit/module_sync/source_code_spec.rb
|
245
|
+
- spec/unit/module_sync_spec.rb
|
244
246
|
homepage: https://github.com/voxpupuli/modulesync
|
245
247
|
licenses:
|
246
248
|
- Apache-2.0
|
247
249
|
metadata: {}
|
248
|
-
post_install_message:
|
249
250
|
rdoc_options: []
|
250
251
|
require_paths:
|
251
252
|
- lib
|
@@ -260,8 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
261
|
- !ruby/object:Gem::Version
|
261
262
|
version: '0'
|
262
263
|
requirements: []
|
263
|
-
rubygems_version: 3.
|
264
|
-
signing_key:
|
264
|
+
rubygems_version: 3.6.7
|
265
265
|
specification_version: 4
|
266
266
|
summary: Puppet Module Synchronizer
|
267
267
|
test_files: []
|
data/.simplecov
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
SimpleCov.start do
|
2
|
-
if ENV['SIMPLECOV_ROOT']
|
3
|
-
SimpleCov.root(ENV['SIMPLECOV_ROOT'])
|
4
|
-
|
5
|
-
filters.clear # This will remove the :root_filter and :bundler_filter that come via simplecov's defaults
|
6
|
-
|
7
|
-
# Because simplecov filters everything outside of the SimpleCov.root
|
8
|
-
# This should be added, cf.
|
9
|
-
# https://github.com/colszowka/simplecov#default-root-filter-and-coverage-for-things-outside-of-it
|
10
|
-
add_filter do |src|
|
11
|
-
src.filename !~ /^#{SimpleCov.root}/
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
add_group 'Source code', 'lib'
|
16
|
-
|
17
|
-
add_group 'Unit tests', 'spec'
|
18
|
-
|
19
|
-
add_group 'Behavior tests', 'features'
|
20
|
-
add_filter '/features/support/env.rb'
|
21
|
-
|
22
|
-
enable_coverage :branch
|
23
|
-
|
24
|
-
# do not track vendored files
|
25
|
-
add_filter '/vendor'
|
26
|
-
add_filter '/.vendor'
|
27
|
-
|
28
|
-
# exclude anything that is not in lib, spec or features directories
|
29
|
-
add_filter do |src|
|
30
|
-
src.filename !~ %r{^#{SimpleCov.root}/(lib|spec|features)}
|
31
|
-
end
|
32
|
-
|
33
|
-
track_files '**/*.rb'
|
34
|
-
end
|
35
|
-
|
36
|
-
if ENV['CODECOV'] == 'yes'
|
37
|
-
require 'simplecov-console'
|
38
|
-
require 'codecov'
|
39
|
-
|
40
|
-
SimpleCov.formatters = [
|
41
|
-
SimpleCov::Formatter::Console,
|
42
|
-
SimpleCov::Formatter::Codecov,
|
43
|
-
]
|
44
|
-
end
|
45
|
-
|
46
|
-
# vim: filetype=ruby
|