abt-cli 0.0.28 → 0.0.29

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dd7a6d58fed695f167581c8c7b16578b1e0f29664319c1b3594235e07bfc179
4
- data.tar.gz: 48e88420bd4e7b7dd2c99ac82cfcc7ada1120637f9f7b08c39fa9abf128ebefe
3
+ metadata.gz: 1fbc512b85932a7c8cfa8e6d9ec10176f3e2ac8711df78ad4ce67100ac79f003
4
+ data.tar.gz: 7dc1c727ced7d316c84075458b75839bd931050e50c9ffe39f925324c6a8e63d
5
5
  SHA512:
6
- metadata.gz: d8e7534007c20d2f16099e453d8d7fdaae042f4f658ef111c4a7d2ec25dee13d9e6c7ed511de57ba14e249c1043129cb540742a5746ee32c6ed51c419470e756
7
- data.tar.gz: 28173fc0ea536fdfd3c787e18abf4ed27818f9a47d4e69bfa2c25c6f5a00ef12e586378dec0be4e21b61cb198e24ab8ba36c1289ccc0b90f0f009d88000ba5e3
6
+ metadata.gz: 74f84e028cf84f156ee18f46177fae4e17f857eb538362daf2baf3b017f1ace428a8b9c16aa912ba0c486fdc13cbf2a41402fa64917fa74ee9578c6e041c6d7b
7
+ data.tar.gz: fe06b4314f9a119950979b7a8c966758a56b4a3619dcabc9328209beaca94f317851bc9dedbc986a955a120afe29da0707225e78896e1517854c24864bba2efc
@@ -28,7 +28,7 @@ module Abt
28
28
  return if flags[:"dry-run"]
29
29
 
30
30
  if config.local_available?
31
- config.path = Path.from_gids(project_gid: project["gid"], task_gid: task["gid"])
31
+ config.path = path
32
32
  else
33
33
  warn("No local configuration to update - will function as dry run")
34
34
  end
@@ -30,7 +30,7 @@ module Abt
30
30
  def call
31
31
  task = select_task
32
32
 
33
- path_with_task = Path.new([path, task["gid"]].join("/"))
33
+ path_with_task = Path.from_gids(project_gid: path.project_gid, task_gid: task["gid"])
34
34
 
35
35
  Result.new(task: task, path: path_with_task)
36
36
  end
@@ -28,7 +28,7 @@ module Abt
28
28
  return if flags[:"dry-run"]
29
29
 
30
30
  if config.local_available?
31
- update_config(work_item)
31
+ config.path = path
32
32
  else
33
33
  warn("No local configuration to update - will function as dry run")
34
34
  end
@@ -41,15 +41,6 @@ module Abt
41
41
  prompt_board! if board_id.nil? || flags[:clean]
42
42
  prompt_work_item!
43
43
  end
44
-
45
- def update_config(work_item)
46
- config.path = Path.from_ids(
47
- organization_name: organization_name,
48
- project_name: project_name,
49
- board_id: board_id,
50
- work_item_id: work_item["id"]
51
- )
52
- end
53
44
  end
54
45
  end
55
46
  end
@@ -29,7 +29,11 @@ module Abt
29
29
  def call
30
30
  board = cli.prompt.choice("Select a project work board", boards)
31
31
 
32
- path_with_board = Path.new([path, board["id"]].join("/"))
32
+ path_with_board = Path.from_ids(
33
+ organization_name: path.organization_name,
34
+ project_name: path.project_name,
35
+ board_id: board["id"]
36
+ )
33
37
 
34
38
  Result.new(board: board, path: path_with_board)
35
39
  end
@@ -30,7 +30,12 @@ module Abt
30
30
  def call
31
31
  work_item = select_work_item
32
32
 
33
- path_with_work_item = Path.new([path, work_item["id"]].join("/"))
33
+ path_with_work_item = Path.from_ids(
34
+ organization_name: path.organization_name,
35
+ project_name: path.project_name,
36
+ board_id: path.board_id,
37
+ work_item_id: work_item["id"]
38
+ )
34
39
 
35
40
  Result.new(work_item: work_item, path: path_with_work_item)
36
41
  end
@@ -32,7 +32,7 @@ module Abt
32
32
  return
33
33
  end
34
34
 
35
- config.path = Path.from_ids(project_id: project["id"], task_id: task["id"])
35
+ config.path = path
36
36
  end
37
37
 
38
38
  private
@@ -29,7 +29,7 @@ module Abt
29
29
  def call
30
30
  task = cli.prompt.choice("Select a task from #{project['name']}", tasks)
31
31
 
32
- path_with_task = Path.new([path, task["id"]].join("/"))
32
+ path_with_task = Path.from_ids(project_id: path.project_id, task_id: task["id"])
33
33
 
34
34
  Result.new(task: task, path: path_with_task)
35
35
  end
data/lib/abt/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Abt
4
- VERSION = "0.0.28"
4
+ VERSION = "0.0.29"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: abt-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.28
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jesper Sørensen