dude-cli 2.0.1 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae53371c7fc3cf10cc4a0dd5e1de22266e065d30395321547dadf6d5636de8da
4
- data.tar.gz: 7b88740c6849e9a21056e87ea0f3689d12698b8251f4c06267b089d8e0a34c72
3
+ metadata.gz: 3db4b4826c0b1b1585760b4e79bf3e9b02820fcee1782841be83dd6d9f439152
4
+ data.tar.gz: eb3da77da90e2acf84c4b149f46f13161b1f88f196da14b0ac769a4e24edaace
5
5
  SHA512:
6
- metadata.gz: 2e5cbf1936ed062017041c6d803005514378927babca5c38e67dd3c7e5ed9e7fe3807cbd7ca0c9955d1bd5d01ca16e1454b136873b693a4c02af03bdae5125d4
7
- data.tar.gz: 7bdf3aff1601829b22c992c73305963fcdaa64faca40f0bbaaeae7b5148f6a18cc130ad094ef93549408126e529dfc2d70154b115eceadffd0ff8170ae4ee061
6
+ metadata.gz: e0cad6a457995294bcf3298db28117234426db3551eae14b0eeb7c65d56da7cf11c6fa93f4d3f7d8d60581cd76022fe4fcdabe21496e403857feb50a4c89b660
7
+ data.tar.gz: 78aa9e5106c5898452dc79322cd54eebfd37b9a23eff1248938dd6260707b1310310a023640d8069020732805fc0dfb05c75fe114b87ddb76f98721426876d66
data/Gemfile CHANGED
@@ -2,6 +2,3 @@ source "https://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in dude.gemspec
4
4
  gemspec
5
-
6
- gem "rake", "~> 13.0"
7
- gem "rspec", "~> 3.0"
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dude-cli (2.0.1)
4
+ dude-cli (2.0.5)
5
5
  colorize (~> 0.8.1)
6
- dry-cli (>= 0.6)
6
+ dry-cli (~> 0.6)
7
7
  faraday (~> 1.1)
8
8
  jira-ruby (~> 2.1)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (6.1.1)
13
+ activesupport (6.1.3)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 1.6, < 2)
16
16
  minitest (>= 5.1)
@@ -49,15 +49,15 @@ GEM
49
49
  rspec-core (~> 3.10.0)
50
50
  rspec-expectations (~> 3.10.0)
51
51
  rspec-mocks (~> 3.10.0)
52
- rspec-core (3.10.0)
52
+ rspec-core (3.10.1)
53
53
  rspec-support (~> 3.10.0)
54
- rspec-expectations (3.10.0)
54
+ rspec-expectations (3.10.1)
55
55
  diff-lcs (>= 1.2.0, < 2.0)
56
56
  rspec-support (~> 3.10.0)
57
- rspec-mocks (3.10.0)
57
+ rspec-mocks (3.10.2)
58
58
  diff-lcs (>= 1.2.0, < 2.0)
59
59
  rspec-support (~> 3.10.0)
60
- rspec-support (3.10.0)
60
+ rspec-support (3.10.2)
61
61
  ruby2_keywords (0.0.4)
62
62
  tzinfo (2.0.4)
63
63
  concurrent-ruby (~> 1.0)
data/README.md CHANGED
@@ -62,6 +62,15 @@ DONE_LIST_NAME=Done
62
62
 
63
63
  ## Usage
64
64
 
65
+ #### Using RVM
66
+
67
+ To run gem in any folder using RVM just install gem to the global default ruby version and add alias to ~/.bashrc or ~/.zshrc
68
+ (Replace 2.7.2 to your ruby version and/or gemset)
69
+
70
+ ```bash
71
+ alias dude="rvm 2.7.2 do dude"
72
+ ```
73
+
65
74
  | Command | Required parameters | Optional parameters | Description |
66
75
  |:-------------:|:-------------------|:-------------------|:--------------------------------------------------------------------------------------|
67
76
  | dude install | - | - | Create .duderc file in your home directory |
data/bin/dude CHANGED
@@ -1,6 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require "bundler/setup"
4
3
  require "dude"
5
4
 
6
5
  Dry::CLI.new(Dude::Commands).call
data/dude.gemspec CHANGED
@@ -1,3 +1,5 @@
1
+ lib = File.expand_path("../lib", __FILE__)
2
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
1
3
  require_relative 'lib/dude/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
@@ -9,24 +11,25 @@ Gem::Specification.new do |spec|
9
11
  spec.summary = %q{A daily assistant in the hard work of a programmer.}
10
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.}
11
13
  spec.homepage = "https://github.com/npupko/dude"
14
+ spec.license = "MIT"
12
15
  spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
13
16
 
14
17
  spec.metadata["homepage_uri"] = spec.homepage
15
18
  spec.metadata["source_code_uri"] = "https://github.com/npupko/dude"
16
19
  spec.metadata["changelog_uri"] = "https://github.com/npupko/dude/blob/master/CHANGELOG.md"
17
20
 
18
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
19
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
- end
21
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
22
 
22
23
  spec.bindir = "bin"
23
24
  spec.executables = ["dude"]
24
25
  spec.require_paths = ["lib"]
25
26
 
26
- spec.add_runtime_dependency 'dry-cli', '>= 0.6'
27
+ spec.add_runtime_dependency 'dry-cli', '~> 0.6'
27
28
  spec.add_runtime_dependency "faraday", "~> 1.1"
28
29
  spec.add_runtime_dependency "colorize", "~> 0.8.1"
29
30
  spec.add_runtime_dependency "jira-ruby", "~> 2.1"
30
31
 
31
32
  spec.add_development_dependency 'pry', '~> 0.14.0'
33
+ spec.add_development_dependency 'rake', '~> 13.0'
34
+ spec.add_development_dependency 'rspec', '~> 3.0'
32
35
  end
data/lib/dude.rb CHANGED
@@ -1,13 +1,9 @@
1
- require "pry"
2
1
  require "colorize"
3
2
 
4
3
  require "dude/settings"
5
4
  require "dude/version"
6
5
  require "dude/commands"
7
6
  require "dude/git"
8
- require "dude/project_management/trello"
9
- require "dude/project_management/jira"
10
- require "dude/time_trackers/toggl"
11
7
 
12
8
  module Dude
13
9
  class ToBeImplementedError < StandardError; end
@@ -1,4 +1,3 @@
1
- # require 'forwardable'
2
1
  require 'dude/project_management/jira/client'
3
2
 
4
3
  module Dude
@@ -1,3 +1,5 @@
1
+ require 'faraday'
2
+
1
3
  module Dude
2
4
  module Toggl
3
5
  class Base
data/lib/dude/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dude
2
- VERSION = "2.0.1"
2
+ VERSION = "2.0.6"
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dude-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Pupko
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-10 00:00:00.000000000 Z
11
+ date: 2021-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.6'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.6'
27
27
  - !ruby/object:Gem::Dependency
@@ -80,6 +80,34 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.14.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: rake
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '13.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '13.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '3.0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '3.0'
83
111
  description: This program helps to combine such services as Jira, Toggl and git and
84
112
  replace most routine activities with one simple CLI utility.
85
113
  email:
@@ -123,12 +151,6 @@ files:
123
151
  - lib/dude/project_management/jira/get_current_tasks.rb
124
152
  - lib/dude/project_management/jira/get_task_name_by_id.rb
125
153
  - lib/dude/project_management/jira/move_task_to_list.rb
126
- - lib/dude/project_management/trello.rb
127
- - lib/dude/project_management/trello/checkout.rb
128
- - lib/dude/project_management/trello/client.rb
129
- - lib/dude/project_management/trello/get_current_tasks.rb
130
- - lib/dude/project_management/trello/get_lists.rb
131
- - lib/dude/project_management/trello/move_tasks_to_list.rb
132
154
  - lib/dude/settings.rb
133
155
  - lib/dude/time_trackers/toggl.rb
134
156
  - lib/dude/time_trackers/toggl/base.rb
@@ -136,12 +158,13 @@ files:
136
158
  - lib/dude/time_trackers/toggl/stop_time_entry.rb
137
159
  - lib/dude/version.rb
138
160
  homepage: https://github.com/npupko/dude
139
- licenses: []
161
+ licenses:
162
+ - MIT
140
163
  metadata:
141
164
  homepage_uri: https://github.com/npupko/dude
142
165
  source_code_uri: https://github.com/npupko/dude
143
166
  changelog_uri: https://github.com/npupko/dude/blob/master/CHANGELOG.md
144
- post_install_message:
167
+ post_install_message:
145
168
  rdoc_options: []
146
169
  require_paths:
147
170
  - lib
@@ -157,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
180
  version: '0'
158
181
  requirements: []
159
182
  rubygems_version: 3.1.4
160
- signing_key:
183
+ signing_key:
161
184
  specification_version: 4
162
185
  summary: A daily assistant in the hard work of a programmer.
163
186
  test_files: []
@@ -1,6 +0,0 @@
1
- require_relative './trello/client'
2
-
3
- module ProjectsManagement
4
- module Trello
5
- end
6
- end
@@ -1,4 +0,0 @@
1
- # TODO
2
- response = client.get("/1/boards/#{BOARD_ID}/cards/#{id}")
3
- extracted_branch_name = JSON.parse(response.body).dig('url').rpartition('/').last
4
- Git::Checkout.new.call(extracted_branch_name)
@@ -1,33 +0,0 @@
1
- # TODO
2
-
3
- require 'faraday'
4
- require 'json'
5
-
6
- module Dude
7
- module Trello
8
- class Client
9
- private
10
-
11
- def faraday_client
12
- @faraday_client ||= Faraday.new('https://api.trello.com/', {
13
- params: {
14
- key: "62b20e9eeab2d6e06145c69178521225",
15
- token: "6285fc2d2ff6100a5c341838d0e4acfed3601ae503beb973ddccf1cfab088537"
16
- }
17
- })
18
- end
19
-
20
- def method_missing(method, *args, &block)
21
- faraday_client.send(method, *args, &block)
22
- end
23
-
24
- def get_current_tasks
25
- GetCurrentTasks.new(client).call
26
- end
27
-
28
- def move_task_to_list(id, list)
29
- MoveTasksToList.new(client, id: id, list_name: list).call
30
- end
31
- end
32
- end
33
- end
@@ -1,24 +0,0 @@
1
- # TODO
2
- module Dude
3
- module ProjectManagement
4
- module Trello
5
- class GetCurrentTasks
6
-
7
- def initialize
8
- client = Trello::Client.new
9
-
10
- response = client.get("/1/lists/#{TODO_LIST_ID}/cards", { fields: 'name,idShort' })
11
-
12
- body = JSON.parse(response.body)
13
-
14
- puts "To Do list\n".green.bold
15
-
16
- body.map do |issue|
17
- binding.pry
18
- Entities::Issue.new(id: card['idShort'], title: card['name'], description: issue.description, status: issue.status.name)
19
- end
20
- end
21
- end
22
- end
23
- end
24
- end
@@ -1,15 +0,0 @@
1
- # TODO
2
- module Dude
3
- module Trello
4
- class GetLists < Dry::CLI::Command
5
- desc "Get board lists"
6
-
7
- def call
8
- client = Trello::Client.new
9
- response = client.get "/1/boards/#{BOARD_ID}/lists"
10
- body = JSON.parse(response.body)
11
- puts body
12
- end
13
- end
14
- end
15
- end
@@ -1,14 +0,0 @@
1
- # TODO
2
- module Dude
3
- module Trello
4
- class MoveTasksToList < Dry::CLI::Command
5
- desc "Get board lists"
6
-
7
- def call
8
- # response = client.get("/1/boards/#{BOARD_ID}/cards/#{id}", { fields: 'id' })
9
- # card_id = JSON.parse(response.body).dig('id')
10
- # client.put("/1/cards/#{card_id}", { idList: selected_list(list) })
11
- end
12
- end
13
- end
14
- end