modulesync 2.6.0 → 3.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: 16c0c39c9e9c25f2f153464a9b0eaaa32d84d2d0586620e479676d4900503ae9
4
- data.tar.gz: 328deb34bae7f84f47969b289b121a0f241dbde49756d881963f21dac0842595
3
+ metadata.gz: 52c1ece84e9891163b6f6a8a54e4b867fbd473f785acfaf007e46d21338f5fa8
4
+ data.tar.gz: 86674966a7c373aa94678bc5efb62582e13baebd133ada527e9b002c40d48b98
5
5
  SHA512:
6
- metadata.gz: 42ca23a6203c31ceab58cb653070763e309606255107fec64239ce4808744073975dee48d8a397a3eb5cdc458882e29c126413aae6fc36eafd64024cb4441243
7
- data.tar.gz: 33543edf6757f1988c5fca4a382a3b939a53647764bf0fc4291f6076c188749f72f5036438cc93b91999b7268c65400b34059b050ba0b6857eb89e9758de11ad
6
+ metadata.gz: 02a4315090f93f8e3c7a3cdbccbd42bf5fb3f942a26df1793dcb917eeaf096dd8c8eba908eca806b6ffdaabd49c0a06d58912767bdb365823048d19f712e7da9
7
+ data.tar.gz: b8e6cd36e66c6f9f7c307ebe1093ae0a85130a48ca0f2de31f99044678feeaa8203dd3b07564ea9eace6ff2a882e004c78253f13a3df5f173fb66977fca1932f
@@ -21,7 +21,7 @@ jobs:
21
21
  ruby-version: '3.1'
22
22
  bundler-cache: true
23
23
  - name: Run linter
24
- run: bundle exec rubocop --format github
24
+ run: bundle exec rake rubocop
25
25
  test:
26
26
  needs: rubocop
27
27
  runs-on: ubuntu-latest
@@ -29,8 +29,6 @@ jobs:
29
29
  fail-fast: false
30
30
  matrix:
31
31
  include:
32
- - ruby: "2.5"
33
- - ruby: "2.6"
34
32
  - ruby: "2.7"
35
33
  - ruby: "3.0"
36
34
  - ruby: "3.1"
@@ -50,7 +48,7 @@ jobs:
50
48
  - name: Run behavior tests
51
49
  run: bundle exec cucumber
52
50
  - name: Build gem
53
- run: gem build *.gemspec
51
+ run: gem build --verbose *.gemspec
54
52
  tests:
55
53
  needs:
56
54
  - rubocop
@@ -18,7 +18,7 @@ jobs:
18
18
  env:
19
19
  BUNDLE_WITHOUT: release
20
20
  - name: Build gem
21
- run: gem build *.gemspec
21
+ run: gem build --verbose *.gemspec
22
22
  - name: Publish gem to rubygems.org
23
23
  run: gem push *.gem
24
24
  env:
data/.rubocop.yml CHANGED
@@ -1,50 +1,5 @@
1
+ ---
1
2
  inherit_from: .rubocop_todo.yml
2
3
 
3
- require:
4
- - rubocop-performance
5
- - rubocop-rake
6
- - rubocop-rspec
7
-
8
- AllCops:
9
- TargetRubyVersion: 2.5
10
- NewCops: enable
11
- Exclude:
12
- - 'vendor/**/*'
13
- - 'tmp/**/*'
14
- - 'pkg/**/*'
15
- - 'lib/monkey_patches.rb'
16
- - 'spec/**/*'
17
- - 'Gemfile'
18
- - 'Rakefile'
19
-
20
- Style/FetchEnvVar:
21
- Enabled: false
22
-
23
- Style/HashSyntax:
24
- Enabled: false
25
-
26
- Style/TrailingCommaInArguments:
27
- EnforcedStyleForMultiline: comma
28
-
29
- Style/TrailingCommaInArrayLiteral:
30
- EnforcedStyleForMultiline: comma
31
-
32
- Style/TrailingCommaInHashLiteral:
33
- EnforcedStyleForMultiline: comma
34
-
35
- # sane line length
36
- Layout/LineLength:
37
- Max: 120
38
- Exclude:
39
- - 'features/**/*'
40
-
41
- Style/FrozenStringLiteralComment:
42
- Enabled: false
43
-
44
- # We explicitly prefer $stderr.puts over #warn
45
- Style/StderrPuts:
46
- Enabled: false
47
-
48
- Gemspec/RequireMFA:
49
- Exclude:
50
- - 'modulesync.gemspec'
4
+ inherit_gem:
5
+ voxpupuli-rubocop: rubocop.yml
data/.rubocop_todo.yml CHANGED
@@ -1,37 +1,114 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2023-04-14 18:50:10 UTC using RuboCop version 1.28.2.
3
+ # on 2023-06-16 18:17:35 UTC using RuboCop version 1.50.2.
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: 10
10
- # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
11
- Metrics/AbcSize:
12
- Max: 60
9
+ # Offense count: 1
10
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
11
+ Lint/DuplicateBranch:
12
+ Exclude:
13
+ - 'lib/modulesync/renderer.rb'
13
14
 
14
- # Offense count: 2
15
- # Configuration parameters: CountComments, CountAsOne.
16
- Metrics/ClassLength:
17
- Max: 186
15
+ # Offense count: 1
16
+ # Configuration parameters: AllowComments, AllowNil.
17
+ Lint/SuppressedException:
18
+ Exclude:
19
+ - 'Rakefile'
20
+
21
+ # Offense count: 1
22
+ # This cop supports unsafe autocorrection (--autocorrect-all).
23
+ Performance/StringInclude:
24
+ Exclude:
25
+ - 'Rakefile'
18
26
 
19
27
  # Offense count: 5
20
- # Configuration parameters: IgnoredMethods.
21
- Metrics/CyclomaticComplexity:
22
- Max: 15
28
+ # This cop supports unsafe autocorrection (--autocorrect-all).
29
+ RSpec/BeEq:
30
+ Exclude:
31
+ - 'spec/unit/modulesync/settings_spec.rb'
32
+
33
+ # Offense count: 3
34
+ # Configuration parameters: Prefixes, AllowedPatterns.
35
+ # Prefixes: when, with, without
36
+ RSpec/ContextWording:
37
+ Exclude:
38
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
39
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
40
+ - 'spec/unit/modulesync_spec.rb'
23
41
 
24
42
  # Offense count: 17
25
- # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
26
- Metrics/MethodLength:
27
- Max: 34
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'
28
55
 
29
- # Offense count: 4
30
- # Configuration parameters: IgnoredMethods.
31
- Metrics/PerceivedComplexity:
56
+ # Offense count: 11
57
+ # Configuration parameters: CountAsOne.
58
+ RSpec/ExampleLength:
32
59
  Max: 16
33
60
 
34
- # Offense count: 8
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
+ # Offense count: 19
75
+ # Configuration parameters: AssignmentOnly.
76
+ RSpec/InstanceVariable:
77
+ Exclude:
78
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
79
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
80
+
81
+ # Offense count: 7
82
+ # Configuration parameters: .
83
+ # SupportedStyles: have_received, receive
84
+ RSpec/MessageSpies:
85
+ EnforcedStyle: receive
86
+
87
+ # Offense count: 6
88
+ RSpec/MultipleExpectations:
89
+ Max: 2
90
+
91
+ # Offense count: 10
92
+ # Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
93
+ # SupportedStyles: always, named_only
94
+ RSpec/NamedSubject:
95
+ Exclude:
96
+ - 'spec/unit/modulesync/settings_spec.rb'
97
+ - 'spec/unit/modulesync/source_code_spec.rb'
98
+
99
+ # Offense count: 9
100
+ # Configuration parameters: AllowedGroups.
101
+ RSpec/NestedGroups:
102
+ Max: 5
103
+
104
+ # Offense count: 6
105
+ RSpec/StubbedMock:
106
+ Exclude:
107
+ - 'spec/unit/modulesync/git_service/github_spec.rb'
108
+ - 'spec/unit/modulesync/git_service/gitlab_spec.rb'
109
+ - 'spec/unit/modulesync_spec.rb'
110
+
111
+ # Offense count: 9
35
112
  # Configuration parameters: AllowedConstants.
36
113
  Style/Documentation:
37
114
  Exclude:
@@ -42,6 +119,27 @@ Style/Documentation:
42
119
  - 'lib/modulesync/hook.rb'
43
120
  - 'lib/modulesync/renderer.rb'
44
121
  - 'lib/modulesync/util.rb'
122
+ - 'lib/monkey_patches.rb'
123
+
124
+ # Offense count: 4
125
+ # This cop supports safe autocorrection (--autocorrect).
126
+ # Configuration parameters: AllowedVars.
127
+ Style/FetchEnvVar:
128
+ Exclude:
129
+ - 'lib/modulesync/git_service.rb'
130
+
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'
45
143
 
46
144
  # Offense count: 1
47
145
  # Configuration parameters: AllowedMethods.
@@ -49,3 +147,10 @@ Style/Documentation:
49
147
  Style/OptionalBooleanParameter:
50
148
  Exclude:
51
149
  - 'lib/modulesync/puppet_module.rb'
150
+
151
+ # Offense count: 6
152
+ # This cop supports safe autocorrection (--autocorrect).
153
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
154
+ # URISchemes: http, https
155
+ Layout/LineLength:
156
+ Max: 169
data/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [3.1.0](https://github.com/voxpupuli/modulesync/tree/3.1.0) (2023-08-02)
6
+
7
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/3.0.0...3.1.0)
8
+
9
+ Release 3.0.0 was broken. It was tagged as 3.0.0 but accidentally released as 2.7.0. The only breaking change was dropping support for EoL ruby versions.
10
+
11
+ **Merged pull requests:**
12
+
13
+ - rubocop: autofix [\#273](https://github.com/voxpupuli/modulesync/pull/273) ([bastelfreak](https://github.com/bastelfreak))
14
+ - Update octokit requirement from \>= 4, \< 7 to \>= 4, \< 8 [\#272](https://github.com/voxpupuli/modulesync/pull/272) ([dependabot[bot]](https://github.com/apps/dependabot))
15
+ - Update voxpupuli-rubocop requirement from ~\> 1.3 to ~\> 2.0 [\#271](https://github.com/voxpupuli/modulesync/pull/271) ([dependabot[bot]](https://github.com/apps/dependabot))
16
+
17
+ ## [3.0.0](https://github.com/voxpupuli/modulesync/tree/3.0.0) (2023-06-16)
18
+
19
+ [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.6.0...3.0.0)
20
+
21
+ **Breaking changes:**
22
+
23
+ - Drop EoL Ruby 2.5/2.6 support [\#270](https://github.com/voxpupuli/modulesync/pull/270) ([bastelfreak](https://github.com/bastelfreak))
24
+
25
+ **Merged pull requests:**
26
+
27
+ - Update puppet-blacksmith requirement from \>= 3.0, \< 7 to \>= 3.0, \< 8 [\#268](https://github.com/voxpupuli/modulesync/pull/268) ([dependabot[bot]](https://github.com/apps/dependabot))
28
+ - Update octokit requirement from ~\> 4.0 to \>= 4, \< 7 [\#263](https://github.com/voxpupuli/modulesync/pull/263) ([dependabot[bot]](https://github.com/apps/dependabot))
29
+
5
30
  ## [2.6.0](https://github.com/voxpupuli/modulesync/tree/2.6.0) (2023-04-14)
6
31
 
7
32
  [Full Changelog](https://github.com/voxpupuli/modulesync/compare/2.5.0...2.6.0)
data/Gemfile CHANGED
@@ -2,11 +2,12 @@ source ENV['GEM_SOURCE'] || 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- group :release do
6
- gem 'github_changelog_generator', :require => false
5
+ group :release, optional: true do
6
+ gem 'faraday-retry', '~> 2.1', require: false
7
+ gem 'github_changelog_generator', '~> 1.16', require: false
7
8
  end
8
9
 
9
- group :coverage, optional: ENV['CODECOV']!='yes' do
10
- gem 'simplecov-console', :require => false
11
- gem 'codecov', :require => false
10
+ group :coverage, optional: ENV['CODECOV'] != 'yes' do
11
+ gem 'codecov', require: false
12
+ gem 'simplecov-console', require: false
12
13
  end
data/Rakefile CHANGED
@@ -10,16 +10,9 @@ rescue LoadError
10
10
  end
11
11
 
12
12
  begin
13
- require 'rubocop/rake_task'
13
+ require 'voxpupuli/rubocop/rake'
14
14
  rescue LoadError
15
15
  # RuboCop is an optional group
16
- else
17
- RuboCop::RakeTask.new(:rubocop) do |task|
18
- # These make the rubocop experience maybe slightly less terrible
19
- task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
20
- # Use Rubocop's Github Actions formatter if possible
21
- task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
22
- end
23
16
  end
24
17
 
25
18
  CLEAN.include('pkg/', 'tmp/')
@@ -29,8 +22,8 @@ Cucumber::Rake::Task.new do |t|
29
22
  t.cucumber_opts << '--format pretty'
30
23
  end
31
24
 
32
- task :test => %i[clean spec cucumber rubocop]
33
- task :default => %i[test]
25
+ task test: %i[clean spec cucumber rubocop]
26
+ task default: %i[test]
34
27
 
35
28
  begin
36
29
  require 'github_changelog_generator/task'
@@ -44,12 +37,12 @@ begin
44
37
 
45
38
  # Workaround for https://github.com/github-changelog-generator/github-changelog-generator/issues/715
46
39
  require 'rbconfig'
47
- if RbConfig::CONFIG['host_os'] =~ /linux/
40
+ if /linux/.match?(RbConfig::CONFIG['host_os'])
48
41
  task :changelog do
49
42
  puts 'Fixing line endings...'
50
43
  changelog_file = File.join(__dir__, 'CHANGELOG.md')
51
44
  changelog_txt = File.read(changelog_file)
52
- new_contents = changelog_txt.gsub(/\r\n/, "\n")
45
+ new_contents = changelog_txt.gsub("\r\n", "\n")
53
46
  File.open(changelog_file, 'w') { |file| file.puts new_contents }
54
47
  end
55
48
  end
@@ -21,12 +21,12 @@ module ModuleSync
21
21
 
22
22
  class Hook < Thor
23
23
  option :hook_args,
24
- :aliases => '-a',
25
- :desc => 'Arguments to pass to msync in the git hook'
24
+ aliases: '-a',
25
+ desc: 'Arguments to pass to msync in the git hook'
26
26
  option :branch,
27
- :aliases => '-b',
28
- :desc => 'Branch name to pass to msync in the git hook',
29
- :default => CLI.defaults[:branch]
27
+ aliases: '-b',
28
+ desc: 'Branch name to pass to msync in the git hook',
29
+ default: CLI.defaults[:branch]
30
30
  desc 'activate', 'Activate the git hook.'
31
31
  def activate
32
32
  ModuleSync.hook CLI.prepare_options(options, hook: 'activate')
@@ -40,106 +40,106 @@ module ModuleSync
40
40
 
41
41
  class Base < Thor
42
42
  class_option :project_root,
43
- :aliases => '-c',
44
- :desc => 'Path used by git to clone modules into.',
45
- :default => CLI.defaults[:project_root]
43
+ aliases: '-c',
44
+ desc: 'Path used by git to clone modules into.',
45
+ default: CLI.defaults[:project_root]
46
46
  class_option :git_base,
47
- :desc => 'Specify the base part of a git URL to pull from',
48
- :default => CLI.defaults[:git_base] || 'git@github.com:'
47
+ desc: 'Specify the base part of a git URL to pull from',
48
+ default: CLI.defaults[:git_base] || 'git@github.com:'
49
49
  class_option :namespace,
50
- :aliases => '-n',
51
- :desc => 'Remote github namespace (user or organization) to clone from and push to.',
52
- :default => CLI.defaults[:namespace] || 'puppetlabs'
50
+ aliases: '-n',
51
+ desc: 'Remote github namespace (user or organization) to clone from and push to.',
52
+ default: CLI.defaults[:namespace] || 'puppetlabs'
53
53
  class_option :filter,
54
- :aliases => '-f',
55
- :desc => 'A regular expression to select repositories to update.'
54
+ aliases: '-f',
55
+ desc: 'A regular expression to select repositories to update.'
56
56
  class_option :negative_filter,
57
- :aliases => '-x',
58
- :desc => 'A regular expression to skip repositories.'
57
+ aliases: '-x',
58
+ desc: 'A regular expression to skip repositories.'
59
59
  class_option :verbose,
60
- :aliases => '-v',
61
- :desc => 'Verbose mode',
62
- :type => :boolean,
63
- :default => false
60
+ aliases: '-v',
61
+ desc: 'Verbose mode',
62
+ type: :boolean,
63
+ default: false
64
64
 
65
65
  desc 'update', 'Update the modules in managed_modules.yml'
66
66
  option :message,
67
- :aliases => '-m',
68
- :desc => 'Commit message to apply to updated modules. Required unless running in noop mode.',
69
- :default => CLI.defaults[:message]
67
+ aliases: '-m',
68
+ desc: 'Commit message to apply to updated modules. Required unless running in noop mode.',
69
+ default: CLI.defaults[:message]
70
70
  option :configs,
71
- :aliases => '-c',
72
- :desc => 'The local directory or remote repository to define the list of managed modules,' \
73
- ' the file templates, and the default values for template variables.'
71
+ aliases: '-c',
72
+ desc: 'The local directory or remote repository to define the list of managed modules, ' \
73
+ 'the file templates, and the default values for template variables.'
74
74
  option :managed_modules_conf,
75
- :desc => 'The file name to define the list of managed modules'
75
+ desc: 'The file name to define the list of managed modules'
76
76
  option :remote_branch,
77
- :aliases => '-r',
78
- :desc => 'Remote branch name to push the changes to. Defaults to the branch name.',
79
- :default => CLI.defaults[:remote_branch]
77
+ aliases: '-r',
78
+ desc: 'Remote branch name to push the changes to. Defaults to the branch name.',
79
+ default: CLI.defaults[:remote_branch]
80
80
  option :skip_broken,
81
- :type => :boolean,
82
- :aliases => '-s',
83
- :desc => 'Process remaining modules if an error is found',
84
- :default => false
81
+ type: :boolean,
82
+ aliases: '-s',
83
+ desc: 'Process remaining modules if an error is found',
84
+ default: false
85
85
  option :amend,
86
- :type => :boolean,
87
- :desc => 'Amend previous commit',
88
- :default => false
86
+ type: :boolean,
87
+ desc: 'Amend previous commit',
88
+ default: false
89
89
  option :force,
90
- :type => :boolean,
91
- :desc => 'Force push amended commit',
92
- :default => false
90
+ type: :boolean,
91
+ desc: 'Force push amended commit',
92
+ default: false
93
93
  option :noop,
94
- :type => :boolean,
95
- :desc => 'No-op mode',
96
- :default => false
94
+ type: :boolean,
95
+ desc: 'No-op mode',
96
+ default: false
97
97
  option :pr,
98
- :type => :boolean,
99
- :desc => 'Submit pull/merge request',
100
- :default => false
98
+ type: :boolean,
99
+ desc: 'Submit pull/merge request',
100
+ default: false
101
101
  option :pr_title,
102
- :desc => 'Title of pull/merge request',
103
- :default => CLI.defaults[:pr_title] || 'Update to module template files'
102
+ desc: 'Title of pull/merge request',
103
+ default: CLI.defaults[:pr_title] || 'Update to module template files'
104
104
  option :pr_labels,
105
- :type => :array,
106
- :desc => 'Labels to add to the pull/merge request',
107
- :default => CLI.defaults[:pr_labels] || []
105
+ type: :array,
106
+ desc: 'Labels to add to the pull/merge request',
107
+ default: CLI.defaults[:pr_labels] || []
108
108
  option :pr_target_branch,
109
- :desc => 'Target branch for the pull/merge request',
110
- :default => CLI.defaults[:pr_target_branch]
109
+ desc: 'Target branch for the pull/merge request',
110
+ default: CLI.defaults[:pr_target_branch]
111
111
  option :offline,
112
- :type => :boolean,
113
- :desc => 'Do not run any Git commands. Allows the user to manage Git outside of ModuleSync.',
114
- :default => false
112
+ type: :boolean,
113
+ desc: 'Do not run any Git commands. Allows the user to manage Git outside of ModuleSync.',
114
+ default: false
115
115
  option :bump,
116
- :type => :boolean,
117
- :desc => 'Bump module version to the next minor',
118
- :default => false
116
+ type: :boolean,
117
+ desc: 'Bump module version to the next minor',
118
+ default: false
119
119
  option :changelog,
120
- :type => :boolean,
121
- :desc => 'Update CHANGELOG.md if version was bumped',
122
- :default => false
120
+ type: :boolean,
121
+ desc: 'Update CHANGELOG.md if version was bumped',
122
+ default: false
123
123
  option :tag,
124
- :type => :boolean,
125
- :desc => 'Git tag with the current module version',
126
- :default => false
124
+ type: :boolean,
125
+ desc: 'Git tag with the current module version',
126
+ default: false
127
127
  option :tag_pattern,
128
- :desc => 'The pattern to use when tagging releases.'
128
+ desc: 'The pattern to use when tagging releases.'
129
129
  option :pre_commit_script,
130
- :desc => 'A script to be run before committing',
131
- :default => CLI.defaults[:pre_commit_script]
130
+ desc: 'A script to be run before committing',
131
+ default: CLI.defaults[:pre_commit_script]
132
132
  option :fail_on_warnings,
133
- :type => :boolean,
134
- :aliases => '-F',
135
- :desc => 'Produce a failure exit code when there are warnings' \
136
- ' (only has effect when --skip_broken is enabled)',
137
- :default => false
133
+ type: :boolean,
134
+ aliases: '-F',
135
+ desc: 'Produce a failure exit code when there are warnings ' \
136
+ '(only has effect when --skip_broken is enabled)',
137
+ default: false
138
138
  option :branch,
139
- :aliases => '-b',
140
- :desc => 'Branch name to make the changes in.' \
141
- ' Defaults to the default branch of the upstream repository, but falls back to "master".',
142
- :default => CLI.defaults[:branch]
139
+ aliases: '-b',
140
+ desc: 'Branch name to make the changes in. ' \
141
+ 'Defaults to the default branch of the upstream repository, but falls back to "master".',
142
+ default: CLI.defaults[:branch]
143
143
  def update
144
144
  config = CLI.prepare_options(options)
145
145
  raise Thor::Error, 'No value provided for required option "--message"' unless config[:noop] \
@@ -164,19 +164,19 @@ module ModuleSync
164
164
  DESC
165
165
 
166
166
  option :configs,
167
- :aliases => '-c',
168
- :desc => 'The local directory or remote repository to define the list of managed modules,' \
169
- ' the file templates, and the default values for template variables.'
167
+ aliases: '-c',
168
+ desc: 'The local directory or remote repository to define the list of managed modules, ' \
169
+ 'the file templates, and the default values for template variables.'
170
170
  option :managed_modules_conf,
171
- :desc => 'The file name to define the list of managed modules'
171
+ desc: 'The file name to define the list of managed modules'
172
172
  option :branch,
173
- :aliases => '-b',
174
- :desc => 'Branch name to make the changes in.',
175
- :default => CLI.defaults[:branch]
173
+ aliases: '-b',
174
+ desc: 'Branch name to make the changes in.',
175
+ default: CLI.defaults[:branch]
176
176
  option :fail_fast,
177
- :type => :boolean,
178
- :desc => 'Abort the run after a command execution failure',
179
- :default => CLI.defaults[:fail_fast].nil? ? true : CLI.defaults[:fail_fast]
177
+ type: :boolean,
178
+ desc: 'Abort the run after a command execution failure',
179
+ default: CLI.defaults[:fail_fast].nil? ? true : CLI.defaults[:fail_fast]
180
180
  def execute(*command_args)
181
181
  raise Thor::Error, 'COMMAND is a required argument' if command_args.empty?
182
182
 
@@ -196,38 +196,38 @@ module ModuleSync
196
196
  \x5 * Switch to specified branch
197
197
  DESC
198
198
  option :configs,
199
- :aliases => '-c',
200
- :desc => 'The local directory or remote repository to define the list of managed modules,' \
201
- ' the file templates, and the default values for template variables.'
199
+ aliases: '-c',
200
+ desc: 'The local directory or remote repository to define the list of managed modules, ' \
201
+ 'the file templates, and the default values for template variables.'
202
202
  option :managed_modules_conf,
203
- :desc => 'The file name to define the list of managed modules'
203
+ desc: 'The file name to define the list of managed modules'
204
204
  option :branch,
205
- :aliases => '-b',
206
- :desc => 'Branch name to make the changes in.',
207
- :default => CLI.defaults[:branch]
205
+ aliases: '-b',
206
+ desc: 'Branch name to make the changes in.',
207
+ default: CLI.defaults[:branch]
208
208
  option :offline,
209
- :type => :boolean,
210
- :desc => 'Only proceed local operations',
211
- :default => false
209
+ type: :boolean,
210
+ desc: 'Only proceed local operations',
211
+ default: false
212
212
  option :source_branch,
213
- :desc => 'Branch to reset from (e.g. origin/wip)'
213
+ desc: 'Branch to reset from (e.g. origin/wip)'
214
214
  def reset
215
215
  ModuleSync.reset CLI.prepare_options(options)
216
216
  end
217
217
 
218
218
  desc 'push', 'Push all available commits from branch to remote'
219
219
  option :configs,
220
- :aliases => '-c',
221
- :desc => 'The local directory or remote repository to define the list of managed modules,' \
222
- ' the file templates, and the default values for template variables.'
220
+ aliases: '-c',
221
+ desc: 'The local directory or remote repository to define the list of managed modules, ' \
222
+ 'the file templates, and the default values for template variables.'
223
223
  option :managed_modules_conf,
224
- :desc => 'The file name to define the list of managed modules'
224
+ desc: 'The file name to define the list of managed modules'
225
225
  option :branch,
226
- :aliases => '-b',
227
- :desc => 'Branch name to push',
228
- :default => CLI.defaults[:branch]
226
+ aliases: '-b',
227
+ desc: 'Branch name to push',
228
+ default: CLI.defaults[:branch]
229
229
  option :remote_branch,
230
- :desc => 'Remote branch to push to (e.g. maintenance)'
230
+ desc: 'Remote branch to push to (e.g. maintenance)'
231
231
  def push
232
232
  ModuleSync.push CLI.prepare_options(options)
233
233
  end