renuo-cli 3.1.7 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +4 -37
  3. data/.ruby-version +1 -1
  4. data/.semaphore/main-deploy.yml +1 -1
  5. data/.semaphore/semaphore.yml +2 -2
  6. data/.tool-versions +1 -0
  7. data/Gemfile +2 -0
  8. data/README.md +3 -3
  9. data/Rakefile +2 -0
  10. data/lib/renuo/cli/app/command_helper.rb +2 -0
  11. data/lib/renuo/cli/app/commit_leaderboard.rb +130 -0
  12. data/lib/renuo/cli/app/commit_leaderboard_sync.rb +107 -0
  13. data/lib/renuo/cli/app/configure_semaphore.rb +14 -6
  14. data/lib/renuo/cli/app/configure_sentry.rb +4 -4
  15. data/lib/renuo/cli/app/create_aws_project.rb +5 -3
  16. data/lib/renuo/cli/app/create_heroku_app.rb +3 -3
  17. data/lib/renuo/cli/app/create_new_logins.rb +2 -0
  18. data/lib/renuo/cli/app/create_slidev_presentation.rb +46 -0
  19. data/lib/renuo/cli/app/environments.rb +5 -3
  20. data/lib/renuo/cli/app/fetch_emails.rb +3 -1
  21. data/lib/renuo/cli/app/generate_password.rb +2 -0
  22. data/lib/renuo/cli/app/heroku_apps.rb +3 -3
  23. data/lib/renuo/cli/app/heroku_users.rb +3 -3
  24. data/lib/renuo/cli/app/list_large_git_files.rb +4 -2
  25. data/lib/renuo/cli/app/local_storage.rb +2 -0
  26. data/lib/renuo/cli/app/name_display.rb +7 -5
  27. data/lib/renuo/cli/app/package.json +14 -0
  28. data/lib/renuo/cli/app/redmine/csv_base_service.rb +4 -2
  29. data/lib/renuo/cli/app/redmine/issue.rb +2 -0
  30. data/lib/renuo/cli/app/release_project.rb +8 -4
  31. data/lib/renuo/cli/app/release_xing.rb +2 -0
  32. data/lib/renuo/cli/app/renuo_version.rb +6 -4
  33. data/lib/renuo/cli/app/services/cloudfront_config_service.rb +66 -67
  34. data/lib/renuo/cli/app/services/markdown_parser_service.rb +2 -0
  35. data/lib/renuo/cli/app/services/renuo_cli_config.rb +2 -0
  36. data/lib/renuo/cli/app/setup_uptimerobot.rb +1 -1
  37. data/lib/renuo/cli/app/templates/semaphore/semaphore-deploy.yml.erb +3 -3
  38. data/lib/renuo/cli/app/templates/semaphore/semaphore.yml.erb +38 -63
  39. data/lib/renuo/cli/app/templates/slidev/README.md.erb +11 -0
  40. data/lib/renuo/cli/app/templates/slidev/package.json.erb +16 -0
  41. data/lib/renuo/cli/app/toggl/detail.rb +2 -0
  42. data/lib/renuo/cli/app/toggl/time_entry.rb +2 -0
  43. data/lib/renuo/cli/app/toggl/user.rb +2 -0
  44. data/lib/renuo/cli/app/toggl/workspace.rb +2 -0
  45. data/lib/renuo/cli/app/toggl_redmine_comparator.rb +9 -5
  46. data/lib/renuo/cli/app/upgrade_laptop/upgrade_laptop_execution.rb +2 -0
  47. data/lib/renuo/cli/app/upgrade_laptop/upgrade_mac_os.rb +3 -1
  48. data/lib/renuo/cli/app/upgrade_laptop.rb +2 -0
  49. data/lib/renuo/cli/app/work.rb +3 -1
  50. data/lib/renuo/cli/version.rb +4 -2
  51. data/lib/renuo/cli.rb +78 -21
  52. data/renuo-cli.gemspec +12 -7
  53. metadata +39 -17
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_resource'
2
4
 
3
5
  module Redmine
@@ -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
- "as a #{@update_type} release (#{current_version} => #{@version})?")
167
+ "as a #{@update_type} release (#{current_version} => #{@version})?")
165
168
  abort('>> Cancelling Release.')
166
169
  end
167
170
 
168
- return unless Time.now.friday? && Time.now.hour >= 16
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
- 'Did you think about your family...waiting for you at home?')
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,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class ReleaseXing
2
4
  TMP_FOLDER_NAME = "_RENUO_RELEASE_TEMP_#{rand(100_000_000)}".freeze
3
5
  MOVE_TO_TMP_FOLDER = "mkdir -p #{TMP_FOLDER_NAME} && cd #{TMP_FOLDER_NAME}".freeze
@@ -1,9 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class RenuoVersion
2
- SEMVER_SCHEMA = /^\d+\.\d+\.\d+(\.[a-z]+\d+)?$/.freeze
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 =~ SEMVER_SCHEMA
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!(old_number, (old_number.to_i + 1).to_s)
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
- "DistributionConfig": {
17
- "CallerReference": unique_caller_reference,
18
- "Origins": {
19
- "Quantity": 1,
20
- "Items": [
17
+ DistributionConfig: {
18
+ CallerReference: unique_caller_reference,
19
+ Origins: {
20
+ Quantity: 1,
21
+ Items: [
21
22
  {
22
- "Id": "S3-#{@bucket}",
23
- "DomainName": "#{@bucket}.s3.amazonaws.com",
24
- "OriginPath": '',
25
- "CustomHeaders": {
26
- "Quantity": 0
23
+ Id: "S3-#{@bucket}",
24
+ DomainName: "#{@bucket}.s3.amazonaws.com",
25
+ OriginPath: '',
26
+ CustomHeaders: {
27
+ Quantity: 0
27
28
  },
28
- "S3OriginConfig": {
29
- "OriginAccessIdentity": ''
29
+ S3OriginConfig: {
30
+ OriginAccessIdentity: ''
30
31
  }
31
32
  }
32
33
  ]
33
34
  },
34
- "DefaultCacheBehavior": {
35
- "TargetOriginId": "S3-#{@bucket}",
36
- "ForwardedValues": {
37
- "QueryString": false,
38
- "Cookies": {
39
- "Forward": 'none'
35
+ DefaultCacheBehavior: {
36
+ TargetOriginId: "S3-#{@bucket}",
37
+ ForwardedValues: {
38
+ QueryString: false,
39
+ Cookies: {
40
+ Forward: 'none'
40
41
  },
41
- "Headers": {
42
- "Quantity": 0
42
+ Headers: {
43
+ Quantity: 0
43
44
  },
44
- "QueryStringCacheKeys": {
45
- "Quantity": 0
45
+ QueryStringCacheKeys: {
46
+ Quantity: 0
46
47
  }
47
48
  },
48
- "TrustedSigners": {
49
- "Enabled": false,
50
- "Quantity": 0
49
+ TrustedSigners: {
50
+ Enabled: false,
51
+ Quantity: 0
51
52
  },
52
- "ViewerProtocolPolicy": 'redirect-to-https',
53
- "MinTTL": 0,
54
- "AllowedMethods": {
55
- "Quantity": 2,
56
- "Items": %w[
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
- "CachedMethods": {
61
- "Quantity": 2,
62
- "Items": %w[
61
+ CachedMethods: {
62
+ Quantity: 2,
63
+ Items: %w[
63
64
  HEAD
64
65
  GET
65
66
  ]
66
67
  }
67
68
  },
68
- "SmoothStreaming": false,
69
- "DefaultTTL": 86_400,
70
- "MaxTTL": 31_536_000,
71
- "Compress": true,
72
- "LambdaFunctionAssociations": {
73
- "Quantity": 0
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
- "CacheBehaviors": {
77
- "Quantity": 0
77
+ CacheBehaviors: {
78
+ Quantity: 0
78
79
  },
79
- "CustomErrorResponses": {
80
- "Quantity": 0
80
+ CustomErrorResponses: {
81
+ Quantity: 0
81
82
  },
82
- "Comment": '',
83
- "Logging": {
84
- "Enabled": false,
85
- "IncludeCookies": false,
86
- "Bucket": '',
87
- "Prefix": ''
83
+ Comment: '',
84
+ Logging: {
85
+ Enabled: false,
86
+ IncludeCookies: false,
87
+ Bucket: '',
88
+ Prefix: ''
88
89
  },
89
- "PriceClass": 'PriceClass_100',
90
- "Enabled": true,
91
- "ViewerCertificate": {
92
- "CloudFrontDefaultCertificate": true,
93
- "MinimumProtocolVersion": 'TLSv1.2_2018',
94
- "CertificateSource": 'cloudfront'
90
+ PriceClass: 'PriceClass_100',
91
+ Enabled: true,
92
+ ViewerCertificate: {
93
+ CloudFrontDefaultCertificate: true,
94
+ MinimumProtocolVersion: 'TLSv1.2_2018',
95
+ CertificateSource: 'cloudfront'
95
96
  },
96
- "Restrictions": {
97
- "GeoRestriction": {
98
- "RestrictionType": 'none',
99
- "Quantity": 0
97
+ Restrictions: {
98
+ GeoRestriction: {
99
+ RestrictionType: 'none',
100
+ Quantity: 0
100
101
  }
101
102
  },
102
- "WebACLId": '',
103
- "HttpVersion": 'http2',
104
- "IsIPV6Enabled": true
103
+ WebACLId: '',
104
+ HttpVersion: 'http2',
105
+ IsIPV6Enabled: true
105
106
  },
106
- "Tags": {
107
- "Items": @tags
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
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'redcarpet'
2
4
 
3
5
  class MarkdownParserService
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'yaml'
2
4
 
3
5
  class RenuoCliConfig
@@ -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 =~ URI::DEFAULT_PARSER.make_regexp
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: e1-standard-2
6
- os_image: ubuntu2004
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:master
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: "v1.0"
1
+ version: v1.0
2
2
  name: <%= project_name %>
3
+
3
4
  agent:
4
5
  machine:
5
- type: e1-standard-2
6
- os_image: ubuntu2004
6
+ type: e2-standard-2
7
+ os_image: ubuntu2204
8
+
7
9
  auto_cancel:
8
10
  running:
9
- when: "true"
11
+ when: 'true'
12
+
10
13
  fail_fast:
11
14
  cancel:
12
- when: "branch != 'main'"
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
- epilogue:
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
- - mkdir -p tmp/screenshots
102
- - mkdir -p tmp/capybara
103
- - mkdir -p coverage
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 --expire-in 2w coverage-$SEMAPHORE_GIT_SHA.zip
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: "result = 'passed' and branch = 'develop'"
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: "result = 'passed' and branch = 'main'"
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,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_resource'
2
4
 
3
5
  module Toggl
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_resource'
2
4
 
3
5
  module Toggl
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Toggl
2
4
  class User < ActiveResource::Base
3
5
  self.site = 'https://www.toggl.com/api/v8/'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_resource'
2
4
 
3
5
  module Toggl
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'commander'
2
4
  require 'csv'
3
- require_relative './environments'
4
- require_relative './fetch_emails'
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: 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: workspace_id, user_ids: user_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('%02d:%02d', hour, min)
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 UpgradeLaptopExecution
2
4
  include CommandHelper
3
5
 
@@ -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 "#{"\nYour Mac needs to be rebooted, Still continue?".red} (Yes / No)"
37
+ agree "\nYour Mac needs to be rebooted, Still continue?".red.to_s
36
38
  end
37
39
 
38
40
  def execute_upgrade
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'command_helper'
2
4
  require_relative 'upgrade_laptop/upgrade_laptop_execution'
3
5
  require_relative 'upgrade_laptop/upgrade_mac_os'
@@ -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
 
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Renuo
2
4
  module Cli
3
- VERSION = '3.1.7'.freeze
4
- NAME = 'renuo-cli'.freeze
5
+ VERSION = '4.2.0'
6
+ NAME = 'renuo-cli'
5
7
  end
6
8
  end