renuo-cli 4.5.0 → 4.5.1

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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/Rakefile +3 -3
  4. data/lib/renuo/cli/app/command_helper.rb +4 -4
  5. data/lib/renuo/cli/app/commit_leaderboard_stage.rb +109 -0
  6. data/lib/renuo/cli/app/commit_leaderboard_sync.rb +20 -20
  7. data/lib/renuo/cli/app/configure_semaphore.rb +8 -8
  8. data/lib/renuo/cli/app/configure_sentry.rb +5 -5
  9. data/lib/renuo/cli/app/create_aws_project.rb +23 -23
  10. data/lib/renuo/cli/app/create_heroku_app.rb +2 -3
  11. data/lib/renuo/cli/app/create_new_logins.rb +5 -5
  12. data/lib/renuo/cli/app/create_slidev_presentation.rb +11 -11
  13. data/lib/renuo/cli/app/environments.rb +3 -3
  14. data/lib/renuo/cli/app/fetch_emails.rb +6 -6
  15. data/lib/renuo/cli/app/generate_password.rb +2 -2
  16. data/lib/renuo/cli/app/heroku_apps.rb +1 -1
  17. data/lib/renuo/cli/app/heroku_users.rb +3 -3
  18. data/lib/renuo/cli/app/local_storage.rb +5 -5
  19. data/lib/renuo/cli/app/name_display.rb +11 -11
  20. data/lib/renuo/cli/app/redmine/csv_base_service.rb +5 -5
  21. data/lib/renuo/cli/app/redmine/issue.rb +3 -3
  22. data/lib/renuo/cli/app/release_project.rb +25 -25
  23. data/lib/renuo/cli/app/release_xing.rb +5 -5
  24. data/lib/renuo/cli/app/renuo_version.rb +2 -2
  25. data/lib/renuo/cli/app/secrets_fetcher.rb +18 -18
  26. data/lib/renuo/cli/app/services/cloudfront_config_service.rb +13 -13
  27. data/lib/renuo/cli/app/services/markdown_parser_service.rb +3 -3
  28. data/lib/renuo/cli/app/services/renuo_cli_config.rb +4 -4
  29. data/lib/renuo/cli/app/setup_uptimerobot.rb +17 -17
  30. data/lib/renuo/cli/app/toggl/detail.rb +4 -4
  31. data/lib/renuo/cli/app/toggl/time_entry.rb +4 -4
  32. data/lib/renuo/cli/app/toggl/user.rb +3 -3
  33. data/lib/renuo/cli/app/toggl/workspace.rb +3 -3
  34. data/lib/renuo/cli/app/toggl_redmine_comparator.rb +26 -26
  35. data/lib/renuo/cli/app/upgrade_laptop/upgrade_laptop_execution.rb +4 -4
  36. data/lib/renuo/cli/app/upgrade_laptop/upgrade_mac_os.rb +4 -4
  37. data/lib/renuo/cli/app/upgrade_laptop.rb +4 -4
  38. data/lib/renuo/cli/app/work.rb +12 -12
  39. data/lib/renuo/cli/version.rb +2 -2
  40. data/lib/renuo/cli.rb +148 -146
  41. data/renuo-cli.gemspec +33 -33
  42. metadata +3 -3
  43. data/lib/renuo/cli/app/commit_leaderboard.rb +0 -130
data/lib/renuo/cli.rb CHANGED
@@ -1,38 +1,38 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'renuo/cli/version'
4
- require 'rubygems'
5
- require 'gems'
6
- require 'colorize'
7
- require 'tmpdir'
8
- require 'net/http'
9
- require 'renuo/cli/app/services/renuo_cli_config'
10
- require 'renuo/cli/app/name_display'
11
- require 'renuo/cli/app/local_storage'
12
- require 'renuo/cli/app/list_large_git_files'
13
- require 'renuo/cli/app/generate_password'
14
- require 'renuo/cli/app/upgrade_laptop'
15
- require 'renuo/cli/app/create_aws_project'
16
- require 'renuo/cli/app/create_heroku_app'
17
- require 'renuo/cli/app/configure_sentry'
18
- require 'renuo/cli/app/create_new_logins'
19
- require 'renuo/cli/app/work'
20
- require 'renuo/cli/app/release_project'
21
- require 'renuo/cli/app/fetch_emails'
22
- require 'renuo/cli/app/heroku_users'
23
- require 'renuo/cli/app/setup_uptimerobot'
24
- require 'renuo/cli/app/release_xing'
25
- require 'renuo/cli/app/configure_semaphore'
26
- require 'renuo/cli/app/toggl_redmine_comparator'
27
- require 'renuo/cli/app/renuo_version'
28
- require 'renuo/cli/app/create_slidev_presentation'
29
- require 'renuo/cli/app/commit_leaderboard'
30
- require 'renuo/cli/app/commit_leaderboard_sync'
31
- require 'renuo/cli/app/secrets_fetcher'
32
- require 'highline'
3
+ require "renuo/cli/version"
4
+ require "rubygems"
5
+ require "gems"
6
+ require "colorize"
7
+ require "tmpdir"
8
+ require "net/http"
9
+ require "renuo/cli/app/services/renuo_cli_config"
10
+ require "renuo/cli/app/name_display"
11
+ require "renuo/cli/app/local_storage"
12
+ require "renuo/cli/app/list_large_git_files"
13
+ require "renuo/cli/app/generate_password"
14
+ require "renuo/cli/app/upgrade_laptop"
15
+ require "renuo/cli/app/create_aws_project"
16
+ require "renuo/cli/app/create_heroku_app"
17
+ require "renuo/cli/app/configure_sentry"
18
+ require "renuo/cli/app/create_new_logins"
19
+ require "renuo/cli/app/work"
20
+ require "renuo/cli/app/release_project"
21
+ require "renuo/cli/app/fetch_emails"
22
+ require "renuo/cli/app/heroku_users"
23
+ require "renuo/cli/app/setup_uptimerobot"
24
+ require "renuo/cli/app/release_xing"
25
+ require "renuo/cli/app/configure_semaphore"
26
+ require "renuo/cli/app/toggl_redmine_comparator"
27
+ require "renuo/cli/app/renuo_version"
28
+ require "renuo/cli/app/create_slidev_presentation"
29
+ require "renuo/cli/app/commit_leaderboard_stage"
30
+ require "renuo/cli/app/commit_leaderboard_sync"
31
+ require "renuo/cli/app/secrets_fetcher"
32
+ require "highline"
33
33
 
34
34
  def agree(question)
35
- question += ' [y/n]' if question
35
+ question += " [y/n]" if question
36
36
  super
37
37
  end
38
38
 
@@ -40,81 +40,81 @@ end
40
40
  module Renuo
41
41
  class CLI
42
42
  def start
43
- require 'commander/import'
43
+ require "commander/import"
44
44
  program :version, Renuo::Cli::VERSION
45
- program :description, 'Renuo CLI'
45
+ program :description, "Renuo CLI"
46
46
 
47
47
  info = Gems.info Renuo::Cli::NAME
48
48
 
49
- if Gem::Version.new(Renuo::Cli::VERSION) < Gem::Version.new(info['version'])
50
- say "You are running the version #{Renuo::Cli::VERSION} but the brand new #{info['version']} is available. 🎉"
49
+ if Gem::Version.new(Renuo::Cli::VERSION) < Gem::Version.new(info["version"])
50
+ say "You are running the version #{Renuo::Cli::VERSION} but the brand new #{info["version"]} is available. 🎉"
51
51
  if agree("Why don't you update with `gem update renuo-cli`? I can run it for you. 💪")
52
52
  system("gem update #{Renuo::Cli::NAME}")
53
- abort 'Nice! I updated myself. 🤩 Now you can run the command again.'
53
+ abort "Nice! I updated myself. 🤩 Now you can run the command again."
54
54
  end
55
- abort('Good. Just do it yourself then...😒')
55
+ abort("Good. Just do it yourself then...😒")
56
56
  end
57
57
 
58
- command :'display-name' do |c|
59
- c.syntax = 'renuo display-name [options]'
60
- c.summary = 'Sets the name of a customer on the Renuo dashboard'
61
- c.description = 'Sets the name of a customer on the Renuo dashboard'
58
+ command :"display-name" do |c|
59
+ c.syntax = "renuo display-name [options]"
60
+ c.summary = "Sets the name of a customer on the Renuo dashboard"
61
+ c.description = "Sets the name of a customer on the Renuo dashboard"
62
62
  c.example 'Display "Peter Muster" on the dashboard', 'renuo display-name "Peter Muster"'
63
- c.example 'Remove the current name from the dashboard', 'renuo display-name --delete'
64
- c.example 'Override the current message on the dashboard', 'renuo display-name Happy friday 🍻 --override'
65
- c.option '--delete', 'Deletes the current name'
66
- c.option '--override', 'Overrides the entire message'
67
- c.option '--monitor', 'Open the Google slides'
63
+ c.example "Remove the current name from the dashboard", "renuo display-name --delete"
64
+ c.example "Override the current message on the dashboard", "renuo display-name Happy friday 🍻 --override"
65
+ c.option "--delete", "Deletes the current name"
66
+ c.option "--override", "Overrides the entire message"
67
+ c.option "--monitor", "Open the Google slides"
68
68
  c.action do |args, options|
69
69
  NameDisplay.new.run(args, options)
70
70
  end
71
71
  end
72
72
 
73
- command 'list-large-git-files' do |c|
74
- c.syntax = 'renuo list-large-git-files'
75
- c.summary = 'Lists the 5 largest files in a git repository. Warning: must be a bare checkout of the repo!'
73
+ command "list-large-git-files" do |c|
74
+ c.syntax = "renuo list-large-git-files"
75
+ c.summary = "Lists the 5 largest files in a git repository. Warning: must be a bare checkout of the repo!"
76
76
  c.description = "Lists the 5 largest files in a git repository.\nWarning: must be a bare checkout of the repo!"
77
- c.example 'list the 5 largest git files of github.com/renuo/renuo-cli',
78
- 'git clone --bare git@github.com:renuo/renuo-cli.git && ' \
79
- 'cd renuo-cli.git && renuo list-large-git-files'
77
+ c.example "list the 5 largest git files of github.com/renuo/renuo-cli",
78
+ "git clone --bare git@github.com:renuo/renuo-cli.git && " \
79
+ "cd renuo-cli.git && renuo list-large-git-files"
80
80
  c.action do
81
81
  ListLargeGitFiles.new.run
82
82
  end
83
83
  end
84
84
 
85
- command 'generate-password' do |c|
86
- c.syntax = 'renuo generate-password'
87
- c.summary = 'Generates a phrase of random 0-9a-zA-Z characters. Choose a substring of it as a new password.'
88
- c.description = 'Generates a phrase of random 0-9a-zA-Z characters. Choose a substring of it as a new password.'
89
- c.example 'renuo generate-password', 'generates a random password'
85
+ command "generate-password" do |c|
86
+ c.syntax = "renuo generate-password"
87
+ c.summary = "Generates a phrase of random 0-9a-zA-Z characters. Choose a substring of it as a new password."
88
+ c.description = "Generates a phrase of random 0-9a-zA-Z characters. Choose a substring of it as a new password."
89
+ c.example "renuo generate-password", "generates a random password"
90
90
  c.action do
91
91
  GeneratePassword.new.run
92
92
  end
93
93
  end
94
94
 
95
- command 'upgrade-laptop' do |c|
96
- c.syntax = 'renuo upgrade-laptop'
97
- c.summary = 'Upgrades the installed apps from the app store, macOS and homebrew'
98
- c.description = 'Upgrades the installed apps from the app store, macOS and homebrew'
99
- c.example 'renuo upgrade-laptop', 'upgrades your laptop'
95
+ command "upgrade-laptop" do |c|
96
+ c.syntax = "renuo upgrade-laptop"
97
+ c.summary = "Upgrades the installed apps from the app store, macOS and homebrew"
98
+ c.description = "Upgrades the installed apps from the app store, macOS and homebrew"
99
+ c.example "renuo upgrade-laptop", "upgrades your laptop"
100
100
  c.action do
101
101
  UpgradeLaptop.new.run
102
102
  end
103
103
  end
104
104
 
105
- command 'create-new-logins' do |c|
106
- c.syntax = 'renuo create-new-logins'
107
- c.summary = 'Guides you through the sign up pages for Sentry, NewRelic and Gemnasium'
108
- c.description = 'Guides you through the sign up pages for Sentry, NewRelic and Gemnasium'
109
- c.example 'renuo create-new-logins', 'creates new logins'
105
+ command "create-new-logins" do |c|
106
+ c.syntax = "renuo create-new-logins"
107
+ c.summary = "Guides you through the sign up pages for Sentry, NewRelic and Gemnasium"
108
+ c.description = "Guides you through the sign up pages for Sentry, NewRelic and Gemnasium"
109
+ c.example "renuo create-new-logins", "creates new logins"
110
110
  c.action do
111
111
  CreateNewLogins.new.run
112
112
  end
113
113
  end
114
114
 
115
- command 'create-aws-project' do |c|
116
- c.syntax = 'renuo create-aws-project'
117
- c.summary = 'Generates necessary commands for our project setup on AWS incl. necessary installations.'
115
+ command "create-aws-project" do |c|
116
+ c.syntax = "renuo create-aws-project"
117
+ c.summary = "Generates necessary commands for our project setup on AWS incl. necessary installations."
118
118
  c.description = <<~DESCRIPTION
119
119
  This creates commands for creating AWS users, buckets an versioning policies and CloudFront.
120
120
  It also guides you to set up the necessary environment.
@@ -133,134 +133,135 @@ module Renuo
133
133
  - enable versioning for main buckets
134
134
  (- set up a CloudFront distribution for each environment with the default config or plus alias if configured)
135
135
  DESCRIPTION
136
- c.example 'Setup a project (you will be asked for details)', 'renuo create-aws-project'
136
+ c.example "Setup a project (you will be asked for details)", "renuo create-aws-project"
137
137
  c.action do |_args, _options|
138
138
  CreateAwsProject.new.run
139
139
  end
140
140
  end
141
141
 
142
- command 'work' do |c|
143
- c.syntax = 'renuo work'
144
- c.summary = 'A utility command to start working on a ticket.'
145
- c.description = 'When you start working on a feature, it will jump to the project folder, ' \
146
- 'start a new feature with the ticket number,' \
142
+ command "work" do |c|
143
+ c.syntax = "renuo work"
144
+ c.summary = "A utility command to start working on a ticket."
145
+ c.description = "When you start working on a feature, it will jump to the project folder, " \
146
+ "start a new feature with the ticket number," \
147
147
  'move the ticket in "In progress" state on Redmine and start Toggl with the ' \
148
- 'ticket number or add the ticket number to the running one if there was none.'
149
- c.example 'renuo work start kinova 1234', 'start working on ticket 1234 on kinova project'
148
+ "ticket number or add the ticket number to the running one if there was none."
149
+ c.example "renuo work start kinova 1234", "start working on ticket 1234 on kinova project"
150
150
  c.action do |args|
151
151
  Work.new.run(args)
152
152
  end
153
153
  end
154
154
 
155
- command 'release' do |c|
156
- c.syntax = 'renuo release'
157
- c.summary = 'Release a projects state of develop (on github) to main in one command.'
158
- c.description = 'Creates a new release version of a project on main as either a Major, Minor, ' \
159
- 'Patch or Custom release based on the current state of develop on Github'
160
- c.example 'renuo release my-project minor', 'release a minor release of my-project'
161
- c.example 'renuo release my-project custom 2.5.0', 'release my-project as release 2.5.0'
155
+ command "release" do |c|
156
+ c.syntax = "renuo release"
157
+ c.summary = "Release a projects state of develop (on github) to main in one command."
158
+ c.description = "Creates a new release version of a project on main as either a Major, Minor, " \
159
+ "Patch or Custom release based on the current state of develop on Github"
160
+ c.example "renuo release my-project minor", "release a minor release of my-project"
161
+ c.example "renuo release my-project custom 2.5.0", "release my-project as release 2.5.0"
162
162
  c.action do |args|
163
163
  ReleaseProject.new.run(args)
164
164
  end
165
165
  end
166
166
 
167
- command 'create-heroku-app' do |c|
168
- c.syntax = 'renuo create-heroku-app'
169
- c.summary = 'Generates the script necessary to setup an application on Heroku.'
170
- c.description = 'Generates the script necessary to setup an application on Heroku.'
171
- c.example 'renuo create-heroku-app hello', 'generates the command to create hello on Heroku'
167
+ command "create-heroku-app" do |c|
168
+ c.syntax = "renuo create-heroku-app"
169
+ c.summary = "Generates the script necessary to setup an application on Heroku."
170
+ c.description = "Generates the script necessary to setup an application on Heroku."
171
+ c.example "renuo create-heroku-app hello", "generates the command to create hello on Heroku"
172
172
  c.action do |args|
173
173
  CreateHerokuApp.new.run(args)
174
174
  end
175
175
  end
176
176
 
177
- command 'configure-sentry' do |c|
178
- c.syntax = 'renuo configure-sentry [project-name] [SENTRY_DSN]'
179
- c.summary = 'Generates the script necessary to setup sentry on Heroku.'
177
+ command "configure-sentry" do |c|
178
+ c.syntax = "renuo configure-sentry [project-name] [SENTRY_DSN]"
179
+ c.summary = "Generates the script necessary to setup sentry on Heroku."
180
180
  c.description = c.summary
181
- c.example 'renuo configure-sentry myproject https://randomkey@sentry.io/11223344',
182
- 'generates the command to configure sentry for myproject on Heroku'
181
+ c.example "renuo configure-sentry myproject https://randomkey@sentry.io/11223344",
182
+ "generates the command to configure sentry for myproject on Heroku"
183
183
  c.action do |args|
184
184
  ConfigureSentry.new.run(args)
185
185
  end
186
186
  end
187
187
 
188
- command 'fetch-emails' do |c|
189
- c.syntax = 'renuo fetch-emails'
190
- c.summary = 'Retrieves all renuo employees email addresses'
191
- c.description = 'Retrieves all renuo employees email addresses. One per line.'
188
+ command "fetch-emails" do |c|
189
+ c.syntax = "renuo fetch-emails"
190
+ c.summary = "Retrieves all renuo employees email addresses"
191
+ c.description = "Retrieves all renuo employees email addresses. One per line."
192
192
  c.action do |args|
193
193
  FetchEmails.new.run(args)
194
194
  end
195
195
  end
196
196
 
197
- command 'heroku-users' do |c|
198
- c.syntax = 'renuo heroku-users add/remove emailaddress'
199
- c.summary = 'Prints a list of commands to add or remove an email address from all Heroku projects'
200
- c.description = 'Useful when a new person is hired or a person quits.'
201
- c.example 'renuo heroku-users add alessandro.rodi@renuo.ch',
202
- 'Adds the user alessandro.rodi@renuo.ch to all the Heroku projects'
203
- c.example 'renuo heroku-users remove alessandro.rodi@renuo.ch',
204
- 'Removes the user alessandro.rodi@renuo.ch from all the Heroku projects'
197
+ command "heroku-users" do |c|
198
+ c.syntax = "renuo heroku-users add/remove emailaddress"
199
+ c.summary = "Prints a list of commands to add or remove an email address from all Heroku projects"
200
+ c.description = "Useful when a new person is hired or a person quits."
201
+ c.example "renuo heroku-users add alessandro.rodi@renuo.ch",
202
+ "Adds the user alessandro.rodi@renuo.ch to all the Heroku projects"
203
+ c.example "renuo heroku-users remove alessandro.rodi@renuo.ch",
204
+ "Removes the user alessandro.rodi@renuo.ch from all the Heroku projects"
205
205
  c.action do |args|
206
206
  HerokuUsers.new.run(args)
207
207
  end
208
208
  end
209
209
 
210
- command 'setup-uptimerobot' do |c|
211
- c.syntax = 'renuo setup-uptimerobot'
212
- c.summary = 'Sets up uptimerobot for the given project'
213
- c.description = 'The uptimerobot configuration is mandatory for most projects. ' \
214
- 'This command sets everything up and pauses the monitoring directly. Once the app is ready, ' \
215
- 'the monitoring should get started.'
216
- c.example 'renuo setup-uptimerobot https://redmine.ch', 'Configures redmine monitoring on uptimerobot'
210
+ command "setup-uptimerobot" do |c|
211
+ c.syntax = "renuo setup-uptimerobot"
212
+ c.summary = "Sets up uptimerobot for the given project"
213
+ c.description = "The uptimerobot configuration is mandatory for most projects. " \
214
+ "This command sets everything up and pauses the monitoring directly. Once the app is ready, " \
215
+ "the monitoring should get started."
216
+ c.example "renuo setup-uptimerobot https://redmine.ch", "Configures redmine monitoring on uptimerobot"
217
217
  c.action do |args|
218
218
  SetupUptimerobot.new(args).run
219
219
  end
220
220
  end
221
221
 
222
- command 'release-xing' do |c|
223
- c.syntax = 'renuo release-xing'
224
- c.summary = 'Release Xing to preview.'
225
- c.description = 'Xing needs to be released manually. ' \
226
- 'You need a VPN connection open before runnign this command.'
222
+ command "release-xing" do |c|
223
+ c.syntax = "renuo release-xing"
224
+ c.summary = "Release Xing to preview."
225
+ c.description = "Xing needs to be released manually. " \
226
+ "You need a VPN connection open before runnign this command."
227
227
  c.action do |_args|
228
228
  ReleaseXing.new.run
229
229
  end
230
230
  end
231
231
 
232
- command 'configure-semaphore' do |c|
233
- c.syntax = 'renuo configure-semaphore'
234
- c.summary = 'Adds standard semaphore configuration files to a project and creates the notifications'
235
- c.description = 'Run this command with a project, to add the semaphore configuration files ' \
236
- 'and create notifications.'
232
+ command "configure-semaphore" do |c|
233
+ c.syntax = "renuo configure-semaphore"
234
+ c.summary = "Adds standard semaphore configuration files to a project and creates the notifications"
235
+ c.description = "Run this command with a project, to add the semaphore configuration files " \
236
+ "and create notifications."
237
237
  c.action do |_args|
238
238
  ConfigureSemaphore.new.call
239
239
  end
240
240
  end
241
241
 
242
- command 'toggl-redmine' do |c|
243
- c.syntax = 'renuo toggl-redmine'
244
- c.summary = 'Compares your time entries between Toggl and Redmine'
245
- c.description = 'This command extracts your time entries in Toggl and in Redmine and checks if they are ' \
246
- 'consistant. It can help you in your time booking to find if you booked something wrong'
242
+ command "toggl-redmine" do |c|
243
+ c.syntax = "renuo toggl-redmine"
244
+ c.summary = "Compares your time entries between Toggl and Redmine"
245
+ c.description = "This command extracts your time entries in Toggl and in Redmine and checks if they are " \
246
+ "consistant. It can help you in your time booking to find if you booked something wrong"
247
247
  c.action do |_args|
248
248
  TogglRedmineComparator.call
249
249
  end
250
250
  end
251
251
 
252
- command 'create-slidev-presentation' do |c|
253
- c.syntax = 'renuo create-slidev-presentation [presentation-name]'
254
- c.summary = 'Creates a new Slidev presentation with the Renuo theme'
255
- c.description = 'Creates a new Slidev presentation with the Renuo theme'
252
+ command "create-slidev-presentation" do |c|
253
+ c.syntax = "renuo create-slidev-presentation [presentation-name]"
254
+ c.summary = "Creates a new Slidev presentation with the Renuo theme"
255
+ c.description = "Creates a new Slidev presentation with the Renuo theme"
256
256
  c.action do |args|
257
257
  CreateSlidevPresentation.new.run(args)
258
258
  end
259
259
  end
260
260
 
261
- command 'commit-leaderboard-stage' do |c|
262
- c.syntax = 'renuo commit-leaderboard-stage [username] [avatar-url] [queue-path]'
263
- c.summary = 'Adds local commits to a local queue for the commit leaderboard'
261
+ command "commit-leaderboard-stage" do |c|
262
+ c.syntax = "renuo commit-leaderboard-stage [username] [avatar-url] [queue-path]"
263
+ c.summary = "Adds local commits to a local queue for the commit leaderboard"
264
+ c.option "--verbose", "Prints the latest commit"
264
265
  c.description = <<~DESCRIPTION
265
266
  Add post-commit hook to `git config core.hookspath` with the following contents:
266
267
 
@@ -270,14 +271,14 @@ module Renuo
270
271
  # You can get the GitHub avatar url using `gh api user | jq .avatar_url`
271
272
  DESCRIPTION
272
273
 
273
- c.action do |args|
274
- CommitLeaderboard.new.run(args)
274
+ c.action do |args, options|
275
+ CommitLeaderboardStage.new.run(args, options)
275
276
  end
276
277
  end
277
278
 
278
- command 'commit-leaderboard-sync' do |c|
279
- c.syntax = 'renuo commit-leaderboard-sync [api-secret] [queue-path] [api-url]'
280
- c.summary = 'Sends commits from the queue to the commit leaderboard'
279
+ command "commit-leaderboard-sync" do |c|
280
+ c.syntax = "renuo commit-leaderboard-sync [api-secret] [queue-path] [api-url]"
281
+ c.summary = "Sends commits from the queue to the commit leaderboard"
281
282
  c.description = <<~DESCRIPTION
282
283
  Sends commits from the queue to the commit leaderboard
283
284
  Add pre-push hook to `git config core.hookspath` with the following contents:
@@ -285,14 +286,15 @@ module Renuo
285
286
  #/usr/bin/env sh
286
287
  renuo commit-leaderboard-sync {SECRET} ~/.renuo-commit-leaderboard.json https://dashboard.renuo.ch/api/v1/commit_leaderboard
287
288
  DESCRIPTION
288
- c.action do |args|
289
- CommitLeaderboardSync.new.run(args)
289
+ c.option "--verbose", "Prints the configuration, request body and response"
290
+ c.action do |args, options|
291
+ CommitLeaderboardSync.new.run(args, options)
290
292
  end
291
293
  end
292
294
 
293
- command 'fetch-secrets' do |c|
294
- c.syntax = 'renuo fetch-secrets'
295
- c.summary = 'Fetches the needed secrets in a project from the renuo secrets store'
295
+ command "fetch-secrets" do |c|
296
+ c.syntax = "renuo fetch-secrets"
297
+ c.summary = "Fetches the needed secrets in a project from the renuo secrets store"
296
298
  c.description = <<~DESCRIPTION
297
299
  Run the command within a project folder to fetch the secrets from the renuo secrets store.
298
300
  The bin/setup of the project might run this command for you.
data/renuo-cli.gemspec CHANGED
@@ -1,49 +1,49 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'renuo/cli/version'
5
+ require "renuo/cli/version"
6
6
 
7
7
  # rubocop:disable Metrics/BlockLength
8
8
  Gem::Specification.new do |spec|
9
9
  spec.name = Renuo::Cli::NAME
10
10
  spec.version = Renuo::Cli::VERSION
11
- spec.authors = ['Renuo AG']
12
- spec.email = ['info@renuo.ch']
11
+ spec.authors = ["Renuo AG"]
12
+ spec.email = ["info@renuo.ch"]
13
13
 
14
- spec.summary = 'The Renuo CLI automates some common workflows.'
15
- spec.description = 'The Renuo CLI automates some commonly used workflows by providing a command line interface.'
16
- spec.homepage = 'https://github.com/renuo/renuo-cli'
17
- spec.license = 'MIT'
14
+ spec.summary = "The Renuo CLI automates some common workflows."
15
+ spec.description = "The Renuo CLI automates some commonly used workflows by providing a command line interface."
16
+ spec.homepage = "https://github.com/renuo/renuo-cli"
17
+ spec.license = "MIT"
18
18
 
19
19
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
- spec.executables << 'renuo'
21
- spec.require_paths = ['lib']
22
- spec.metadata['rubygems_mfa_required'] = 'true'
20
+ spec.executables << "renuo"
21
+ spec.require_paths = ["lib"]
22
+ spec.metadata["rubygems_mfa_required"] = "true"
23
23
 
24
- spec.required_ruby_version = '>= 3.1.0'
24
+ spec.required_ruby_version = ">= 3.1.0"
25
25
 
26
- spec.add_dependency 'activeresource', '~> 5.1.0'
27
- spec.add_dependency 'colorize', '~> 0'
28
- spec.add_dependency 'commander', '~> 4.0'
29
- spec.add_dependency 'gems', '~> 1.1'
30
- spec.add_dependency 'redcarpet', '~> 3.0'
31
- spec.add_dependency 'terminal-table'
26
+ spec.add_dependency "activeresource", "~> 5.1.0"
27
+ spec.add_dependency "colorize", "~> 0"
28
+ spec.add_dependency "commander", "~> 4.0"
29
+ spec.add_dependency "gems", "~> 1.1"
30
+ spec.add_dependency "redcarpet", "~> 3.0"
31
+ spec.add_dependency "terminal-table"
32
32
 
33
- spec.add_development_dependency 'aruba', '~> 0.14.5'
34
- spec.add_development_dependency 'bundler', '~> 2.5'
35
- spec.add_development_dependency 'byebug'
36
- spec.add_development_dependency 'cucumber', '~> 3.1'
37
- spec.add_development_dependency 'dotenv', '~> 2.7.2'
38
- spec.add_development_dependency 'mdl', '~> 0.13'
39
- spec.add_development_dependency 'pry', '~> 0.14'
40
- spec.add_development_dependency 'rake', '~> 13.0'
41
- spec.add_development_dependency 'renuocop'
42
- spec.add_development_dependency 'rspec', '~> 3.5'
43
- spec.add_development_dependency 'rubocop', '~> 1.62'
44
- spec.add_development_dependency 'simplecov'
45
- spec.add_development_dependency 'simplecov-console'
46
- spec.add_development_dependency 'vcr', '~> 6.2'
47
- spec.add_development_dependency 'webmock', '~> 3.23'
33
+ spec.add_development_dependency "aruba", "~> 0.14.5"
34
+ spec.add_development_dependency "bundler", "~> 2.5"
35
+ spec.add_development_dependency "byebug"
36
+ spec.add_development_dependency "cucumber", "~> 3.1"
37
+ spec.add_development_dependency "dotenv", "~> 2.7.2"
38
+ spec.add_development_dependency "mdl", "~> 0.13"
39
+ spec.add_development_dependency "pry", "~> 0.14"
40
+ spec.add_development_dependency "rake", "~> 13.0"
41
+ spec.add_development_dependency "renuocop"
42
+ spec.add_development_dependency "rspec", "~> 3.5"
43
+ spec.add_development_dependency "rubocop", "~> 1.62"
44
+ spec.add_development_dependency "simplecov"
45
+ spec.add_development_dependency "simplecov-console"
46
+ spec.add_development_dependency "vcr", "~> 6.2"
47
+ spec.add_development_dependency "webmock", "~> 3.23"
48
48
  end
49
49
  # rubocop:enable Metrics/BlockLength
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: renuo-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.5.0
4
+ version: 4.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Renuo AG
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-17 00:00:00.000000000 Z
11
+ date: 2024-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -336,7 +336,7 @@ files:
336
336
  - config/1password-secrets.yml
337
337
  - lib/renuo/cli.rb
338
338
  - lib/renuo/cli/app/command_helper.rb
339
- - lib/renuo/cli/app/commit_leaderboard.rb
339
+ - lib/renuo/cli/app/commit_leaderboard_stage.rb
340
340
  - lib/renuo/cli/app/commit_leaderboard_sync.rb
341
341
  - lib/renuo/cli/app/configure_semaphore.rb
342
342
  - lib/renuo/cli/app/configure_sentry.rb