troo 0.0.8 → 0.0.9
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 +4 -4
- data/.gitignore +3 -1
- data/.ruby-version +1 -1
- data/.trooconf.example +18 -0
- data/Gemfile.lock +178 -0
- data/README.md +77 -21
- data/Rakefile +1 -1
- data/bin/completion.bash +10 -0
- data/bin/completion.zsh +10 -0
- data/bin/init.sh +15 -0
- data/bin/troo +12 -3
- data/config/cucumber.yml +3 -3
- data/config/en.yml +29 -0
- data/config/trello_api.yml +19 -0
- data/features/add/board.feature +3 -19
- data/features/add/card.feature +14 -18
- data/features/add/comment.feature +14 -14
- data/features/add/list.feature +11 -14
- data/features/default/board.feature +4 -4
- data/features/default/card.feature +4 -4
- data/features/default/list.feature +4 -4
- data/features/move/card.feature +54 -0
- data/features/refresh/all.feature +8 -4
- data/features/refresh/board.feature +9 -6
- data/features/refresh/card.feature +9 -6
- data/features/refresh/list.feature +9 -6
- data/features/show/board.feature +7 -7
- data/features/show/boards.feature +19 -0
- data/features/show/card.feature +86 -15
- data/features/show/comment.feature +14 -12
- data/features/show/list.feature +19 -14
- data/features/status.feature +27 -13
- data/features/step_definitions/fabrication_steps.rb +43 -8
- data/features/step_definitions/troo_steps.rb +3 -2
- data/features/support/env.rb +1 -0
- data/features/troo.feature +0 -12
- data/lib/troo.rb +32 -29
- data/lib/troo/api/client.rb +117 -0
- data/lib/troo/api/endpoints.rb +39 -0
- data/lib/troo/api/headers.rb +44 -0
- data/lib/troo/api/oauth_settings.rb +36 -0
- data/lib/troo/api/request.rb +37 -0
- data/lib/troo/api/response.rb +31 -0
- data/lib/troo/cli/add.rb +8 -12
- data/lib/troo/cli/commands/add.rb +95 -0
- data/lib/troo/cli/commands/default.rb +44 -0
- data/lib/troo/cli/commands/move/card.rb +95 -0
- data/lib/troo/cli/commands/refresh.rb +80 -0
- data/lib/troo/cli/commands/refresh/all.rb +52 -0
- data/lib/troo/cli/commands/show.rb +56 -0
- data/lib/troo/cli/commands/show/show_boards.rb +36 -0
- data/lib/troo/cli/commands/show/show_comments.rb +54 -0
- data/lib/troo/cli/commands/status.rb +68 -0
- data/lib/troo/cli/default.rb +3 -3
- data/lib/troo/cli/main.rb +60 -9
- data/lib/troo/cli/refresh.rb +4 -4
- data/lib/troo/cli/show.rb +7 -7
- data/lib/troo/cli/thor_fixes.rb +1 -5
- data/lib/troo/configuration.rb +53 -0
- data/lib/troo/debug.rb +18 -0
- data/lib/troo/decorators/member.rb +2 -19
- data/lib/troo/decorators/resource.rb +130 -0
- data/lib/troo/helpers/decorator_helpers.rb +21 -74
- data/lib/troo/helpers/model_helpers.rb +19 -4
- data/lib/troo/helpers/remote_model_helpers.rb +54 -0
- data/lib/troo/models/board.rb +19 -11
- data/lib/troo/models/card.rb +20 -17
- data/lib/troo/models/comment.rb +28 -8
- data/lib/troo/models/list.rb +22 -14
- data/lib/troo/models/member.rb +21 -5
- data/lib/troo/models/refresh.rb +3 -4
- data/lib/troo/persistence/local.rb +63 -0
- data/lib/troo/presentation/formatter.rb +132 -0
- data/lib/troo/presentation/template.rb +0 -4
- data/lib/troo/presenters/board.rb +32 -51
- data/lib/troo/presenters/card.rb +4 -11
- data/lib/troo/presenters/comment.rb +30 -16
- data/lib/troo/presenters/list.rb +25 -21
- data/lib/troo/presenters/member.rb +1 -8
- data/lib/troo/remote/all.rb +16 -0
- data/lib/troo/remote/board.rb +64 -0
- data/lib/troo/remote/card.rb +81 -0
- data/lib/troo/remote/comment.rb +70 -0
- data/lib/troo/remote/comment_data.rb +11 -0
- data/lib/troo/remote/comment_data_board.rb +13 -0
- data/lib/troo/remote/comment_data_card.rb +15 -0
- data/lib/troo/remote/list.rb +49 -0
- data/lib/troo/remote/member.rb +75 -0
- data/lib/troo/remote/persistence/board.rb +57 -0
- data/lib/troo/remote/persistence/card.rb +59 -0
- data/lib/troo/remote/persistence/comment.rb +58 -0
- data/lib/troo/remote/persistence/list.rb +57 -0
- data/lib/troo/remote/persistence/move_card.rb +85 -0
- data/lib/troo/retrieval/local.rb +100 -0
- data/lib/troo/retrieval/remote.rb +91 -0
- data/lib/troo/troo.rb +42 -42
- data/lib/troo/version.rb +1 -1
- data/lib/troo/views/card.erb +8 -10
- data/lib/troo/views/comments.erb +4 -0
- data/test/cassettes/board_by_id.yml +21 -30
- data/test/cassettes/boards_all.yml +22 -90
- data/test/cassettes/card_by_id.yml +49 -0
- data/test/cassettes/cards_by_board_id.yml +22 -90
- data/test/cassettes/cards_by_list_id.yml +22 -87
- data/test/cassettes/comments_by_board_id.yml +22 -95
- data/test/cassettes/comments_by_card_id.yml +22 -87
- data/test/cassettes/create_board.yml +20 -32
- data/test/cassettes/create_card.yml +21 -35
- data/test/cassettes/create_comment.yml +19 -37
- data/test/cassettes/create_list.yml +18 -32
- data/test/cassettes/list_by_id.yml +46 -0
- data/test/cassettes/lists_by_board_id.yml +19 -91
- data/test/cassettes/member_by_id.yml +48 -0
- data/test/cassettes/members_by_board_id.yml +21 -82
- data/test/cassettes/move_card_board.yml +49 -0
- data/test/cassettes/move_card_list.yml +49 -0
- data/test/lib/troo/api/client_test.rb +75 -0
- data/test/lib/troo/api/endpoints_test.rb +48 -0
- data/test/lib/troo/api/headers_test.rb +27 -0
- data/test/lib/troo/api/oauth_settings_test.rb +10 -0
- data/test/lib/troo/api/request_test.rb +63 -0
- data/test/lib/troo/api/response_test.rb +15 -0
- data/test/lib/troo/cli/add_test.rb +113 -0
- data/test/lib/troo/cli/commands/add_test.rb +66 -0
- data/test/lib/troo/cli/commands/default_test.rb +39 -0
- data/test/lib/troo/cli/commands/move/card_test.rb +86 -0
- data/test/lib/troo/cli/commands/refresh/all_test.rb +37 -0
- data/test/lib/troo/cli/commands/refresh_test.rb +59 -0
- data/test/lib/troo/cli/commands/show/show_boards_test.rb +35 -0
- data/test/lib/troo/cli/commands/show/show_comments_test.rb +63 -0
- data/test/lib/troo/cli/commands/show_test.rb +65 -0
- data/test/lib/troo/cli/commands/status_test.rb +48 -0
- data/test/lib/troo/cli/default_test.rb +39 -0
- data/test/lib/troo/cli/main_test.rb +102 -0
- data/test/lib/troo/cli/refresh_test.rb +43 -0
- data/test/lib/troo/cli/show_test.rb +49 -0
- data/test/lib/troo/cli/thor_fixes_test.rb +38 -0
- data/test/lib/troo/configuration_test.rb +43 -0
- data/test/lib/troo/debug_test.rb +25 -0
- data/test/lib/troo/decorators/card_test.rb +105 -229
- data/test/lib/troo/decorators/member_test.rb +20 -35
- data/test/lib/troo/decorators/resource_test.rb +157 -0
- data/test/lib/troo/helpers/decorator_helpers_test.rb +10 -19
- data/test/lib/troo/helpers/model_helpers_test.rb +18 -8
- data/test/lib/troo/helpers/remote_model_helpers_test.rb +68 -0
- data/test/lib/troo/models/behaviours/set_default_test.rb +0 -10
- data/test/lib/troo/models/board_test.rb +2 -2
- data/test/lib/troo/models/card_test.rb +2 -2
- data/test/lib/troo/models/comment_test.rb +6 -2
- data/test/lib/troo/models/list_test.rb +2 -2
- data/test/lib/troo/models/member_test.rb +6 -2
- data/test/lib/troo/persistence/local_test.rb +31 -0
- data/test/lib/troo/presentation/formatter_test.rb +31 -0
- data/test/lib/troo/presentation/sentence_test.rb +0 -12
- data/test/lib/troo/presentation/template_test.rb +1 -14
- data/test/lib/troo/presenters/board_test.rb +17 -36
- data/test/lib/troo/presenters/card_test.rb +1 -31
- data/test/lib/troo/presenters/comment_test.rb +19 -19
- data/test/lib/troo/presenters/list_test.rb +18 -18
- data/test/lib/troo/presenters/member_test.rb +1 -14
- data/test/lib/troo/remote/board_test.rb +66 -0
- data/test/lib/troo/remote/card_test.rb +81 -0
- data/test/lib/troo/remote/comment_data_board.rb +9 -0
- data/test/lib/troo/remote/comment_data_card_test.rb +9 -0
- data/test/lib/troo/remote/comment_data_test.rb +9 -0
- data/test/lib/troo/remote/comment_test.rb +100 -0
- data/test/lib/troo/remote/list_test.rb +67 -0
- data/test/lib/troo/remote/member_test.rb +70 -0
- data/test/lib/troo/remote/persistence/board_test.rb +39 -0
- data/test/lib/troo/remote/persistence/card_test.rb +50 -0
- data/test/lib/troo/remote/persistence/comment_test.rb +45 -0
- data/test/lib/troo/remote/persistence/list_test.rb +45 -0
- data/test/lib/troo/remote/persistence/move_card_test.rb +78 -0
- data/test/lib/troo/retrieval/local_test.rb +192 -0
- data/test/lib/troo/retrieval/remote_test.rb +49 -0
- data/test/support/fabrication.rb +17 -17
- data/test/support/fake_trello/fake_response.rb +38 -0
- data/test/support/fake_trello/server.rb +124 -0
- data/test/support/remotes/all_boards.json +41 -0
- data/test/support/remotes/board.json +140 -0
- data/test/support/remotes/board_by_id.json +75 -0
- data/test/support/remotes/card.json +40 -0
- data/test/support/remotes/card_by_card_id.json +302 -0
- data/test/support/remotes/comment.json +27 -0
- data/test/support/remotes/create_board.json +38 -0
- data/test/support/remotes/list.json +7 -0
- data/test/support/remotes/member.json +50 -0
- data/test/system_test.sh +21 -1
- data/test/test_helper.rb +2 -1
- data/troo.gemspec +28 -20
- metadata +376 -269
- data/configuration.yml.example +0 -7
- data/features/cleanup.feature +0 -13
- data/lib/troo/actions/create_board.rb +0 -46
- data/lib/troo/actions/create_card.rb +0 -44
- data/lib/troo/actions/create_comment.rb +0 -46
- data/lib/troo/actions/create_list.rb +0 -42
- data/lib/troo/actions/move_card.rb +0 -37
- data/lib/troo/adaptors/board.rb +0 -32
- data/lib/troo/adaptors/card.rb +0 -67
- data/lib/troo/adaptors/comment.rb +0 -42
- data/lib/troo/adaptors/list.rb +0 -37
- data/lib/troo/adaptors/member.rb +0 -52
- data/lib/troo/adaptors/resource.rb +0 -17
- data/lib/troo/commands/add/board.rb +0 -26
- data/lib/troo/commands/add/card.rb +0 -33
- data/lib/troo/commands/add/comment.rb +0 -33
- data/lib/troo/commands/add/list.rb +0 -33
- data/lib/troo/commands/add/resource.rb +0 -21
- data/lib/troo/commands/commands.rb +0 -28
- data/lib/troo/commands/default/board.rb +0 -25
- data/lib/troo/commands/default/card.rb +0 -25
- data/lib/troo/commands/default/list.rb +0 -25
- data/lib/troo/commands/default/resource.rb +0 -26
- data/lib/troo/commands/refresh/all.rb +0 -41
- data/lib/troo/commands/refresh/board.rb +0 -28
- data/lib/troo/commands/refresh/card.rb +0 -29
- data/lib/troo/commands/refresh/list.rb +0 -29
- data/lib/troo/commands/refresh/resource.rb +0 -42
- data/lib/troo/commands/show/board.rb +0 -13
- data/lib/troo/commands/show/boards.rb +0 -35
- data/lib/troo/commands/show/card.rb +0 -13
- data/lib/troo/commands/show/comments.rb +0 -21
- data/lib/troo/commands/show/list.rb +0 -13
- data/lib/troo/commands/show/resource.rb +0 -41
- data/lib/troo/commands/status/board.rb +0 -30
- data/lib/troo/commands/status/card.rb +0 -30
- data/lib/troo/commands/status/list.rb +0 -30
- data/lib/troo/commands/status/resource.rb +0 -34
- data/lib/troo/decorators/board.rb +0 -66
- data/lib/troo/decorators/card.rb +0 -105
- data/lib/troo/decorators/comment.rb +0 -36
- data/lib/troo/decorators/list.rb +0 -60
- data/lib/troo/external/board.rb +0 -31
- data/lib/troo/external/card.rb +0 -31
- data/lib/troo/external/comment.rb +0 -27
- data/lib/troo/external/list.rb +0 -27
- data/lib/troo/external/member.rb +0 -27
- data/lib/troo/external/resource.rb +0 -42
- data/lib/troo/helpers/command_helpers.rb +0 -37
- data/lib/troo/models/persistence/board.rb +0 -19
- data/lib/troo/models/persistence/card.rb +0 -19
- data/lib/troo/models/persistence/comment.rb +0 -19
- data/lib/troo/models/persistence/list.rb +0 -19
- data/lib/troo/models/persistence/member.rb +0 -19
- data/lib/troo/models/persistence/resource.rb +0 -50
- data/lib/troo/models/remote/comment.rb +0 -21
- data/lib/troo/models/remote/resource.rb +0 -25
- data/lib/troo/models/retrieval/board.rb +0 -29
- data/lib/troo/models/retrieval/card.rb +0 -33
- data/lib/troo/models/retrieval/comment.rb +0 -25
- data/lib/troo/models/retrieval/list.rb +0 -29
- data/lib/troo/models/retrieval/member.rb +0 -25
- data/lib/troo/models/retrieval/resource.rb +0 -36
- data/lib/troo/views/comment.erb +0 -3
- data/test/cassettes/card_by_card_id.yml +0 -58
- data/test/cassettes/comments_by_list_id.yml +0 -109
- data/test/cassettes/list_by_list_id.yml +0 -56
- data/test/cassettes/member_by_member_id.yml +0 -60
- data/test/cassettes/move_card.yml +0 -61
- data/test/lib/troo/actions/create_board_test.rb +0 -66
- data/test/lib/troo/actions/create_card_test.rb +0 -71
- data/test/lib/troo/actions/create_comment_test.rb +0 -71
- data/test/lib/troo/actions/create_list_test.rb +0 -65
- data/test/lib/troo/actions/move_card_test.rb +0 -54
- data/test/lib/troo/adaptors/board_test.rb +0 -38
- data/test/lib/troo/adaptors/card_test.rb +0 -49
- data/test/lib/troo/adaptors/comment_test.rb +0 -41
- data/test/lib/troo/adaptors/list_test.rb +0 -38
- data/test/lib/troo/adaptors/member_test.rb +0 -44
- data/test/lib/troo/commands/add/board_test.rb +0 -43
- data/test/lib/troo/commands/add/card_test.rb +0 -44
- data/test/lib/troo/commands/add/comment_test.rb +0 -44
- data/test/lib/troo/commands/add/list_test.rb +0 -44
- data/test/lib/troo/commands/add/resource_test.rb +0 -25
- data/test/lib/troo/commands/default/board_test.rb +0 -37
- data/test/lib/troo/commands/default/card_test.rb +0 -37
- data/test/lib/troo/commands/default/list_test.rb +0 -37
- data/test/lib/troo/commands/default/resource_test.rb +0 -20
- data/test/lib/troo/commands/refresh/all_test.rb +0 -39
- data/test/lib/troo/commands/refresh/board_test.rb +0 -62
- data/test/lib/troo/commands/refresh/card_test.rb +0 -62
- data/test/lib/troo/commands/refresh/list_test.rb +0 -62
- data/test/lib/troo/commands/refresh/resource_test.rb +0 -20
- data/test/lib/troo/commands/show/board_test.rb +0 -65
- data/test/lib/troo/commands/show/boards_test.rb +0 -36
- data/test/lib/troo/commands/show/card_test.rb +0 -64
- data/test/lib/troo/commands/show/comments_test.rb +0 -64
- data/test/lib/troo/commands/show/list_test.rb +0 -64
- data/test/lib/troo/commands/show/resource_test.rb +0 -25
- data/test/lib/troo/commands/status/board_test.rb +0 -43
- data/test/lib/troo/commands/status/card_test.rb +0 -43
- data/test/lib/troo/commands/status/list_test.rb +0 -43
- data/test/lib/troo/commands/status/resource_test.rb +0 -19
- data/test/lib/troo/decorators/board_test.rb +0 -129
- data/test/lib/troo/decorators/comment_test.rb +0 -74
- data/test/lib/troo/decorators/list_test.rb +0 -102
- data/test/lib/troo/external/board_test.rb +0 -102
- data/test/lib/troo/external/card_test.rb +0 -131
- data/test/lib/troo/external/comment_test.rb +0 -109
- data/test/lib/troo/external/list_test.rb +0 -94
- data/test/lib/troo/external/member_test.rb +0 -94
- data/test/lib/troo/external/resource_test.rb +0 -25
- data/test/lib/troo/helpers/command_helpers_test.rb +0 -82
- data/test/lib/troo/models/persistence/board_test.rb +0 -62
- data/test/lib/troo/models/persistence/card_test.rb +0 -61
- data/test/lib/troo/models/persistence/comment_test.rb +0 -69
- data/test/lib/troo/models/persistence/list_test.rb +0 -60
- data/test/lib/troo/models/persistence/member_test.rb +0 -60
- data/test/lib/troo/models/remote/comment_test.rb +0 -56
- data/test/lib/troo/models/remote/resource_test.rb +0 -26
- data/test/lib/troo/models/retrieval/board_test.rb +0 -93
- data/test/lib/troo/models/retrieval/card_test.rb +0 -101
- data/test/lib/troo/models/retrieval/comment_test.rb +0 -46
- data/test/lib/troo/models/retrieval/list_test.rb +0 -93
- data/test/lib/troo/models/retrieval/member_test.rb +0 -58
@@ -0,0 +1,19 @@
|
|
1
|
+
version_1:
|
2
|
+
boards_all: '/members/me/boards'
|
3
|
+
board_by_id: '/boards/%{external_id}'
|
4
|
+
card_by_id: '/cards/%{external_id}'
|
5
|
+
list_by_id: '/lists/%{external_id}'
|
6
|
+
member_by_id: '/members/%{external_id}'
|
7
|
+
cards_by_board_id: '/boards/%{external_id}/cards'
|
8
|
+
cards_by_list_id: '/lists/%{external_id}/cards'
|
9
|
+
comments_by_board_id: '/boards/%{external_id}/actions'
|
10
|
+
comments_by_card_id: '/cards/%{external_id}/actions'
|
11
|
+
comments_by_list_id: '/lists/%{external_id}/actions'
|
12
|
+
lists_by_board_id: '/boards/%{external_id}/lists'
|
13
|
+
members_by_board_id: '/boards/%{external_id}/members'
|
14
|
+
create_board: '/boards'
|
15
|
+
create_card: '/cards'
|
16
|
+
create_comment: '/cards/%{external_id}/actions/comments'
|
17
|
+
create_list: '/lists'
|
18
|
+
move_card_list: '/cards/%{external_id}/idList'
|
19
|
+
move_card_board: '/cards/%{external_id}/idBoard'
|
data/features/add/board.feature
CHANGED
@@ -2,25 +2,9 @@ Feature: Adding content to Trello
|
|
2
2
|
|
3
3
|
@add
|
4
4
|
Scenario: Add a board
|
5
|
-
Given the Trello API is stubbed with "
|
6
|
-
When I run `troo add board "
|
5
|
+
Given the Trello API is stubbed with "200_create_board"
|
6
|
+
When I run `troo add board "My Cucumber Board"`
|
7
7
|
Then the output should contain:
|
8
8
|
"""
|
9
|
-
New board '
|
9
|
+
New board 'My Cucumber Board' created.
|
10
10
|
"""
|
11
|
-
|
12
|
-
@pending @failing @add
|
13
|
-
Scenario: Add a board, name not provided
|
14
|
-
Given the Trello API is stubbed with "add_board_interactive_success"
|
15
|
-
When I run `troo add board` interactively
|
16
|
-
And I type "Cuke Add Board Interactive"
|
17
|
-
Then the output should contain:
|
18
|
-
"""
|
19
|
-
New board 'Cuke Add Board Interactive' created.
|
20
|
-
"""
|
21
|
-
|
22
|
-
@pending @failing @add
|
23
|
-
Scenario: Cannot add a board
|
24
|
-
Given the Trello API is stubbed with "add_board_failure"
|
25
|
-
When I run `troo add board "My New Board"`
|
26
|
-
Then the output should contain "Board could not be created."
|
data/features/add/card.feature
CHANGED
@@ -2,33 +2,29 @@ Feature: Adding content to Trello
|
|
2
2
|
Background:
|
3
3
|
Given a list exists
|
4
4
|
|
5
|
-
@
|
5
|
+
@add
|
6
6
|
Scenario: Add a card
|
7
|
-
Given the Trello API is stubbed with "
|
8
|
-
When I run `troo add card
|
7
|
+
Given the Trello API is stubbed with "200_create_card"
|
8
|
+
When I run `troo add card 200 "My Cucumber Card"`
|
9
9
|
Then the output should contain:
|
10
10
|
"""
|
11
|
-
New card 'My Cucumber Card' created
|
11
|
+
New card 'My Cucumber Card' created.
|
12
12
|
"""
|
13
13
|
|
14
14
|
@add
|
15
15
|
Scenario: Add a card, name not provided
|
16
|
-
Given the Trello API is stubbed with "
|
17
|
-
When I run `troo add card
|
18
|
-
Then the output should contain "Card could not be created"
|
19
|
-
|
20
|
-
@pending @failing @add
|
21
|
-
Scenario: Add a card, name not provided
|
22
|
-
Given the Trello API is stubbed with "add_card_interactive_success"
|
23
|
-
When I run `troo --test add card 1`
|
24
|
-
And I type "My New Exciting Card"
|
16
|
+
Given the Trello API is stubbed with "400_create_card"
|
17
|
+
When I run `troo add card 400 ""`
|
25
18
|
Then the output should contain:
|
26
19
|
"""
|
27
|
-
|
20
|
+
Card could not be created.
|
28
21
|
"""
|
29
22
|
|
30
|
-
@
|
23
|
+
@add
|
31
24
|
Scenario: Cannot add a card as list not found
|
32
|
-
Given the Trello API is stubbed with "
|
33
|
-
When I run `troo add card
|
34
|
-
Then the output should contain
|
25
|
+
Given the Trello API is stubbed with "400_create_card"
|
26
|
+
When I run `troo add card 400 "My Cucumber Card"`
|
27
|
+
Then the output should contain:
|
28
|
+
"""
|
29
|
+
Card could not be created.
|
30
|
+
"""
|
@@ -2,20 +2,20 @@ Feature: Adding content to Trello
|
|
2
2
|
Background:
|
3
3
|
Given a card exists
|
4
4
|
|
5
|
-
@
|
5
|
+
@add
|
6
6
|
Scenario: Add a comment
|
7
|
-
Given the Trello API is stubbed with "
|
8
|
-
When I run `troo add comment
|
9
|
-
Then the output should contain
|
7
|
+
Given the Trello API is stubbed with "200_create_comment"
|
8
|
+
When I run `troo add comment 200 "My Cucumber Comment"`
|
9
|
+
Then the output should contain:
|
10
|
+
"""
|
11
|
+
New comment created.
|
12
|
+
"""
|
10
13
|
|
11
|
-
@
|
12
|
-
Scenario: Add a comment, comment not provided
|
13
|
-
Given the Trello API is stubbed with "add_comment_interactive_success"
|
14
|
-
When I run `troo add comment` interactively
|
15
|
-
And I type "My New Exciting Comment"
|
16
|
-
Then the output should contain ""
|
17
|
-
|
18
|
-
@pending @failing @add
|
14
|
+
@add
|
19
15
|
Scenario: Cannot add a comment as card not found
|
20
|
-
|
21
|
-
|
16
|
+
Given the Trello API is stubbed with "400_create_comment"
|
17
|
+
When I run `troo add comment 400 "My Cucumber Comment"`
|
18
|
+
Then the output should contain:
|
19
|
+
"""
|
20
|
+
Comment could not be created.
|
21
|
+
"""
|
data/features/add/list.feature
CHANGED
@@ -2,23 +2,20 @@ Feature: Adding content to Trello
|
|
2
2
|
Background:
|
3
3
|
Given a board exists
|
4
4
|
|
5
|
-
@
|
5
|
+
@add
|
6
6
|
Scenario: Add a list
|
7
|
-
Given the Trello API is stubbed with "
|
8
|
-
When I run `troo add list
|
7
|
+
Given the Trello API is stubbed with "200_create_list"
|
8
|
+
When I run `troo add list 200 "My Cucumber List"`
|
9
9
|
Then the output should contain:
|
10
10
|
"""
|
11
|
-
New list 'My Cucumber
|
11
|
+
New list 'My Cucumber List' created.
|
12
12
|
"""
|
13
13
|
|
14
|
-
@
|
15
|
-
Scenario: Add a list, name not provided
|
16
|
-
Given the Trello API is stubbed with "add_list_interactive_success"
|
17
|
-
When I run `troo add list` interactively
|
18
|
-
And I type "My New Exciting List"
|
19
|
-
Then the output should contain ""
|
20
|
-
|
21
|
-
@pending @failing @add
|
14
|
+
@add
|
22
15
|
Scenario: Cannot add a list as board not found
|
23
|
-
|
24
|
-
|
16
|
+
Given the Trello API is stubbed with "400_create_list"
|
17
|
+
When I run `troo add list 400 "My Cucumber List"`
|
18
|
+
Then the output should contain:
|
19
|
+
"""
|
20
|
+
List could not be created.
|
21
|
+
"""
|
@@ -3,16 +3,16 @@ Feature: Setting a default board
|
|
3
3
|
@default
|
4
4
|
Scenario: Set a board to default
|
5
5
|
Given a board exists
|
6
|
-
When I run `troo default board
|
6
|
+
When I run `troo default board 200`
|
7
7
|
Then the output should contain:
|
8
8
|
"""
|
9
|
-
'My Test Board' set as default
|
9
|
+
'My Test Board' set as default.
|
10
10
|
"""
|
11
11
|
|
12
12
|
@default
|
13
13
|
Scenario: Cannot set a default; not found
|
14
|
-
Given the Trello API is stubbed with "
|
15
|
-
When I run `troo default board
|
14
|
+
Given the Trello API is stubbed with "400_board_by_id"
|
15
|
+
When I run `troo default board 400`
|
16
16
|
Then the output should contain "Board cannot be found."
|
17
17
|
|
18
18
|
@default
|
@@ -3,16 +3,16 @@ Feature: Setting a default card
|
|
3
3
|
@default
|
4
4
|
Scenario: Set a card to default
|
5
5
|
Given a card exists
|
6
|
-
When I run `troo default card
|
6
|
+
When I run `troo default card 200`
|
7
7
|
Then the output should contain:
|
8
8
|
"""
|
9
|
-
'My Test Card' set as default
|
9
|
+
'My Test Card' set as default.
|
10
10
|
"""
|
11
11
|
|
12
12
|
@default
|
13
13
|
Scenario: Cannot set a default; not found
|
14
|
-
Given the Trello API is stubbed with "
|
15
|
-
When I run `troo default card
|
14
|
+
Given the Trello API is stubbed with "400_card_by_id"
|
15
|
+
When I run `troo default card 400`
|
16
16
|
Then the output should contain "Card cannot be found."
|
17
17
|
|
18
18
|
@default
|
@@ -3,16 +3,16 @@ Feature: Setting a default list
|
|
3
3
|
@default
|
4
4
|
Scenario: Set a list to default
|
5
5
|
Given a list exists
|
6
|
-
When I run `troo default list
|
6
|
+
When I run `troo default list 200`
|
7
7
|
Then the output should contain:
|
8
8
|
"""
|
9
|
-
'My Test List' set as default
|
9
|
+
'My Test List' set as default.
|
10
10
|
"""
|
11
11
|
|
12
12
|
@default
|
13
13
|
Scenario: Cannot set a default; not found
|
14
|
-
Given the Trello API is stubbed with "
|
15
|
-
When I run `troo default list
|
14
|
+
Given the Trello API is stubbed with "400_list_by_id"
|
15
|
+
When I run `troo default list 400`
|
16
16
|
Then the output should contain "List cannot be found."
|
17
17
|
|
18
18
|
@default
|
@@ -0,0 +1,54 @@
|
|
1
|
+
Feature: Moving a card
|
2
|
+
|
3
|
+
@move
|
4
|
+
Scenario: Move a card to another list
|
5
|
+
Given the Trello API is stubbed with "200_move_card_200_list"
|
6
|
+
And a card exists
|
7
|
+
And a list exists
|
8
|
+
When I run `troo move 200 200`
|
9
|
+
Then the output should contain:
|
10
|
+
"""
|
11
|
+
Card 'My Test Card' moved to 'My Test List'.
|
12
|
+
"""
|
13
|
+
|
14
|
+
@move
|
15
|
+
Scenario: Cannot move card, card not found
|
16
|
+
Given the Trello API is stubbed with "400_move_card_200_list"
|
17
|
+
When I run `troo move 400 200`
|
18
|
+
Then the output should contain:
|
19
|
+
"""
|
20
|
+
Card cannot be found.
|
21
|
+
"""
|
22
|
+
|
23
|
+
@move
|
24
|
+
Scenario: Cannot move card, list not found
|
25
|
+
Given the Trello API is stubbed with "200_move_card_400_list"
|
26
|
+
And a card exists
|
27
|
+
When I run `troo move 200 400`
|
28
|
+
Then the output should contain:
|
29
|
+
"""
|
30
|
+
List cannot be found.
|
31
|
+
"""
|
32
|
+
|
33
|
+
@move
|
34
|
+
Scenario: Move a card to another list (different board)
|
35
|
+
Given the Trello API is stubbed with "200_move_card_200_board"
|
36
|
+
And a card exists
|
37
|
+
And a list exists
|
38
|
+
And a board exists
|
39
|
+
When I run `troo move 200 200 200`
|
40
|
+
Then the output should contain:
|
41
|
+
"""
|
42
|
+
Card 'My Test Card' moved to 'My Test List' on 'My Test Board'.
|
43
|
+
"""
|
44
|
+
|
45
|
+
@move
|
46
|
+
Scenario: Cannot move card, board not found
|
47
|
+
Given the Trello API is stubbed with "400_move_card_400_board"
|
48
|
+
And a card exists
|
49
|
+
And a list exists
|
50
|
+
When I run `troo move 200 200 400`
|
51
|
+
Then the output should contain:
|
52
|
+
"""
|
53
|
+
Board cannot be found.
|
54
|
+
"""
|
@@ -1,7 +1,11 @@
|
|
1
1
|
Feature: Refreshing all data
|
2
2
|
|
3
|
-
@
|
4
|
-
Scenario:
|
5
|
-
Given the Trello API is stubbed with "
|
3
|
+
@refresh
|
4
|
+
Scenario: Refreshing the local data
|
5
|
+
Given the Trello API is stubbed with "boards_all"
|
6
6
|
When I run `troo refresh all`
|
7
|
-
Then the output should contain
|
7
|
+
Then the output should contain:
|
8
|
+
"""
|
9
|
+
All local data refreshed.
|
10
|
+
"""
|
11
|
+
|
@@ -2,20 +2,20 @@ Feature: Refreshing a resource
|
|
2
2
|
|
3
3
|
@refresh
|
4
4
|
Scenario: Refresh the board with ID
|
5
|
-
Given the Trello API is stubbed with "
|
5
|
+
Given the Trello API is stubbed with "200_board_by_id"
|
6
6
|
And a board exists
|
7
|
-
When I run `troo refresh board
|
7
|
+
When I run `troo refresh board 200`
|
8
8
|
Then the output should contain "refreshed"
|
9
9
|
|
10
10
|
@refresh
|
11
11
|
Scenario: Cannot refresh; board not found
|
12
|
-
Given the Trello API is stubbed with "
|
13
|
-
When I run `troo refresh board
|
12
|
+
Given the Trello API is stubbed with "400_board_by_id"
|
13
|
+
When I run `troo refresh board 400`
|
14
14
|
Then the output should contain "Board cannot be found"
|
15
15
|
|
16
16
|
@refresh
|
17
17
|
Scenario: Refresh the default board
|
18
|
-
Given the Trello API is stubbed with "
|
18
|
+
Given the Trello API is stubbed with "200_board_by_id"
|
19
19
|
And a default board exists
|
20
20
|
When I run `troo refresh board`
|
21
21
|
Then the output should contain "refreshed"
|
@@ -23,4 +23,7 @@ Feature: Refreshing a resource
|
|
23
23
|
@refresh
|
24
24
|
Scenario: Cannot refresh; no default board
|
25
25
|
When I run `troo refresh board`
|
26
|
-
Then the output should contain
|
26
|
+
Then the output should contain:
|
27
|
+
"""
|
28
|
+
Board cannot be found. Specify an <id> or use 'troo default board <id>' to set a default board first.
|
29
|
+
"""
|
@@ -2,20 +2,20 @@ Feature: Refreshing a card
|
|
2
2
|
|
3
3
|
@refresh
|
4
4
|
Scenario: Refresh the card with ID
|
5
|
-
Given the Trello API is stubbed with "
|
5
|
+
Given the Trello API is stubbed with "200_card_by_id"
|
6
6
|
And a card exists
|
7
|
-
When I run `troo refresh card
|
7
|
+
When I run `troo refresh card 200`
|
8
8
|
Then the output should contain "refreshed"
|
9
9
|
|
10
10
|
@refresh
|
11
11
|
Scenario: Cannot refresh; card not found
|
12
|
-
Given the Trello API is stubbed with "
|
13
|
-
When I run `troo refresh card
|
12
|
+
Given the Trello API is stubbed with "400_card_by_id"
|
13
|
+
When I run `troo refresh card 400`
|
14
14
|
Then the output should contain "Card cannot be found"
|
15
15
|
|
16
16
|
@refresh
|
17
17
|
Scenario: Refresh the default card
|
18
|
-
Given the Trello API is stubbed with "
|
18
|
+
Given the Trello API is stubbed with "200_card_by_id"
|
19
19
|
And a default card exists
|
20
20
|
When I run `troo refresh card`
|
21
21
|
Then the output should contain "refreshed"
|
@@ -23,5 +23,8 @@ Feature: Refreshing a card
|
|
23
23
|
@refresh
|
24
24
|
Scenario: Cannot refresh; no default card
|
25
25
|
When I run `troo refresh card`
|
26
|
-
Then the output should contain
|
26
|
+
Then the output should contain:
|
27
|
+
"""
|
28
|
+
Card cannot be found. Specify an <id> or use 'troo default card <id>' to set a default card first.
|
29
|
+
"""
|
27
30
|
|
@@ -2,20 +2,20 @@ Feature: Refreshing a resource
|
|
2
2
|
|
3
3
|
@refresh
|
4
4
|
Scenario: Refresh the list with ID
|
5
|
-
Given the Trello API is stubbed with "
|
5
|
+
Given the Trello API is stubbed with "200_list_by_id"
|
6
6
|
And a list exists
|
7
|
-
When I run `troo refresh list
|
7
|
+
When I run `troo refresh list 200`
|
8
8
|
Then the output should contain "refreshed"
|
9
9
|
|
10
10
|
@refresh
|
11
11
|
Scenario: Cannot refresh; list not found
|
12
|
-
Given the Trello API is stubbed with "
|
13
|
-
When I run `troo refresh list
|
12
|
+
Given the Trello API is stubbed with "400_list_by_id"
|
13
|
+
When I run `troo refresh list 400`
|
14
14
|
Then the output should contain "List cannot be found"
|
15
15
|
|
16
16
|
@refresh
|
17
17
|
Scenario: Refresh the default list
|
18
|
-
Given the Trello API is stubbed with "
|
18
|
+
Given the Trello API is stubbed with "200_list_by_id"
|
19
19
|
And a default list exists
|
20
20
|
When I run `troo refresh list`
|
21
21
|
Then the output should contain "refreshed"
|
@@ -23,5 +23,8 @@ Feature: Refreshing a resource
|
|
23
23
|
@refresh
|
24
24
|
Scenario: Cannot refresh; no default list
|
25
25
|
When I run `troo refresh list`
|
26
|
-
Then the output should contain
|
26
|
+
Then the output should contain:
|
27
|
+
"""
|
28
|
+
List cannot be found. Specify an <id> or use 'troo default list <id>' to set a default list first.
|
29
|
+
"""
|
27
30
|
|
data/features/show/board.feature
CHANGED
@@ -3,17 +3,17 @@ Feature: Showing a board
|
|
3
3
|
@show
|
4
4
|
Scenario: Showing a board with ID
|
5
5
|
Given a board exists
|
6
|
-
When I run `troo show board
|
6
|
+
When I run `troo show board 200`
|
7
7
|
Then the output should contain:
|
8
8
|
"""
|
9
|
-
|
10
|
-
|
9
|
+
(1) My Test Board
|
10
|
+
No lists were found.
|
11
11
|
"""
|
12
12
|
|
13
13
|
@show
|
14
14
|
Scenario: Cannot show board; not found
|
15
|
-
|
16
|
-
When I run `troo show board
|
15
|
+
Given the Trello API is stubbed with "400_board_by_id"
|
16
|
+
When I run `troo show board 400`
|
17
17
|
Then the output should contain "Board cannot be found."
|
18
18
|
|
19
19
|
@show
|
@@ -22,8 +22,8 @@ Feature: Showing a board
|
|
22
22
|
When I run `troo show board`
|
23
23
|
Then the output should contain:
|
24
24
|
"""
|
25
|
-
|
26
|
-
|
25
|
+
(1) My Default Board *
|
26
|
+
No lists were found.
|
27
27
|
"""
|
28
28
|
|
29
29
|
@show
|