crab 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +12 -12
- data/bin/crab-help +9 -13
- data/bin/crab-iteration +18 -0
- data/bin/crab-iteration-help +11 -0
- data/bin/crab-login +2 -2
- data/bin/crab-logout +18 -0
- data/bin/crab-project +1 -1
- data/bin/{crab-tc → crab-release} +4 -4
- data/bin/crab-release-help +11 -0
- data/bin/crab-story +18 -0
- data/bin/{crab-add → crab-story-add} +2 -2
- data/bin/{crab-change → crab-story-change} +4 -4
- data/bin/{crab-new → crab-story-create} +2 -2
- data/bin/{crab-remove → crab-story-del} +3 -3
- data/bin/{crab-delete → crab-story-delete} +3 -3
- data/bin/{crab-find → crab-story-find} +2 -2
- data/bin/crab-story-help +11 -0
- data/bin/{crab-ls → crab-story-list} +2 -2
- data/bin/{crab-list → crab-story-ls} +2 -2
- data/bin/{crab-move → crab-story-move} +2 -2
- data/bin/{crab-mv → crab-story-mv} +2 -2
- data/bin/{crab-create → crab-story-new} +2 -2
- data/bin/{crab-pull → crab-story-pull} +2 -2
- data/bin/{crab-rename → crab-story-ren} +2 -2
- data/bin/crab-story-rename +27 -0
- data/bin/{crab-rm → crab-story-rm} +3 -3
- data/bin/{crab-show → crab-story-show} +2 -2
- data/bin/{crab-up → crab-story-up} +4 -4
- data/bin/{crab-update → crab-story-update} +4 -4
- data/bin/crab-testcase +1 -1
- data/bin/crab-testcase-add +5 -1
- data/bin/crab-testcase-change +18 -0
- data/bin/crab-testcase-create +5 -1
- data/bin/crab-testcase-del +18 -0
- data/bin/crab-testcase-delete +5 -1
- data/bin/crab-testcase-find +10 -0
- data/bin/crab-testcase-help +11 -5
- data/bin/crab-testcase-list +1 -1
- data/bin/crab-testcase-ls +6 -21
- data/bin/crab-testcase-new +5 -1
- data/bin/crab-testcase-rm +5 -1
- data/bin/crab-testcase-show +1 -1
- data/bin/crab-testcase-up +18 -0
- data/bin/crab-testcase-update +5 -1
- data/features/find-text-in-stories.feature +3 -3
- data/features/login-and-out-of-rally.feature +1 -2
- data/features/move-in-rally.feature +2 -2
- data/features/pull-from-rally-into-cucumber.feature +4 -4
- data/features/show-from-rally.feature +3 -3
- data/features/steps/rally_steps.rb +45 -59
- data/features/subcommand-help.feature +28 -89
- data/features/update-story-in-rally.feature +8 -8
- data/lib/crab/rally.rb +4 -4
- data/lib/crab/version.rb +1 -1
- metadata +62 -42
- data/bin/crab-del +0 -21
@@ -9,98 +9,37 @@ Feature: Subcommand Help
|
|
9
9
|
When I run `crab`
|
10
10
|
Then I should see a usage screen
|
11
11
|
|
12
|
-
Scenario: Help
|
13
|
-
When I run `crab -h`
|
14
|
-
Then the output should contain "create Create a new story in Rally"
|
15
|
-
And the output should contain "delete Delete an existing story in Rally"
|
16
|
-
And the output should contain "find Find stories by text in name, description or notes"
|
17
|
-
And the output should contain "login Persistently authenticate user with Rally"
|
18
|
-
And the output should contain "move Move a story from one status to the next (or previous)"
|
19
|
-
And the output should contain "project Persistently select project to work with in Rally"
|
20
|
-
And the output should contain "pull Downloads stories (and its test cases) as Cucumber feature files"
|
21
|
-
And the output should contain "show Show a story (and its test cases) as a Cucumber feature"
|
22
|
-
And the output should contain "testcase Manage test cases in a story (add, update, delete)"
|
23
|
-
And the output should contain "update Update a story (name, estimate, etc)"
|
24
|
-
|
25
12
|
Scenario: Bogus Subcommand
|
26
13
|
When I run `crab bogus`
|
27
14
|
Then I should see a usage screen
|
28
15
|
|
29
|
-
Scenario:
|
30
|
-
When I run `crab
|
31
|
-
Then the output should contain
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
Usage: crab
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
Usage: crab
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
Usage: crab
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
When I run `crab delete --help`
|
58
|
-
Then the output should contain:
|
59
|
-
"""
|
60
|
-
crab delete: delete an existing story in Rally
|
61
|
-
|
62
|
-
Usage: crab delete story [options]
|
63
|
-
"""
|
64
|
-
|
65
|
-
Scenario: Testcase Subcommand
|
66
|
-
When I run `crab testcase --help`
|
67
|
-
Then the output should contain "crab testcase: manage test cases in a story (add, update, delete)"
|
68
|
-
And the output should contain "Usage: crab testcase add story name [options]"
|
69
|
-
And the output should contain "crab testcase update testcase [options]"
|
70
|
-
And the output should contain "crab testcase delete testcase [options]"
|
71
|
-
|
72
|
-
Scenario: Update Subcommand
|
73
|
-
When I run `crab update --help`
|
74
|
-
Then the output should contain:
|
75
|
-
"""
|
76
|
-
crab update: update a story in Rally
|
77
|
-
|
78
|
-
Usage: crab update story [options]
|
79
|
-
"""
|
80
|
-
|
81
|
-
Scenario: Update Needs a Story Number
|
82
|
-
When I run `crab update`
|
83
|
-
Then the output should contain "Error: No story given."
|
84
|
-
|
85
|
-
Scenario: Update Needs At Least One Switch
|
86
|
-
When I run `crab update US4988`
|
87
|
-
Then the output should contain "Error: Nothing to update. Please provide some options."
|
88
|
-
|
89
|
-
Scenario: Find Subcommand
|
90
|
-
When I run `crab find --help`
|
91
|
-
Then the output should contain:
|
92
|
-
"""
|
93
|
-
crab find: find a story in Rally
|
94
|
-
|
95
|
-
Usage: crab find [options] [text]
|
96
|
-
"""
|
97
|
-
|
98
|
-
Scenario: Move Subcommand
|
99
|
-
When I run `crab move --help`
|
100
|
-
Then the output should contain:
|
101
|
-
"""
|
102
|
-
crab move: move a story from one status to the next (or previous)
|
16
|
+
Scenario Outline: Subcommands And Help Text
|
17
|
+
When I run `crab <Command> --help`
|
18
|
+
Then the output should contain "<Output>"
|
19
|
+
|
20
|
+
Examples:
|
21
|
+
| Command | Output |
|
22
|
+
| help | Usage: crab <command> [options*] |
|
23
|
+
| iteration | Usage: crab iteration <command> [options*] |
|
24
|
+
| login | Usage: crab login [options*] |
|
25
|
+
| project | Usage: crab project [name] [options*] |
|
26
|
+
| release | Usage: crab release <command> [options*] |
|
27
|
+
| story | Usage: crab story <command> [options*] |
|
28
|
+
| testcase | Usage: crab testcase <command> [options*] |
|
29
|
+
| story create | Usage: crab story create <name> [options*] |
|
30
|
+
| story update | Usage: crab story update <id> [options*] |
|
31
|
+
| story delete | Usage: crab story delete <id> [options*] |
|
32
|
+
| story find | Usage: crab story find [options*] [text] |
|
33
|
+
| story move | Usage: crab story move <id> [options*] |
|
34
|
+
| story pull | Usage: crab story pull <id> [id*] [options*] |
|
35
|
+
| story rename | Usage: crab story rename <id> <name> [options*] |
|
36
|
+
| story show | Usage: crab story show <id> [options*] |
|
37
|
+
| story help | Usage: crab story <command> [options*] |
|
38
|
+
| testcase create | Usage: crab testcase create <story> <name> [options*] |
|
39
|
+
| testcase update | Usage: crab testcase update <id> [options*] |
|
40
|
+
| testcase delete | Usage: crab testcase delete <id> [options*] |
|
41
|
+
| testcase find | Usage: crab testcase find <story> [options*] |
|
42
|
+
| testcase show | Usage: crab testcase show <id> [options*] |
|
43
|
+
| testcase help | Usage: crab testcase <command> [options*] |
|
103
44
|
|
104
|
-
Usage: crab move story [options]
|
105
|
-
"""
|
106
45
|
|
@@ -1,33 +1,33 @@
|
|
1
1
|
Feature: Update Story in Rally
|
2
|
-
|
2
|
+
|
3
3
|
In order to change a story's fields in Rally
|
4
4
|
A developer who doesn't want to open a browser or click on things
|
5
5
|
Wants to update those fields from the command line
|
6
6
|
|
7
|
-
Background:
|
7
|
+
Background:
|
8
8
|
Given I am logged in
|
9
9
|
|
10
10
|
Scenario: Update Name
|
11
|
-
When I run `crab update US4988 --name "Sample Crab Story"`
|
11
|
+
When I run `crab story update US4988 --name "Sample Crab Story"`
|
12
12
|
Then the output should contain "US4988: Sample Crab Story (grooming)"
|
13
13
|
|
14
14
|
Scenario: Block and Unblock
|
15
|
-
When I run `crab update US4988 --blocked`
|
15
|
+
When I run `crab story update US4988 --blocked`
|
16
16
|
Then the output should contain "US4988: Sample Crab Story (grooming)"
|
17
17
|
And the story US4988 should be blocked
|
18
|
-
When I run `crab update US4988 --unblocked`
|
18
|
+
When I run `crab story update US4988 --unblocked`
|
19
19
|
Then the output should contain "US4988: Sample Crab Story (grooming)"
|
20
20
|
And the story US4988 should be unblocked
|
21
21
|
|
22
22
|
Scenario: Setting Iteration
|
23
|
-
When I run `crab update US4988 --iteration "Iteration 0"`
|
23
|
+
When I run `crab story update US4988 --iteration "Iteration 0"`
|
24
24
|
Then the story US4988 should be in iteration "Iteration 0"
|
25
25
|
|
26
26
|
Scenario: Setting Release
|
27
|
-
When I run `crab update US4988 --release "Beta release"`
|
27
|
+
When I run `crab story update US4988 --release "Beta release"`
|
28
28
|
Then the story US4988 should be in release "Beta release"
|
29
29
|
|
30
30
|
Scenario: Setting Parent
|
31
|
-
When I run `crab update US4988 --parent US5000`
|
31
|
+
When I run `crab story update US4988 --parent US5000`
|
32
32
|
Then the story US4988 should have US5000 as its parent
|
33
33
|
|
data/lib/crab/rally.rb
CHANGED
@@ -52,12 +52,12 @@ module Crab
|
|
52
52
|
@rally.find(:project, :fetch => true) { equal :name, name }.first
|
53
53
|
end
|
54
54
|
|
55
|
-
def find_iteration_by_name(name)
|
56
|
-
@rally.find(:iteration) { equal :name, name }.first
|
55
|
+
def find_iteration_by_name(name, project)
|
56
|
+
@rally.find(:iteration, :project => project) { equal :name, name }.first
|
57
57
|
end
|
58
58
|
|
59
|
-
def find_release_by_name(name)
|
60
|
-
@rally.find(:release) { equal :name, name }.first
|
59
|
+
def find_release_by_name(name, project)
|
60
|
+
@rally.find(:release, :project => project) { equal :name, name }.first
|
61
61
|
end
|
62
62
|
|
63
63
|
def create_story(opts)
|
data/lib/crab/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crab
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 3
|
10
|
+
version: 0.2.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Carlos Villela
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-30 00:00:00 -03:00
|
19
19
|
default_executable: crab
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -149,40 +149,50 @@ email:
|
|
149
149
|
- cvillela@thoughtworks.com
|
150
150
|
executables:
|
151
151
|
- crab
|
152
|
-
- crab-add
|
153
|
-
- crab-change
|
154
|
-
- crab-create
|
155
|
-
- crab-del
|
156
|
-
- crab-delete
|
157
|
-
- crab-find
|
158
152
|
- crab-help
|
159
|
-
- crab-
|
153
|
+
- crab-iteration
|
154
|
+
- crab-iteration-help
|
160
155
|
- crab-login
|
161
|
-
- crab-
|
162
|
-
- crab-move
|
163
|
-
- crab-mv
|
164
|
-
- crab-new
|
156
|
+
- crab-logout
|
165
157
|
- crab-project
|
166
|
-
- crab-
|
167
|
-
- crab-
|
168
|
-
- crab-
|
169
|
-
- crab-
|
170
|
-
- crab-
|
171
|
-
- crab-
|
158
|
+
- crab-release
|
159
|
+
- crab-release-help
|
160
|
+
- crab-story
|
161
|
+
- crab-story-add
|
162
|
+
- crab-story-change
|
163
|
+
- crab-story-create
|
164
|
+
- crab-story-del
|
165
|
+
- crab-story-delete
|
166
|
+
- crab-story-find
|
167
|
+
- crab-story-help
|
168
|
+
- crab-story-list
|
169
|
+
- crab-story-ls
|
170
|
+
- crab-story-move
|
171
|
+
- crab-story-mv
|
172
|
+
- crab-story-new
|
173
|
+
- crab-story-pull
|
174
|
+
- crab-story-ren
|
175
|
+
- crab-story-rename
|
176
|
+
- crab-story-rm
|
177
|
+
- crab-story-show
|
178
|
+
- crab-story-up
|
179
|
+
- crab-story-update
|
172
180
|
- crab-testcase
|
173
181
|
- crab-testcase-add
|
182
|
+
- crab-testcase-change
|
174
183
|
- crab-testcase-create
|
184
|
+
- crab-testcase-del
|
175
185
|
- crab-testcase-delete
|
186
|
+
- crab-testcase-find
|
176
187
|
- crab-testcase-help
|
177
188
|
- crab-testcase-list
|
178
189
|
- crab-testcase-ls
|
179
190
|
- crab-testcase-new
|
180
191
|
- crab-testcase-rm
|
181
192
|
- crab-testcase-show
|
193
|
+
- crab-testcase-up
|
182
194
|
- crab-testcase-update
|
183
195
|
- crab-truncate
|
184
|
-
- crab-up
|
185
|
-
- crab-update
|
186
196
|
- crab-version
|
187
197
|
extensions: []
|
188
198
|
|
@@ -195,40 +205,50 @@ files:
|
|
195
205
|
- README.md
|
196
206
|
- Rakefile
|
197
207
|
- bin/crab
|
198
|
-
- bin/crab-add
|
199
|
-
- bin/crab-change
|
200
|
-
- bin/crab-create
|
201
|
-
- bin/crab-del
|
202
|
-
- bin/crab-delete
|
203
|
-
- bin/crab-find
|
204
208
|
- bin/crab-help
|
205
|
-
- bin/crab-
|
209
|
+
- bin/crab-iteration
|
210
|
+
- bin/crab-iteration-help
|
206
211
|
- bin/crab-login
|
207
|
-
- bin/crab-
|
208
|
-
- bin/crab-move
|
209
|
-
- bin/crab-mv
|
210
|
-
- bin/crab-new
|
212
|
+
- bin/crab-logout
|
211
213
|
- bin/crab-project
|
212
|
-
- bin/crab-
|
213
|
-
- bin/crab-
|
214
|
-
- bin/crab-
|
215
|
-
- bin/crab-
|
216
|
-
- bin/crab-
|
217
|
-
- bin/crab-
|
214
|
+
- bin/crab-release
|
215
|
+
- bin/crab-release-help
|
216
|
+
- bin/crab-story
|
217
|
+
- bin/crab-story-add
|
218
|
+
- bin/crab-story-change
|
219
|
+
- bin/crab-story-create
|
220
|
+
- bin/crab-story-del
|
221
|
+
- bin/crab-story-delete
|
222
|
+
- bin/crab-story-find
|
223
|
+
- bin/crab-story-help
|
224
|
+
- bin/crab-story-list
|
225
|
+
- bin/crab-story-ls
|
226
|
+
- bin/crab-story-move
|
227
|
+
- bin/crab-story-mv
|
228
|
+
- bin/crab-story-new
|
229
|
+
- bin/crab-story-pull
|
230
|
+
- bin/crab-story-ren
|
231
|
+
- bin/crab-story-rename
|
232
|
+
- bin/crab-story-rm
|
233
|
+
- bin/crab-story-show
|
234
|
+
- bin/crab-story-up
|
235
|
+
- bin/crab-story-update
|
218
236
|
- bin/crab-testcase
|
219
237
|
- bin/crab-testcase-add
|
238
|
+
- bin/crab-testcase-change
|
220
239
|
- bin/crab-testcase-create
|
240
|
+
- bin/crab-testcase-del
|
221
241
|
- bin/crab-testcase-delete
|
242
|
+
- bin/crab-testcase-find
|
222
243
|
- bin/crab-testcase-help
|
223
244
|
- bin/crab-testcase-list
|
224
245
|
- bin/crab-testcase-ls
|
225
246
|
- bin/crab-testcase-new
|
226
247
|
- bin/crab-testcase-rm
|
227
248
|
- bin/crab-testcase-show
|
249
|
+
- bin/crab-testcase-up
|
228
250
|
- bin/crab-testcase-update
|
229
251
|
- bin/crab-truncate
|
230
|
-
- bin/crab-up
|
231
|
-
- bin/crab-update
|
232
252
|
- bin/crab-version
|
233
253
|
- crab.gemspec
|
234
254
|
- features/create-and-delete-story.feature
|
data/bin/crab-del
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
# vim: set ft=ruby :
|
2
|
-
require 'crab'
|
3
|
-
|
4
|
-
opts = Trollop::options do
|
5
|
-
banner <<-BANNER
|
6
|
-
crab delete: delete an existing story in Rally
|
7
|
-
|
8
|
-
Usage: crab delete story [options]
|
9
|
-
BANNER
|
10
|
-
opt :dry, "Dry-run (don't change anything)", :short => "-D", :default => false
|
11
|
-
end
|
12
|
-
|
13
|
-
id = ARGV.join(" ")
|
14
|
-
Trollop::die "Story ID must be specified" if story_id.blank?
|
15
|
-
|
16
|
-
Crab::Rally.new(opts[:dry]) do |rally|
|
17
|
-
story = rally.find_story_with_id id
|
18
|
-
story.delete
|
19
|
-
|
20
|
-
puts "Story #{id} deleted."
|
21
|
-
end
|