renuo-cli 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/renuo/cli/app/command_helper.rb +18 -0
- data/lib/renuo/cli/app/create_new_logins.rb +2 -3
- data/lib/renuo/cli/app/name_display.rb +21 -5
- data/lib/renuo/cli/app/release_project.rb +5 -9
- data/lib/renuo/cli/app/upgrade_laptop/upgrade_laptop_execution.rb +1 -1
- data/lib/renuo/cli/app/upgrade_laptop/upgrade_mac_os.rb +1 -1
- data/lib/renuo/cli/app/upgrade_laptop.rb +1 -1
- data/lib/renuo/cli/version.rb +1 -1
- data/lib/renuo/cli.rb +3 -0
- metadata +2 -2
- data/lib/renuo/cli/app/upgrade_laptop/run_command.rb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c63f2b385a0924947d1b2a9379a836576b8d28c22a56aab71a8b8c5b7e912a59
|
4
|
+
data.tar.gz: 9f518b1bf101f4a65b93db3a595f5afbc2e1d94389a454511e5c6a4db1bc69d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 920b11fcc5d8135ac1e443916a7453f3317bf9b834438eb7d2c4c0031917250ad525b657cb6cb45b01ca92e4bb287186e34ad44fc7275d47947de590db2b3aeb
|
7
|
+
data.tar.gz: b555c4b20295c9094a43635868ff090f0ca63f50804985a0e2744892d0e51d7e9a2973e6a8e7a5ea735569c6b93f7585537c9c9bfda10d215a58d98a115ae3e0
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module CommandHelper
|
2
|
+
def run_command(command)
|
3
|
+
say "\n#{command.yellow}"
|
4
|
+
system command
|
5
|
+
end
|
6
|
+
|
7
|
+
def open_path(path)
|
8
|
+
system_command = case RbConfig::CONFIG['host_os']
|
9
|
+
when /mswin|mingw|cygwin/
|
10
|
+
'start'
|
11
|
+
when /darwin/
|
12
|
+
'open'
|
13
|
+
when /linux|bsd/
|
14
|
+
'xdg-open'
|
15
|
+
end
|
16
|
+
run_command "#{system_command} #{path}"
|
17
|
+
end
|
18
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class CreateNewLogins
|
2
|
-
include
|
2
|
+
include CommandHelper
|
3
3
|
|
4
4
|
@logins = [{ name: 'Sentry', sign_up_url: 'https://sentry.io/organizations/renuo/members/new/',
|
5
5
|
steps: ['Click on add new Member'] },
|
@@ -20,8 +20,7 @@ class CreateNewLogins
|
|
20
20
|
private
|
21
21
|
|
22
22
|
def open_site(website)
|
23
|
-
|
24
|
-
system "open '#{website}'"
|
23
|
+
open_path(website)
|
25
24
|
wait_to_continue
|
26
25
|
end
|
27
26
|
|
@@ -1,17 +1,33 @@
|
|
1
|
+
require_relative 'command_helper'
|
2
|
+
|
1
3
|
class NameDisplay
|
4
|
+
include CommandHelper
|
5
|
+
|
2
6
|
def run(args, options)
|
3
|
-
return
|
7
|
+
return open_path(SLIDES) if options.monitor
|
8
|
+
return display_name(nil) if options.delete
|
9
|
+
return say('empty argument') if args.empty?
|
4
10
|
|
5
|
-
return
|
11
|
+
return run_heroku_command(args.join(' ')) if options.override
|
6
12
|
|
7
13
|
display_name(args.join(' '))
|
8
14
|
end
|
9
15
|
|
16
|
+
private
|
17
|
+
|
18
|
+
HEROKU_APP_NAME = '-a renuo-dashboard-master'.freeze
|
19
|
+
HEROKU_CLI = 'heroku run'.freeze
|
20
|
+
RENUO_CLI = 'rails renuo:welcome'.freeze
|
21
|
+
SLIDES = 'https://docs.google.com/presentation/d/1mPhQjArZnlUWUa2ik5R9IlGmdCKCwc2_H8Qq-AWgV-A/edit'.freeze
|
22
|
+
WELCOME_MESSAGE = 'Welcome to Renuo'.freeze
|
23
|
+
|
10
24
|
def display_name(name)
|
11
|
-
|
25
|
+
text_message = [WELCOME_MESSAGE, name, '🥳🔥'].compact.join(' ')
|
26
|
+
run_heroku_command(text_message)
|
12
27
|
end
|
13
28
|
|
14
|
-
def
|
15
|
-
|
29
|
+
def run_heroku_command(text_message)
|
30
|
+
rails_command = "\"#{RENUO_CLI}['#{text_message}']\""
|
31
|
+
run_command([HEROKU_CLI, rails_command, HEROKU_APP_NAME].join(' '))
|
16
32
|
end
|
17
33
|
end
|
@@ -1,4 +1,8 @@
|
|
1
|
+
require_relative 'command_helper'
|
2
|
+
|
1
3
|
class ReleaseProject
|
4
|
+
include CommandHelper
|
5
|
+
|
2
6
|
UPDATE_TYPES = %w[major minor patch custom].freeze
|
3
7
|
TMP_FOLDER_NAME = "_RENUO_RELEASE_TEMP_#{rand(100_000_000)}".freeze
|
4
8
|
MOVE_TO_TMP_FOLDER = "mkdir -p #{TMP_FOLDER_NAME} && cd #{TMP_FOLDER_NAME}".freeze
|
@@ -60,15 +64,7 @@ class ReleaseProject
|
|
60
64
|
|
61
65
|
def open_comparison_page
|
62
66
|
puts 'Opening browser to double-check what is going to be deployed…'
|
63
|
-
|
64
|
-
when /mswin|mingw|cygwin/
|
65
|
-
'start'
|
66
|
-
when /darwin/
|
67
|
-
'open'
|
68
|
-
when /linux|bsd/
|
69
|
-
'xdg-open'
|
70
|
-
end
|
71
|
-
system "#{system_command} https://github.com/#{@project_name}/compare/#{main_branch}...develop"
|
67
|
+
open_path "https://github.com/#{@project_name}/compare/#{main_branch}...develop"
|
72
68
|
end
|
73
69
|
|
74
70
|
def checkout_project
|
data/lib/renuo/cli/version.rb
CHANGED
data/lib/renuo/cli.rb
CHANGED
@@ -46,7 +46,10 @@ module Renuo
|
|
46
46
|
c.description = 'Sets the name of a customer on the Renuo dashboard'
|
47
47
|
c.example 'Display "Peter Muster" on the dashboard', 'renuo display-name "Peter Muster"'
|
48
48
|
c.example 'Remove the current name from the dashboard', 'renuo display-name --delete'
|
49
|
+
c.example 'Override the current message on the dashboard', 'renuo display-name Happy friday 🍻 --override'
|
49
50
|
c.option '--delete', 'Deletes the current name'
|
51
|
+
c.option '--override', 'Overrides the entire message'
|
52
|
+
c.option '--monitor', 'Open the Google slides'
|
50
53
|
c.action do |args, options|
|
51
54
|
NameDisplay.new.run(args, options)
|
52
55
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renuo-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Renuo AG
|
@@ -319,6 +319,7 @@ files:
|
|
319
319
|
- bin/run
|
320
320
|
- bin/setup
|
321
321
|
- lib/renuo/cli.rb
|
322
|
+
- lib/renuo/cli/app/command_helper.rb
|
322
323
|
- lib/renuo/cli/app/configure_semaphore.rb
|
323
324
|
- lib/renuo/cli/app/configure_sentry.rb
|
324
325
|
- lib/renuo/cli/app/create_aws_project.rb
|
@@ -351,7 +352,6 @@ files:
|
|
351
352
|
- lib/renuo/cli/app/toggl/workspace.rb
|
352
353
|
- lib/renuo/cli/app/toggl_redmine_comparator.rb
|
353
354
|
- lib/renuo/cli/app/upgrade_laptop.rb
|
354
|
-
- lib/renuo/cli/app/upgrade_laptop/run_command.rb
|
355
355
|
- lib/renuo/cli/app/upgrade_laptop/upgrade_laptop_execution.rb
|
356
356
|
- lib/renuo/cli/app/upgrade_laptop/upgrade_mac_os.rb
|
357
357
|
- lib/renuo/cli/app/work.rb
|