troo 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/Gemfile.lock +40 -32
- data/Guardfile +9 -1
- data/README.md +15 -10
- data/bin/troo +22 -2
- data/config/en.yml +11 -1
- data/config/help +16 -0
- data/{.trooconf.example → config/trooconf.yml} +4 -2
- data/features/add/card.feature +1 -1
- data/features/add/comment.feature +1 -1
- data/features/add/list.feature +1 -1
- data/features/default/board.feature +1 -1
- data/features/default/card.feature +1 -1
- data/features/default/list.feature +1 -1
- data/features/move/card.feature +5 -5
- data/features/refresh/board.feature +1 -1
- data/features/refresh/card.feature +1 -1
- data/features/refresh/list.feature +1 -1
- data/features/show/board.feature +11 -3
- data/features/show/boards.feature +1 -0
- data/features/show/card.feature +7 -7
- data/features/show/comment.feature +15 -6
- data/features/show/list.feature +3 -1
- data/features/status.feature +2 -2
- data/features/step_definitions/fabrication_steps.rb +11 -11
- data/features/step_definitions/troo_steps.rb +1 -1
- data/features/support/cassettes/200_board_by_id.yml +56 -0
- data/features/support/cassettes/200_card_by_id.yml +77 -0
- data/features/support/cassettes/200_create_board.yml +186 -0
- data/features/support/cassettes/200_create_card.yml +86 -0
- data/features/support/cassettes/200_create_comment.yml +73 -0
- data/features/support/cassettes/200_create_list.yml +53 -0
- data/{test/cassettes/list_by_id.yml → features/support/cassettes/200_list_by_id.yml} +6 -6
- data/features/support/cassettes/200_move_card_200_board.yml +86 -0
- data/features/support/cassettes/200_move_card_200_list.yml +86 -0
- data/features/support/cassettes/200_move_card_400_list.yml +46 -0
- data/{test/cassettes/lists_by_board_id.yml → features/support/cassettes/400_board_by_id.yml} +10 -10
- data/features/support/cassettes/400_card_by_id.yml +46 -0
- data/features/support/cassettes/400_create_card.yml +46 -0
- data/features/support/cassettes/400_create_comment.yml +46 -0
- data/features/support/cassettes/400_create_list.yml +46 -0
- data/features/support/cassettes/400_list_by_id.yml +46 -0
- data/features/support/cassettes/400_move_card_200_list.yml +46 -0
- data/features/support/cassettes/400_move_card_400_board.yml +46 -0
- data/features/support/cassettes/boards_all.yml +286 -0
- data/features/support/env.rb +1 -2
- data/lib/troo/cli/commands/refresh/all.rb +2 -0
- data/lib/troo/cli/main.rb +2 -23
- data/lib/troo/configuration.rb +5 -0
- data/lib/troo/database.rb +29 -0
- data/lib/troo/decorators/resource.rb +24 -10
- data/lib/troo/helpers/model_helpers.rb +3 -2
- data/lib/troo/models/board.rb +1 -1
- data/lib/troo/models/card.rb +1 -1
- data/lib/troo/models/comment.rb +0 -4
- data/lib/troo/models/list.rb +1 -1
- data/lib/troo/presentation/formatter.rb +99 -4
- data/lib/troo/presentation/template.rb +8 -9
- data/lib/troo/presenters/board.rb +24 -26
- data/lib/troo/presenters/card.rb +3 -1
- data/lib/troo/presenters/list.rb +30 -17
- data/lib/troo/presenters/resource.rb +90 -0
- data/lib/troo/retrieval/local.rb +5 -1
- data/lib/troo/troo.rb +2 -0
- data/lib/troo/version.rb +1 -1
- data/lib/troo.rb +7 -4
- data/test/cassettes/create_board.yml +15 -9
- data/test/cassettes/create_card.yml +10 -10
- data/test/cassettes/create_comment.yml +9 -9
- data/test/cassettes/create_list.yml +5 -5
- data/test/cassettes/move_card_board.yml +11 -11
- data/test/cassettes/move_card_list.yml +11 -11
- data/test/lib/troo/api/endpoints_test.rb +2 -2
- data/test/lib/troo/cli/commands/add_test.rb +2 -2
- data/test/lib/troo/cli/commands/refresh/all_test.rb +4 -9
- data/test/lib/troo/cli/main_test.rb +0 -25
- data/test/lib/troo/configuration_test.rb +18 -13
- data/test/lib/troo/decorators/member_test.rb +0 -27
- data/test/lib/troo/decorators/resource_test.rb +0 -32
- data/test/lib/troo/helpers/model_helpers_test.rb +15 -3
- data/test/lib/troo/models/board_test.rb +45 -1
- data/test/lib/troo/models/card_test.rb +60 -6
- data/test/lib/troo/models/comment_test.rb +44 -4
- data/test/lib/troo/models/database_test.rb +19 -0
- data/test/lib/troo/models/list_test.rb +46 -2
- data/test/lib/troo/models/member_test.rb +51 -1
- data/test/lib/troo/presentation/formatter_test.rb +54 -2
- data/test/lib/troo/presentation/template_test.rb +4 -4
- data/test/lib/troo/presenters/board_test.rb +4 -3
- data/test/lib/troo/presenters/list_test.rb +3 -3
- data/test/lib/troo/presenters/member_test.rb +1 -1
- data/test/lib/troo/presenters/resource_test.rb +79 -0
- data/test/lib/troo/remote/board_test.rb +5 -8
- data/test/lib/troo/remote/card_test.rb +7 -11
- data/test/lib/troo/remote/comment_test.rb +10 -14
- data/test/lib/troo/remote/list_test.rb +5 -9
- data/test/lib/troo/remote/member_test.rb +5 -9
- data/test/lib/troo/remote/persistence/card_test.rb +1 -1
- data/test/lib/troo/remote/persistence/comment_test.rb +1 -1
- data/test/lib/troo/remote/persistence/list_test.rb +1 -1
- data/test/lib/troo/remote/persistence/move_card_test.rb +3 -3
- data/test/lib/troo/retrieval/local_test.rb +13 -1
- data/test/lib/troo/retrieval/remote_test.rb +1 -1
- data/test/support/fabrication.rb +12 -12
- data/test/support/fake_trello/fake_response.rb +18 -1
- data/test/support/fake_trello/server.rb +2 -0
- data/test/support/remotes/all_boards.json +103 -4
- data/test/support/remotes/{board.json → all_boards_200.json} +13 -13
- data/test/support/remotes/board_200.json +140 -0
- data/test/support/remotes/board_by_id.json +9 -9
- data/test/support/remotes/board_by_id_200.json +75 -0
- data/test/support/remotes/card.json +4 -4
- data/test/support/remotes/card_200.json +40 -0
- data/test/support/remotes/card_by_card_id.json +64 -64
- data/test/support/remotes/card_by_card_id_200.json +302 -0
- data/test/support/remotes/comment.json +6 -6
- data/test/support/remotes/comment_200.json +27 -0
- data/test/support/remotes/create_board.json +1 -1
- data/test/support/remotes/create_board_200.json +38 -0
- data/test/support/remotes/list.json +2 -2
- data/test/support/remotes/list_200.json +7 -0
- data/test/support/remotes/member.json +4 -4
- data/test/support/remotes/member_200.json +50 -0
- data/test/test_helper.rb +9 -2
- data/troo.gemspec +4 -3
- metadata +92 -41
- data/test/cassettes/board_by_id.yml +0 -50
- data/test/cassettes/boards_all.yml +0 -50
- data/test/cassettes/card_by_id.yml +0 -49
- data/test/cassettes/cards_by_board_id.yml +0 -49
- data/test/cassettes/cards_by_list_id.yml +0 -49
- data/test/cassettes/comments_by_board_id.yml +0 -49
- data/test/cassettes/comments_by_card_id.yml +0 -49
- data/test/cassettes/member_by_id.yml +0 -48
- data/test/cassettes/members_by_board_id.yml +0 -48
- 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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25d9e705a6baae8f54e59d630224178f8752c229
|
4
|
+
data.tar.gz: f02c744c0f64a0a18448b0668d6a7803fc47f4c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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
|
-
|
29
|
-
|
30
|
-
|
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.
|
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.
|
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.
|
52
|
+
multi_test (>= 0.1.1)
|
50
53
|
curses (1.0.0)
|
51
|
-
descendants_tracker (0.0.
|
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.
|
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.
|
66
|
+
guard (2.6.0)
|
63
67
|
formatador (>= 0.2.4)
|
64
|
-
listen (~> 2.
|
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.
|
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.
|
85
|
+
lumberjack (1.0.5)
|
82
86
|
metaclass (0.0.4)
|
83
87
|
method_source (0.8.2)
|
84
|
-
mime-types (2.
|
85
|
-
minitest (5.3.
|
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.
|
89
|
-
multi_test (0.
|
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.
|
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.
|
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.
|
127
|
+
rubocop (0.19.1)
|
124
128
|
json (>= 1.7.7, < 2)
|
125
|
-
parser (~> 2.1.
|
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.
|
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.
|
147
|
-
vcr (2.
|
148
|
-
virtus (1.0.
|
149
|
-
axiom-types (~> 0.
|
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.
|
152
|
-
equalizer (~> 0.0.
|
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
|
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)
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
##
|
128
|
+
## Contribute
|
127
129
|
|
128
|
-
1. Fork it
|
129
|
-
2.
|
130
|
-
3.
|
131
|
-
4.
|
132
|
-
5.
|
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}.
|
10
|
-
.map
|
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
|
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
|
-
|
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
|
-
|
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
|
data/features/add/card.feature
CHANGED
@@ -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
|
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
|
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.
|
data/features/add/list.feature
CHANGED
@@ -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
|
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.
|
data/features/move/card.feature
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
7
|
+
When I run `troo refresh list 20040`
|
8
8
|
Then the output should contain "refreshed"
|
9
9
|
|
10
10
|
@refresh
|
data/features/show/board.feature
CHANGED
@@ -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
|
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
|
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
|
37
|
+
Then the output should contain:
|
38
|
+
"""
|
39
|
+
set a default board first
|
40
|
+
"""
|
data/features/show/card.feature
CHANGED
@@ -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
|
6
|
+
When I run `troo show card 20020`
|
7
7
|
Then the output should contain:
|
8
8
|
"""
|
9
|
-
(
|
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
|
-
(
|
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
|
70
|
+
When I run `troo show card 20020`
|
71
71
|
Then the output should contain:
|
72
72
|
"""
|
73
|
-
(
|
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
|
102
|
+
When I run `troo show card 20020`
|
103
103
|
Then the output should contain:
|
104
104
|
"""
|
105
|
-
(
|
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
|
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
|
16
|
-
Then the output should contain
|
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
|
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
|
-
(
|
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
|
47
|
+
Then the output should contain:
|
48
|
+
"""
|
49
|
+
set a default card first
|
50
|
+
"""
|
data/features/show/list.feature
CHANGED
@@ -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
|
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
|
|
data/features/status.feature
CHANGED
@@ -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
|
-
(
|
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
|
+
"""
|