dude-cli 2.0.5 → 2.1.0.alpha3

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 (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/verify.yml +32 -0
  3. data/.rspec +0 -1
  4. data/.rubocop.yml +13 -0
  5. data/CHANGELOG.md +7 -3
  6. data/Gemfile +3 -1
  7. data/Gemfile.lock +62 -9
  8. data/LICENCE +20 -0
  9. data/README.md +60 -35
  10. data/Rakefile +5 -3
  11. data/bin/console +4 -3
  12. data/bin/dude +2 -2
  13. data/demo/dude.gif +0 -0
  14. data/demo/wizard.gif +0 -0
  15. data/dude.gemspec +26 -18
  16. data/lib/dude.rb +18 -7
  17. data/lib/dude/code_management.rb +10 -0
  18. data/lib/dude/code_management/github/client.rb +27 -0
  19. data/lib/dude/code_management/github/create_pull_request.rb +51 -0
  20. data/lib/dude/commands.rb +26 -17
  21. data/lib/dude/commands/checkout.rb +4 -2
  22. data/lib/dude/commands/health_check.rb +15 -0
  23. data/lib/dude/commands/install.rb +67 -43
  24. data/lib/dude/commands/move.rb +5 -3
  25. data/lib/dude/commands/pr.rb +11 -0
  26. data/lib/dude/commands/pr/create.rb +49 -0
  27. data/lib/dude/commands/pr/remove.rb +15 -0
  28. data/lib/dude/commands/start.rb +14 -10
  29. data/lib/dude/commands/stop.rb +4 -4
  30. data/lib/dude/commands/tasks.rb +6 -5
  31. data/lib/dude/commands/track.rb +7 -7
  32. data/lib/dude/commands/version.rb +3 -1
  33. data/lib/dude/config.rb +18 -0
  34. data/lib/dude/git.rb +3 -0
  35. data/lib/dude/git/checkout.rb +20 -1
  36. data/lib/dude/git/current_branch_name.rb +3 -1
  37. data/lib/dude/git/remote_name.rb +21 -0
  38. data/lib/dude/health_check.rb +39 -0
  39. data/lib/dude/project_management/client.rb +14 -7
  40. data/lib/dude/project_management/entities/issue.rb +10 -7
  41. data/lib/dude/project_management/jira.rb +2 -1
  42. data/lib/dude/project_management/jira/client.rb +35 -18
  43. data/lib/dude/project_management/jira/fetch_current_task.rb +35 -0
  44. data/lib/dude/project_management/jira/fetch_current_tasks.rb +46 -0
  45. data/lib/dude/project_management/jira/get_task_name_by_id.rb +1 -3
  46. data/lib/dude/project_management/jira/move_task_to_list.rb +15 -15
  47. data/lib/dude/project_management/{entities/board.rb → trello.rb} +3 -4
  48. data/lib/dude/project_management/trello/client.rb +56 -0
  49. data/lib/dude/project_management/trello/fetch_current_task.rb +41 -0
  50. data/lib/dude/project_management/trello/fetch_current_tasks.rb +51 -0
  51. data/lib/dude/project_management/trello/fetch_lists.rb +22 -0
  52. data/lib/dude/project_management/trello/get_task_name_by_id.rb +23 -0
  53. data/lib/dude/project_management/trello/move_task_to_list.rb +53 -0
  54. data/lib/dude/settings.rb +3 -0
  55. data/lib/dude/setup/github.rb +35 -0
  56. data/lib/dude/setup/jira.rb +64 -0
  57. data/lib/dude/setup/toggl.rb +47 -0
  58. data/lib/dude/setup/trello.rb +58 -0
  59. data/lib/dude/templates/duderc_template +32 -0
  60. data/lib/dude/time_trackers/toggl.rb +2 -0
  61. data/lib/dude/time_trackers/toggl/base.rb +4 -4
  62. data/lib/dude/time_trackers/toggl/start_time_entry.rb +3 -2
  63. data/lib/dude/time_trackers/toggl/stop_time_entry.rb +3 -1
  64. data/lib/dude/version.rb +3 -1
  65. metadata +99 -14
  66. data/lib/dude/project_management/jira/get_current_tasks.rb +0 -40
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7dd18737ad834d3af86dd3f9175d746dc063698af0ec01bf604d331d85da4a1e
4
- data.tar.gz: 10cd3e47d6eac284183dd427d89f49bc6cdf316a215e1773634ce622019f8f71
3
+ metadata.gz: 5a37ec9e7b502cf8da43c6e20431f452321dc55fd6ac0be38444e80cf0796fd0
4
+ data.tar.gz: fce3bf1daa29bc55f29cc4b96ccfc92ebcf694890b18153c3c4f162f5b641749
5
5
  SHA512:
6
- metadata.gz: 2cdca860b2d570d9787749043d550a819538436b8b534225e10e446fe7ca5da3c39dad98882c2fd6ac1d85c62d463111e3a58b9a4ca5678c7b0aadac950bcff3
7
- data.tar.gz: 0fe924787d2ae6e00f179c515b53951a6768ae7d08e0c277f71672bb560dc166d4c3c99a29493cdc99446f8d670c7a321369275b0ca5fb47c777d4d27b2a539f
6
+ metadata.gz: b9e295659a902a6d904bab212191e1a19ff8a9b584a717008b493b9ec77c0583207033989cb65ab4afda97ff1653c20ff781bf44595e23f543446cd16acb2656
7
+ data.tar.gz: 0a1f084399039789b96b6bef5e24189ad4d7e4cd96cf57ef229f5ae1e31c2c877521dd3b0f81e9eaa62d4c2085f6d09e107ecc14a5ce201a8ec9d70b7f51f710
@@ -0,0 +1,32 @@
1
+ # Put this in the file: .github/workflows/verify.yml
2
+
3
+ name: Verify
4
+ on: [push, pull_request]
5
+
6
+ jobs:
7
+ rubocop:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.6 # Not needed with a .ruby-version file
14
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
15
+ - name: Run Rubocop
16
+ run: bundle exec rubocop
17
+
18
+ rspec:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v2
22
+ - uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: 2.6 # Not needed with a .ruby-version file
25
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
26
+ - name: Run RSpec
27
+ run: COVERAGE=true bundle exec rspec
28
+ - name: Run codacy-coverage-reporter
29
+ uses: codacy/codacy-coverage-reporter-action@master
30
+ with:
31
+ project-token: "8c564cf8054e4575b20b580d47020f52"
32
+ coverage-reports: coverage/coverage.xml
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --format documentation
2
1
  --color
3
2
  --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ Style/Documentation:
2
+ Enabled: false
3
+
4
+ AllCops:
5
+ NewCops: enable
6
+ SuggestExtensions: false
7
+ TargetRubyVersion: 2.5
8
+
9
+ Metrics/BlockLength:
10
+ IgnoredMethods: ['describe', 'context']
11
+
12
+ Layout/FirstHashElementIndentation:
13
+ EnforcedStyle: consistent
data/CHANGELOG.md CHANGED
@@ -1,10 +1,13 @@
1
1
  # Changelog
2
2
 
3
- ## [Unreleased]
3
+ ## [2.0.7] - 2021-04-02
4
4
 
5
5
  ### Added
6
-
7
- - Added Trello support
6
+ - RSpec and coverage
7
+ - Rubocop style changes
8
+ - Fixed #15
9
+ - Fixed README errors
10
+ - Changed requires to relatives
8
11
 
9
12
  ## [2.0.0] - 2021-03-10
10
13
 
@@ -23,3 +26,4 @@
23
26
 
24
27
  [2.0.0]: https://github.com/npupko/dude/releases/tag/2.0.0
25
28
  [1.0.2]: https://github.com/npupko/dude/releases/tag/1.0.2
29
+ [1.0.6]: https://github.com/npupko/dude/releases/tag/1.0.6
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in dude.gemspec
4
6
  gemspec
data/Gemfile.lock CHANGED
@@ -1,35 +1,45 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dude-cli (2.0.5)
4
+ dude-cli (2.1.0.alpha3)
5
5
  colorize (~> 0.8.1)
6
6
  dry-cli (~> 0.6)
7
7
  faraday (~> 1.1)
8
8
  jira-ruby (~> 2.1)
9
+ tty-prompt (~> 0.23.1)
9
10
 
10
11
  GEM
11
12
  remote: https://rubygems.org/
12
13
  specs:
13
- activesupport (6.1.3)
14
+ activesupport (6.1.3.2)
14
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
16
  i18n (>= 1.6, < 2)
16
17
  minitest (>= 5.1)
17
18
  tzinfo (~> 2.0)
18
19
  zeitwerk (~> 2.3)
20
+ ast (2.4.2)
19
21
  atlassian-jwt (0.2.0)
20
22
  jwt (~> 2.1.0)
21
23
  coderay (1.1.3)
22
24
  colorize (0.8.1)
23
25
  concurrent-ruby (1.1.8)
24
26
  diff-lcs (1.4.4)
25
- dry-cli (0.6.0)
26
- concurrent-ruby (~> 1.0)
27
- faraday (1.3.0)
27
+ docile (1.3.5)
28
+ dry-cli (0.7.0)
29
+ faraday (1.4.2)
30
+ faraday-em_http (~> 1.0)
31
+ faraday-em_synchrony (~> 1.0)
32
+ faraday-excon (~> 1.1)
28
33
  faraday-net_http (~> 1.0)
34
+ faraday-net_http_persistent (~> 1.1)
29
35
  multipart-post (>= 1.2, < 3)
30
- ruby2_keywords
36
+ ruby2_keywords (>= 0.0.4)
37
+ faraday-em_http (1.0.0)
38
+ faraday-em_synchrony (1.0.0)
39
+ faraday-excon (1.1.0)
31
40
  faraday-net_http (1.0.1)
32
- i18n (1.8.9)
41
+ faraday-net_http_persistent (1.1.0)
42
+ i18n (1.8.10)
33
43
  concurrent-ruby (~> 1.0)
34
44
  jira-ruby (2.1.5)
35
45
  activesupport
@@ -40,11 +50,19 @@ GEM
40
50
  method_source (1.0.0)
41
51
  minitest (5.14.4)
42
52
  multipart-post (2.1.1)
43
- oauth (0.5.5)
44
- pry (0.14.0)
53
+ oauth (0.5.6)
54
+ parallel (1.20.1)
55
+ parser (3.0.1.1)
56
+ ast (~> 2.4.1)
57
+ pastel (0.8.0)
58
+ tty-color (~> 0.5)
59
+ pry (0.14.1)
45
60
  coderay (~> 1.1)
46
61
  method_source (~> 1.0)
62
+ rainbow (3.0.0)
47
63
  rake (13.0.3)
64
+ regexp_parser (2.1.1)
65
+ rexml (3.2.5)
48
66
  rspec (3.10.0)
49
67
  rspec-core (~> 3.10.0)
50
68
  rspec-expectations (~> 3.10.0)
@@ -58,9 +76,41 @@ GEM
58
76
  diff-lcs (>= 1.2.0, < 2.0)
59
77
  rspec-support (~> 3.10.0)
60
78
  rspec-support (3.10.2)
79
+ rubocop (1.15.0)
80
+ parallel (~> 1.10)
81
+ parser (>= 3.0.0.0)
82
+ rainbow (>= 2.2.2, < 4.0)
83
+ regexp_parser (>= 1.8, < 3.0)
84
+ rexml
85
+ rubocop-ast (>= 1.5.0, < 2.0)
86
+ ruby-progressbar (~> 1.7)
87
+ unicode-display_width (>= 1.4.0, < 3.0)
88
+ rubocop-ast (1.5.0)
89
+ parser (>= 3.0.1.1)
90
+ ruby-progressbar (1.11.0)
61
91
  ruby2_keywords (0.0.4)
92
+ simplecov (0.21.2)
93
+ docile (~> 1.1)
94
+ simplecov-html (~> 0.11)
95
+ simplecov_json_formatter (~> 0.1)
96
+ simplecov-cobertura (1.4.2)
97
+ simplecov (~> 0.8)
98
+ simplecov-html (0.12.3)
99
+ simplecov_json_formatter (0.1.2)
100
+ tty-color (0.6.0)
101
+ tty-cursor (0.7.1)
102
+ tty-prompt (0.23.1)
103
+ pastel (~> 0.8)
104
+ tty-reader (~> 0.8)
105
+ tty-reader (0.9.0)
106
+ tty-cursor (~> 0.7)
107
+ tty-screen (~> 0.8)
108
+ wisper (~> 2.0)
109
+ tty-screen (0.8.1)
62
110
  tzinfo (2.0.4)
63
111
  concurrent-ruby (~> 1.0)
112
+ unicode-display_width (2.0.0)
113
+ wisper (2.0.1)
64
114
  zeitwerk (2.4.2)
65
115
 
66
116
  PLATFORMS
@@ -71,6 +121,9 @@ DEPENDENCIES
71
121
  pry (~> 0.14.0)
72
122
  rake (~> 13.0)
73
123
  rspec (~> 3.0)
124
+ rubocop (~> 1.12)
125
+ simplecov (~> 0.21.2)
126
+ simplecov-cobertura (~> 1.4)
74
127
 
75
128
  BUNDLED WITH
76
129
  2.1.4
data/LICENCE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2020-2021 Nikita Pupko
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,8 +1,16 @@
1
- # Dude [![Gem Version](https://badge.fury.io/rb/dude-cli.svg)](https://badge.fury.io/rb/dude-cli)
1
+ # Dude
2
+
3
+ [![Gem Version](https://badge.fury.io/rb/dude-cli.svg)](https://badge.fury.io/rb/dude-cli)
4
+ ![Codacy coverage](https://img.shields.io/codacy/coverage/8c564cf8054e4575b20b580d47020f52)
5
+ [![Codacy Badge](https://app.codacy.com/project/badge/Grade/a02f0a87f88542c89ac5bf62d1a7d0f7)](https://www.codacy.com/gh/npupko/dude/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=npupko/dude&amp;utm_campaign=Badge_Grade)
6
+ ![Gem](https://img.shields.io/gem/dv/dude-cli/stable)
7
+ ![GitHub](https://img.shields.io/github/license/npupko/dude)
2
8
 
3
9
  A daily assistant in the hard work of a programmer
4
10
 
5
- This program helps to combine such services as [Jira](https://atlassian.net), [Toggl](https://toggl.com) and replace most routine activities with one simple CLI utility.
11
+ This program helps to combine such services as [Jira](https://atlassian.net), [Trello](https://trello.com), [Toggl](https://toggl.com), etc. and replace most routine activities with one simple CLI utility.
12
+
13
+ ![Dude](/demo/dude.gif)
6
14
 
7
15
  ## Installation
8
16
 
@@ -20,58 +28,73 @@ Or install it yourself as:
20
28
 
21
29
  $ gem install dude-cli
22
30
 
23
- After that create .duderc file in your HOME directory by command:
31
+ After that create .duderc.yml file in your work project directory by command:
24
32
 
25
33
  $ dude install
26
34
 
27
- And configure all variables in this file
28
-
29
- `PROJECT_MANAGEMENT_TOOL=jira` - Project management (Now only Jira supported)
30
- `ATLASSIAN_EMAIL` - Your Jira email
35
+ It will offer you a step by step instruction how to setup dude:
31
36
 
32
- `ATLASSIAN_TOKEN` - How to create Atlassian token: https://support.siteimprove.com/hc/en-gb/articles/360004317332-How-to-create-an-API-token-from-your-Atlassian-account
37
+ ![Setup Wizard](/demo/wizard.gif)
33
38
 
34
- `ATLASSIAN_URL` - URL of your project. Example: https://example.atlassian.net
39
+ You always could edit this file manually and setup some stuff like Toggl time entry name or Github PR template
35
40
 
36
- `ATLASSIAN_PROJECT_KEY` - KEY of your project. If your issues have id BT-123 - BT is the key
37
-
38
- `ATLASSIAN_BOARD_ID`:
39
- Just open your atlassian main board and copy id from the url after rapidView=*ID* part.
40
-
41
- Example: https://dealmakerns.atlassian.net/secure/RapidBoard.jspa?rapidView=23&projectKey=DT - 23 is the id
41
+ Default template could be found here: [lib/dude/templates/duderc_template](/lib/dude/templates/duderc_template)
42
42
 
43
+ ### Additional configuration variables:
43
44
 
44
45
  #### Replace it with your project list names. Skip for empty lists
45
46
 
47
+ ```yaml
48
+ :todo_list_name: To Do
49
+ :in_progress_list_name: In Progress
50
+ :code_review_list_name: Code Review
51
+ :testing_list_name: TESTABLE
52
+ :done_list_name: Done
46
53
  ```
47
- TODO_LIST_NAME=To Do
48
- IN_PROGRESS_LIST_NAME=In Progress
49
- CODE_REVIEW_LIST_NAME=Code Review
50
- TESTING_LIST_NAME=TESTABLE
51
- DONE_LIST_NAME=Done
54
+
55
+ #### Use the *{issue_id}* and *{issue_title}* and specify format for the task titles in Toggl or keep it as it is
56
+
57
+ ```yaml
58
+ :toggl:
59
+ :task_format: [{issue_id}] {issue_title}
52
60
  ```
53
61
 
54
- `TOGGL_PROJECT_NAME` - Your Toggl project name
62
+ #### Github PR template looks like this (Available variables: *{issue_id}*, *{issue_title}*, *{issue_url}*)
63
+
64
+ ```yaml
65
+ :github:
66
+ :pr_template:
67
+ :title: "[{issue_id}] {issue_title}\n"
68
+ :body: |
69
+ ## Story
70
+ [**\[{issue_id}\] {issue_title}**]({issue_url})
71
+ ## Description
72
+ Example description of the issue
73
+ ```
55
74
 
56
- `TOGGL_TOKEN` - Your Toggl API token can be found at the bottom of the page: https://track.toggl.com/profile
75
+ ## Usage
57
76
 
58
- `TOGGL_WORKSPACE_ID` - Can be copied from url here: https://toggl.com/app/projects/. Example: 123456
77
+ #### Using RVM
59
78
 
60
- #### Use the *id* and *title* and specify format for the task titles in Trello or keep it as it is
61
- `TOGGL_TASK_FORMAT=[id] title`
79
+ To run gem in any folder using RVM just install gem to the global default ruby version and add alias to ~/.bashrc or ~/.zshrc
80
+ (Replace 2.7.2 to your ruby version and/or gemset)
62
81
 
63
- ## Usage
82
+ ```bash
83
+ alias dude="rvm 2.7.2 do dude"
84
+ ```
64
85
 
65
86
  | Command | Required parameters | Optional parameters | Description |
66
87
  |:-------------:|:-------------------|:-------------------|:--------------------------------------------------------------------------------------|
67
- | dude install | - | - | Create .duderc file in your home directory |
68
- | dude checkout | ISSUE_ID | - | Checkout to branch with name "ID-issue-title" |
69
- | dude track | ISSUE_ID | - | Start time entry in Toggl with issue project, title and id |
70
- | dude tasks | ISSUE_ID | - | Show all issues in current project (For current sprint) |
71
- | dude stop | - | - | Stop current time entry in Toggl |
72
- | dude start | - | - | Do `checkout`, `track` and `move` actions |
73
- | dude move | ISSUE_ID | --list=NAME | Move issue to another column (Will provide options if called without --list parameter) |
74
- | dude version | - | - | Display gem version |
88
+ | dude install | - | - | Create .duderc file in your home directory |
89
+ | dude checkout | ISSUE_ID | - | Checkout to branch with name "ID-issue-title" |
90
+ | dude track | ISSUE_ID | - | Start time entry in Toggl with issue project, title and id |
91
+ | dude tasks | - | - | Show all issues in current project (For current sprint) |
92
+ | dude stop | - | - | Stop current time entry in Toggl |
93
+ | dude start | ISSUE_ID | - | Do `checkout`, `track` and `move` actions |
94
+ | dude move | ISSUE_ID | --list=NAME | Move issue to another column (Will provide options if called without --list parameter) |
95
+ | dude pr create | | | Creates PR in Github using template |
96
+ | dude version | - | - | Display gem version |
97
+ | dude healthcheck | - | - | Check configuration of all dependencies |
75
98
 
76
99
  You also can use `dude help` for short description of every command.
77
100
 
@@ -83,4 +106,6 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/npupko
83
106
 
84
107
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
85
108
 
86
- ## [Changelog](https://github.com/npupko/dude/CHANGELOG.md)
109
+ ## Changelog
110
+
111
+ [CHANGELOG.md](/CHANGELOG.md)
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "dude"
4
+ require 'bundler/setup'
5
+ require 'dude'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "dude"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
data/bin/dude CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "dude"
4
+ require_relative '../lib/dude'
5
5
 
6
6
  Dry::CLI.new(Dude::Commands).call
data/demo/dude.gif ADDED
Binary file
data/demo/wizard.gif ADDED
Binary file
data/dude.gemspec CHANGED
@@ -1,35 +1,43 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require_relative 'lib/dude/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- spec.name = "dude-cli"
8
+ spec.name = 'dude-cli'
7
9
  spec.version = Dude::VERSION
8
- spec.authors = ["Nikita Pupko"]
9
- spec.email = ["work.pupko@gmail.com"]
10
+ spec.authors = ['Nikita Pupko']
11
+ spec.email = ['work.pupko@gmail.com']
10
12
 
11
- spec.summary = %q{A daily assistant in the hard work of a programmer.}
12
- spec.description = %q{This program helps to combine such services as Jira, Toggl and git and replace most routine activities with one simple CLI utility.}
13
- spec.homepage = "https://github.com/npupko/dude"
14
- spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
+ spec.summary = 'A daily assistant in the hard work of a programmer.'
14
+ spec.description = <<~DESC
15
+ This program helps to combine such services as Jira, Toggl and git and replace most routine activities with one simple CLI utility.
16
+ DESC
17
+ spec.homepage = 'https://github.com/npupko/dude'
18
+ spec.license = 'MIT'
19
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5.0')
16
20
 
17
- spec.metadata["homepage_uri"] = spec.homepage
18
- spec.metadata["source_code_uri"] = "https://github.com/npupko/dude"
19
- spec.metadata["changelog_uri"] = "https://github.com/npupko/dude/blob/master/CHANGELOG.md"
21
+ spec.metadata['homepage_uri'] = spec.homepage
22
+ spec.metadata['source_code_uri'] = 'https://github.com/npupko/dude'
23
+ spec.metadata['changelog_uri'] = 'https://github.com/npupko/dude/blob/master/CHANGELOG.md'
20
24
 
21
25
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
22
26
 
23
- spec.bindir = "bin"
24
- spec.executables = ["dude"]
25
- spec.require_paths = ["lib"]
27
+ spec.bindir = 'bin'
28
+ spec.executables = ['dude']
29
+ spec.require_paths = ['lib']
26
30
 
31
+ spec.add_runtime_dependency 'colorize', '~> 0.8.1'
27
32
  spec.add_runtime_dependency 'dry-cli', '~> 0.6'
28
- spec.add_runtime_dependency "faraday", "~> 1.1"
29
- spec.add_runtime_dependency "colorize", "~> 0.8.1"
30
- spec.add_runtime_dependency "jira-ruby", "~> 2.1"
33
+ spec.add_runtime_dependency 'faraday', '~> 1.1'
34
+ spec.add_runtime_dependency 'jira-ruby', '~> 2.1'
35
+ spec.add_runtime_dependency 'tty-prompt', '~> 0.23.1'
31
36
 
32
37
  spec.add_development_dependency 'pry', '~> 0.14.0'
33
38
  spec.add_development_dependency 'rake', '~> 13.0'
34
39
  spec.add_development_dependency 'rspec', '~> 3.0'
40
+ spec.add_development_dependency 'rubocop', '~> 1.12'
41
+ spec.add_development_dependency 'simplecov', '~> 0.21.2'
42
+ spec.add_development_dependency 'simplecov-cobertura', '~> 1.4'
35
43
  end