dude-cli 2.0.4 → 2.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/dude.rb +0 -3
- data/lib/dude/project_management/client.rb +0 -1
- data/lib/dude/time_trackers/toggl/base.rb +2 -0
- data/lib/dude/version.rb +1 -1
- metadata +1 -7
- data/lib/dude/project_management/trello.rb +0 -6
- data/lib/dude/project_management/trello/checkout.rb +0 -4
- data/lib/dude/project_management/trello/client.rb +0 -33
- data/lib/dude/project_management/trello/get_current_tasks.rb +0 -24
- data/lib/dude/project_management/trello/get_lists.rb +0 -15
- data/lib/dude/project_management/trello/move_tasks_to_list.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dd18737ad834d3af86dd3f9175d746dc063698af0ec01bf604d331d85da4a1e
|
4
|
+
data.tar.gz: 10cd3e47d6eac284183dd427d89f49bc6cdf316a215e1773634ce622019f8f71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2cdca860b2d570d9787749043d550a819538436b8b534225e10e446fe7ca5da3c39dad98882c2fd6ac1d85c62d463111e3a58b9a4ca5678c7b0aadac950bcff3
|
7
|
+
data.tar.gz: 0fe924787d2ae6e00f179c515b53951a6768ae7d08e0c277f71672bb560dc166d4c3c99a29493cdc99446f8d670c7a321369275b0ca5fb47c777d4d27b2a539f
|
data/Gemfile.lock
CHANGED
data/lib/dude.rb
CHANGED
@@ -4,9 +4,6 @@ require "dude/settings"
|
|
4
4
|
require "dude/version"
|
5
5
|
require "dude/commands"
|
6
6
|
require "dude/git"
|
7
|
-
require "dude/project_management/trello"
|
8
|
-
require "dude/project_management/jira"
|
9
|
-
require "dude/time_trackers/toggl"
|
10
7
|
|
11
8
|
module Dude
|
12
9
|
class ToBeImplementedError < StandardError; end
|
data/lib/dude/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dude-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Pupko
|
@@ -151,12 +151,6 @@ files:
|
|
151
151
|
- lib/dude/project_management/jira/get_current_tasks.rb
|
152
152
|
- lib/dude/project_management/jira/get_task_name_by_id.rb
|
153
153
|
- lib/dude/project_management/jira/move_task_to_list.rb
|
154
|
-
- lib/dude/project_management/trello.rb
|
155
|
-
- lib/dude/project_management/trello/checkout.rb
|
156
|
-
- lib/dude/project_management/trello/client.rb
|
157
|
-
- lib/dude/project_management/trello/get_current_tasks.rb
|
158
|
-
- lib/dude/project_management/trello/get_lists.rb
|
159
|
-
- lib/dude/project_management/trello/move_tasks_to_list.rb
|
160
154
|
- lib/dude/settings.rb
|
161
155
|
- lib/dude/time_trackers/toggl.rb
|
162
156
|
- lib/dude/time_trackers/toggl/base.rb
|
@@ -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
|