renuo-cli 3.1.7 → 4.2.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/.rubocop.yml +4 -37
- data/.ruby-version +1 -1
- data/.semaphore/main-deploy.yml +1 -1
- data/.semaphore/semaphore.yml +2 -2
- data/.tool-versions +1 -0
- data/Gemfile +2 -0
- data/README.md +3 -3
- data/Rakefile +2 -0
- data/lib/renuo/cli/app/command_helper.rb +2 -0
- data/lib/renuo/cli/app/commit_leaderboard.rb +130 -0
- data/lib/renuo/cli/app/commit_leaderboard_sync.rb +107 -0
- data/lib/renuo/cli/app/configure_semaphore.rb +14 -6
- data/lib/renuo/cli/app/configure_sentry.rb +4 -4
- data/lib/renuo/cli/app/create_aws_project.rb +5 -3
- data/lib/renuo/cli/app/create_heroku_app.rb +3 -3
- data/lib/renuo/cli/app/create_new_logins.rb +2 -0
- data/lib/renuo/cli/app/create_slidev_presentation.rb +46 -0
- data/lib/renuo/cli/app/environments.rb +5 -3
- data/lib/renuo/cli/app/fetch_emails.rb +3 -1
- data/lib/renuo/cli/app/generate_password.rb +2 -0
- data/lib/renuo/cli/app/heroku_apps.rb +3 -3
- data/lib/renuo/cli/app/heroku_users.rb +3 -3
- data/lib/renuo/cli/app/list_large_git_files.rb +4 -2
- data/lib/renuo/cli/app/local_storage.rb +2 -0
- data/lib/renuo/cli/app/name_display.rb +7 -5
- data/lib/renuo/cli/app/package.json +14 -0
- data/lib/renuo/cli/app/redmine/csv_base_service.rb +4 -2
- data/lib/renuo/cli/app/redmine/issue.rb +2 -0
- data/lib/renuo/cli/app/release_project.rb +8 -4
- data/lib/renuo/cli/app/release_xing.rb +2 -0
- data/lib/renuo/cli/app/renuo_version.rb +6 -4
- data/lib/renuo/cli/app/services/cloudfront_config_service.rb +66 -67
- data/lib/renuo/cli/app/services/markdown_parser_service.rb +2 -0
- data/lib/renuo/cli/app/services/renuo_cli_config.rb +2 -0
- data/lib/renuo/cli/app/setup_uptimerobot.rb +1 -1
- data/lib/renuo/cli/app/templates/semaphore/semaphore-deploy.yml.erb +3 -3
- data/lib/renuo/cli/app/templates/semaphore/semaphore.yml.erb +38 -63
- data/lib/renuo/cli/app/templates/slidev/README.md.erb +11 -0
- data/lib/renuo/cli/app/templates/slidev/package.json.erb +16 -0
- data/lib/renuo/cli/app/toggl/detail.rb +2 -0
- data/lib/renuo/cli/app/toggl/time_entry.rb +2 -0
- data/lib/renuo/cli/app/toggl/user.rb +2 -0
- data/lib/renuo/cli/app/toggl/workspace.rb +2 -0
- data/lib/renuo/cli/app/toggl_redmine_comparator.rb +9 -5
- data/lib/renuo/cli/app/upgrade_laptop/upgrade_laptop_execution.rb +2 -0
- data/lib/renuo/cli/app/upgrade_laptop/upgrade_mac_os.rb +3 -1
- data/lib/renuo/cli/app/upgrade_laptop.rb +2 -0
- data/lib/renuo/cli/app/work.rb +3 -1
- data/lib/renuo/cli/version.rb +4 -2
- data/lib/renuo/cli.rb +78 -21
- data/renuo-cli.gemspec +12 -7
- metadata +39 -17
@@ -1,5 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require_relative 'command_helper'
|
2
4
|
|
5
|
+
# rubocop:disable Metrics/ClassLength
|
3
6
|
class ReleaseProject
|
4
7
|
include CommandHelper
|
5
8
|
|
@@ -33,7 +36,7 @@ class ReleaseProject
|
|
33
36
|
|
34
37
|
def validate_update_type
|
35
38
|
unless valid_update_type?
|
36
|
-
abort('>> Please provide the desired update type: major, minor, patch or custom. '\
|
39
|
+
abort('>> Please provide the desired update type: major, minor, patch or custom. ' \
|
37
40
|
'If you are unsure about the type please read https://semver.org')
|
38
41
|
end
|
39
42
|
|
@@ -161,14 +164,14 @@ class ReleaseProject
|
|
161
164
|
|
162
165
|
def ask_for_final_confirmation
|
163
166
|
unless agree(">> Are you sure you wish to deploy '#{@project_name}' " \
|
164
|
-
|
167
|
+
"as a #{@update_type} release (#{current_version} => #{@version})?")
|
165
168
|
abort('>> Cancelling Release.')
|
166
169
|
end
|
167
170
|
|
168
|
-
return unless Time.
|
171
|
+
return unless Time.current.friday? && Time.current.hour >= 16
|
169
172
|
|
170
173
|
unless agree('>> Are you sure you want to deploy on late Friday afternoon? ' \
|
171
|
-
|
174
|
+
'Did you think about your family...waiting for you at home?')
|
172
175
|
abort('>> Very good. Go home now.')
|
173
176
|
end
|
174
177
|
end
|
@@ -198,3 +201,4 @@ class ReleaseProject
|
|
198
201
|
'develop'
|
199
202
|
end
|
200
203
|
end
|
204
|
+
# rubocop:enable Metrics/ClassLength
|
@@ -1,9 +1,11 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class RenuoVersion
|
2
|
-
SEMVER_SCHEMA = /^\d+\.\d+\.\d+(\.[a-z]+\d+)
|
4
|
+
SEMVER_SCHEMA = /^\d+\.\d+\.\d+(\.[a-z]+\d+)?$/
|
3
5
|
SEGMENTS = %w[major minor patch].freeze
|
4
6
|
|
5
7
|
def self.create(str)
|
6
|
-
raise "Invalid segments (#{str} =~ #{SEMVER_SCHEMA})" unless str
|
8
|
+
raise "Invalid segments (#{str} =~ #{SEMVER_SCHEMA})" unless SEMVER_SCHEMA.match?(str)
|
7
9
|
|
8
10
|
new(*str.split('.'))
|
9
11
|
end
|
@@ -18,7 +20,7 @@ class RenuoVersion
|
|
18
20
|
def bump(segment)
|
19
21
|
raise "Invalid segment #{segment} (must be one of #{SEGMENTS})" unless SEGMENTS.include?(segment)
|
20
22
|
|
21
|
-
send("bump_#{segment}")
|
23
|
+
send(:"bump_#{segment}")
|
22
24
|
self
|
23
25
|
end
|
24
26
|
|
@@ -44,7 +46,7 @@ class RenuoVersion
|
|
44
46
|
def bump_patch
|
45
47
|
if prerelease?
|
46
48
|
old_number = @segments[3][/\d+/]
|
47
|
-
@segments[3].gsub
|
49
|
+
@segments[3] = @segments[3].gsub(old_number, (old_number.to_i + 1).to_s)
|
48
50
|
else # default patch
|
49
51
|
@segments = [*@segments[0..1], @segments[2] + 1]
|
50
52
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class CloudfrontConfigService
|
2
4
|
def initialize(bucket, tags = [])
|
3
5
|
@bucket = bucket
|
@@ -10,107 +12,104 @@ class CloudfrontConfigService
|
|
10
12
|
|
11
13
|
private
|
12
14
|
|
13
|
-
# rubocop:disable Metrics/MethodLength
|
14
15
|
def bucket_config
|
15
16
|
{
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
DistributionConfig: {
|
18
|
+
CallerReference: unique_caller_reference,
|
19
|
+
Origins: {
|
20
|
+
Quantity: 1,
|
21
|
+
Items: [
|
21
22
|
{
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
Id: "S3-#{@bucket}",
|
24
|
+
DomainName: "#{@bucket}.s3.amazonaws.com",
|
25
|
+
OriginPath: '',
|
26
|
+
CustomHeaders: {
|
27
|
+
Quantity: 0
|
27
28
|
},
|
28
|
-
|
29
|
-
|
29
|
+
S3OriginConfig: {
|
30
|
+
OriginAccessIdentity: ''
|
30
31
|
}
|
31
32
|
}
|
32
33
|
]
|
33
34
|
},
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
DefaultCacheBehavior: {
|
36
|
+
TargetOriginId: "S3-#{@bucket}",
|
37
|
+
ForwardedValues: {
|
38
|
+
QueryString: false,
|
39
|
+
Cookies: {
|
40
|
+
Forward: 'none'
|
40
41
|
},
|
41
|
-
|
42
|
-
|
42
|
+
Headers: {
|
43
|
+
Quantity: 0
|
43
44
|
},
|
44
|
-
|
45
|
-
|
45
|
+
QueryStringCacheKeys: {
|
46
|
+
Quantity: 0
|
46
47
|
}
|
47
48
|
},
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
TrustedSigners: {
|
50
|
+
Enabled: false,
|
51
|
+
Quantity: 0
|
51
52
|
},
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
53
|
+
ViewerProtocolPolicy: 'redirect-to-https',
|
54
|
+
MinTTL: 0,
|
55
|
+
AllowedMethods: {
|
56
|
+
Quantity: 2,
|
57
|
+
Items: %w[
|
57
58
|
HEAD
|
58
59
|
GET
|
59
60
|
],
|
60
|
-
|
61
|
-
|
62
|
-
|
61
|
+
CachedMethods: {
|
62
|
+
Quantity: 2,
|
63
|
+
Items: %w[
|
63
64
|
HEAD
|
64
65
|
GET
|
65
66
|
]
|
66
67
|
}
|
67
68
|
},
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
69
|
+
SmoothStreaming: false,
|
70
|
+
DefaultTTL: 86_400,
|
71
|
+
MaxTTL: 31_536_000,
|
72
|
+
Compress: true,
|
73
|
+
LambdaFunctionAssociations: {
|
74
|
+
Quantity: 0
|
74
75
|
}
|
75
76
|
},
|
76
|
-
|
77
|
-
|
77
|
+
CacheBehaviors: {
|
78
|
+
Quantity: 0
|
78
79
|
},
|
79
|
-
|
80
|
-
|
80
|
+
CustomErrorResponses: {
|
81
|
+
Quantity: 0
|
81
82
|
},
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
83
|
+
Comment: '',
|
84
|
+
Logging: {
|
85
|
+
Enabled: false,
|
86
|
+
IncludeCookies: false,
|
87
|
+
Bucket: '',
|
88
|
+
Prefix: ''
|
88
89
|
},
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
90
|
+
PriceClass: 'PriceClass_100',
|
91
|
+
Enabled: true,
|
92
|
+
ViewerCertificate: {
|
93
|
+
CloudFrontDefaultCertificate: true,
|
94
|
+
MinimumProtocolVersion: 'TLSv1.2_2018',
|
95
|
+
CertificateSource: 'cloudfront'
|
95
96
|
},
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
97
|
+
Restrictions: {
|
98
|
+
GeoRestriction: {
|
99
|
+
RestrictionType: 'none',
|
100
|
+
Quantity: 0
|
100
101
|
}
|
101
102
|
},
|
102
|
-
|
103
|
-
|
104
|
-
|
103
|
+
WebACLId: '',
|
104
|
+
HttpVersion: 'http2',
|
105
|
+
IsIPV6Enabled: true
|
105
106
|
},
|
106
|
-
|
107
|
-
|
107
|
+
Tags: {
|
108
|
+
Items: @tags
|
108
109
|
}
|
109
110
|
}
|
110
111
|
end
|
111
112
|
|
112
|
-
# rubocop:enable Metrics/MethodLength
|
113
|
-
|
114
113
|
def unique_caller_reference
|
115
114
|
"#{Time.now.getutc.to_i}-#{@bucket}"
|
116
115
|
end
|
@@ -31,7 +31,7 @@ class SetupUptimerobot
|
|
31
31
|
|
32
32
|
def validate_url(args)
|
33
33
|
abort('The url to be monitored was not given') if args.first.nil?
|
34
|
-
abort('The url is invalid') unless args.first
|
34
|
+
abort('The url is invalid') unless args.first&.match?(URI::DEFAULT_PARSER.make_regexp)
|
35
35
|
URI.parse(args.first)
|
36
36
|
end
|
37
37
|
|
@@ -2,8 +2,8 @@ version: v1.0
|
|
2
2
|
name: <%= environment %>-deploy
|
3
3
|
agent:
|
4
4
|
machine:
|
5
|
-
type:
|
6
|
-
os_image:
|
5
|
+
type: e2-standard-2
|
6
|
+
os_image: ubuntu2204
|
7
7
|
|
8
8
|
blocks:
|
9
9
|
- name: <%= environment %>-deploy
|
@@ -18,5 +18,5 @@ blocks:
|
|
18
18
|
commands:
|
19
19
|
- checkout --use-cache
|
20
20
|
- heroku git:remote -a $HEROKU_APP_NAME
|
21
|
-
- git push heroku -f $SEMAPHORE_GIT_BRANCH:
|
21
|
+
- git push heroku -f $SEMAPHORE_GIT_BRANCH:main
|
22
22
|
- if heroku run -x rails db:migrate; then heroku dyno:restart; else heroku rollback; exit -1; fi
|
@@ -1,77 +1,59 @@
|
|
1
|
-
version:
|
1
|
+
version: v1.0
|
2
2
|
name: <%= project_name %>
|
3
|
+
|
3
4
|
agent:
|
4
5
|
machine:
|
5
|
-
type:
|
6
|
-
os_image:
|
6
|
+
type: e2-standard-2
|
7
|
+
os_image: ubuntu2204
|
8
|
+
|
7
9
|
auto_cancel:
|
8
10
|
running:
|
9
|
-
when:
|
11
|
+
when: 'true'
|
12
|
+
|
10
13
|
fail_fast:
|
11
14
|
cancel:
|
12
|
-
when:
|
15
|
+
when: branch != 'main'
|
16
|
+
|
17
|
+
global_job_config:
|
18
|
+
secrets:
|
19
|
+
- name: <%= project_name %>
|
20
|
+
|
21
|
+
prologue:
|
22
|
+
commands:
|
23
|
+
- checkout --use-cache
|
24
|
+
- source .semaphore/bin/cache_restore rails
|
25
|
+
- bundle config set deployment 'true'
|
26
|
+
- bundle config set path 'vendor/bundle'
|
27
|
+
- bundle install -j 4
|
28
|
+
- nvm install
|
29
|
+
- bin/yarn install --cache-folder ~/.cache/yarn
|
13
30
|
|
14
31
|
blocks:
|
15
32
|
- name: cache
|
33
|
+
dependencies: []
|
16
34
|
execution_time_limit:
|
17
35
|
minutes: 10
|
18
|
-
dependencies: []
|
19
36
|
task:
|
20
|
-
secrets:
|
21
|
-
- name: <%= project_name %>
|
22
37
|
jobs:
|
23
38
|
- name: cache
|
24
39
|
commands:
|
25
|
-
- checkout --use-cache
|
26
|
-
- gem update --system --no-document
|
27
|
-
- source .semaphore/bin/cache_restore rails
|
28
|
-
- bundle config set deployment 'true'
|
29
|
-
- bundle config set path 'vendor/bundle'
|
30
|
-
- bundle install -j 4
|
31
|
-
- nvm install
|
32
|
-
- bin/yarn install --cache-folder ~/.cache/yarn
|
33
40
|
- source .semaphore/bin/cache_store rails
|
41
|
+
|
34
42
|
- name: linting
|
43
|
+
dependencies: [cache]
|
35
44
|
execution_time_limit:
|
36
45
|
minutes: 5
|
37
|
-
dependencies: ['cache']
|
38
46
|
task:
|
39
|
-
secrets:
|
40
|
-
- name: <%= project_name %>
|
41
|
-
env_vars:
|
42
|
-
- name: RAILS_ENV
|
43
|
-
value: test
|
44
|
-
prologue:
|
45
|
-
commands:
|
46
|
-
- checkout --use-cache
|
47
|
-
- gem update --system --no-document
|
48
|
-
- source .semaphore/bin/cache_restore rails
|
49
|
-
- bundle config set deployment 'true'
|
50
|
-
- bundle config set path 'vendor/bundle'
|
51
|
-
- bundle install -j 4
|
52
|
-
- nvm install
|
53
|
-
- bin/yarn install --cache-folder ~/.cache/yarn
|
54
47
|
jobs:
|
55
48
|
- name: linting
|
56
49
|
commands:
|
57
50
|
- bin/fastcheck
|
58
|
-
|
59
|
-
on_fail:
|
60
|
-
commands:
|
61
|
-
- mkdir -p log
|
62
|
-
- mkdir -p tmp/screenshots
|
63
|
-
- mkdir -p coverage
|
64
|
-
- artifact push job --expire-in 2w log
|
65
|
-
- artifact push job --expire-in 2w tmp/screenshots
|
66
|
-
- zip -r coverage-$SEMAPHORE_GIT_SHA coverage/
|
67
|
-
- artifact push job --expire-in 2w coverage-$SEMAPHORE_GIT_SHA.zip
|
51
|
+
|
68
52
|
- name: tests
|
53
|
+
dependencies: [cache]
|
69
54
|
execution_time_limit:
|
70
55
|
minutes: 10
|
71
|
-
dependencies: ['cache']
|
72
56
|
task:
|
73
|
-
secrets:
|
74
|
-
- name: <%= project_name %>
|
75
57
|
env_vars:
|
76
58
|
- name: DATABASE_URL
|
77
59
|
value: postgresql://postgres@localhost/test?encoding=utf8
|
@@ -79,14 +61,6 @@ blocks:
|
|
79
61
|
value: test
|
80
62
|
prologue:
|
81
63
|
commands:
|
82
|
-
- checkout --use-cache
|
83
|
-
- gem update --system --no-document
|
84
|
-
- source .semaphore/bin/cache_restore rails
|
85
|
-
- bundle config set deployment 'true'
|
86
|
-
- bundle config set path 'vendor/bundle'
|
87
|
-
- bundle install -j 4
|
88
|
-
- nvm install
|
89
|
-
- bin/yarn install --cache-folder ~/.cache/yarn
|
90
64
|
- sem-service start postgres
|
91
65
|
- cp config/application.example.yml config/application.yml
|
92
66
|
- bundle exec rails db:create db:schema:load
|
@@ -97,21 +71,22 @@ blocks:
|
|
97
71
|
epilogue:
|
98
72
|
on_fail:
|
99
73
|
commands:
|
100
|
-
- mkdir -p log
|
101
|
-
-
|
102
|
-
-
|
103
|
-
-
|
104
|
-
- artifact push job log --expire-in 2w
|
105
|
-
- artifact push job tmp/screenshots --expire-in 2w
|
106
|
-
- artifact push job tmp/capybara --expire-in 2w
|
74
|
+
- mkdir -p log coverage tmp/screenshots tmp/capybara
|
75
|
+
- artifact push job log
|
76
|
+
- artifact push job tmp/screenshots
|
77
|
+
- artifact push job tmp/capybara
|
107
78
|
- zip -r coverage-$SEMAPHORE_GIT_SHA coverage/
|
108
|
-
- artifact push job
|
79
|
+
- artifact push job coverage-$SEMAPHORE_GIT_SHA.zip
|
80
|
+
|
109
81
|
promotions:
|
110
82
|
- name: develop
|
83
|
+
deployment_target: develop
|
111
84
|
pipeline_file: develop-deploy.yml
|
112
85
|
auto_promote:
|
113
|
-
when:
|
86
|
+
when: result = 'passed' and branch = 'develop'
|
87
|
+
|
114
88
|
- name: main
|
89
|
+
deployment_target: main
|
115
90
|
pipeline_file: main-deploy.yml
|
116
91
|
auto_promote:
|
117
|
-
when:
|
92
|
+
when: result = 'passed' and branch = 'main'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Welcome to [Slidev](https://github.com/slidevjs/slidev)!
|
2
|
+
|
3
|
+
To start the slide show:
|
4
|
+
|
5
|
+
- `npm install`
|
6
|
+
- `npm run dev`
|
7
|
+
- visit http://localhost:3030
|
8
|
+
|
9
|
+
Edit the [slides.md](./slides.md) to see the changes.
|
10
|
+
|
11
|
+
Learn more about Slidev on [documentations](https://sli.dev/).
|
@@ -0,0 +1,16 @@
|
|
1
|
+
{
|
2
|
+
"name": "<%= presentation_name %>",
|
3
|
+
"type": "module",
|
4
|
+
"author": "<%= presentation_author %>",
|
5
|
+
"private": true,
|
6
|
+
"scripts": {
|
7
|
+
"build": "slidev build",
|
8
|
+
"dev": "slidev --open",
|
9
|
+
"export": "slidev export"
|
10
|
+
},
|
11
|
+
"dependencies": {
|
12
|
+
"@slidev/cli": "^0.48.7",
|
13
|
+
"slidev-theme-renuo": "latest",
|
14
|
+
"vue": "^3.4.21"
|
15
|
+
}
|
16
|
+
}
|
@@ -1,7 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'commander'
|
2
4
|
require 'csv'
|
3
|
-
require_relative '
|
4
|
-
require_relative '
|
5
|
+
require_relative 'environments'
|
6
|
+
require_relative 'fetch_emails'
|
5
7
|
require 'renuo/cli/app/toggl/workspace'
|
6
8
|
require 'renuo/cli/app/toggl/detail'
|
7
9
|
require 'renuo/cli/app/toggl/user'
|
@@ -9,6 +11,7 @@ require 'terminal-table'
|
|
9
11
|
require 'colorize'
|
10
12
|
require 'active_support/core_ext/numeric/time'
|
11
13
|
|
14
|
+
# rubocop:disable Metrics/ClassLength
|
12
15
|
class TogglRedmineComparator
|
13
16
|
class << self
|
14
17
|
def call(days_behind = 7)
|
@@ -31,7 +34,7 @@ class TogglRedmineComparator
|
|
31
34
|
rows << :separator
|
32
35
|
end
|
33
36
|
rows.pop
|
34
|
-
table = Terminal::Table.new headings: %w[Day Redmine Toggl].map(&:cyan), rows
|
37
|
+
table = Terminal::Table.new headings: %w[Day Redmine Toggl].map(&:cyan), rows:,
|
35
38
|
style: { padding_left: 2, padding_right: 2,
|
36
39
|
border_x: '-'.blue, border_y: '|'.blue, border_i: '+'.blue }
|
37
40
|
puts table
|
@@ -98,7 +101,7 @@ class TogglRedmineComparator
|
|
98
101
|
|
99
102
|
workspace_ids.each do |workspace_id|
|
100
103
|
time_entries = Toggl::Detail.where(since: since_date, until: until_date,
|
101
|
-
user_agent: 'renuo-cli', workspace_id
|
104
|
+
user_agent: 'renuo-cli', workspace_id:, user_ids: user_id)
|
102
105
|
parse_toggl_entries(report, time_entries)
|
103
106
|
end
|
104
107
|
end
|
@@ -121,7 +124,7 @@ class TogglRedmineComparator
|
|
121
124
|
sec = value / 1000.0
|
122
125
|
min, _sec = sec.divmod(60.0)
|
123
126
|
hour, min = min.divmod(60.0)
|
124
|
-
format('
|
127
|
+
format('%<hour>02d:%<min>02d', hour:, min:)
|
125
128
|
end
|
126
129
|
|
127
130
|
def to_seconds(value)
|
@@ -144,3 +147,4 @@ class TogglRedmineComparator
|
|
144
147
|
end
|
145
148
|
end
|
146
149
|
end
|
150
|
+
# rubocop:enable Metrics/ClassLength
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
class UpgradeMacOS
|
2
4
|
include CommandHelper
|
3
5
|
|
@@ -32,7 +34,7 @@ class UpgradeMacOS
|
|
32
34
|
end
|
33
35
|
|
34
36
|
def agree_for_reboot?
|
35
|
-
agree "
|
37
|
+
agree "\nYour Mac needs to be rebooted, Still continue?".red.to_s
|
36
38
|
end
|
37
39
|
|
38
40
|
def execute_upgrade
|
data/lib/renuo/cli/app/work.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'fileutils'
|
2
4
|
require 'renuo/cli/app/redmine/issue'
|
3
5
|
require 'renuo/cli/app/toggl/time_entry'
|
@@ -39,7 +41,7 @@ class Work
|
|
39
41
|
|
40
42
|
def start_feature_branch
|
41
43
|
project_folder = `autojump #{@project_name}`.strip
|
42
|
-
system("cd #{project_folder} && git stash && git checkout develop "\
|
44
|
+
system("cd #{project_folder} && git stash && git checkout develop " \
|
43
45
|
"&& git pull && git flow feature start #{@ticket_number}")
|
44
46
|
end
|
45
47
|
|