troo 0.0.9 → 0.0.10

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 (137) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/Gemfile.lock +40 -32
  4. data/Guardfile +9 -1
  5. data/README.md +15 -10
  6. data/bin/troo +22 -2
  7. data/config/en.yml +11 -1
  8. data/config/help +16 -0
  9. data/{.trooconf.example → config/trooconf.yml} +4 -2
  10. data/features/add/card.feature +1 -1
  11. data/features/add/comment.feature +1 -1
  12. data/features/add/list.feature +1 -1
  13. data/features/default/board.feature +1 -1
  14. data/features/default/card.feature +1 -1
  15. data/features/default/list.feature +1 -1
  16. data/features/move/card.feature +5 -5
  17. data/features/refresh/board.feature +1 -1
  18. data/features/refresh/card.feature +1 -1
  19. data/features/refresh/list.feature +1 -1
  20. data/features/show/board.feature +11 -3
  21. data/features/show/boards.feature +1 -0
  22. data/features/show/card.feature +7 -7
  23. data/features/show/comment.feature +15 -6
  24. data/features/show/list.feature +3 -1
  25. data/features/status.feature +2 -2
  26. data/features/step_definitions/fabrication_steps.rb +11 -11
  27. data/features/step_definitions/troo_steps.rb +1 -1
  28. data/features/support/cassettes/200_board_by_id.yml +56 -0
  29. data/features/support/cassettes/200_card_by_id.yml +77 -0
  30. data/features/support/cassettes/200_create_board.yml +186 -0
  31. data/features/support/cassettes/200_create_card.yml +86 -0
  32. data/features/support/cassettes/200_create_comment.yml +73 -0
  33. data/features/support/cassettes/200_create_list.yml +53 -0
  34. data/{test/cassettes/list_by_id.yml → features/support/cassettes/200_list_by_id.yml} +6 -6
  35. data/features/support/cassettes/200_move_card_200_board.yml +86 -0
  36. data/features/support/cassettes/200_move_card_200_list.yml +86 -0
  37. data/features/support/cassettes/200_move_card_400_list.yml +46 -0
  38. data/{test/cassettes/lists_by_board_id.yml → features/support/cassettes/400_board_by_id.yml} +10 -10
  39. data/features/support/cassettes/400_card_by_id.yml +46 -0
  40. data/features/support/cassettes/400_create_card.yml +46 -0
  41. data/features/support/cassettes/400_create_comment.yml +46 -0
  42. data/features/support/cassettes/400_create_list.yml +46 -0
  43. data/features/support/cassettes/400_list_by_id.yml +46 -0
  44. data/features/support/cassettes/400_move_card_200_list.yml +46 -0
  45. data/features/support/cassettes/400_move_card_400_board.yml +46 -0
  46. data/features/support/cassettes/boards_all.yml +286 -0
  47. data/features/support/env.rb +1 -2
  48. data/lib/troo/cli/commands/refresh/all.rb +2 -0
  49. data/lib/troo/cli/main.rb +2 -23
  50. data/lib/troo/configuration.rb +5 -0
  51. data/lib/troo/database.rb +29 -0
  52. data/lib/troo/decorators/resource.rb +24 -10
  53. data/lib/troo/helpers/model_helpers.rb +3 -2
  54. data/lib/troo/models/board.rb +1 -1
  55. data/lib/troo/models/card.rb +1 -1
  56. data/lib/troo/models/comment.rb +0 -4
  57. data/lib/troo/models/list.rb +1 -1
  58. data/lib/troo/presentation/formatter.rb +99 -4
  59. data/lib/troo/presentation/template.rb +8 -9
  60. data/lib/troo/presenters/board.rb +24 -26
  61. data/lib/troo/presenters/card.rb +3 -1
  62. data/lib/troo/presenters/list.rb +30 -17
  63. data/lib/troo/presenters/resource.rb +90 -0
  64. data/lib/troo/retrieval/local.rb +5 -1
  65. data/lib/troo/troo.rb +2 -0
  66. data/lib/troo/version.rb +1 -1
  67. data/lib/troo.rb +7 -4
  68. data/test/cassettes/create_board.yml +15 -9
  69. data/test/cassettes/create_card.yml +10 -10
  70. data/test/cassettes/create_comment.yml +9 -9
  71. data/test/cassettes/create_list.yml +5 -5
  72. data/test/cassettes/move_card_board.yml +11 -11
  73. data/test/cassettes/move_card_list.yml +11 -11
  74. data/test/lib/troo/api/endpoints_test.rb +2 -2
  75. data/test/lib/troo/cli/commands/add_test.rb +2 -2
  76. data/test/lib/troo/cli/commands/refresh/all_test.rb +4 -9
  77. data/test/lib/troo/cli/main_test.rb +0 -25
  78. data/test/lib/troo/configuration_test.rb +18 -13
  79. data/test/lib/troo/decorators/member_test.rb +0 -27
  80. data/test/lib/troo/decorators/resource_test.rb +0 -32
  81. data/test/lib/troo/helpers/model_helpers_test.rb +15 -3
  82. data/test/lib/troo/models/board_test.rb +45 -1
  83. data/test/lib/troo/models/card_test.rb +60 -6
  84. data/test/lib/troo/models/comment_test.rb +44 -4
  85. data/test/lib/troo/models/database_test.rb +19 -0
  86. data/test/lib/troo/models/list_test.rb +46 -2
  87. data/test/lib/troo/models/member_test.rb +51 -1
  88. data/test/lib/troo/presentation/formatter_test.rb +54 -2
  89. data/test/lib/troo/presentation/template_test.rb +4 -4
  90. data/test/lib/troo/presenters/board_test.rb +4 -3
  91. data/test/lib/troo/presenters/list_test.rb +3 -3
  92. data/test/lib/troo/presenters/member_test.rb +1 -1
  93. data/test/lib/troo/presenters/resource_test.rb +79 -0
  94. data/test/lib/troo/remote/board_test.rb +5 -8
  95. data/test/lib/troo/remote/card_test.rb +7 -11
  96. data/test/lib/troo/remote/comment_test.rb +10 -14
  97. data/test/lib/troo/remote/list_test.rb +5 -9
  98. data/test/lib/troo/remote/member_test.rb +5 -9
  99. data/test/lib/troo/remote/persistence/card_test.rb +1 -1
  100. data/test/lib/troo/remote/persistence/comment_test.rb +1 -1
  101. data/test/lib/troo/remote/persistence/list_test.rb +1 -1
  102. data/test/lib/troo/remote/persistence/move_card_test.rb +3 -3
  103. data/test/lib/troo/retrieval/local_test.rb +13 -1
  104. data/test/lib/troo/retrieval/remote_test.rb +1 -1
  105. data/test/support/fabrication.rb +12 -12
  106. data/test/support/fake_trello/fake_response.rb +18 -1
  107. data/test/support/fake_trello/server.rb +2 -0
  108. data/test/support/remotes/all_boards.json +103 -4
  109. data/test/support/remotes/{board.json → all_boards_200.json} +13 -13
  110. data/test/support/remotes/board_200.json +140 -0
  111. data/test/support/remotes/board_by_id.json +9 -9
  112. data/test/support/remotes/board_by_id_200.json +75 -0
  113. data/test/support/remotes/card.json +4 -4
  114. data/test/support/remotes/card_200.json +40 -0
  115. data/test/support/remotes/card_by_card_id.json +64 -64
  116. data/test/support/remotes/card_by_card_id_200.json +302 -0
  117. data/test/support/remotes/comment.json +6 -6
  118. data/test/support/remotes/comment_200.json +27 -0
  119. data/test/support/remotes/create_board.json +1 -1
  120. data/test/support/remotes/create_board_200.json +38 -0
  121. data/test/support/remotes/list.json +2 -2
  122. data/test/support/remotes/list_200.json +7 -0
  123. data/test/support/remotes/member.json +4 -4
  124. data/test/support/remotes/member_200.json +50 -0
  125. data/test/test_helper.rb +9 -2
  126. data/troo.gemspec +4 -3
  127. metadata +92 -41
  128. data/test/cassettes/board_by_id.yml +0 -50
  129. data/test/cassettes/boards_all.yml +0 -50
  130. data/test/cassettes/card_by_id.yml +0 -49
  131. data/test/cassettes/cards_by_board_id.yml +0 -49
  132. data/test/cassettes/cards_by_list_id.yml +0 -49
  133. data/test/cassettes/comments_by_board_id.yml +0 -49
  134. data/test/cassettes/comments_by_card_id.yml +0 -49
  135. data/test/cassettes/member_by_id.yml +0 -48
  136. data/test/cassettes/members_by_board_id.yml +0 -48
  137. data/test/lib/troo/decorators/card_test.rb +0 -113
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e562cb940c1670f9685dab12000647ecbce6b8a1
4
- data.tar.gz: 4bb70fcdaac0084038d99e5cff7232b765bc0718
3
+ metadata.gz: 25d9e705a6baae8f54e59d630224178f8752c229
4
+ data.tar.gz: f02c744c0f64a0a18448b0668d6a7803fc47f4c5
5
5
  SHA512:
6
- metadata.gz: 4d136fa04838de005b32223db2dfc78340741edf1df0179b71a3d441aa0c072ef7f656e45fe84e45cbdea6833c4c848452ac8838071a7106d8e520199c9c381d
7
- data.tar.gz: 9b3e03a4587a2d70a1c4885a5f0e5c6660ea35227772541aff74902308ae73eedf28981f6232fe37a5e1124fd540dcfc7b2ec75c48e29c52cbf3752f5e4164ac
6
+ metadata.gz: fdbd5da52500592454d7c5f25cb60259697bba0401a7a78966b0c06332682f0a215098135ef805cda54235676d5f9d01ee27ec44b27e1bcd7409a364dbc8af7d
7
+ data.tar.gz: 700c9f4d5776861fe287b689e5d3b79472c2ac2bbe9863f167d063719da7885d6a71c8fb0c5c793228b82650966405a380dee11b7c0425835f7539e40e17c664
data/.gitignore CHANGED
@@ -14,12 +14,12 @@ rerun.txt
14
14
  spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
- test/support/.trooconf
18
17
  tmp
19
18
 
20
- features/support/fixtures/cassettes/*.yml
21
19
  logs/*.log
22
20
  troo.db
23
21
  tags
24
22
  test/support/fake_trello/my-server.crt
25
23
  test/support/fake_trello/my-server.key
24
+
25
+ test/support/private_remotes/*.json
data/Gemfile.lock CHANGED
@@ -1,67 +1,71 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- troo (0.0.8)
4
+ troo (0.0.9)
5
5
  addressable
6
+ curses (= 1.0.0)
6
7
  dispel
7
8
  json
8
9
  oauth
9
- ohm
10
- ohm-contrib
10
+ ohm (= 1.3.2)
11
+ ohm-contrib (= 1.2)
11
12
  pry
12
13
  pry-nav
13
14
  rest-client
14
15
  term-ansicolor
15
- thor
16
+ thor (= 0.18.1)
16
17
  virtus
17
18
  yajl-ruby
18
19
 
19
20
  GEM
20
21
  remote: https://rubygems.org/
21
22
  specs:
22
- addressable (2.3.5)
23
+ addressable (2.3.6)
23
24
  aruba (0.5.4)
24
25
  childprocess (>= 0.3.6)
25
26
  cucumber (>= 1.1.1)
26
27
  rspec-expectations (>= 2.7.0)
27
28
  ast (1.1.0)
28
- axiom-types (0.0.5)
29
- descendants_tracker (~> 0.0.1)
30
- ice_nine (~> 0.9)
29
+ atomic (1.1.16)
30
+ axiom-types (0.1.1)
31
+ descendants_tracker (~> 0.0.4)
32
+ ice_nine (~> 0.11.0)
33
+ thread_safe (~> 0.3, >= 0.3.1)
31
34
  builder (3.2.2)
32
35
  celluloid (0.15.2)
33
36
  timers (~> 1.1.0)
34
37
  celluloid-io (0.15.0)
35
38
  celluloid (>= 0.15.0)
36
39
  nio4r (>= 0.5.0)
37
- childprocess (0.5.1)
40
+ childprocess (0.5.2)
38
41
  ffi (~> 1.0, >= 1.0.11)
39
42
  coderay (1.1.0)
40
43
  coercible (1.0.0)
41
44
  descendants_tracker (~> 0.0.1)
42
45
  crack (0.4.2)
43
46
  safe_yaml (~> 1.0.0)
44
- cucumber (1.3.11)
47
+ cucumber (1.3.14)
45
48
  builder (>= 2.1.2)
46
49
  diff-lcs (>= 1.1.3)
47
50
  gherkin (~> 2.12)
48
51
  multi_json (>= 1.7.5, < 2.0)
49
- multi_test (>= 0.0.2)
52
+ multi_test (>= 0.1.1)
50
53
  curses (1.0.0)
51
- descendants_tracker (0.0.3)
54
+ descendants_tracker (0.0.4)
55
+ thread_safe (~> 0.3, >= 0.3.1)
52
56
  diff-lcs (1.2.5)
53
57
  dispel (0.0.7)
54
58
  curses
55
59
  docile (1.1.3)
56
60
  equalizer (0.0.9)
57
- fabrication (2.9.8)
61
+ fabrication (2.11.0)
58
62
  ffi (1.9.3)
59
63
  formatador (0.2.4)
60
64
  gherkin (2.12.2)
61
65
  multi_json (~> 1.3)
62
- guard (2.5.1)
66
+ guard (2.6.0)
63
67
  formatador (>= 0.2.4)
64
- listen (~> 2.6)
68
+ listen (~> 2.7)
65
69
  lumberjack (~> 1.0)
66
70
  pry (>= 0.9.12)
67
71
  thor (>= 0.18.1)
@@ -73,20 +77,20 @@ GEM
73
77
  minitest (>= 3.0)
74
78
  ice_nine (0.11.0)
75
79
  json (1.8.1)
76
- listen (2.6.2)
80
+ listen (2.7.1)
77
81
  celluloid (>= 0.15.2)
78
82
  celluloid-io (>= 0.15.0)
79
83
  rb-fsevent (>= 0.9.3)
80
84
  rb-inotify (>= 0.9)
81
- lumberjack (1.0.4)
85
+ lumberjack (1.0.5)
82
86
  metaclass (0.0.4)
83
87
  method_source (0.8.2)
84
- mime-types (2.1)
85
- minitest (5.3.0)
88
+ mime-types (2.2)
89
+ minitest (5.3.1)
86
90
  mocha (1.0.0)
87
91
  metaclass (~> 0.0.1)
88
- multi_json (1.8.4)
89
- multi_test (0.0.3)
92
+ multi_json (1.9.2)
93
+ multi_test (0.1.1)
90
94
  nest (1.1.2)
91
95
  redis
92
96
  nio4r (1.0.0)
@@ -97,7 +101,7 @@ GEM
97
101
  scrivener (~> 0.0.3)
98
102
  ohm-contrib (1.2)
99
103
  ohm (~> 1.2)
100
- parser (2.1.5)
104
+ parser (2.1.7)
101
105
  ast (~> 1.1)
102
106
  slop (~> 3.4, >= 3.4.5)
103
107
  powerpack (0.0.9)
@@ -111,7 +115,7 @@ GEM
111
115
  rack-protection (1.5.2)
112
116
  rack
113
117
  rainbow (2.0.0)
114
- rake (10.1.1)
118
+ rake (10.2.2)
115
119
  rb-fsevent (0.9.4)
116
120
  rb-inotify (0.9.3)
117
121
  ffi (>= 0.5.0)
@@ -120,12 +124,14 @@ GEM
120
124
  mime-types (>= 1.16)
121
125
  rspec-expectations (2.14.5)
122
126
  diff-lcs (>= 1.1.3, < 2.0)
123
- rubocop (0.18.1)
127
+ rubocop (0.19.1)
124
128
  json (>= 1.7.7, < 2)
125
- parser (~> 2.1.3)
129
+ parser (~> 2.1.7)
126
130
  powerpack (~> 0.0.6)
127
131
  rainbow (>= 1.99.1, < 3.0)
132
+ ruby-progressbar (~> 1.4)
128
133
  ruby-prof (0.14.2)
134
+ ruby-progressbar (1.4.2)
129
135
  safe_yaml (1.0.1)
130
136
  scrivener (0.0.3)
131
137
  simplecov (0.8.2)
@@ -137,19 +143,21 @@ GEM
137
143
  rack (~> 1.4)
138
144
  rack-protection (~> 1.4)
139
145
  tilt (~> 1.3, >= 1.3.4)
140
- slop (3.4.7)
146
+ slop (3.5.0)
141
147
  term-ansicolor (1.3.0)
142
148
  tins (~> 1.0)
143
149
  thor (0.18.1)
150
+ thread_safe (0.3.1)
151
+ atomic (>= 1.1.7, < 2)
144
152
  tilt (1.4.1)
145
153
  timers (1.1.0)
146
- tins (1.0.0)
147
- vcr (2.8.0)
148
- virtus (1.0.1)
149
- axiom-types (~> 0.0.5)
154
+ tins (1.0.1)
155
+ vcr (2.9.0)
156
+ virtus (1.0.2)
157
+ axiom-types (~> 0.1)
150
158
  coercible (~> 1.0)
151
- descendants_tracker (~> 0.0.1)
152
- equalizer (~> 0.0.7)
159
+ descendants_tracker (~> 0.0.3)
160
+ equalizer (~> 0.0.9)
153
161
  webmock (1.17.4)
154
162
  addressable (>= 2.2.7)
155
163
  crack (>= 0.3.2)
data/Guardfile CHANGED
@@ -1,4 +1,12 @@
1
- guard :minitest do
1
+ guard 'cucumber' do
2
+ watch(%r{^features/.+\.feature$})
3
+ watch(%r{^features/support/.+$}) { 'features' }
4
+ watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m|
5
+ Dir[File.join("**/#{m[1]}.feature")][0] || 'features'
6
+ end
7
+ end
8
+
9
+ guard :minitest, all_after_pass: true do
2
10
  watch(%r{^test/(.*)_test\.rb})
3
11
  watch(%r{^lib/(.+)\.rb}) do |m|
4
12
  "test/lib/#{m[1]}_test.rb"
data/README.md CHANGED
@@ -76,17 +76,19 @@ Or install it yourself as:
76
76
 
77
77
  You will need user authentication tokens to access your Trello account.
78
78
 
79
- 1) Create your developer key at Trello:
79
+ 1) Sign in to Trello in the normal way.
80
+
81
+ 2) Create your developer key at Trello:
80
82
 
81
83
  https://trello.com/1/appKey/generate
82
84
 
83
- 2) Go to
85
+ 3) Go to:
84
86
 
85
87
  https://trello.com/1/connect?key=your_key_here&name=troo&response_type=token&scope=read,write
86
88
 
87
- 3) Add your authentication tokens to the configuration file `.trooconf` in your home directory. (This file will be created for you the first time you run `troo`)
89
+ 4) Add your authentication tokens to the configuration file `.trooconf` in your home directory. (This file will be created for you the first time you run `troo init`)
88
90
 
89
- 4) Have fun, and tweet me @gavinlaking if you like it.
91
+ 5) Have fun, and tweet me @gavinlaking if you like it.
90
92
 
91
93
  ## Todo
92
94
 
@@ -123,11 +125,14 @@ I've put a simple fake server together so that I'm not hitting the Trello API co
123
125
  sudo ipfw del 100
124
126
  sudo ipfw del 101
125
127
 
126
- ## Contributing
128
+ ## Contribute
127
129
 
128
- 1. Fork it
129
- 2. Create your feature branch (`git checkout -b my-new-feature`)
130
- 3. Commit your changes (`git commit -am 'Add some feature'`)
131
- 4. Push to the branch (`git push origin my-new-feature`)
132
- 5. Create new Pull Request
130
+ 1. Fork it, clone it
131
+ 2. `bundle`
132
+ 3. `rake`
133
+ 4. Create your feature branch (`git checkout -b my-new-feature`)
134
+ 5. Write some tests, write some code, have some fun
135
+ 6. Commit your changes (`git commit -am 'Add some feature'`)
136
+ 7. Push to the branch (`git push origin my-new-feature`)
137
+ 8. Create new Pull Request
133
138
 
data/bin/troo CHANGED
@@ -6,8 +6,28 @@ trap('INT') { exit! }
6
6
  if ARGV.include?('autocomplete')
7
7
  command = ARGV.delete_if { |a| a == 'autocomplete' }
8
8
  %w{add cleanup config default init move refresh
9
- show status version}.find_all { |e| /^#{command}/ =~ e }
10
- .map { |c| puts c }
9
+ show status version}.select { |e| /^#{command}/ =~ e }
10
+ .map { |c| puts c }
11
+ elsif ARGV.include?('init')
12
+ require 'fileutils'
13
+
14
+ source = File.dirname(__FILE__) + '/../config/trooconf.yml'
15
+ destination = Dir.home + '/.trooconf'
16
+
17
+ if File.exist?(destination)
18
+ puts "\nA configuration file already exists in your home " \
19
+ "directory.\n\n"
20
+ else
21
+ print "\nCreating a configuration file in your home directory..."
22
+
23
+ FileUtils.cp(source, destination)
24
+
25
+ sleep 1 # simulate work being done
26
+ print " done.\n\n"
27
+
28
+ help = File.read(File.dirname(__FILE__) + '/../config/help')
29
+ print help
30
+ end
11
31
  elsif ARGV.include?('path')
12
32
  puts File.expand_path File.dirname(__FILE__)
13
33
  else
data/config/en.yml CHANGED
@@ -25,5 +25,15 @@ en:
25
25
  boards: 'Show all the boards with lists.'
26
26
  board: 'Show lists and cards for board <id> (uses default board if <id> not provided).'
27
27
  list: 'Show all cards for list <id> (uses default list if <id> not provided).'
28
- card: 'Show a card <id> including last 3 comments' (uses default card if <id> not provided).'
28
+ card: 'Show a card <id> including last 3 comments (uses default card if <id> not provided).'
29
29
  comments: 'Show all comments for card <id> (uses default card if <id> not provided).'
30
+ success:
31
+ default: "%{name} set as default."
32
+ many_refresh: "Multiple %{resource}s refreshed."
33
+ refresh_all: 'All local data refreshed.'
34
+ refresh: "'%{name}' refreshed."
35
+ failure:
36
+ no_default: "Specify an <id> or use 'troo default %{resource} <id>' to set a default #{type} first."
37
+ not_found: "%{resource} cannot be found."
38
+ not_moved: 'Card could not be moved.'
39
+ refresh_all: 'Cannot refresh all local data.'
data/config/help ADDED
@@ -0,0 +1,16 @@
1
+ Troo: CLI interface for Trello.
2
+
3
+ You will need user authentication tokens to access your Trello
4
+ account.
5
+
6
+ - Sign in to Trello, and then create your developer key by visiting:
7
+ https://trello.com/1/appKey/generate
8
+
9
+ - Go to:
10
+ https://trello.com/1/connect?key=your_key_here&name=troo&response_type=token&scope=read,write
11
+
12
+ - Add your authentication tokens to the configuration file `.trooconf`
13
+ in your home directory. (This file has just been created for you.)
14
+
15
+ - Have fun!
16
+
@@ -1,5 +1,6 @@
1
1
  default:
2
- api_url: http://www.example.com
2
+ name: My Example Configuration
3
+ api_url: https://api.trello.com/1
3
4
  api_key: some_key
4
5
  api_token: some_secret
5
6
  api_oauth_token: some_oauth_token
@@ -8,7 +9,8 @@ default:
8
9
  allow_remote: true
9
10
  logs: true
10
11
  test:
11
- api_url: http://www.example.com
12
+ name: My Example Test Configuration
13
+ api_url: https://api.trello.com/1
12
14
  api_key: some_key
13
15
  api_token: some_secret
14
16
  api_oauth_token: some_oauth_token
@@ -5,7 +5,7 @@ Feature: Adding content to Trello
5
5
  @add
6
6
  Scenario: Add a card
7
7
  Given the Trello API is stubbed with "200_create_card"
8
- When I run `troo add card 200 "My Cucumber Card"`
8
+ When I run `troo add card 20040 "My Cucumber Card"`
9
9
  Then the output should contain:
10
10
  """
11
11
  New card 'My Cucumber Card' created.
@@ -5,7 +5,7 @@ Feature: Adding content to Trello
5
5
  @add
6
6
  Scenario: Add a comment
7
7
  Given the Trello API is stubbed with "200_create_comment"
8
- When I run `troo add comment 200 "My Cucumber Comment"`
8
+ When I run `troo add comment 20020 "My Cucumber Comment"`
9
9
  Then the output should contain:
10
10
  """
11
11
  New comment created.
@@ -5,7 +5,7 @@ Feature: Adding content to Trello
5
5
  @add
6
6
  Scenario: Add a list
7
7
  Given the Trello API is stubbed with "200_create_list"
8
- When I run `troo add list 200 "My Cucumber List"`
8
+ When I run `troo add list 20010 "My Cucumber List"`
9
9
  Then the output should contain:
10
10
  """
11
11
  New list 'My Cucumber List' created.
@@ -3,7 +3,7 @@ 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 200`
6
+ When I run `troo default board 20010`
7
7
  Then the output should contain:
8
8
  """
9
9
  'My Test Board' set as default.
@@ -3,7 +3,7 @@ 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 200`
6
+ When I run `troo default card 20020`
7
7
  Then the output should contain:
8
8
  """
9
9
  'My Test Card' set as default.
@@ -3,7 +3,7 @@ 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 200`
6
+ When I run `troo default list 20040`
7
7
  Then the output should contain:
8
8
  """
9
9
  'My Test List' set as default.
@@ -5,7 +5,7 @@ Feature: Moving a card
5
5
  Given the Trello API is stubbed with "200_move_card_200_list"
6
6
  And a card exists
7
7
  And a list exists
8
- When I run `troo move 200 200`
8
+ When I run `troo move 20020 20040`
9
9
  Then the output should contain:
10
10
  """
11
11
  Card 'My Test Card' moved to 'My Test List'.
@@ -14,7 +14,7 @@ Feature: Moving a card
14
14
  @move
15
15
  Scenario: Cannot move card, card not found
16
16
  Given the Trello API is stubbed with "400_move_card_200_list"
17
- When I run `troo move 400 200`
17
+ When I run `troo move 400 20040`
18
18
  Then the output should contain:
19
19
  """
20
20
  Card cannot be found.
@@ -24,7 +24,7 @@ Feature: Moving a card
24
24
  Scenario: Cannot move card, list not found
25
25
  Given the Trello API is stubbed with "200_move_card_400_list"
26
26
  And a card exists
27
- When I run `troo move 200 400`
27
+ When I run `troo move 20020 400`
28
28
  Then the output should contain:
29
29
  """
30
30
  List cannot be found.
@@ -36,7 +36,7 @@ Feature: Moving a card
36
36
  And a card exists
37
37
  And a list exists
38
38
  And a board exists
39
- When I run `troo move 200 200 200`
39
+ When I run `troo move 20020 20040 20010`
40
40
  Then the output should contain:
41
41
  """
42
42
  Card 'My Test Card' moved to 'My Test List' on 'My Test Board'.
@@ -47,7 +47,7 @@ Feature: Moving a card
47
47
  Given the Trello API is stubbed with "400_move_card_400_board"
48
48
  And a card exists
49
49
  And a list exists
50
- When I run `troo move 200 200 400`
50
+ When I run `troo move 20020 20040 400`
51
51
  Then the output should contain:
52
52
  """
53
53
  Board cannot be found.
@@ -4,7 +4,7 @@ Feature: Refreshing a resource
4
4
  Scenario: Refresh the board with ID
5
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 200`
7
+ When I run `troo refresh board 20010`
8
8
  Then the output should contain "refreshed"
9
9
 
10
10
  @refresh
@@ -4,7 +4,7 @@ Feature: Refreshing a card
4
4
  Scenario: Refresh the card with ID
5
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 200`
7
+ When I run `troo refresh card 20020`
8
8
  Then the output should contain "refreshed"
9
9
 
10
10
  @refresh
@@ -4,7 +4,7 @@ Feature: Refreshing a resource
4
4
  Scenario: Refresh the list with ID
5
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 200`
7
+ When I run `troo refresh list 20040`
8
8
  Then the output should contain "refreshed"
9
9
 
10
10
  @refresh
@@ -3,10 +3,11 @@ 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 200`
6
+ When I run `troo show board 20010`
7
7
  Then the output should contain:
8
8
  """
9
9
  (1) My Test Board
10
+
10
11
  No lists were found.
11
12
  """
12
13
 
@@ -14,7 +15,10 @@ Feature: Showing a board
14
15
  Scenario: Cannot show board; not found
15
16
  Given the Trello API is stubbed with "400_board_by_id"
16
17
  When I run `troo show board 400`
17
- Then the output should contain "Board cannot be found."
18
+ Then the output should contain:
19
+ """
20
+ Board cannot be found.
21
+ """
18
22
 
19
23
  @show
20
24
  Scenario: Showing the default board
@@ -23,10 +27,14 @@ Feature: Showing a board
23
27
  Then the output should contain:
24
28
  """
25
29
  (1) My Default Board *
30
+
26
31
  No lists were found.
27
32
  """
28
33
 
29
34
  @show
30
35
  Scenario: Cannot show; no default board
31
36
  When I run `troo show board`
32
- Then the output should contain "set a default board first"
37
+ Then the output should contain:
38
+ """
39
+ set a default board first
40
+ """
@@ -7,6 +7,7 @@ Feature: Showing all boards
7
7
  Then the output should contain:
8
8
  """
9
9
  (1) My Test Board
10
+
10
11
  No lists were found.
11
12
  """
12
13
 
@@ -3,10 +3,10 @@ Feature: Showing a card
3
3
  @show
4
4
  Scenario: Showing a card with ID
5
5
  Given a card exists
6
- When I run `troo show card 200`
6
+ When I run `troo show card 20020`
7
7
  Then the output should contain:
8
8
  """
9
- (1) My Test Card
9
+ (67) My Test Card
10
10
 
11
11
  Description:
12
12
  some description
@@ -38,7 +38,7 @@ Feature: Showing a card
38
38
  When I run `troo show card`
39
39
  Then the output should contain:
40
40
  """
41
- (1) My Default Card *
41
+ (67) My Default Card *
42
42
 
43
43
  Description:
44
44
  some description
@@ -67,10 +67,10 @@ Feature: Showing a card
67
67
  Scenario: Showing a card with comments
68
68
  Given a card exists
69
69
  Given 2 comments exist
70
- When I run `troo show card 200`
70
+ When I run `troo show card 20020`
71
71
  Then the output should contain:
72
72
  """
73
- (1) My Test Card
73
+ (67) My Test Card
74
74
 
75
75
  Description:
76
76
  some description
@@ -99,10 +99,10 @@ Feature: Showing a card
99
99
  Scenario: Showing a card with many comments
100
100
  Given a card exists
101
101
  Given 5 comments exist
102
- When I run `troo show card 200`
102
+ When I run `troo show card 20020`
103
103
  Then the output should contain:
104
104
  """
105
- (1) My Test Card
105
+ (67) My Test Card
106
106
 
107
107
  Description:
108
108
  some description
@@ -3,7 +3,7 @@ Feature: Showing comments
3
3
  @show
4
4
  Scenario: Showing comments for a card with ID
5
5
  Given a comment exists
6
- When I run `troo show comments 200`
6
+ When I run `troo show comments 20020`
7
7
  Then the output should contain:
8
8
  """
9
9
  My Test Comment
@@ -12,14 +12,20 @@ Feature: Showing comments
12
12
  @show
13
13
  Scenario: Showing comments for a card with ID; no comments
14
14
  Given a card exists
15
- When I run `troo show comments 200`
16
- Then the output should contain "No comments"
15
+ When I run `troo show comments 20020`
16
+ Then the output should contain:
17
+ """
18
+ No comments
19
+ """
17
20
 
18
21
  @show
19
22
  Scenario: Cannot show comments; card not found
20
23
  Given the Trello API is stubbed with "400_card_by_id"
21
24
  When I run `troo show comments 400`
22
- Then the output should contain "Card cannot be found."
25
+ Then the output should contain:
26
+ """
27
+ Card cannot be found.
28
+ """
23
29
 
24
30
  @show
25
31
  Scenario: Showing the comments for the default card
@@ -28,7 +34,7 @@ Feature: Showing comments
28
34
  When I run `troo show comments`
29
35
  Then the output should contain:
30
36
  """
31
- (1) My Default Card *
37
+ (67) My Default Card *
32
38
 
33
39
  @gavinlaking1:
34
40
  My Test Comment
@@ -38,4 +44,7 @@ Feature: Showing comments
38
44
  @show
39
45
  Scenario: Cannot show comments; no default card
40
46
  When I run `troo show comments`
41
- Then the output should contain "set a default card first"
47
+ Then the output should contain:
48
+ """
49
+ set a default card first
50
+ """
@@ -3,12 +3,13 @@ Feature: Showing a list
3
3
  @show
4
4
  Scenario: Showing a list with ID
5
5
  Given a list exists
6
- When I run `troo show list 200`
6
+ When I run `troo show list 20040`
7
7
  Then the output should contain:
8
8
  """
9
9
  (1) My Test Board
10
10
 
11
11
  (1) My Test List
12
+
12
13
  No cards were found.
13
14
  """
14
15
 
@@ -30,6 +31,7 @@ Feature: Showing a list
30
31
  (1) My Test Board
31
32
 
32
33
  (1) My Default List *
34
+
33
35
  No cards were found.
34
36
  """
35
37
 
@@ -23,7 +23,7 @@ Feature: Showing the current status
23
23
  Lists: 1 list found.
24
24
  (1) My Default List *
25
25
  Cards: 1 card found.
26
- (1) My Default Card *
26
+ (67) My Default Card *
27
27
  """
28
28
 
29
29
  @status
@@ -57,4 +57,4 @@ Feature: Showing the current status
57
57
  """
58
58
  Last refreshed:
59
59
  Unknown. Run `troo refresh all`.
60
- """
60
+ """